diff --git a/out/cli.cjs b/out/cli.cjs index 78f58f89..9e638681 100755 --- a/out/cli.cjs +++ b/out/cli.cjs @@ -32,6 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/sisteransi/src/index.js var require_src = __commonJS({ @@ -41,16 +42,16 @@ var require_src = __commonJS({ var CSI = `${ESC}[`; var beep = "\x07"; var cursor = { - to(x5, y6) { - if (!y6) return `${CSI}${x5 + 1}G`; - return `${CSI}${y6 + 1};${x5 + 1}H`; + to(x7, y7) { + if (!y7) return `${CSI}${x7 + 1}G`; + return `${CSI}${y7 + 1};${x7 + 1}H`; }, - move(x5, y6) { + move(x7, y7) { let ret = ""; - if (x5 < 0) ret += `${CSI}${-x5}D`; - else if (x5 > 0) ret += `${CSI}${x5}C`; - if (y6 < 0) ret += `${CSI}${-y6}A`; - else if (y6 > 0) ret += `${CSI}${y6}B`; + if (x7 < 0) ret += `${CSI}${-x7}D`; + else if (x7 > 0) ret += `${CSI}${x7}C`; + if (y7 < 0) ret += `${CSI}${-y7}A`; + else if (y7 > 0) ret += `${CSI}${y7}B`; return ret; }, up: (count = 1) => `${CSI}${count}A`, @@ -78,8 +79,8 @@ var require_src = __commonJS({ lineStart: `${CSI}1K`, lines(count) { let clear = ""; - for (let i3 = 0; i3 < count; i3++) - clear += this.line + (i3 < count - 1 ? cursor.up() : ""); + for (let i5 = 0; i5 < count; i5++) + clear += this.line + (i5 < count - 1 ? cursor.up() : ""); if (count) clear += cursor.left; return clear; @@ -92,10 +93,10 @@ var require_src = __commonJS({ // node_modules/picocolors/picocolors.js var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports2, module2) { - var p4 = process || {}; - var argv = p4.argv || []; - var env2 = p4.env || {}; - var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p4.platform === "win32" || (p4.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI); + var p6 = process || {}; + var argv = p6.argv || []; + var env2 = p6.env || {}; + var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p6.platform === "win32" || (p6.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI); var formatter = (open, close, replace = open) => (input) => { let string = "" + input, index = string.indexOf(close, open.length); return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; @@ -110,50 +111,50 @@ var require_picocolors = __commonJS({ return result + string.substring(cursor); }; var createColors = (enabled2 = isColorSupported) => { - let f4 = enabled2 ? formatter : () => String; + let f6 = enabled2 ? formatter : () => String; return { isColorSupported: enabled2, - reset: f4("\x1B[0m", "\x1B[0m"), - bold: f4("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), - dim: f4("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), - italic: f4("\x1B[3m", "\x1B[23m"), - underline: f4("\x1B[4m", "\x1B[24m"), - inverse: f4("\x1B[7m", "\x1B[27m"), - hidden: f4("\x1B[8m", "\x1B[28m"), - strikethrough: f4("\x1B[9m", "\x1B[29m"), - black: f4("\x1B[30m", "\x1B[39m"), - red: f4("\x1B[31m", "\x1B[39m"), - green: f4("\x1B[32m", "\x1B[39m"), - yellow: f4("\x1B[33m", "\x1B[39m"), - blue: f4("\x1B[34m", "\x1B[39m"), - magenta: f4("\x1B[35m", "\x1B[39m"), - cyan: f4("\x1B[36m", "\x1B[39m"), - white: f4("\x1B[37m", "\x1B[39m"), - gray: f4("\x1B[90m", "\x1B[39m"), - bgBlack: f4("\x1B[40m", "\x1B[49m"), - bgRed: f4("\x1B[41m", "\x1B[49m"), - bgGreen: f4("\x1B[42m", "\x1B[49m"), - bgYellow: f4("\x1B[43m", "\x1B[49m"), - bgBlue: f4("\x1B[44m", "\x1B[49m"), - bgMagenta: f4("\x1B[45m", "\x1B[49m"), - bgCyan: f4("\x1B[46m", "\x1B[49m"), - bgWhite: f4("\x1B[47m", "\x1B[49m"), - blackBright: f4("\x1B[90m", "\x1B[39m"), - redBright: f4("\x1B[91m", "\x1B[39m"), - greenBright: f4("\x1B[92m", "\x1B[39m"), - yellowBright: f4("\x1B[93m", "\x1B[39m"), - blueBright: f4("\x1B[94m", "\x1B[39m"), - magentaBright: f4("\x1B[95m", "\x1B[39m"), - cyanBright: f4("\x1B[96m", "\x1B[39m"), - whiteBright: f4("\x1B[97m", "\x1B[39m"), - bgBlackBright: f4("\x1B[100m", "\x1B[49m"), - bgRedBright: f4("\x1B[101m", "\x1B[49m"), - bgGreenBright: f4("\x1B[102m", "\x1B[49m"), - bgYellowBright: f4("\x1B[103m", "\x1B[49m"), - bgBlueBright: f4("\x1B[104m", "\x1B[49m"), - bgMagentaBright: f4("\x1B[105m", "\x1B[49m"), - bgCyanBright: f4("\x1B[106m", "\x1B[49m"), - bgWhiteBright: f4("\x1B[107m", "\x1B[49m") + reset: f6("\x1B[0m", "\x1B[0m"), + bold: f6("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), + dim: f6("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), + italic: f6("\x1B[3m", "\x1B[23m"), + underline: f6("\x1B[4m", "\x1B[24m"), + inverse: f6("\x1B[7m", "\x1B[27m"), + hidden: f6("\x1B[8m", "\x1B[28m"), + strikethrough: f6("\x1B[9m", "\x1B[29m"), + black: f6("\x1B[30m", "\x1B[39m"), + red: f6("\x1B[31m", "\x1B[39m"), + green: f6("\x1B[32m", "\x1B[39m"), + yellow: f6("\x1B[33m", "\x1B[39m"), + blue: f6("\x1B[34m", "\x1B[39m"), + magenta: f6("\x1B[35m", "\x1B[39m"), + cyan: f6("\x1B[36m", "\x1B[39m"), + white: f6("\x1B[37m", "\x1B[39m"), + gray: f6("\x1B[90m", "\x1B[39m"), + bgBlack: f6("\x1B[40m", "\x1B[49m"), + bgRed: f6("\x1B[41m", "\x1B[49m"), + bgGreen: f6("\x1B[42m", "\x1B[49m"), + bgYellow: f6("\x1B[43m", "\x1B[49m"), + bgBlue: f6("\x1B[44m", "\x1B[49m"), + bgMagenta: f6("\x1B[45m", "\x1B[49m"), + bgCyan: f6("\x1B[46m", "\x1B[49m"), + bgWhite: f6("\x1B[47m", "\x1B[49m"), + blackBright: f6("\x1B[90m", "\x1B[39m"), + redBright: f6("\x1B[91m", "\x1B[39m"), + greenBright: f6("\x1B[92m", "\x1B[39m"), + yellowBright: f6("\x1B[93m", "\x1B[39m"), + blueBright: f6("\x1B[94m", "\x1B[39m"), + magentaBright: f6("\x1B[95m", "\x1B[39m"), + cyanBright: f6("\x1B[96m", "\x1B[39m"), + whiteBright: f6("\x1B[97m", "\x1B[39m"), + bgBlackBright: f6("\x1B[100m", "\x1B[49m"), + bgRedBright: f6("\x1B[101m", "\x1B[49m"), + bgGreenBright: f6("\x1B[102m", "\x1B[49m"), + bgYellowBright: f6("\x1B[103m", "\x1B[49m"), + bgBlueBright: f6("\x1B[104m", "\x1B[49m"), + bgMagentaBright: f6("\x1B[105m", "\x1B[49m"), + bgCyanBright: f6("\x1B[106m", "\x1B[49m"), + bgWhiteBright: f6("\x1B[107m", "\x1B[49m") }; }; module2.exports = createColors(); @@ -176,9 +177,9 @@ var require_windows = __commonJS({ if (pathext.indexOf("") !== -1) { return true; } - for (var i3 = 0; i3 < pathext.length; i3++) { - var p4 = pathext[i3].toLowerCase(); - if (p4 && path5.substr(-p4.length).toLowerCase() === p4) { + for (var i5 = 0; i5 < pathext.length; i5++) { + var p6 = pathext[i5].toLowerCase(); + if (p6 && path5.substr(-p6.length).toLowerCase() === p6) { return true; } } @@ -224,11 +225,11 @@ var require_mode = __commonJS({ var gid = stat.gid; var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); - var u3 = parseInt("100", 8); - var g4 = parseInt("010", 8); - var o3 = parseInt("001", 8); - var ug = u3 | g4; - var ret = mod & o3 || mod & g4 && gid === myGid || mod & u3 && uid === myUid || mod & ug && myUid === 0; + var u5 = parseInt("100", 8); + var g6 = parseInt("010", 8); + var o5 = parseInt("001", 8); + var ug = u5 | g6; + var ret = mod & o5 || mod & g6 && gid === myGid || mod & u5 && uid === myUid || mod & ug && myUid === 0; return ret; } } @@ -326,27 +327,27 @@ var require_which = __commonJS({ opt = {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); const found = []; - const step = (i3) => new Promise((resolve, reject) => { - if (i3 === pathEnv.length) + const step = (i5) => new Promise((resolve, reject) => { + if (i5 === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); - const ppRaw = pathEnv[i3]; + const ppRaw = pathEnv[i5]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path5.join(pathPart, cmd); - const p4 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - resolve(subStep(p4, i3, 0)); + const p6 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p6, i5, 0)); }); - const subStep = (p4, i3, ii) => new Promise((resolve, reject) => { + const subStep = (p6, i5, ii) => new Promise((resolve, reject) => { if (ii === pathExt.length) - return resolve(step(i3 + 1)); + return resolve(step(i5 + 1)); const ext = pathExt[ii]; - isexe(p4 + ext, { pathExt: pathExtExe }, (er2, is) => { + isexe(p6 + ext, { pathExt: pathExtExe }, (er2, is) => { if (!er2 && is) { if (opt.all) - found.push(p4 + ext); + found.push(p6 + ext); else - return resolve(p4 + ext); + return resolve(p6 + ext); } - return resolve(subStep(p4, i3, ii + 1)); + return resolve(subStep(p6, i5, ii + 1)); }); }); return cb ? step(0).then((res) => cb(null, res), cb) : step(0); @@ -355,13 +356,13 @@ var require_which = __commonJS({ opt = opt || {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); const found = []; - for (let i3 = 0; i3 < pathEnv.length; i3++) { - const ppRaw = pathEnv[i3]; + for (let i5 = 0; i5 < pathEnv.length; i5++) { + const ppRaw = pathEnv[i5]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path5.join(pathPart, cmd); - const p4 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; - for (let j4 = 0; j4 < pathExt.length; j4++) { - const cur = p4 + pathExt[j4]; + const p6 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j6 = 0; j6 < pathExt.length; j6++) { + const cur = p6 + pathExt[j6]; try { const is = isexe.sync(cur, { pathExt: pathExtExe }); if (is) { @@ -426,7 +427,7 @@ var require_resolveCommand = __commonJS({ path: env2[getPathKey({ env: env2 })], pathExt: withoutPathExt ? path5.delimiter : void 0 }); - } catch (e3) { + } catch (e5) { } finally { if (shouldSwitchCwd) { process.chdir(cwd); @@ -511,7 +512,7 @@ var require_readShebang = __commonJS({ fd = fs7.openSync(command, "r"); fs7.readSync(fd, buffer, 0, size, 0); fs7.closeSync(fd); - } catch (e3) { + } catch (e5) { } return shebangCommand(buffer.toString()); } @@ -558,7 +559,7 @@ var require_parse = __commonJS({ } return parsed; } - function parse(command, args, options) { + function parse3(command, args, options) { if (args && !Array.isArray(args)) { options = args; args = null; @@ -577,7 +578,7 @@ var require_parse = __commonJS({ }; return options.shell ? parsed : parseNonShell(parsed); } - module2.exports = parse; + module2.exports = parse3; } }); @@ -636,16 +637,16 @@ var require_cross_spawn = __commonJS({ "node_modules/cross-spawn/index.js"(exports2, module2) { "use strict"; var cp = require("child_process"); - var parse = require_parse(); + var parse3 = require_parse(); var enoent = require_enoent(); function spawn(command, args, options) { - const parsed = parse(command, args, options); + const parsed = parse3(command, args, options); const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); enoent.hookChildProcess(spawned, parsed); return spawned; } function spawnSync(command, args, options) { - const parsed = parse(command, args, options); + const parsed = parse3(command, args, options); const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); return result; @@ -653,7 +654,7 @@ var require_cross_spawn = __commonJS({ module2.exports = spawn; module2.exports.spawn = spawn; module2.exports.sync = spawnSync; - module2.exports._parse = parse; + module2.exports._parse = parse3; module2.exports._enoent = enoent; } }); @@ -1071,11 +1072,11 @@ var require_main = __commonJS({ var fs7 = require("fs"); var path5 = require("path"); var os4 = require("os"); - var crypto3 = require("crypto"); + var crypto11 = require("crypto"); var packageJson = require_package(); - var version = packageJson.version; + var version3 = packageJson.version; var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; - function parse(src) { + function parse3(src) { const obj = {}; let lines = src.toString(); lines = lines.replace(/\r\n?/mg, "\n"); @@ -1105,14 +1106,14 @@ var require_main = __commonJS({ const keys = _dotenvKey(options).split(","); const length = keys.length; let decrypted; - for (let i3 = 0; i3 < length; i3++) { + for (let i5 = 0; i5 < length; i5++) { try { - const key = keys[i3].trim(); + const key = keys[i5].trim(); const attrs = _instructions(result, key); decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); break; } catch (error) { - if (i3 + 1 >= length) { + if (i5 + 1 >= length) { throw error; } } @@ -1120,13 +1121,13 @@ var require_main = __commonJS({ return DotenvModule.parse(decrypted); } function _log(message) { - console.log(`[dotenv@${version}][INFO] ${message}`); + console.log(`[dotenv@${version3}][INFO] ${message}`); } function _warn(message) { - console.log(`[dotenv@${version}][WARN] ${message}`); + console.log(`[dotenv@${version3}][WARN] ${message}`); } function _debug(message) { - console.log(`[dotenv@${version}][DEBUG] ${message}`); + console.log(`[dotenv@${version3}][DEBUG] ${message}`); } function _dotenvKey(options) { if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { @@ -1231,11 +1232,11 @@ var require_main = __commonJS({ try { const parsed = DotenvModule.parse(fs7.readFileSync(path6, { encoding })); DotenvModule.populate(parsedAll, parsed, options); - } catch (e3) { + } catch (e5) { if (debug3) { - _debug(`Failed to load ${path6} ${e3.message}`); + _debug(`Failed to load ${path6} ${e5.message}`); } - lastError = e3; + lastError = e5; } } let processEnv = process.env; @@ -1267,7 +1268,7 @@ var require_main = __commonJS({ const authTag = ciphertext.subarray(-16); ciphertext = ciphertext.subarray(12, -16); try { - const aesgcm = crypto3.createDecipheriv("aes-256-gcm", key, nonce); + const aesgcm = crypto11.createDecipheriv("aes-256-gcm", key, nonce); aesgcm.setAuthTag(authTag); return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; } catch (error) { @@ -1318,7 +1319,7 @@ var require_main = __commonJS({ _parseVault, config: config7, decrypt, - parse, + parse: parse3, populate }; module2.exports.configDotenv = DotenvModule.configDotenv; @@ -1350,26 +1351,26 @@ var require_ini = __commonJS({ opt.whitespace = opt.whitespace === true; } const separator = opt.whitespace ? " = " : "="; - for (const k7 of Object.keys(obj)) { - const val = obj[k7]; + for (const k9 of Object.keys(obj)) { + const val = obj[k9]; if (val && Array.isArray(val)) { for (const item of val) { - out += safe(k7 + "[]") + separator + safe(item) + eol; + out += safe(k9 + "[]") + separator + safe(item) + eol; } } else if (val && typeof val === "object") { - children.push(k7); + children.push(k9); } else { - out += safe(k7) + separator + safe(val) + eol; + out += safe(k9) + separator + safe(val) + eol; } } if (opt.section && out.length) { out = "[" + safe(opt.section) + "]" + eol + out; } - for (const k7 of children) { - const nk = dotSplit(k7).join("\\."); + for (const k9 of children) { + const nk = dotSplit(k9).join("\\."); const section = (opt.section ? opt.section + "." : "") + nk; const { whitespace } = opt; - const child = encode3(obj[k7], { + const child = encode3(obj[k9], { section, whitespace }); @@ -1383,7 +1384,7 @@ var require_ini = __commonJS({ var dotSplit = (str2) => str2.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "")); var decode = (str2) => { const out = /* @__PURE__ */ Object.create(null); - let p4 = out; + let p6 = out; let section = null; const re3 = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; const lines = str2.split(/[\r\n]+/g); @@ -1398,10 +1399,10 @@ var require_ini = __commonJS({ if (match[1] !== void 0) { section = unsafe(match[1]); if (section === "__proto__") { - p4 = /* @__PURE__ */ Object.create(null); + p6 = /* @__PURE__ */ Object.create(null); continue; } - p4 = out[section] = out[section] || /* @__PURE__ */ Object.create(null); + p6 = out[section] = out[section] || /* @__PURE__ */ Object.create(null); continue; } const keyRaw = unsafe(match[2]); @@ -1413,41 +1414,41 @@ var require_ini = __commonJS({ const valueRaw = match[3] ? unsafe(match[4]) : true; const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw; if (isArray2) { - if (!hasOwnProperty2.call(p4, key)) { - p4[key] = []; - } else if (!Array.isArray(p4[key])) { - p4[key] = [p4[key]]; + if (!hasOwnProperty2.call(p6, key)) { + p6[key] = []; + } else if (!Array.isArray(p6[key])) { + p6[key] = [p6[key]]; } } - if (Array.isArray(p4[key])) { - p4[key].push(value); + if (Array.isArray(p6[key])) { + p6[key].push(value); } else { - p4[key] = value; + p6[key] = value; } } const remove = []; - for (const k7 of Object.keys(out)) { - if (!hasOwnProperty2.call(out, k7) || typeof out[k7] !== "object" || Array.isArray(out[k7])) { + for (const k9 of Object.keys(out)) { + if (!hasOwnProperty2.call(out, k9) || typeof out[k9] !== "object" || Array.isArray(out[k9])) { continue; } - const parts = dotSplit(k7); - p4 = out; - const l3 = parts.pop(); - const nl = l3.replace(/\\\./g, "."); + const parts = dotSplit(k9); + p6 = out; + const l5 = parts.pop(); + const nl = l5.replace(/\\\./g, "."); for (const part of parts) { if (part === "__proto__") { continue; } - if (!hasOwnProperty2.call(p4, part) || typeof p4[part] !== "object") { - p4[part] = /* @__PURE__ */ Object.create(null); + if (!hasOwnProperty2.call(p6, part) || typeof p6[part] !== "object") { + p6[part] = /* @__PURE__ */ Object.create(null); } - p4 = p4[part]; + p6 = p6[part]; } - if (p4 === out && nl === l3) { + if (p6 === out && nl === l5) { continue; } - p4[nl] = out[k7]; - remove.push(k7); + p6[nl] = out[k9]; + remove.push(k9); } for (const del of remove) { delete out[del]; @@ -1476,21 +1477,21 @@ var require_ini = __commonJS({ } else { let esc = false; let unesc = ""; - for (let i3 = 0, l3 = val.length; i3 < l3; i3++) { - const c3 = val.charAt(i3); + for (let i5 = 0, l5 = val.length; i5 < l5; i5++) { + const c5 = val.charAt(i5); if (esc) { - if ("\\;#".indexOf(c3) !== -1) { - unesc += c3; + if ("\\;#".indexOf(c5) !== -1) { + unesc += c5; } else { - unesc += "\\" + c3; + unesc += "\\" + c5; } esc = false; - } else if (";#".indexOf(c3) !== -1) { + } else if (";#".indexOf(c5) !== -1) { break; - } else if (c3 === "\\") { + } else if (c5 === "\\") { esc = true; } else { - unesc += c3; + unesc += c5; } } if (esc) { @@ -1521,7 +1522,7 @@ var require_lib = __commonJS({ } return new ErrorType(`${options.context ? options.context : "Value"} ${message}.`); } - function toNumber(value, options) { + function toNumber2(value, options) { if (typeof value === "bigint") { throw makeException(TypeError, "is a BigInt which cannot be converted to a number", options); } @@ -1530,27 +1531,27 @@ var require_lib = __commonJS({ } return options.globals.Number(value); } - function evenRound(x5) { - if (x5 > 0 && x5 % 1 === 0.5 && (x5 & 1) === 0 || x5 < 0 && x5 % 1 === -0.5 && (x5 & 1) === 1) { - return censorNegativeZero(Math.floor(x5)); + function evenRound(x7) { + if (x7 > 0 && x7 % 1 === 0.5 && (x7 & 1) === 0 || x7 < 0 && x7 % 1 === -0.5 && (x7 & 1) === 1) { + return censorNegativeZero(Math.floor(x7)); } - return censorNegativeZero(Math.round(x5)); + return censorNegativeZero(Math.round(x7)); } - function integerPart(n2) { - return censorNegativeZero(Math.trunc(n2)); + function integerPart(n4) { + return censorNegativeZero(Math.trunc(n4)); } - function sign(x5) { - return x5 < 0 ? -1 : 1; + function sign(x7) { + return x7 < 0 ? -1 : 1; } - function modulo(x5, y6) { - const signMightNotMatch = x5 % y6; - if (sign(y6) !== sign(signMightNotMatch)) { - return signMightNotMatch + y6; + function modulo(x7, y7) { + const signMightNotMatch = x7 % y7; + if (sign(y7) !== sign(signMightNotMatch)) { + return signMightNotMatch + y7; } return signMightNotMatch; } - function censorNegativeZero(x5) { - return x5 === 0 ? 0 : x5; + function censorNegativeZero(x7) { + return x7 === 0 ? 0 : x7; } function createIntegerConversion(bitLength, { unsigned }) { let lowerBound, upperBound; @@ -1564,39 +1565,39 @@ var require_lib = __commonJS({ const twoToTheBitLength = 2 ** bitLength; const twoToOneLessThanTheBitLength = 2 ** (bitLength - 1); return (value, options = {}) => { - let x5 = toNumber(value, options); - x5 = censorNegativeZero(x5); + let x7 = toNumber2(value, options); + x7 = censorNegativeZero(x7); if (options.enforceRange) { - if (!Number.isFinite(x5)) { + if (!Number.isFinite(x7)) { throw makeException(TypeError, "is not a finite number", options); } - x5 = integerPart(x5); - if (x5 < lowerBound || x5 > upperBound) { + x7 = integerPart(x7); + if (x7 < lowerBound || x7 > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, options ); } - return x5; + return x7; } - if (!Number.isNaN(x5) && options.clamp) { - x5 = Math.min(Math.max(x5, lowerBound), upperBound); - x5 = evenRound(x5); - return x5; + if (!Number.isNaN(x7) && options.clamp) { + x7 = Math.min(Math.max(x7, lowerBound), upperBound); + x7 = evenRound(x7); + return x7; } - if (!Number.isFinite(x5) || x5 === 0) { + if (!Number.isFinite(x7) || x7 === 0) { return 0; } - x5 = integerPart(x5); - if (x5 >= lowerBound && x5 <= upperBound) { - return x5; + x7 = integerPart(x7); + if (x7 >= lowerBound && x7 <= upperBound) { + return x7; } - x5 = modulo(x5, twoToTheBitLength); - if (!unsigned && x5 >= twoToOneLessThanTheBitLength) { - return x5 - twoToTheBitLength; + x7 = modulo(x7, twoToTheBitLength); + if (!unsigned && x7 >= twoToOneLessThanTheBitLength) { + return x7 - twoToTheBitLength; } - return x5; + return x7; }; } function createLongLongConversion(bitLength, { unsigned }) { @@ -1604,31 +1605,31 @@ var require_lib = __commonJS({ const lowerBound = unsigned ? 0 : Number.MIN_SAFE_INTEGER; const asBigIntN = unsigned ? BigInt.asUintN : BigInt.asIntN; return (value, options = {}) => { - let x5 = toNumber(value, options); - x5 = censorNegativeZero(x5); + let x7 = toNumber2(value, options); + x7 = censorNegativeZero(x7); if (options.enforceRange) { - if (!Number.isFinite(x5)) { + if (!Number.isFinite(x7)) { throw makeException(TypeError, "is not a finite number", options); } - x5 = integerPart(x5); - if (x5 < lowerBound || x5 > upperBound) { + x7 = integerPart(x7); + if (x7 < lowerBound || x7 > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, options ); } - return x5; + return x7; } - if (!Number.isNaN(x5) && options.clamp) { - x5 = Math.min(Math.max(x5, lowerBound), upperBound); - x5 = evenRound(x5); - return x5; + if (!Number.isNaN(x7) && options.clamp) { + x7 = Math.min(Math.max(x7, lowerBound), upperBound); + x7 = evenRound(x7); + return x7; } - if (!Number.isFinite(x5) || x5 === 0) { + if (!Number.isFinite(x7) || x7 === 0) { return 0; } - let xBigInt = BigInt(integerPart(x5)); + let xBigInt = BigInt(integerPart(x7)); xBigInt = asBigIntN(bitLength, xBigInt); return Number(xBigInt); }; @@ -1651,39 +1652,39 @@ var require_lib = __commonJS({ exports2["long long"] = createLongLongConversion(64, { unsigned: false }); exports2["unsigned long long"] = createLongLongConversion(64, { unsigned: true }); exports2.double = (value, options = {}) => { - const x5 = toNumber(value, options); - if (!Number.isFinite(x5)) { + const x7 = toNumber2(value, options); + if (!Number.isFinite(x7)) { throw makeException(TypeError, "is not a finite floating-point value", options); } - return x5; + return x7; }; exports2["unrestricted double"] = (value, options = {}) => { - const x5 = toNumber(value, options); - return x5; + const x7 = toNumber2(value, options); + return x7; }; exports2.float = (value, options = {}) => { - const x5 = toNumber(value, options); - if (!Number.isFinite(x5)) { + const x7 = toNumber2(value, options); + if (!Number.isFinite(x7)) { throw makeException(TypeError, "is not a finite floating-point value", options); } - if (Object.is(x5, -0)) { - return x5; + if (Object.is(x7, -0)) { + return x7; } - const y6 = Math.fround(x5); - if (!Number.isFinite(y6)) { + const y7 = Math.fround(x7); + if (!Number.isFinite(y7)) { throw makeException(TypeError, "is outside the range of a single-precision floating-point value", options); } - return y6; + return y7; }; exports2["unrestricted float"] = (value, options = {}) => { - const x5 = toNumber(value, options); - if (isNaN(x5)) { - return x5; + const x7 = toNumber2(value, options); + if (isNaN(x7)) { + return x7; } - if (Object.is(x5, -0)) { - return x5; + if (Object.is(x7, -0)) { + return x7; } - return Math.fround(x5); + return Math.fround(x7); }; exports2.DOMString = (value, options = {}) => { if (options.treatNullAsEmptyString && value === null) { @@ -1696,34 +1697,34 @@ var require_lib = __commonJS({ return StringCtor(value); }; exports2.ByteString = (value, options = {}) => { - const x5 = exports2.DOMString(value, options); - let c3; - for (let i3 = 0; (c3 = x5.codePointAt(i3)) !== void 0; ++i3) { - if (c3 > 255) { + const x7 = exports2.DOMString(value, options); + let c5; + for (let i5 = 0; (c5 = x7.codePointAt(i5)) !== void 0; ++i5) { + if (c5 > 255) { throw makeException(TypeError, "is not a valid ByteString", options); } } - return x5; + return x7; }; exports2.USVString = (value, options = {}) => { const S6 = exports2.DOMString(value, options); - const n2 = S6.length; + const n4 = S6.length; const U7 = []; - for (let i3 = 0; i3 < n2; ++i3) { - const c3 = S6.charCodeAt(i3); - if (c3 < 55296 || c3 > 57343) { - U7.push(String.fromCodePoint(c3)); - } else if (56320 <= c3 && c3 <= 57343) { + for (let i5 = 0; i5 < n4; ++i5) { + const c5 = S6.charCodeAt(i5); + if (c5 < 55296 || c5 > 57343) { + U7.push(String.fromCodePoint(c5)); + } else if (56320 <= c5 && c5 <= 57343) { U7.push(String.fromCodePoint(65533)); - } else if (i3 === n2 - 1) { + } else if (i5 === n4 - 1) { U7.push(String.fromCodePoint(65533)); } else { - const d7 = S6.charCodeAt(i3 + 1); - if (56320 <= d7 && d7 <= 57343) { - const a4 = c3 & 1023; - const b7 = d7 & 1023; - U7.push(String.fromCodePoint((2 << 15) + (2 << 9) * a4 + b7)); - ++i3; + const d9 = S6.charCodeAt(i5 + 1); + if (56320 <= d9 && d9 <= 57343) { + const a6 = c5 & 1023; + const b9 = d9 & 1023; + U7.push(String.fromCodePoint((2 << 15) + (2 << 9) * a6 + b9)); + ++i5; } else { U7.push(String.fromCodePoint(65533)); } @@ -1779,7 +1780,7 @@ var require_lib = __commonJS({ exports2.DataView = (value, options = {}) => { try { dvByteLengthGetter.call(value); - } catch (e3) { + } catch (e5) { throw makeException(TypeError, "is not a DataView", options); } if (!options.allowShared && isSharedArrayBuffer(value.buffer)) { @@ -1936,12 +1937,12 @@ var require_utils = __commonJS({ if (typeof P4 !== "string") { return false; } - const i3 = P4 >>> 0; - if (i3 === 2 ** 32 - 1) { + const i5 = P4 >>> 0; + if (i5 === 2 ** 32 - 1) { return false; } - const s2 = `${i3}`; - if (P4 !== s2) { + const s4 = `${i5}`; + if (P4 !== s4) { return false; } return true; @@ -1951,7 +1952,7 @@ var require_utils = __commonJS({ try { byteLengthGetter.call(value); return true; - } catch (e3) { + } catch (e5) { return false; } } @@ -2049,7 +2050,7 @@ var require_punycode = __commonJS({ function error(type2) { throw new RangeError(errors[type2]); } - function map(array, callback) { + function map2(array, callback) { const result = []; let length = array.length; while (length--) { @@ -2066,7 +2067,7 @@ var require_punycode = __commonJS({ } domain = domain.replace(regexSeparators, "."); const labels = domain.split("."); - const encoded = map(labels, callback).join("."); + const encoded = map2(labels, callback).join("."); return result + encoded; } function ucs2decode(string) { @@ -2106,33 +2107,33 @@ var require_punycode = __commonJS({ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); }; var adapt = function(delta, numPoints, firstTime) { - let k7 = 0; + let k9 = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k7 += base) { + for (; delta > baseMinusTMin * tMax >> 1; k9 += base) { delta = floor(delta / baseMinusTMin); } - return floor(k7 + (baseMinusTMin + 1) * delta / (delta + skew)); + return floor(k9 + (baseMinusTMin + 1) * delta / (delta + skew)); }; var decode = function(input) { const output = []; const inputLength = input.length; - let i3 = 0; - let n2 = initialN; + let i5 = 0; + let n4 = initialN; let bias = initialBias; let basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } - for (let j4 = 0; j4 < basic; ++j4) { - if (input.charCodeAt(j4) >= 128) { + for (let j6 = 0; j6 < basic; ++j6) { + if (input.charCodeAt(j6) >= 128) { error("not-basic"); } - output.push(input.charCodeAt(j4)); + output.push(input.charCodeAt(j6)); } for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - const oldi = i3; - for (let w7 = 1, k7 = base; ; k7 += base) { + const oldi = i5; + for (let w9 = 1, k9 = base; ; k9 += base) { if (index >= inputLength) { error("invalid-input"); } @@ -2140,28 +2141,28 @@ var require_punycode = __commonJS({ if (digit >= base) { error("invalid-input"); } - if (digit > floor((maxInt - i3) / w7)) { + if (digit > floor((maxInt - i5) / w9)) { error("overflow"); } - i3 += digit * w7; - const t2 = k7 <= bias ? tMin : k7 >= bias + tMax ? tMax : k7 - bias; - if (digit < t2) { + i5 += digit * w9; + const t4 = k9 <= bias ? tMin : k9 >= bias + tMax ? tMax : k9 - bias; + if (digit < t4) { break; } - const baseMinusT = base - t2; - if (w7 > floor(maxInt / baseMinusT)) { + const baseMinusT = base - t4; + if (w9 > floor(maxInt / baseMinusT)) { error("overflow"); } - w7 *= baseMinusT; + w9 *= baseMinusT; } const out = output.length + 1; - bias = adapt(i3 - oldi, out, oldi == 0); - if (floor(i3 / out) > maxInt - n2) { + bias = adapt(i5 - oldi, out, oldi == 0); + if (floor(i5 / out) > maxInt - n4) { error("overflow"); } - n2 += floor(i3 / out); - i3 %= out; - output.splice(i3++, 0, n2); + n4 += floor(i5 / out); + i5 %= out; + output.splice(i5++, 0, n4); } return String.fromCodePoint(...output); }; @@ -2169,7 +2170,7 @@ var require_punycode = __commonJS({ const output = []; input = ucs2decode(input); const inputLength = input.length; - let n2 = initialN; + let n4 = initialN; let delta = 0; let bias = initialBias; for (const currentValue of input) { @@ -2183,44 +2184,44 @@ var require_punycode = __commonJS({ output.push(delimiter); } while (handledCPCount < inputLength) { - let m5 = maxInt; + let m7 = maxInt; for (const currentValue of input) { - if (currentValue >= n2 && currentValue < m5) { - m5 = currentValue; + if (currentValue >= n4 && currentValue < m7) { + m7 = currentValue; } } const handledCPCountPlusOne = handledCPCount + 1; - if (m5 - n2 > floor((maxInt - delta) / handledCPCountPlusOne)) { + if (m7 - n4 > floor((maxInt - delta) / handledCPCountPlusOne)) { error("overflow"); } - delta += (m5 - n2) * handledCPCountPlusOne; - n2 = m5; + delta += (m7 - n4) * handledCPCountPlusOne; + n4 = m7; for (const currentValue of input) { - if (currentValue < n2 && ++delta > maxInt) { + if (currentValue < n4 && ++delta > maxInt) { error("overflow"); } - if (currentValue === n2) { - let q6 = delta; - for (let k7 = base; ; k7 += base) { - const t2 = k7 <= bias ? tMin : k7 >= bias + tMax ? tMax : k7 - bias; - if (q6 < t2) { + if (currentValue === n4) { + let q8 = delta; + for (let k9 = base; ; k9 += base) { + const t4 = k9 <= bias ? tMin : k9 >= bias + tMax ? tMax : k9 - bias; + if (q8 < t4) { break; } - const qMinusT = q6 - t2; - const baseMinusT = base - t2; + const qMinusT = q8 - t4; + const baseMinusT = base - t4; output.push( - stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)) + stringFromCharCode(digitToBasic(t4 + qMinusT % baseMinusT, 0)) ); - q6 = floor(qMinusT / baseMinusT); + q8 = floor(qMinusT / baseMinusT); } - output.push(stringFromCharCode(digitToBasic(q6, 0))); + output.push(stringFromCharCode(digitToBasic(q8, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); delta = 0; ++handledCPCount; } } ++delta; - ++n2; + ++n4; } return output.join(""); }; @@ -2424,17 +2425,17 @@ var require_tr46 = __commonJS({ } if (checkJoiners) { let last = 0; - for (const [i3, ch] of codePoints.entries()) { + for (const [i5, ch] of codePoints.entries()) { if (ch === "\u200C" || ch === "\u200D") { - if (i3 > 0) { - if (regexes.combiningClassVirama.test(codePoints[i3 - 1])) { + if (i5 > 0) { + if (regexes.combiningClassVirama.test(codePoints[i5 - 1])) { continue; } if (ch === "\u200C") { - const next = codePoints.indexOf("\u200C", i3 + 1); + const next = codePoints.indexOf("\u200C", i5 + 1); const test2 = next < 0 ? codePoints.slice(last) : codePoints.slice(last, next); if (regexes.validZWNJ.test(test2.join(""))) { - last = i3 + 1; + last = i5 + 1; continue; } } @@ -2481,7 +2482,7 @@ var require_tr46 = __commonJS({ const labels = string.split("."); const isBidi = isBidiDomain(labels); let error = false; - for (const [i3, origLabel] of labels.entries()) { + for (const [i5, origLabel] of labels.entries()) { let label = origLabel; let transitionalProcessingForThisLabel = options.transitionalProcessing; if (label.startsWith("xn--")) { @@ -2497,7 +2498,7 @@ var require_tr46 = __commonJS({ continue; } } - labels[i3] = label; + labels[i5] = label; if (label === "" || !containsNonASCII(label)) { error = true; } @@ -2538,23 +2539,23 @@ var require_tr46 = __commonJS({ ignoreInvalidPunycode }); let labels = result.string.split("."); - labels = labels.map((l3) => { - if (containsNonASCII(l3)) { + labels = labels.map((l5) => { + if (containsNonASCII(l5)) { try { - return `xn--${punycode.encode(l3)}`; + return `xn--${punycode.encode(l5)}`; } catch { result.error = true; } } - return l3; + return l5; }); if (verifyDNSLength) { const total = labels.join(".").length; if (total > 253 || total === 0) { result.error = true; } - for (let i3 = 0; i3 < labels.length; ++i3) { - if (labels[i3].length > 63 || labels[i3].length === 0) { + for (let i5 = 0; i5 < labels.length; ++i5) { + if (labels[i5].length > 63 || labels[i5].length === 0) { result.error = true; break; } @@ -2597,17 +2598,17 @@ var require_tr46 = __commonJS({ var require_infra = __commonJS({ "node_modules/whatwg-url/lib/infra.js"(exports2, module2) { "use strict"; - function isASCIIDigit(c3) { - return c3 >= 48 && c3 <= 57; + function isASCIIDigit(c5) { + return c5 >= 48 && c5 <= 57; } - function isASCIIAlpha(c3) { - return c3 >= 65 && c3 <= 90 || c3 >= 97 && c3 <= 122; + function isASCIIAlpha(c5) { + return c5 >= 65 && c5 <= 90 || c5 >= 97 && c5 <= 122; } - function isASCIIAlphanumeric(c3) { - return isASCIIAlpha(c3) || isASCIIDigit(c3); + function isASCIIAlphanumeric(c5) { + return isASCIIAlpha(c5) || isASCIIDigit(c5); } - function isASCIIHex(c3) { - return isASCIIDigit(c3) || c3 >= 65 && c3 <= 70 || c3 >= 97 && c3 <= 102; + function isASCIIHex(c5) { + return isASCIIDigit(c5) || c5 >= 65 && c5 <= 70 || c5 >= 97 && c5 <= 102; } module2.exports = { isASCIIDigit, @@ -2643,11 +2644,11 @@ var require_percent_encoding = __commonJS({ "use strict"; var { isASCIIHex } = require_infra(); var { utf8Encode } = require_encoding(); - function p4(char) { + function p6(char) { return char.codePointAt(0); } - function percentEncode(c3) { - let hex = c3.toString(16).toUpperCase(); + function percentEncode(c5) { + let hex = c5.toString(16).toUpperCase(); if (hex.length === 1) { hex = `0${hex}`; } @@ -2656,16 +2657,16 @@ var require_percent_encoding = __commonJS({ function percentDecodeBytes(input) { const output = new Uint8Array(input.byteLength); let outputIndex = 0; - for (let i3 = 0; i3 < input.byteLength; ++i3) { - const byte = input[i3]; + for (let i5 = 0; i5 < input.byteLength; ++i5) { + const byte = input[i5]; if (byte !== 37) { output[outputIndex++] = byte; - } else if (byte === 37 && (!isASCIIHex(input[i3 + 1]) || !isASCIIHex(input[i3 + 2]))) { + } else if (byte === 37 && (!isASCIIHex(input[i5 + 1]) || !isASCIIHex(input[i5 + 2]))) { output[outputIndex++] = byte; } else { - const bytePoint = parseInt(String.fromCodePoint(input[i3 + 1], input[i3 + 2]), 16); + const bytePoint = parseInt(String.fromCodePoint(input[i5 + 1], input[i5 + 2]), 16); output[outputIndex++] = bytePoint; - i3 += 2; + i5 += 2; } } return output.slice(0, outputIndex); @@ -2674,35 +2675,35 @@ var require_percent_encoding = __commonJS({ const bytes = utf8Encode(input); return percentDecodeBytes(bytes); } - function isC0ControlPercentEncode(c3) { - return c3 <= 31 || c3 > 126; + function isC0ControlPercentEncode(c5) { + return c5 <= 31 || c5 > 126; } - var extraFragmentPercentEncodeSet = /* @__PURE__ */ new Set([p4(" "), p4('"'), p4("<"), p4(">"), p4("`")]); - function isFragmentPercentEncode(c3) { - return isC0ControlPercentEncode(c3) || extraFragmentPercentEncodeSet.has(c3); + var extraFragmentPercentEncodeSet = /* @__PURE__ */ new Set([p6(" "), p6('"'), p6("<"), p6(">"), p6("`")]); + function isFragmentPercentEncode(c5) { + return isC0ControlPercentEncode(c5) || extraFragmentPercentEncodeSet.has(c5); } - var extraQueryPercentEncodeSet = /* @__PURE__ */ new Set([p4(" "), p4('"'), p4("#"), p4("<"), p4(">")]); - function isQueryPercentEncode(c3) { - return isC0ControlPercentEncode(c3) || extraQueryPercentEncodeSet.has(c3); + var extraQueryPercentEncodeSet = /* @__PURE__ */ new Set([p6(" "), p6('"'), p6("#"), p6("<"), p6(">")]); + function isQueryPercentEncode(c5) { + return isC0ControlPercentEncode(c5) || extraQueryPercentEncodeSet.has(c5); } - function isSpecialQueryPercentEncode(c3) { - return isQueryPercentEncode(c3) || c3 === p4("'"); + function isSpecialQueryPercentEncode(c5) { + return isQueryPercentEncode(c5) || c5 === p6("'"); } - var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([p4("?"), p4("`"), p4("{"), p4("}"), p4("^")]); - function isPathPercentEncode(c3) { - return isQueryPercentEncode(c3) || extraPathPercentEncodeSet.has(c3); + var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([p6("?"), p6("`"), p6("{"), p6("}"), p6("^")]); + function isPathPercentEncode(c5) { + return isQueryPercentEncode(c5) || extraPathPercentEncodeSet.has(c5); } - var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([p4("/"), p4(":"), p4(";"), p4("="), p4("@"), p4("["), p4("\\"), p4("]"), p4("|")]); - function isUserinfoPercentEncode(c3) { - return isPathPercentEncode(c3) || extraUserinfoPercentEncodeSet.has(c3); + var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([p6("/"), p6(":"), p6(";"), p6("="), p6("@"), p6("["), p6("\\"), p6("]"), p6("|")]); + function isUserinfoPercentEncode(c5) { + return isPathPercentEncode(c5) || extraUserinfoPercentEncodeSet.has(c5); } - var extraComponentPercentEncodeSet = /* @__PURE__ */ new Set([p4("$"), p4("%"), p4("&"), p4("+"), p4(",")]); - function isComponentPercentEncode(c3) { - return isUserinfoPercentEncode(c3) || extraComponentPercentEncodeSet.has(c3); + var extraComponentPercentEncodeSet = /* @__PURE__ */ new Set([p6("$"), p6("%"), p6("&"), p6("+"), p6(",")]); + function isComponentPercentEncode(c5) { + return isUserinfoPercentEncode(c5) || extraComponentPercentEncodeSet.has(c5); } - var extraURLEncodedPercentEncodeSet = /* @__PURE__ */ new Set([p4("!"), p4("'"), p4("("), p4(")"), p4("~")]); - function isURLEncodedPercentEncode(c3) { - return isComponentPercentEncode(c3) || extraURLEncodedPercentEncodeSet.has(c3); + var extraURLEncodedPercentEncodeSet = /* @__PURE__ */ new Set([p6("!"), p6("'"), p6("("), p6(")"), p6("~")]); + function isURLEncodedPercentEncode(c5) { + return isComponentPercentEncode(c5) || extraURLEncodedPercentEncodeSet.has(c5); } function utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) { const bytes = utf8Encode(codePoint); @@ -2764,7 +2765,7 @@ var require_url_state_machine = __commonJS({ isPathPercentEncode, isUserinfoPercentEncode } = require_percent_encoding(); - function p4(char) { + function p6(char) { return char.codePointAt(0); } var specialSchemes = { @@ -2780,8 +2781,8 @@ var require_url_state_machine = __commonJS({ return [...str2].length; } function at2(input, idx) { - const c3 = input[idx]; - return isNaN(c3) ? void 0 : String.fromCodePoint(c3); + const c5 = input[idx]; + return isNaN(c5) ? void 0 : String.fromCodePoint(c5); } function isSingleDot(buffer) { return buffer === "." || buffer.toLowerCase() === "%2e"; @@ -2791,7 +2792,7 @@ var require_url_state_machine = __commonJS({ return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; } function isWindowsDriveLetterCodePoints(cp1, cp2) { - return infra.isASCIIAlpha(cp1) && (cp2 === p4(":") || cp2 === p4("|")); + return infra.isASCIIAlpha(cp1) && (cp2 === p6(":") || cp2 === p6("|")); } function isWindowsDriveLetterString(string) { return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); @@ -2856,14 +2857,14 @@ var require_url_state_machine = __commonJS({ } const numbers = []; for (const part of parts) { - const n2 = parseIPv4Number(part); - if (n2 === failure) { + const n4 = parseIPv4Number(part); + if (n4 === failure) { return failure; } - numbers.push(n2); + numbers.push(n4); } - for (let i3 = 0; i3 < numbers.length - 1; ++i3) { - if (numbers[i3] > 255) { + for (let i5 = 0; i5 < numbers.length - 1; ++i5) { + if (numbers[i5] > 255) { return failure; } } @@ -2872,49 +2873,49 @@ var require_url_state_machine = __commonJS({ } let ipv4 = numbers.pop(); let counter = 0; - for (const n2 of numbers) { - ipv4 += n2 * 256 ** (3 - counter); + for (const n4 of numbers) { + ipv4 += n4 * 256 ** (3 - counter); ++counter; } return ipv4; } function serializeIPv4(address) { let output = ""; - let n2 = address; - for (let i3 = 1; i3 <= 4; ++i3) { - output = String(n2 % 256) + output; - if (i3 !== 4) { + let n4 = address; + for (let i5 = 1; i5 <= 4; ++i5) { + output = String(n4 % 256) + output; + if (i5 !== 4) { output = `.${output}`; } - n2 = Math.floor(n2 / 256); + n4 = Math.floor(n4 / 256); } return output; } function parseIPv6(input) { const address = [0, 0, 0, 0, 0, 0, 0, 0]; let pieceIndex = 0; - let compress = null; + let compress2 = null; let pointer = 0; - input = Array.from(input, (c3) => c3.codePointAt(0)); - if (input[pointer] === p4(":")) { - if (input[pointer + 1] !== p4(":")) { + input = Array.from(input, (c5) => c5.codePointAt(0)); + if (input[pointer] === p6(":")) { + if (input[pointer + 1] !== p6(":")) { return failure; } pointer += 2; ++pieceIndex; - compress = pieceIndex; + compress2 = pieceIndex; } while (pointer < input.length) { if (pieceIndex === 8) { return failure; } - if (input[pointer] === p4(":")) { - if (compress !== null) { + if (input[pointer] === p6(":")) { + if (compress2 !== null) { return failure; } ++pointer; ++pieceIndex; - compress = pieceIndex; + compress2 = pieceIndex; continue; } let value = 0; @@ -2924,7 +2925,7 @@ var require_url_state_machine = __commonJS({ ++pointer; ++length; } - if (input[pointer] === p4(".")) { + if (input[pointer] === p6(".")) { if (length === 0) { return failure; } @@ -2936,7 +2937,7 @@ var require_url_state_machine = __commonJS({ while (input[pointer] !== void 0) { let ipv4Piece = null; if (numbersSeen > 0) { - if (input[pointer] === p4(".") && numbersSeen < 4) { + if (input[pointer] === p6(".") && numbersSeen < 4) { ++pointer; } else { return failure; @@ -2969,7 +2970,7 @@ var require_url_state_machine = __commonJS({ return failure; } break; - } else if (input[pointer] === p4(":")) { + } else if (input[pointer] === p6(":")) { ++pointer; if (input[pointer] === void 0) { return failure; @@ -2980,24 +2981,24 @@ var require_url_state_machine = __commonJS({ address[pieceIndex] = value; ++pieceIndex; } - if (compress !== null) { - let swaps = pieceIndex - compress; + if (compress2 !== null) { + let swaps = pieceIndex - compress2; pieceIndex = 7; while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; + const temp = address[compress2 + swaps - 1]; + address[compress2 + swaps - 1] = address[pieceIndex]; address[pieceIndex] = temp; --pieceIndex; --swaps; } - } else if (compress === null && pieceIndex !== 8) { + } else if (compress2 === null && pieceIndex !== 8) { return failure; } return address; } function serializeIPv6(address) { let output = ""; - const compress = findTheIPv6AddressCompressedPieceIndex(address); + const compress2 = findTheIPv6AddressCompressedPieceIndex(address); let ignore0 = false; for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { if (ignore0 && address[pieceIndex] === 0) { @@ -3005,7 +3006,7 @@ var require_url_state_machine = __commonJS({ } else if (ignore0) { ignore0 = false; } - if (compress === pieceIndex) { + if (compress2 === pieceIndex) { const separator = pieceIndex === 0 ? "::" : ":"; output += separator; ignore0 = true; @@ -3194,11 +3195,11 @@ var require_url_state_machine = __commonJS({ this.atFlag = false; this.arrFlag = false; this.passwordTokenSeenFlag = false; - this.input = Array.from(this.input, (c3) => c3.codePointAt(0)); + this.input = Array.from(this.input, (c5) => c5.codePointAt(0)); for (; this.pointer <= this.input.length; ++this.pointer) { - const c3 = this.input[this.pointer]; - const cStr = isNaN(c3) ? void 0 : String.fromCodePoint(c3); - const ret = this[`parse ${this.state}`](c3, cStr); + const c5 = this.input[this.pointer]; + const cStr = isNaN(c5) ? void 0 : String.fromCodePoint(c5); + const ret = this[`parse ${this.state}`](c5, cStr); if (!ret) { break; } else if (ret === failure) { @@ -3207,8 +3208,8 @@ var require_url_state_machine = __commonJS({ } } } - URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c3, cStr) { - if (infra.isASCIIAlpha(c3)) { + URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c5, cStr) { + if (infra.isASCIIAlpha(c5)) { this.buffer += cStr.toLowerCase(); this.state = "scheme"; } else if (!this.stateOverride) { @@ -3220,10 +3221,10 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse scheme"] = function parseScheme(c3, cStr) { - if (infra.isASCIIAlphanumeric(c3) || c3 === p4("+") || c3 === p4("-") || c3 === p4(".")) { + URLStateMachine.prototype["parse scheme"] = function parseScheme(c5, cStr) { + if (infra.isASCIIAlphanumeric(c5) || c5 === p6("+") || c5 === p6("-") || c5 === p6(".")) { this.buffer += cStr.toLowerCase(); - } else if (c3 === p4(":")) { + } else if (c5 === p6(":")) { if (this.stateOverride) { if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { return false; @@ -3247,7 +3248,7 @@ var require_url_state_machine = __commonJS({ } this.buffer = ""; if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== p4("/") || this.input[this.pointer + 2] !== p4("/")) { + if (this.input[this.pointer + 1] !== p6("/") || this.input[this.pointer + 2] !== p6("/")) { this.parseError = true; } this.state = "file"; @@ -3255,7 +3256,7 @@ var require_url_state_machine = __commonJS({ this.state = "special relative or authority"; } else if (isSpecial(this.url)) { this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === p4("/")) { + } else if (this.input[this.pointer + 1] === p6("/")) { this.state = "path or authority"; ++this.pointer; } else { @@ -3272,10 +3273,10 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c3) { - if (this.base === null || hasAnOpaquePath(this.base) && c3 !== p4("#")) { + URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c5) { + if (this.base === null || hasAnOpaquePath(this.base) && c5 !== p6("#")) { return failure; - } else if (hasAnOpaquePath(this.base) && c3 === p4("#")) { + } else if (hasAnOpaquePath(this.base) && c5 === p6("#")) { this.url.scheme = this.base.scheme; this.url.path = this.base.path; this.url.query = this.base.query; @@ -3290,8 +3291,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c3) { - if (c3 === p4("/") && this.input[this.pointer + 1] === p4("/")) { + URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c5) { + if (c5 === p6("/") && this.input[this.pointer + 1] === p6("/")) { this.state = "special authority ignore slashes"; ++this.pointer; } else { @@ -3301,8 +3302,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c3) { - if (c3 === p4("/")) { + URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c5) { + if (c5 === p6("/")) { this.state = "authority"; } else { this.state = "path"; @@ -3310,11 +3311,11 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse relative"] = function parseRelative(c3) { + URLStateMachine.prototype["parse relative"] = function parseRelative(c5) { this.url.scheme = this.base.scheme; - if (c3 === p4("/")) { + if (c5 === p6("/")) { this.state = "relative slash"; - } else if (isSpecial(this.url) && c3 === p4("\\")) { + } else if (isSpecial(this.url) && c5 === p6("\\")) { this.parseError = true; this.state = "relative slash"; } else { @@ -3324,13 +3325,13 @@ var require_url_state_machine = __commonJS({ this.url.port = this.base.port; this.url.path = this.base.path.slice(); this.url.query = this.base.query; - if (c3 === p4("?")) { + if (c5 === p6("?")) { this.url.query = ""; this.state = "query"; - } else if (c3 === p4("#")) { + } else if (c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (!isNaN(c3)) { + } else if (!isNaN(c5)) { this.url.query = null; this.url.path.pop(); this.state = "path"; @@ -3339,13 +3340,13 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c3) { - if (isSpecial(this.url) && (c3 === p4("/") || c3 === p4("\\"))) { - if (c3 === p4("\\")) { + URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c5) { + if (isSpecial(this.url) && (c5 === p6("/") || c5 === p6("\\"))) { + if (c5 === p6("\\")) { this.parseError = true; } this.state = "special authority ignore slashes"; - } else if (c3 === p4("/")) { + } else if (c5 === p6("/")) { this.state = "authority"; } else { this.url.username = this.base.username; @@ -3357,8 +3358,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c3) { - if (c3 === p4("/") && this.input[this.pointer + 1] === p4("/")) { + URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c5) { + if (c5 === p6("/") && this.input[this.pointer + 1] === p6("/")) { this.state = "special authority ignore slashes"; ++this.pointer; } else { @@ -3368,8 +3369,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c3) { - if (c3 !== p4("/") && c3 !== p4("\\")) { + URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c5) { + if (c5 !== p6("/") && c5 !== p6("\\")) { this.state = "authority"; --this.pointer; } else { @@ -3377,8 +3378,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse authority"] = function parseAuthority(c3, cStr) { - if (c3 === p4("@")) { + URLStateMachine.prototype["parse authority"] = function parseAuthority(c5, cStr) { + if (c5 === p6("@")) { this.parseError = true; if (this.atFlag) { this.buffer = `%40${this.buffer}`; @@ -3387,7 +3388,7 @@ var require_url_state_machine = __commonJS({ const len = countSymbols(this.buffer); for (let pointer = 0; pointer < len; ++pointer) { const codePoint = this.buffer.codePointAt(pointer); - if (codePoint === p4(":") && !this.passwordTokenSeenFlag) { + if (codePoint === p6(":") && !this.passwordTokenSeenFlag) { this.passwordTokenSeenFlag = true; continue; } @@ -3399,7 +3400,7 @@ var require_url_state_machine = __commonJS({ } } this.buffer = ""; - } else if (isNaN(c3) || c3 === p4("/") || c3 === p4("?") || c3 === p4("#") || isSpecial(this.url) && c3 === p4("\\")) { + } else if (isNaN(c5) || c5 === p6("/") || c5 === p6("?") || c5 === p6("#") || isSpecial(this.url) && c5 === p6("\\")) { if (this.atFlag && this.buffer === "") { this.parseError = true; return failure; @@ -3412,11 +3413,11 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c3, cStr) { + URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c5, cStr) { if (this.stateOverride && this.url.scheme === "file") { --this.pointer; this.state = "file host"; - } else if (c3 === p4(":") && !this.arrFlag) { + } else if (c5 === p6(":") && !this.arrFlag) { if (this.buffer === "") { this.parseError = true; return failure; @@ -3431,7 +3432,7 @@ var require_url_state_machine = __commonJS({ this.url.host = host; this.buffer = ""; this.state = "port"; - } else if (isNaN(c3) || c3 === p4("/") || c3 === p4("?") || c3 === p4("#") || isSpecial(this.url) && c3 === p4("\\")) { + } else if (isNaN(c5) || c5 === p6("/") || c5 === p6("?") || c5 === p6("#") || isSpecial(this.url) && c5 === p6("\\")) { --this.pointer; if (isSpecial(this.url) && this.buffer === "") { this.parseError = true; @@ -3451,19 +3452,19 @@ var require_url_state_machine = __commonJS({ return false; } } else { - if (c3 === p4("[")) { + if (c5 === p6("[")) { this.arrFlag = true; - } else if (c3 === p4("]")) { + } else if (c5 === p6("]")) { this.arrFlag = false; } this.buffer += cStr; } return true; }; - URLStateMachine.prototype["parse port"] = function parsePort(c3, cStr) { - if (infra.isASCIIDigit(c3)) { + URLStateMachine.prototype["parse port"] = function parsePort(c5, cStr) { + if (infra.isASCIIDigit(c5)) { this.buffer += cStr; - } else if (isNaN(c3) || c3 === p4("/") || c3 === p4("?") || c3 === p4("#") || isSpecial(this.url) && c3 === p4("\\") || this.stateOverride) { + } else if (isNaN(c5) || c5 === p6("/") || c5 === p6("?") || c5 === p6("#") || isSpecial(this.url) && c5 === p6("\\") || this.stateOverride) { if (this.buffer !== "") { const port = parseInt(this.buffer); if (port > 2 ** 16 - 1) { @@ -3484,16 +3485,16 @@ var require_url_state_machine = __commonJS({ } return true; }; - var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([p4("/"), p4("\\"), p4("?"), p4("#")]); + var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([p6("/"), p6("\\"), p6("?"), p6("#")]); function startsWithWindowsDriveLetter(input, pointer) { const length = input.length - pointer; return length >= 2 && isWindowsDriveLetterCodePoints(input[pointer], input[pointer + 1]) && (length === 2 || fileOtherwiseCodePoints.has(input[pointer + 2])); } - URLStateMachine.prototype["parse file"] = function parseFile(c3) { + URLStateMachine.prototype["parse file"] = function parseFile(c5) { this.url.scheme = "file"; this.url.host = ""; - if (c3 === p4("/") || c3 === p4("\\")) { - if (c3 === p4("\\")) { + if (c5 === p6("/") || c5 === p6("\\")) { + if (c5 === p6("\\")) { this.parseError = true; } this.state = "file slash"; @@ -3501,13 +3502,13 @@ var require_url_state_machine = __commonJS({ this.url.host = this.base.host; this.url.path = this.base.path.slice(); this.url.query = this.base.query; - if (c3 === p4("?")) { + if (c5 === p6("?")) { this.url.query = ""; this.state = "query"; - } else if (c3 === p4("#")) { + } else if (c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (!isNaN(c3)) { + } else if (!isNaN(c5)) { this.url.query = null; if (!startsWithWindowsDriveLetter(this.input, this.pointer)) { shortenPath(this.url); @@ -3524,9 +3525,9 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c3) { - if (c3 === p4("/") || c3 === p4("\\")) { - if (c3 === p4("\\")) { + URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c5) { + if (c5 === p6("/") || c5 === p6("\\")) { + if (c5 === p6("\\")) { this.parseError = true; } this.state = "file host"; @@ -3542,8 +3543,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse file host"] = function parseFileHost(c3, cStr) { - if (isNaN(c3) || c3 === p4("/") || c3 === p4("\\") || c3 === p4("?") || c3 === p4("#")) { + URLStateMachine.prototype["parse file host"] = function parseFileHost(c5, cStr) { + if (isNaN(c5) || c5 === p6("/") || c5 === p6("\\") || c5 === p6("?") || c5 === p6("#")) { --this.pointer; if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { this.parseError = true; @@ -3574,24 +3575,24 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path start"] = function parsePathStart(c3) { + URLStateMachine.prototype["parse path start"] = function parsePathStart(c5) { if (isSpecial(this.url)) { - if (c3 === p4("\\")) { + if (c5 === p6("\\")) { this.parseError = true; } this.state = "path"; - if (c3 !== p4("/") && c3 !== p4("\\")) { + if (c5 !== p6("/") && c5 !== p6("\\")) { --this.pointer; } - } else if (!this.stateOverride && c3 === p4("?")) { + } else if (!this.stateOverride && c5 === p6("?")) { this.url.query = ""; this.state = "query"; - } else if (!this.stateOverride && c3 === p4("#")) { + } else if (!this.stateOverride && c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (c3 !== void 0) { + } else if (c5 !== void 0) { this.state = "path"; - if (c3 !== p4("/")) { + if (c5 !== p6("/")) { --this.pointer; } } else if (this.stateOverride && this.url.host === null) { @@ -3599,17 +3600,17 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path"] = function parsePath(c3) { - if (isNaN(c3) || c3 === p4("/") || isSpecial(this.url) && c3 === p4("\\") || !this.stateOverride && (c3 === p4("?") || c3 === p4("#"))) { - if (isSpecial(this.url) && c3 === p4("\\")) { + URLStateMachine.prototype["parse path"] = function parsePath(c5) { + if (isNaN(c5) || c5 === p6("/") || isSpecial(this.url) && c5 === p6("\\") || !this.stateOverride && (c5 === p6("?") || c5 === p6("#"))) { + if (isSpecial(this.url) && c5 === p6("\\")) { this.parseError = true; } if (isDoubleDot(this.buffer)) { shortenPath(this.url); - if (c3 !== p4("/") && !(isSpecial(this.url) && c3 === p4("\\"))) { + if (c5 !== p6("/") && !(isSpecial(this.url) && c5 === p6("\\"))) { this.url.path.push(""); } - } else if (isSingleDot(this.buffer) && c3 !== p4("/") && !(isSpecial(this.url) && c3 === p4("\\"))) { + } else if (isSingleDot(this.buffer) && c5 !== p6("/") && !(isSpecial(this.url) && c5 === p6("\\"))) { this.url.path.push(""); } else if (!isSingleDot(this.buffer)) { if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { @@ -3618,75 +3619,75 @@ var require_url_state_machine = __commonJS({ this.url.path.push(this.buffer); } this.buffer = ""; - if (c3 === p4("?")) { + if (c5 === p6("?")) { this.url.query = ""; this.state = "query"; } - if (c3 === p4("#")) { + if (c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; } } else { - if (c3 === p4("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + if (c5 === p6("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - this.buffer += utf8PercentEncodeCodePoint(c3, isPathPercentEncode); + this.buffer += utf8PercentEncodeCodePoint(c5, isPathPercentEncode); } return true; }; - URLStateMachine.prototype["parse opaque path"] = function parseOpaquePath(c3) { - if (c3 === p4("?")) { + URLStateMachine.prototype["parse opaque path"] = function parseOpaquePath(c5) { + if (c5 === p6("?")) { this.url.query = ""; this.state = "query"; - } else if (c3 === p4("#")) { + } else if (c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (c3 === p4(" ")) { + } else if (c5 === p6(" ")) { const remaining = this.input[this.pointer + 1]; - if (remaining === p4("?") || remaining === p4("#")) { + if (remaining === p6("?") || remaining === p6("#")) { this.url.path += "%20"; } else { this.url.path += " "; } } else { - if (!isNaN(c3) && c3 !== p4("%")) { + if (!isNaN(c5) && c5 !== p6("%")) { this.parseError = true; } - if (c3 === p4("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + if (c5 === p6("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - if (!isNaN(c3)) { - this.url.path += utf8PercentEncodeCodePoint(c3, isC0ControlPercentEncode); + if (!isNaN(c5)) { + this.url.path += utf8PercentEncodeCodePoint(c5, isC0ControlPercentEncode); } } return true; }; - URLStateMachine.prototype["parse query"] = function parseQuery(c3, cStr) { + URLStateMachine.prototype["parse query"] = function parseQuery(c5, cStr) { if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { this.encodingOverride = "utf-8"; } - if (!this.stateOverride && c3 === p4("#") || isNaN(c3)) { + if (!this.stateOverride && c5 === p6("#") || isNaN(c5)) { const queryPercentEncodePredicate = isSpecial(this.url) ? isSpecialQueryPercentEncode : isQueryPercentEncode; this.url.query += utf8PercentEncodeString(this.buffer, queryPercentEncodePredicate); this.buffer = ""; - if (c3 === p4("#")) { + if (c5 === p6("#")) { this.url.fragment = ""; this.state = "fragment"; } - } else if (!isNaN(c3)) { - if (c3 === p4("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + } else if (!isNaN(c5)) { + if (c5 === p6("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } this.buffer += cStr; } return true; }; - URLStateMachine.prototype["parse fragment"] = function parseFragment(c3) { - if (!isNaN(c3)) { - if (c3 === p4("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + URLStateMachine.prototype["parse fragment"] = function parseFragment(c5) { + if (!isNaN(c5)) { + if (c5 === p6("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - this.url.fragment += utf8PercentEncodeCodePoint(c3, isFragmentPercentEncode); + this.url.fragment += utf8PercentEncodeCodePoint(c5, isFragmentPercentEncode); } return true; }; @@ -3803,18 +3804,18 @@ var require_urlencoded = __commonJS({ "use strict"; var { utf8Encode, utf8DecodeWithoutBOM } = require_encoding(); var { percentDecodeBytes, utf8PercentEncodeString, isURLEncodedPercentEncode } = require_percent_encoding(); - function p4(char) { + function p6(char) { return char.codePointAt(0); } function parseUrlencoded(input) { - const sequences = strictlySplitByteSequence(input, p4("&")); + const sequences = strictlySplitByteSequence(input, p6("&")); const output = []; for (const bytes of sequences) { if (bytes.length === 0) { continue; } let name, value; - const indexOfEqual = bytes.indexOf(p4("=")); + const indexOfEqual = bytes.indexOf(p6("=")); if (indexOfEqual >= 0) { name = bytes.slice(0, indexOfEqual); value = bytes.slice(indexOfEqual + 1); @@ -3835,10 +3836,10 @@ var require_urlencoded = __commonJS({ } function serializeUrlencoded(tuples) { let output = ""; - for (const [i3, tuple] of tuples.entries()) { + for (const [i5, tuple] of tuples.entries()) { const name = utf8PercentEncodeString(tuple[0], isURLEncodedPercentEncode, true); const value = utf8PercentEncodeString(tuple[1], isURLEncodedPercentEncode, true); - if (i3 !== 0) { + if (i5 !== 0) { output += "&"; } output += `${name}=${value}`; @@ -3848,11 +3849,11 @@ var require_urlencoded = __commonJS({ function strictlySplitByteSequence(buf, cp) { const list = []; let last = 0; - let i3 = buf.indexOf(cp); - while (i3 >= 0) { - list.push(buf.slice(last, i3)); - last = i3 + 1; - i3 = buf.indexOf(cp, last); + let i5 = buf.indexOf(cp); + while (i5 >= 0) { + list.push(buf.slice(last, i5)); + last = i5 + 1; + i5 = buf.indexOf(cp, last); } if (last !== buf.length) { list.push(buf.slice(last)); @@ -3860,10 +3861,10 @@ var require_urlencoded = __commonJS({ return list; } function replaceByteInByteSequence(buf, from, to) { - let i3 = buf.indexOf(from); - while (i3 >= 0) { - buf[i3] = to; - i3 = buf.indexOf(from, i3 + 1); + let i5 = buf.indexOf(from); + while (i5 >= 0) { + buf[i5] = to; + i5 = buf.indexOf(from, i5 + 1); } return buf; } @@ -3887,16 +3888,16 @@ var require_Function = __commonJS({ function invokeTheCallbackFunction(...args) { const thisArg = utils.tryWrapperForImpl(this); let callResult; - for (let i3 = 0; i3 < args.length; i3++) { - args[i3] = utils.tryWrapperForImpl(args[i3]); + for (let i5 = 0; i5 < args.length; i5++) { + args[i5] = utils.tryWrapperForImpl(args[i5]); } callResult = Reflect.apply(value, thisArg, args); callResult = conversions["any"](callResult, { context, globals: globalObject }); return callResult; } invokeTheCallbackFunction.construct = (...args) => { - for (let i3 = 0; i3 < args.length; i3++) { - args[i3] = utils.tryWrapperForImpl(args[i3]); + for (let i5 = 0; i5 < args.length; i5++) { + args[i5] = utils.tryWrapperForImpl(args[i5]); } let callResult = Reflect.construct(value, args); callResult = conversions["any"](callResult, { context, globals: globalObject }); @@ -3955,12 +3956,12 @@ var require_URLSearchParams_impl = __commonJS({ this._updateSteps(); } delete(name, value) { - let i3 = 0; - while (i3 < this._list.length) { - if (this._list[i3][0] === name && (value === void 0 || this._list[i3][1] === value)) { - this._list.splice(i3, 1); + let i5 = 0; + while (i5 < this._list.length) { + if (this._list[i5][0] === name && (value === void 0 || this._list[i5][1] === value)) { + this._list.splice(i5, 1); } else { - i3++; + i5++; } } this._updateSteps(); @@ -3992,18 +3993,18 @@ var require_URLSearchParams_impl = __commonJS({ } set(name, value) { let found = false; - let i3 = 0; - while (i3 < this._list.length) { - if (this._list[i3][0] === name) { + let i5 = 0; + while (i5 < this._list.length) { + if (this._list[i5][0] === name) { if (found) { - this._list.splice(i3, 1); + this._list.splice(i5, 1); } else { found = true; - this._list[i3][1] = value; - i3++; + this._list[i5][1] = value; + i5++; } } else { - i3++; + i5++; } } if (!found) { @@ -4012,11 +4013,11 @@ var require_URLSearchParams_impl = __commonJS({ this._updateSteps(); } sort() { - this._list.sort((a4, b7) => { - if (a4[0] < b7[0]) { + this._list.sort((a6, b9) => { + if (a6[0] < b9[0]) { return -1; } - if (a4[0] > b7[0]) { + if (a6[0] > b9[0]) { return 1; } return 0; @@ -4415,12 +4416,12 @@ var require_URLSearchParams = __commonJS({ }); const thisArg = arguments[1]; let pairs = Array.from(this[implSymbol]); - let i3 = 0; - while (i3 < pairs.length) { - const [key, value] = pairs[i3].map(utils.tryWrapperForImpl); + let i5 = 0; + while (i5 < pairs.length) { + const [key, value] = pairs[i5].map(utils.tryWrapperForImpl); callback.call(thisArg, value, key, this); pairs = Array.from(this[implSymbol]); - i3++; + i5++; } } get size() { @@ -4535,10 +4536,10 @@ var require_URL_impl = __commonJS({ get href() { return usm.serializeURL(this._url); } - set href(v5) { - const parsedURL = usm.basicURLParse(v5); + set href(v8) { + const parsedURL = usm.basicURLParse(v8); if (parsedURL === null) { - throw new TypeError(`Invalid URL: ${v5}`); + throw new TypeError(`Invalid URL: ${v8}`); } this._url = parsedURL; this._query._list.splice(0); @@ -4553,26 +4554,26 @@ var require_URL_impl = __commonJS({ get protocol() { return `${this._url.scheme}:`; } - set protocol(v5) { - usm.basicURLParse(`${v5}:`, { url: this._url, stateOverride: "scheme start" }); + set protocol(v8) { + usm.basicURLParse(`${v8}:`, { url: this._url, stateOverride: "scheme start" }); } get username() { return this._url.username; } - set username(v5) { + set username(v8) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - usm.setTheUsername(this._url, v5); + usm.setTheUsername(this._url, v8); } get password() { return this._url.password; } - set password(v5) { + set password(v8) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - usm.setThePassword(this._url, v5); + usm.setThePassword(this._url, v8); } get host() { const url2 = this._url; @@ -4584,11 +4585,11 @@ var require_URL_impl = __commonJS({ } return `${usm.serializeHost(url2.host)}:${usm.serializeInteger(url2.port)}`; } - set host(v5) { + set host(v8) { if (usm.hasAnOpaquePath(this._url)) { return; } - usm.basicURLParse(v5, { url: this._url, stateOverride: "host" }); + usm.basicURLParse(v8, { url: this._url, stateOverride: "host" }); } get hostname() { if (this._url.host === null) { @@ -4596,11 +4597,11 @@ var require_URL_impl = __commonJS({ } return usm.serializeHost(this._url.host); } - set hostname(v5) { + set hostname(v8) { if (usm.hasAnOpaquePath(this._url)) { return; } - usm.basicURLParse(v5, { url: this._url, stateOverride: "hostname" }); + usm.basicURLParse(v8, { url: this._url, stateOverride: "hostname" }); } get port() { if (this._url.port === null) { @@ -4608,25 +4609,25 @@ var require_URL_impl = __commonJS({ } return usm.serializeInteger(this._url.port); } - set port(v5) { + set port(v8) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - if (v5 === "") { + if (v8 === "") { this._url.port = null; } else { - usm.basicURLParse(v5, { url: this._url, stateOverride: "port" }); + usm.basicURLParse(v8, { url: this._url, stateOverride: "port" }); } } get pathname() { return usm.serializePath(this._url); } - set pathname(v5) { + set pathname(v8) { if (usm.hasAnOpaquePath(this._url)) { return; } this._url.path = []; - usm.basicURLParse(v5, { url: this._url, stateOverride: "path start" }); + usm.basicURLParse(v8, { url: this._url, stateOverride: "path start" }); } get search() { if (this._url.query === null || this._url.query === "") { @@ -4634,14 +4635,14 @@ var require_URL_impl = __commonJS({ } return `?${this._url.query}`; } - set search(v5) { + set search(v8) { const url2 = this._url; - if (v5 === "") { + if (v8 === "") { url2.query = null; this._query._list = []; return; } - const input = v5[0] === "?" ? v5.substring(1) : v5; + const input = v8[0] === "?" ? v8.substring(1) : v8; url2.query = ""; usm.basicURLParse(input, { url: url2, stateOverride: "query" }); this._query._list = urlencoded.parseUrlencodedString(input); @@ -4655,12 +4656,12 @@ var require_URL_impl = __commonJS({ } return `#${this._url.fragment}`; } - set hash(v5) { - if (v5 === "") { + set hash(v8) { + if (v8 === "") { this._url.fragment = null; return; } - const input = v5[0] === "#" ? v5.substring(1) : v5; + const input = v8[0] === "#" ? v8.substring(1) : v8; this._url.fragment = ""; usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); } @@ -4744,7 +4745,7 @@ var require_URL = __commonJS({ return; } const ctorRegistry = utils.initCtorRegistry(globalObject); - class URL2 { + class URL4 { constructor(url2) { if (arguments.length < 1) { throw new globalObject.TypeError( @@ -5037,7 +5038,7 @@ var require_URL = __commonJS({ return Impl.implementation.canParse(...args); } } - Object.defineProperties(URL2.prototype, { + Object.defineProperties(URL4.prototype, { toJSON: { enumerable: true }, href: { enumerable: true }, toString: { enumerable: true }, @@ -5054,18 +5055,18 @@ var require_URL = __commonJS({ hash: { enumerable: true }, [Symbol.toStringTag]: { value: "URL", configurable: true } }); - Object.defineProperties(URL2, { parse: { enumerable: true }, canParse: { enumerable: true } }); - ctorRegistry[interfaceName] = URL2; + Object.defineProperties(URL4, { parse: { enumerable: true }, canParse: { enumerable: true } }); + ctorRegistry[interfaceName] = URL4; Object.defineProperty(globalObject, interfaceName, { configurable: true, writable: true, - value: URL2 + value: URL4 }); if (globalNames.includes("Window")) { Object.defineProperty(globalObject, "webkitURL", { configurable: true, writable: true, - value: URL2 + value: URL4 }); } }; @@ -5077,9 +5078,9 @@ var require_URL = __commonJS({ var require_webidl2js_wrapper = __commonJS({ "node_modules/whatwg-url/webidl2js-wrapper.js"(exports2) { "use strict"; - var URL2 = require_URL(); + var URL4 = require_URL(); var URLSearchParams2 = require_URLSearchParams(); - exports2.URL = URL2; + exports2.URL = URL4; exports2.URLSearchParams = URLSearchParams2; } }); @@ -5088,11 +5089,11 @@ var require_webidl2js_wrapper = __commonJS({ var require_whatwg_url = __commonJS({ "node_modules/whatwg-url/index.js"(exports2) { "use strict"; - var { URL: URL2, URLSearchParams: URLSearchParams2 } = require_webidl2js_wrapper(); + var { URL: URL4, URLSearchParams: URLSearchParams2 } = require_webidl2js_wrapper(); var urlStateMachine = require_url_state_machine(); var percentEncoding = require_percent_encoding(); var sharedGlobalObject = { Array, Object, Promise, String, TypeError }; - URL2.install(sharedGlobalObject, ["Window"]); + URL4.install(sharedGlobalObject, ["Window"]); URLSearchParams2.install(sharedGlobalObject, ["Window"]); exports2.URL = sharedGlobalObject.URL; exports2.URLSearchParams = sharedGlobalObject.URLSearchParams; @@ -5137,10 +5138,10 @@ var require_lib2 = __commonJS({ const buffers = []; let size = 0; if (blobParts) { - const a4 = blobParts; - const length = Number(a4.length); - for (let i3 = 0; i3 < length; i3++) { - const element = a4[i3]; + const a6 = blobParts; + const length = Number(a6.length); + for (let i5 = 0; i5 < length; i5++) { + const element = a6[i5]; let buffer; if (element instanceof Buffer) { buffer = element; @@ -5241,7 +5242,7 @@ var require_lib2 = __commonJS({ var convert; try { convert = require("encoding").convert; - } catch (e3) { + } catch (e5) { } var INTERNALS = Symbol("Body internals"); var PassThrough = Stream3.PassThrough; @@ -5255,7 +5256,7 @@ var require_lib2 = __commonJS({ body = null; } else if (isURLSearchParams2(body)) { body = Buffer.from(body.toString()); - } else if (isBlob4(body)) ; + } else if (isBlob5(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") { body = Buffer.from(body); @@ -5390,7 +5391,7 @@ var require_lib2 = __commonJS({ if (body === null) { return Body.Promise.resolve(Buffer.alloc(0)); } - if (isBlob4(body)) { + if (isBlob5(body)) { body = body.stream(); } if (Buffer.isBuffer(body)) { @@ -5486,7 +5487,7 @@ var require_lib2 = __commonJS({ } return obj.constructor.name === "URLSearchParams" || Object.prototype.toString.call(obj) === "[object URLSearchParams]" || typeof obj.sort === "function"; } - function isBlob4(obj) { + function isBlob5(obj) { return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); } function clone(instance) { @@ -5512,7 +5513,7 @@ var require_lib2 = __commonJS({ return "text/plain;charset=UTF-8"; } else if (isURLSearchParams2(body)) { return "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { return body.type || null; } else if (Buffer.isBuffer(body)) { return null; @@ -5532,7 +5533,7 @@ var require_lib2 = __commonJS({ const body = instance.body; if (body === null) { return 0; - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { return body.size; } else if (Buffer.isBuffer(body)) { return body.length; @@ -5550,7 +5551,7 @@ var require_lib2 = __commonJS({ const body = instance.body; if (body === null) { dest.end(); - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { body.stream().pipe(dest); } else if (Buffer.isBuffer(body)) { dest.write(body); @@ -5574,9 +5575,9 @@ var require_lib2 = __commonJS({ throw new TypeError(`${value} is not a legal HTTP header value`); } } - function find(map, name) { + function find(map2, name) { name = name.toLowerCase(); - for (const key in map) { + for (const key in map2) { if (key.toLowerCase() === name) { return key; } @@ -5659,13 +5660,13 @@ var require_lib2 = __commonJS({ forEach(callback) { let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0; let pairs = getHeaders2(this); - let i3 = 0; - while (i3 < pairs.length) { - var _pairs$i = pairs[i3]; + let i5 = 0; + while (i5 < pairs.length) { + var _pairs$i = pairs[i5]; const name = _pairs$i[0], value = _pairs$i[1]; callback.call(thisArg, value, name, this); pairs = getHeaders2(this); - i3++; + i5++; } } /** @@ -5783,12 +5784,12 @@ var require_lib2 = __commonJS({ function getHeaders2(headers) { let kind3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value"; const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind3 === "key" ? function(k7) { - return k7.toLowerCase(); - } : kind3 === "value" ? function(k7) { - return headers[MAP][k7].join(", "); - } : function(k7) { - return [k7.toLowerCase(), headers[MAP][k7].join(", ")]; + return keys.map(kind3 === "key" ? function(k9) { + return k9.toLowerCase(); + } : kind3 === "value" ? function(k9) { + return headers[MAP][k9].join(", "); + } : function(k9) { + return [k9.toLowerCase(), headers[MAP][k9].join(", ")]; }); } var INTERNAL = Symbol("internal"); @@ -5937,12 +5938,12 @@ var require_lib2 = __commonJS({ configurable: true }); var INTERNALS$2 = Symbol("Request internals"); - var URL2 = Url.URL || whatwgUrl.URL; + var URL4 = Url.URL || whatwgUrl.URL; var parse_url = Url.parse; var format_url = Url.format; function parseURL(urlStr) { if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL2(urlStr).toString(); + urlStr = new URL4(urlStr).toString(); } return parse_url(urlStr); } @@ -6168,9 +6169,9 @@ var require_lib2 = __commonJS({ } }); if (parseInt(process.version.substring(1)) < 14) { - req.on("socket", function(s2) { - s2.addListener("close", function(hadError) { - const hasDataListener = s2.listenerCount("data") > 0; + req.on("socket", function(s4) { + s4.addListener("close", function(hadError) { + const hasDataListener = s4.listenerCount("data") > 0; if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { const err = new Error("Premature close"); err.code = "ERR_STREAM_PREMATURE_CLOSE"; @@ -6311,8 +6312,8 @@ var require_lib2 = __commonJS({ } function fixResponseChunkedTransferBadEnding(request3, errorCallback) { let socket; - request3.on("socket", function(s2) { - socket = s2; + request3.on("socket", function(s4) { + socket = s4; }); request3.on("response", function(response) { const headers = response.headers; @@ -6354,1001 +6355,1001 @@ var require_lib2 = __commonJS({ // node_modules/formdata-node/node_modules/web-streams-polyfill/dist/ponyfill.mjs function t() { } -function r2(e3) { - return "object" == typeof e3 && null !== e3 || "function" == typeof e3; +function r2(e5) { + return "object" == typeof e5 && null !== e5 || "function" == typeof e5; } -function n(e3, t2) { +function n(e5, t4) { try { - Object.defineProperty(e3, "name", { value: t2, configurable: true }); - } catch (e4) { + Object.defineProperty(e5, "name", { value: t4, configurable: true }); + } catch (e6) { } } -function u2(e3) { - return new a3(e3); +function u2(e5) { + return new a3(e5); } -function c2(e3) { - return l2(e3); +function c2(e5) { + return l2(e5); } -function d6(e3) { - return s(e3); +function d6(e5) { + return s(e5); } -function f3(e3, t2, r3) { - return i2.call(e3, t2, r3); +function f3(e5, t4, r5) { + return i2.call(e5, t4, r5); } -function b6(e3, t2, r3) { - f3(f3(e3, t2, r3), void 0, o2); +function b6(e5, t4, r5) { + f3(f3(e5, t4, r5), void 0, o2); } -function h3(e3, t2) { - b6(e3, t2); +function h3(e5, t4) { + b6(e5, t4); } -function _6(e3, t2) { - b6(e3, void 0, t2); +function _6(e5, t4) { + b6(e5, void 0, t4); } -function p3(e3, t2, r3) { - return f3(e3, t2, r3); +function p3(e5, t4, r5) { + return f3(e5, t4, r5); } -function m4(e3) { - f3(e3, void 0, o2); +function m4(e5) { + f3(e5, void 0, o2); } -function g3(e3, t2, r3) { - if ("function" != typeof e3) throw new TypeError("Argument is not a function"); - return Function.prototype.apply.call(e3, t2, r3); +function g3(e5, t4, r5) { + if ("function" != typeof e5) throw new TypeError("Argument is not a function"); + return Function.prototype.apply.call(e5, t4, r5); } -function w6(e3, t2, r3) { +function w6(e5, t4, r5) { try { - return c2(g3(e3, t2, r3)); - } catch (e4) { - return d6(e4); + return c2(g3(e5, t4, r5)); + } catch (e6) { + return d6(e6); } } -function E3(e3, t2) { - e3._ownerReadableStream = t2, t2._reader = e3, "readable" === t2._state ? O4(e3) : "closed" === t2._state ? function(e4) { - O4(e4), j3(e4); - }(e3) : B2(e3, t2._storedError); +function E3(e5, t4) { + e5._ownerReadableStream = t4, t4._reader = e5, "readable" === t4._state ? O4(e5) : "closed" === t4._state ? function(e6) { + O4(e6), j3(e6); + }(e5) : B2(e5, t4._storedError); } -function P3(e3, t2) { - return Gt(e3._ownerReadableStream, t2); +function P3(e5, t4) { + return Gt(e5._ownerReadableStream, t4); } -function W5(e3) { - const t2 = e3._ownerReadableStream; - "readable" === t2._state ? A4(e3, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : function(e4, t3) { - B2(e4, t3); - }(e3, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), t2._readableStreamController[C4](), t2._reader = void 0, e3._ownerReadableStream = void 0; +function W5(e5) { + const t4 = e5._ownerReadableStream; + "readable" === t4._state ? A4(e5, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : function(e6, t5) { + B2(e6, t5); + }(e5, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), t4._readableStreamController[C4](), t4._reader = void 0, e5._ownerReadableStream = void 0; } -function k6(e3) { - return new TypeError("Cannot " + e3 + " a stream using a released reader"); +function k6(e5) { + return new TypeError("Cannot " + e5 + " a stream using a released reader"); } -function O4(e3) { - e3._closedPromise = u2((t2, r3) => { - e3._closedPromise_resolve = t2, e3._closedPromise_reject = r3; +function O4(e5) { + e5._closedPromise = u2((t4, r5) => { + e5._closedPromise_resolve = t4, e5._closedPromise_reject = r5; }); } -function B2(e3, t2) { - O4(e3), A4(e3, t2); +function B2(e5, t4) { + O4(e5), A4(e5, t4); } -function A4(e3, t2) { - void 0 !== e3._closedPromise_reject && (m4(e3._closedPromise), e3._closedPromise_reject(t2), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0); +function A4(e5, t4) { + void 0 !== e5._closedPromise_reject && (m4(e5._closedPromise), e5._closedPromise_reject(t4), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0); } -function j3(e3) { - void 0 !== e3._closedPromise_resolve && (e3._closedPromise_resolve(void 0), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0); +function j3(e5) { + void 0 !== e5._closedPromise_resolve && (e5._closedPromise_resolve(void 0), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0); } -function F4(e3, t2) { - if (void 0 !== e3 && ("object" != typeof (r3 = e3) && "function" != typeof r3)) throw new TypeError(`${t2} is not an object.`); - var r3; +function F4(e5, t4) { + if (void 0 !== e5 && ("object" != typeof (r5 = e5) && "function" != typeof r5)) throw new TypeError(`${t4} is not an object.`); + var r5; } -function I4(e3, t2) { - if ("function" != typeof e3) throw new TypeError(`${t2} is not a function.`); +function I4(e5, t4) { + if ("function" != typeof e5) throw new TypeError(`${t4} is not a function.`); } -function D4(e3, t2) { - if (!/* @__PURE__ */ function(e4) { - return "object" == typeof e4 && null !== e4 || "function" == typeof e4; - }(e3)) throw new TypeError(`${t2} is not an object.`); +function D4(e5, t4) { + if (!/* @__PURE__ */ function(e6) { + return "object" == typeof e6 && null !== e6 || "function" == typeof e6; + }(e5)) throw new TypeError(`${t4} is not an object.`); } -function $5(e3, t2, r3) { - if (void 0 === e3) throw new TypeError(`Parameter ${t2} is required in '${r3}'.`); +function $5(e5, t4, r5) { + if (void 0 === e5) throw new TypeError(`Parameter ${t4} is required in '${r5}'.`); } -function M4(e3, t2, r3) { - if (void 0 === e3) throw new TypeError(`${t2} is required in '${r3}'.`); +function M4(e5, t4, r5) { + if (void 0 === e5) throw new TypeError(`${t4} is required in '${r5}'.`); } -function Y2(e3) { - return Number(e3); +function Y2(e5) { + return Number(e5); } -function Q4(e3) { - return 0 === e3 ? 0 : e3; +function Q4(e5) { + return 0 === e5 ? 0 : e5; } -function N5(e3, t2) { - const r3 = Number.MAX_SAFE_INTEGER; - let o3 = Number(e3); - if (o3 = Q4(o3), !z5(o3)) throw new TypeError(`${t2} is not a finite number`); - if (o3 = function(e4) { - return Q4(L6(e4)); - }(o3), o3 < 0 || o3 > r3) throw new TypeError(`${t2} is outside the accepted range of 0 to ${r3}, inclusive`); - return z5(o3) && 0 !== o3 ? o3 : 0; +function N5(e5, t4) { + const r5 = Number.MAX_SAFE_INTEGER; + let o5 = Number(e5); + if (o5 = Q4(o5), !z5(o5)) throw new TypeError(`${t4} is not a finite number`); + if (o5 = function(e6) { + return Q4(L6(e6)); + }(o5), o5 < 0 || o5 > r5) throw new TypeError(`${t4} is outside the accepted range of 0 to ${r5}, inclusive`); + return z5(o5) && 0 !== o5 ? o5 : 0; } -function H4(e3) { - if (!r2(e3)) return false; - if ("function" != typeof e3.getReader) return false; +function H4(e5) { + if (!r2(e5)) return false; + if ("function" != typeof e5.getReader) return false; try { - return "boolean" == typeof e3.locked; - } catch (e4) { + return "boolean" == typeof e5.locked; + } catch (e6) { return false; } } -function x4(e3) { - if (!r2(e3)) return false; - if ("function" != typeof e3.getWriter) return false; +function x4(e5) { + if (!r2(e5)) return false; + if ("function" != typeof e5.getWriter) return false; try { - return "boolean" == typeof e3.locked; - } catch (e4) { + return "boolean" == typeof e5.locked; + } catch (e6) { return false; } } -function V5(e3, t2) { - if (!Vt(e3)) throw new TypeError(`${t2} is not a ReadableStream.`); +function V5(e5, t4) { + if (!Vt(e5)) throw new TypeError(`${t4} is not a ReadableStream.`); } -function U6(e3, t2) { - e3._reader._readRequests.push(t2); +function U6(e5, t4) { + e5._reader._readRequests.push(t4); } -function G5(e3, t2, r3) { - const o3 = e3._reader._readRequests.shift(); - r3 ? o3._closeSteps() : o3._chunkSteps(t2); +function G5(e5, t4, r5) { + const o5 = e5._reader._readRequests.shift(); + r5 ? o5._closeSteps() : o5._chunkSteps(t4); } -function X4(e3) { - return e3._reader._readRequests.length; +function X4(e5) { + return e5._reader._readRequests.length; } -function J4(e3) { - const t2 = e3._reader; - return void 0 !== t2 && !!K5(t2); +function J4(e5) { + const t4 = e5._reader; + return void 0 !== t4 && !!K5(t4); } -function K5(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readRequests") && e3 instanceof ReadableStreamDefaultReader); +function K5(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readRequests") && e5 instanceof ReadableStreamDefaultReader); } -function Z5(e3, t2) { - const r3 = e3._readRequests; - e3._readRequests = new S5(), r3.forEach((e4) => { - e4._errorSteps(t2); +function Z5(e5, t4) { + const r5 = e5._readRequests; + e5._readRequests = new S5(), r5.forEach((e6) => { + e6._errorSteps(t4); }); } -function ee2(e3) { - return new TypeError(`ReadableStreamDefaultReader.prototype.${e3} can only be used on a ReadableStreamDefaultReader`); +function ee2(e5) { + return new TypeError(`ReadableStreamDefaultReader.prototype.${e5} can only be used on a ReadableStreamDefaultReader`); } -function oe(e3) { - if (!r2(e3)) return false; - if (!Object.prototype.hasOwnProperty.call(e3, "_asyncIteratorImpl")) return false; +function oe(e5) { + if (!r2(e5)) return false; + if (!Object.prototype.hasOwnProperty.call(e5, "_asyncIteratorImpl")) return false; try { - return e3._asyncIteratorImpl instanceof te; - } catch (e4) { + return e5._asyncIteratorImpl instanceof te; + } catch (e6) { return false; } } -function ne(e3) { - return new TypeError(`ReadableStreamAsyncIterator.${e3} can only be used on a ReadableSteamAsyncIterator`); +function ne(e5) { + return new TypeError(`ReadableStreamAsyncIterator.${e5} can only be used on a ReadableSteamAsyncIterator`); } -function ie2(e3, t2, r3, o3, n2) { - new Uint8Array(e3).set(new Uint8Array(r3, o3, n2), t2); +function ie2(e5, t4, r5, o5, n4) { + new Uint8Array(e5).set(new Uint8Array(r5, o5, n4), t4); } -function le2(e3) { - const t2 = function(e4, t3, r3) { - if (e4.slice) return e4.slice(t3, r3); - const o3 = r3 - t3, n2 = new ArrayBuffer(o3); - return ie2(n2, 0, e4, t3, o3), n2; - }(e3.buffer, e3.byteOffset, e3.byteOffset + e3.byteLength); - return new Uint8Array(t2); +function le2(e5) { + const t4 = function(e6, t5, r5) { + if (e6.slice) return e6.slice(t5, r5); + const o5 = r5 - t5, n4 = new ArrayBuffer(o5); + return ie2(n4, 0, e6, t5, o5), n4; + }(e5.buffer, e5.byteOffset, e5.byteOffset + e5.byteLength); + return new Uint8Array(t4); } -function se(e3) { - const t2 = e3._queue.shift(); - return e3._queueTotalSize -= t2.size, e3._queueTotalSize < 0 && (e3._queueTotalSize = 0), t2.value; +function se(e5) { + const t4 = e5._queue.shift(); + return e5._queueTotalSize -= t4.size, e5._queueTotalSize < 0 && (e5._queueTotalSize = 0), t4.value; } -function ue2(e3, t2, r3) { - if ("number" != typeof (o3 = r3) || ae2(o3) || o3 < 0 || r3 === 1 / 0) throw new RangeError("Size must be a finite, non-NaN, non-negative number."); - var o3; - e3._queue.push({ value: t2, size: r3 }), e3._queueTotalSize += r3; +function ue2(e5, t4, r5) { + if ("number" != typeof (o5 = r5) || ae2(o5) || o5 < 0 || r5 === 1 / 0) throw new RangeError("Size must be a finite, non-NaN, non-negative number."); + var o5; + e5._queue.push({ value: t4, size: r5 }), e5._queueTotalSize += r5; } -function ce2(e3) { - e3._queue = new S5(), e3._queueTotalSize = 0; +function ce2(e5) { + e5._queue = new S5(), e5._queueTotalSize = 0; } -function de(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledReadableByteStream") && e3 instanceof ReadableByteStreamController); +function de(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledReadableByteStream") && e5 instanceof ReadableByteStreamController); } -function fe(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_associatedReadableByteStreamController") && e3 instanceof ReadableStreamBYOBRequest); +function fe(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_associatedReadableByteStreamController") && e5 instanceof ReadableStreamBYOBRequest); } -function be(e3) { - const t2 = function(e4) { - const t3 = e4._controlledReadableByteStream; - if ("readable" !== t3._state) return false; - if (e4._closeRequested) return false; - if (!e4._started) return false; - if (J4(t3) && X4(t3) > 0) return true; - if (Le(t3) && ze(t3) > 0) return true; - if (ke(e4) > 0) return true; +function be(e5) { + const t4 = function(e6) { + const t5 = e6._controlledReadableByteStream; + if ("readable" !== t5._state) return false; + if (e6._closeRequested) return false; + if (!e6._started) return false; + if (J4(t5) && X4(t5) > 0) return true; + if (Le(t5) && ze(t5) > 0) return true; + if (ke(e6) > 0) return true; return false; - }(e3); - if (!t2) return; - if (e3._pulling) return void (e3._pullAgain = true); - e3._pulling = true; - b6(e3._pullAlgorithm(), () => (e3._pulling = false, e3._pullAgain && (e3._pullAgain = false, be(e3)), null), (t3) => (Pe(e3, t3), null)); -} -function he(e3) { - Re(e3), e3._pendingPullIntos = new S5(); -} -function _e(e3, t2) { - let r3 = false; - "closed" === e3._state && (r3 = true); - const o3 = pe(t2); - "default" === t2.readerType ? G5(e3, o3, r3) : function(e4, t3, r4) { - const o4 = e4._reader._readIntoRequests.shift(); - r4 ? o4._closeSteps(t3) : o4._chunkSteps(t3); - }(e3, o3, r3); -} -function pe(e3) { - const t2 = e3.bytesFilled, r3 = e3.elementSize; - return new e3.viewConstructor(e3.buffer, e3.byteOffset, t2 / r3); -} -function me(e3, t2, r3, o3) { - e3._queue.push({ buffer: t2, byteOffset: r3, byteLength: o3 }), e3._queueTotalSize += o3; -} -function ye(e3, t2, r3, o3) { - let n2; + }(e5); + if (!t4) return; + if (e5._pulling) return void (e5._pullAgain = true); + e5._pulling = true; + b6(e5._pullAlgorithm(), () => (e5._pulling = false, e5._pullAgain && (e5._pullAgain = false, be(e5)), null), (t5) => (Pe(e5, t5), null)); +} +function he(e5) { + Re(e5), e5._pendingPullIntos = new S5(); +} +function _e(e5, t4) { + let r5 = false; + "closed" === e5._state && (r5 = true); + const o5 = pe(t4); + "default" === t4.readerType ? G5(e5, o5, r5) : function(e6, t5, r6) { + const o6 = e6._reader._readIntoRequests.shift(); + r6 ? o6._closeSteps(t5) : o6._chunkSteps(t5); + }(e5, o5, r5); +} +function pe(e5) { + const t4 = e5.bytesFilled, r5 = e5.elementSize; + return new e5.viewConstructor(e5.buffer, e5.byteOffset, t4 / r5); +} +function me(e5, t4, r5, o5) { + e5._queue.push({ buffer: t4, byteOffset: r5, byteLength: o5 }), e5._queueTotalSize += o5; +} +function ye(e5, t4, r5, o5) { + let n4; try { - n2 = t2.slice(r3, r3 + o3); - } catch (t3) { - throw Pe(e3, t3), t3; - } - me(e3, n2, 0, o3); -} -function ge(e3, t2) { - t2.bytesFilled > 0 && ye(e3, t2.buffer, t2.byteOffset, t2.bytesFilled), Ce(e3); -} -function we(e3, t2) { - const r3 = t2.elementSize, o3 = t2.bytesFilled - t2.bytesFilled % r3, n2 = Math.min(e3._queueTotalSize, t2.byteLength - t2.bytesFilled), a4 = t2.bytesFilled + n2, i3 = a4 - a4 % r3; - let l3 = n2, s2 = false; - i3 > o3 && (l3 = i3 - t2.bytesFilled, s2 = true); - const u3 = e3._queue; - for (; l3 > 0; ) { - const r4 = u3.peek(), o4 = Math.min(l3, r4.byteLength), n3 = t2.byteOffset + t2.bytesFilled; - ie2(t2.buffer, n3, r4.buffer, r4.byteOffset, o4), r4.byteLength === o4 ? u3.shift() : (r4.byteOffset += o4, r4.byteLength -= o4), e3._queueTotalSize -= o4, Se(e3, o4, t2), l3 -= o4; - } - return s2; -} -function Se(e3, t2, r3) { - r3.bytesFilled += t2; -} -function ve(e3) { - 0 === e3._queueTotalSize && e3._closeRequested ? (Ee(e3), Xt(e3._controlledReadableByteStream)) : be(e3); -} -function Re(e3) { - null !== e3._byobRequest && (e3._byobRequest._associatedReadableByteStreamController = void 0, e3._byobRequest._view = null, e3._byobRequest = null); -} -function Te(e3) { - for (; e3._pendingPullIntos.length > 0; ) { - if (0 === e3._queueTotalSize) return; - const t2 = e3._pendingPullIntos.peek(); - we(e3, t2) && (Ce(e3), _e(e3._controlledReadableByteStream, t2)); - } -} -function qe(e3, t2) { - const r3 = e3._pendingPullIntos.peek(); - Re(e3); - "closed" === e3._controlledReadableByteStream._state ? function(e4, t3) { - "none" === t3.readerType && Ce(e4); - const r4 = e4._controlledReadableByteStream; - if (Le(r4)) for (; ze(r4) > 0; ) _e(r4, Ce(e4)); - }(e3, r3) : function(e4, t3, r4) { - if (Se(0, t3, r4), "none" === r4.readerType) return ge(e4, r4), void Te(e4); - if (r4.bytesFilled < r4.elementSize) return; - Ce(e4); - const o3 = r4.bytesFilled % r4.elementSize; - if (o3 > 0) { - const t4 = r4.byteOffset + r4.bytesFilled; - ye(e4, r4.buffer, t4 - o3, o3); - } - r4.bytesFilled -= o3, _e(e4._controlledReadableByteStream, r4), Te(e4); - }(e3, t2, r3), be(e3); -} -function Ce(e3) { - return e3._pendingPullIntos.shift(); -} -function Ee(e3) { - e3._pullAlgorithm = void 0, e3._cancelAlgorithm = void 0; -} -function Pe(e3, t2) { - const r3 = e3._controlledReadableByteStream; - "readable" === r3._state && (he(e3), ce2(e3), Ee(e3), Jt(r3, t2)); -} -function We(e3, t2) { - const r3 = e3._queue.shift(); - e3._queueTotalSize -= r3.byteLength, ve(e3); - const o3 = new Uint8Array(r3.buffer, r3.byteOffset, r3.byteLength); - t2._chunkSteps(o3); -} -function ke(e3) { - const t2 = e3._controlledReadableByteStream._state; - return "errored" === t2 ? null : "closed" === t2 ? 0 : e3._strategyHWM - e3._queueTotalSize; -} -function Oe(e3, t2, r3) { - const o3 = Object.create(ReadableByteStreamController.prototype); - let n2, a4, i3; - n2 = void 0 !== t2.start ? () => t2.start(o3) : () => { - }, a4 = void 0 !== t2.pull ? () => t2.pull(o3) : () => c2(void 0), i3 = void 0 !== t2.cancel ? (e4) => t2.cancel(e4) : () => c2(void 0); - const l3 = t2.autoAllocateChunkSize; - if (0 === l3) throw new TypeError("autoAllocateChunkSize must be greater than 0"); - !function(e4, t3, r4, o4, n3, a5, i4) { - t3._controlledReadableByteStream = e4, t3._pullAgain = false, t3._pulling = false, t3._byobRequest = null, t3._queue = t3._queueTotalSize = void 0, ce2(t3), t3._closeRequested = false, t3._started = false, t3._strategyHWM = a5, t3._pullAlgorithm = o4, t3._cancelAlgorithm = n3, t3._autoAllocateChunkSize = i4, t3._pendingPullIntos = new S5(), e4._readableStreamController = t3, b6(c2(r4()), () => (t3._started = true, be(t3), null), (e5) => (Pe(t3, e5), null)); - }(e3, o3, n2, a4, i3, r3, l3); -} -function Be(e3) { - return new TypeError(`ReadableStreamBYOBRequest.prototype.${e3} can only be used on a ReadableStreamBYOBRequest`); -} -function Ae(e3) { - return new TypeError(`ReadableByteStreamController.prototype.${e3} can only be used on a ReadableByteStreamController`); -} -function je(e3, t2) { - e3._reader._readIntoRequests.push(t2); -} -function ze(e3) { - return e3._reader._readIntoRequests.length; -} -function Le(e3) { - const t2 = e3._reader; - return void 0 !== t2 && !!Fe(t2); -} -function Fe(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readIntoRequests") && e3 instanceof ReadableStreamBYOBReader); -} -function Ie(e3, t2) { - const r3 = e3._readIntoRequests; - e3._readIntoRequests = new S5(), r3.forEach((e4) => { - e4._errorSteps(t2); + n4 = t4.slice(r5, r5 + o5); + } catch (t5) { + throw Pe(e5, t5), t5; + } + me(e5, n4, 0, o5); +} +function ge(e5, t4) { + t4.bytesFilled > 0 && ye(e5, t4.buffer, t4.byteOffset, t4.bytesFilled), Ce(e5); +} +function we(e5, t4) { + const r5 = t4.elementSize, o5 = t4.bytesFilled - t4.bytesFilled % r5, n4 = Math.min(e5._queueTotalSize, t4.byteLength - t4.bytesFilled), a6 = t4.bytesFilled + n4, i5 = a6 - a6 % r5; + let l5 = n4, s4 = false; + i5 > o5 && (l5 = i5 - t4.bytesFilled, s4 = true); + const u5 = e5._queue; + for (; l5 > 0; ) { + const r6 = u5.peek(), o6 = Math.min(l5, r6.byteLength), n5 = t4.byteOffset + t4.bytesFilled; + ie2(t4.buffer, n5, r6.buffer, r6.byteOffset, o6), r6.byteLength === o6 ? u5.shift() : (r6.byteOffset += o6, r6.byteLength -= o6), e5._queueTotalSize -= o6, Se(e5, o6, t4), l5 -= o6; + } + return s4; +} +function Se(e5, t4, r5) { + r5.bytesFilled += t4; +} +function ve(e5) { + 0 === e5._queueTotalSize && e5._closeRequested ? (Ee(e5), Xt(e5._controlledReadableByteStream)) : be(e5); +} +function Re(e5) { + null !== e5._byobRequest && (e5._byobRequest._associatedReadableByteStreamController = void 0, e5._byobRequest._view = null, e5._byobRequest = null); +} +function Te(e5) { + for (; e5._pendingPullIntos.length > 0; ) { + if (0 === e5._queueTotalSize) return; + const t4 = e5._pendingPullIntos.peek(); + we(e5, t4) && (Ce(e5), _e(e5._controlledReadableByteStream, t4)); + } +} +function qe(e5, t4) { + const r5 = e5._pendingPullIntos.peek(); + Re(e5); + "closed" === e5._controlledReadableByteStream._state ? function(e6, t5) { + "none" === t5.readerType && Ce(e6); + const r6 = e6._controlledReadableByteStream; + if (Le(r6)) for (; ze(r6) > 0; ) _e(r6, Ce(e6)); + }(e5, r5) : function(e6, t5, r6) { + if (Se(0, t5, r6), "none" === r6.readerType) return ge(e6, r6), void Te(e6); + if (r6.bytesFilled < r6.elementSize) return; + Ce(e6); + const o5 = r6.bytesFilled % r6.elementSize; + if (o5 > 0) { + const t6 = r6.byteOffset + r6.bytesFilled; + ye(e6, r6.buffer, t6 - o5, o5); + } + r6.bytesFilled -= o5, _e(e6._controlledReadableByteStream, r6), Te(e6); + }(e5, t4, r5), be(e5); +} +function Ce(e5) { + return e5._pendingPullIntos.shift(); +} +function Ee(e5) { + e5._pullAlgorithm = void 0, e5._cancelAlgorithm = void 0; +} +function Pe(e5, t4) { + const r5 = e5._controlledReadableByteStream; + "readable" === r5._state && (he(e5), ce2(e5), Ee(e5), Jt(r5, t4)); +} +function We(e5, t4) { + const r5 = e5._queue.shift(); + e5._queueTotalSize -= r5.byteLength, ve(e5); + const o5 = new Uint8Array(r5.buffer, r5.byteOffset, r5.byteLength); + t4._chunkSteps(o5); +} +function ke(e5) { + const t4 = e5._controlledReadableByteStream._state; + return "errored" === t4 ? null : "closed" === t4 ? 0 : e5._strategyHWM - e5._queueTotalSize; +} +function Oe(e5, t4, r5) { + const o5 = Object.create(ReadableByteStreamController.prototype); + let n4, a6, i5; + n4 = void 0 !== t4.start ? () => t4.start(o5) : () => { + }, a6 = void 0 !== t4.pull ? () => t4.pull(o5) : () => c2(void 0), i5 = void 0 !== t4.cancel ? (e6) => t4.cancel(e6) : () => c2(void 0); + const l5 = t4.autoAllocateChunkSize; + if (0 === l5) throw new TypeError("autoAllocateChunkSize must be greater than 0"); + !function(e6, t5, r6, o6, n5, a7, i6) { + t5._controlledReadableByteStream = e6, t5._pullAgain = false, t5._pulling = false, t5._byobRequest = null, t5._queue = t5._queueTotalSize = void 0, ce2(t5), t5._closeRequested = false, t5._started = false, t5._strategyHWM = a7, t5._pullAlgorithm = o6, t5._cancelAlgorithm = n5, t5._autoAllocateChunkSize = i6, t5._pendingPullIntos = new S5(), e6._readableStreamController = t5, b6(c2(r6()), () => (t5._started = true, be(t5), null), (e7) => (Pe(t5, e7), null)); + }(e5, o5, n4, a6, i5, r5, l5); +} +function Be(e5) { + return new TypeError(`ReadableStreamBYOBRequest.prototype.${e5} can only be used on a ReadableStreamBYOBRequest`); +} +function Ae(e5) { + return new TypeError(`ReadableByteStreamController.prototype.${e5} can only be used on a ReadableByteStreamController`); +} +function je(e5, t4) { + e5._reader._readIntoRequests.push(t4); +} +function ze(e5) { + return e5._reader._readIntoRequests.length; +} +function Le(e5) { + const t4 = e5._reader; + return void 0 !== t4 && !!Fe(t4); +} +function Fe(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readIntoRequests") && e5 instanceof ReadableStreamBYOBReader); +} +function Ie(e5, t4) { + const r5 = e5._readIntoRequests; + e5._readIntoRequests = new S5(), r5.forEach((e6) => { + e6._errorSteps(t4); }); } -function De(e3) { - return new TypeError(`ReadableStreamBYOBReader.prototype.${e3} can only be used on a ReadableStreamBYOBReader`); +function De(e5) { + return new TypeError(`ReadableStreamBYOBReader.prototype.${e5} can only be used on a ReadableStreamBYOBReader`); } -function $e(e3, t2) { - const { highWaterMark: r3 } = e3; - if (void 0 === r3) return t2; - if (ae2(r3) || r3 < 0) throw new RangeError("Invalid highWaterMark"); - return r3; +function $e(e5, t4) { + const { highWaterMark: r5 } = e5; + if (void 0 === r5) return t4; + if (ae2(r5) || r5 < 0) throw new RangeError("Invalid highWaterMark"); + return r5; } -function Me(e3) { - const { size: t2 } = e3; - return t2 || (() => 1); +function Me(e5) { + const { size: t4 } = e5; + return t4 || (() => 1); } -function Ye(e3, t2) { - F4(e3, t2); - const r3 = null == e3 ? void 0 : e3.highWaterMark, o3 = null == e3 ? void 0 : e3.size; - return { highWaterMark: void 0 === r3 ? void 0 : Y2(r3), size: void 0 === o3 ? void 0 : Qe(o3, `${t2} has member 'size' that`) }; +function Ye(e5, t4) { + F4(e5, t4); + const r5 = null == e5 ? void 0 : e5.highWaterMark, o5 = null == e5 ? void 0 : e5.size; + return { highWaterMark: void 0 === r5 ? void 0 : Y2(r5), size: void 0 === o5 ? void 0 : Qe(o5, `${t4} has member 'size' that`) }; } -function Qe(e3, t2) { - return I4(e3, t2), (t3) => Y2(e3(t3)); +function Qe(e5, t4) { + return I4(e5, t4), (t5) => Y2(e5(t5)); } -function Ne(e3, t2, r3) { - return I4(e3, r3), (r4) => w6(e3, t2, [r4]); +function Ne(e5, t4, r5) { + return I4(e5, r5), (r6) => w6(e5, t4, [r6]); } -function He(e3, t2, r3) { - return I4(e3, r3), () => w6(e3, t2, []); +function He(e5, t4, r5) { + return I4(e5, r5), () => w6(e5, t4, []); } -function xe(e3, t2, r3) { - return I4(e3, r3), (r4) => g3(e3, t2, [r4]); +function xe(e5, t4, r5) { + return I4(e5, r5), (r6) => g3(e5, t4, [r6]); } -function Ve(e3, t2, r3) { - return I4(e3, r3), (r4, o3) => w6(e3, t2, [r4, o3]); +function Ve(e5, t4, r5) { + return I4(e5, r5), (r6, o5) => w6(e5, t4, [r6, o5]); } -function Ge(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_writableStreamController") && e3 instanceof WritableStream); +function Ge(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_writableStreamController") && e5 instanceof WritableStream); } -function Xe(e3) { - return void 0 !== e3._writer; +function Xe(e5) { + return void 0 !== e5._writer; } -function Je(e3, t2) { - var r3; - if ("closed" === e3._state || "errored" === e3._state) return c2(void 0); - e3._writableStreamController._abortReason = t2, null === (r3 = e3._writableStreamController._abortController) || void 0 === r3 || r3.abort(t2); - const o3 = e3._state; - if ("closed" === o3 || "errored" === o3) return c2(void 0); - if (void 0 !== e3._pendingAbortRequest) return e3._pendingAbortRequest._promise; - let n2 = false; - "erroring" === o3 && (n2 = true, t2 = void 0); - const a4 = u2((r4, o4) => { - e3._pendingAbortRequest = { _promise: void 0, _resolve: r4, _reject: o4, _reason: t2, _wasAlreadyErroring: n2 }; +function Je(e5, t4) { + var r5; + if ("closed" === e5._state || "errored" === e5._state) return c2(void 0); + e5._writableStreamController._abortReason = t4, null === (r5 = e5._writableStreamController._abortController) || void 0 === r5 || r5.abort(t4); + const o5 = e5._state; + if ("closed" === o5 || "errored" === o5) return c2(void 0); + if (void 0 !== e5._pendingAbortRequest) return e5._pendingAbortRequest._promise; + let n4 = false; + "erroring" === o5 && (n4 = true, t4 = void 0); + const a6 = u2((r6, o6) => { + e5._pendingAbortRequest = { _promise: void 0, _resolve: r6, _reject: o6, _reason: t4, _wasAlreadyErroring: n4 }; }); - return e3._pendingAbortRequest._promise = a4, n2 || et(e3, t2), a4; -} -function Ke(e3) { - const t2 = e3._state; - if ("closed" === t2 || "errored" === t2) return d6(new TypeError(`The stream (in ${t2} state) is not in the writable state and cannot be closed`)); - const r3 = u2((t3, r4) => { - const o4 = { _resolve: t3, _reject: r4 }; - e3._closeRequest = o4; - }), o3 = e3._writer; - var n2; - return void 0 !== o3 && e3._backpressure && "writable" === t2 && Et(o3), ue2(n2 = e3._writableStreamController, lt, 0), dt(n2), r3; -} -function Ze(e3, t2) { - "writable" !== e3._state ? tt(e3) : et(e3, t2); -} -function et(e3, t2) { - const r3 = e3._writableStreamController; - e3._state = "erroring", e3._storedError = t2; - const o3 = e3._writer; - void 0 !== o3 && it(o3, t2), !function(e4) { - if (void 0 === e4._inFlightWriteRequest && void 0 === e4._inFlightCloseRequest) return false; + return e5._pendingAbortRequest._promise = a6, n4 || et(e5, t4), a6; +} +function Ke(e5) { + const t4 = e5._state; + if ("closed" === t4 || "errored" === t4) return d6(new TypeError(`The stream (in ${t4} state) is not in the writable state and cannot be closed`)); + const r5 = u2((t5, r6) => { + const o6 = { _resolve: t5, _reject: r6 }; + e5._closeRequest = o6; + }), o5 = e5._writer; + var n4; + return void 0 !== o5 && e5._backpressure && "writable" === t4 && Et(o5), ue2(n4 = e5._writableStreamController, lt, 0), dt(n4), r5; +} +function Ze(e5, t4) { + "writable" !== e5._state ? tt(e5) : et(e5, t4); +} +function et(e5, t4) { + const r5 = e5._writableStreamController; + e5._state = "erroring", e5._storedError = t4; + const o5 = e5._writer; + void 0 !== o5 && it(o5, t4), !function(e6) { + if (void 0 === e6._inFlightWriteRequest && void 0 === e6._inFlightCloseRequest) return false; return true; - }(e3) && r3._started && tt(e3); -} -function tt(e3) { - e3._state = "errored", e3._writableStreamController[R6](); - const t2 = e3._storedError; - if (e3._writeRequests.forEach((e4) => { - e4._reject(t2); - }), e3._writeRequests = new S5(), void 0 === e3._pendingAbortRequest) return void ot(e3); - const r3 = e3._pendingAbortRequest; - if (e3._pendingAbortRequest = void 0, r3._wasAlreadyErroring) return r3._reject(t2), void ot(e3); - b6(e3._writableStreamController[v4](r3._reason), () => (r3._resolve(), ot(e3), null), (t3) => (r3._reject(t3), ot(e3), null)); -} -function rt(e3) { - return void 0 !== e3._closeRequest || void 0 !== e3._inFlightCloseRequest; -} -function ot(e3) { - void 0 !== e3._closeRequest && (e3._closeRequest._reject(e3._storedError), e3._closeRequest = void 0); - const t2 = e3._writer; - void 0 !== t2 && St(t2, e3._storedError); -} -function nt(e3, t2) { - const r3 = e3._writer; - void 0 !== r3 && t2 !== e3._backpressure && (t2 ? function(e4) { - Rt(e4); - }(r3) : Et(r3)), e3._backpressure = t2; -} -function at(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_ownerWritableStream") && e3 instanceof WritableStreamDefaultWriter); -} -function it(e3, t2) { - "pending" === e3._readyPromiseState ? Ct(e3, t2) : function(e4, t3) { - Tt(e4, t3); - }(e3, t2); -} -function st(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledWritableStream") && e3 instanceof WritableStreamDefaultController); -} -function ut(e3) { - e3._writeAlgorithm = void 0, e3._closeAlgorithm = void 0, e3._abortAlgorithm = void 0, e3._strategySizeAlgorithm = void 0; -} -function ct(e3) { - return e3._strategyHWM - e3._queueTotalSize; -} -function dt(e3) { - const t2 = e3._controlledWritableStream; - if (!e3._started) return; - if (void 0 !== t2._inFlightWriteRequest) return; - if ("erroring" === t2._state) return void tt(t2); - if (0 === e3._queue.length) return; - const r3 = e3._queue.peek().value; - r3 === lt ? function(e4) { - const t3 = e4._controlledWritableStream; - (function(e5) { - e5._inFlightCloseRequest = e5._closeRequest, e5._closeRequest = void 0; - })(t3), se(e4); - const r4 = e4._closeAlgorithm(); - ut(e4), b6(r4, () => (function(e5) { - e5._inFlightCloseRequest._resolve(void 0), e5._inFlightCloseRequest = void 0, "erroring" === e5._state && (e5._storedError = void 0, void 0 !== e5._pendingAbortRequest && (e5._pendingAbortRequest._resolve(), e5._pendingAbortRequest = void 0)), e5._state = "closed"; - const t4 = e5._writer; - void 0 !== t4 && vt(t4); - }(t3), null), (e5) => (function(e6, t4) { - e6._inFlightCloseRequest._reject(t4), e6._inFlightCloseRequest = void 0, void 0 !== e6._pendingAbortRequest && (e6._pendingAbortRequest._reject(t4), e6._pendingAbortRequest = void 0), Ze(e6, t4); - }(t3, e5), null)); - }(e3) : function(e4, t3) { - const r4 = e4._controlledWritableStream; - !function(e5) { - e5._inFlightWriteRequest = e5._writeRequests.shift(); - }(r4); - b6(e4._writeAlgorithm(t3), () => { - !function(e5) { - e5._inFlightWriteRequest._resolve(void 0), e5._inFlightWriteRequest = void 0; - }(r4); - const t4 = r4._state; - if (se(e4), !rt(r4) && "writable" === t4) { - const t5 = bt(e4); - nt(r4, t5); - } - return dt(e4), null; - }, (t4) => ("writable" === r4._state && ut(e4), function(e5, t5) { - e5._inFlightWriteRequest._reject(t5), e5._inFlightWriteRequest = void 0, Ze(e5, t5); - }(r4, t4), null)); - }(e3, r3); -} -function ft(e3, t2) { - "writable" === e3._controlledWritableStream._state && ht(e3, t2); -} -function bt(e3) { - return ct(e3) <= 0; -} -function ht(e3, t2) { - const r3 = e3._controlledWritableStream; - ut(e3), et(r3, t2); -} -function _t(e3) { - return new TypeError(`WritableStream.prototype.${e3} can only be used on a WritableStream`); -} -function pt(e3) { - return new TypeError(`WritableStreamDefaultController.prototype.${e3} can only be used on a WritableStreamDefaultController`); -} -function mt(e3) { - return new TypeError(`WritableStreamDefaultWriter.prototype.${e3} can only be used on a WritableStreamDefaultWriter`); -} -function yt(e3) { - return new TypeError("Cannot " + e3 + " a stream using a released writer"); -} -function gt(e3) { - e3._closedPromise = u2((t2, r3) => { - e3._closedPromise_resolve = t2, e3._closedPromise_reject = r3, e3._closedPromiseState = "pending"; + }(e5) && r5._started && tt(e5); +} +function tt(e5) { + e5._state = "errored", e5._writableStreamController[R6](); + const t4 = e5._storedError; + if (e5._writeRequests.forEach((e6) => { + e6._reject(t4); + }), e5._writeRequests = new S5(), void 0 === e5._pendingAbortRequest) return void ot(e5); + const r5 = e5._pendingAbortRequest; + if (e5._pendingAbortRequest = void 0, r5._wasAlreadyErroring) return r5._reject(t4), void ot(e5); + b6(e5._writableStreamController[v4](r5._reason), () => (r5._resolve(), ot(e5), null), (t5) => (r5._reject(t5), ot(e5), null)); +} +function rt(e5) { + return void 0 !== e5._closeRequest || void 0 !== e5._inFlightCloseRequest; +} +function ot(e5) { + void 0 !== e5._closeRequest && (e5._closeRequest._reject(e5._storedError), e5._closeRequest = void 0); + const t4 = e5._writer; + void 0 !== t4 && St(t4, e5._storedError); +} +function nt(e5, t4) { + const r5 = e5._writer; + void 0 !== r5 && t4 !== e5._backpressure && (t4 ? function(e6) { + Rt(e6); + }(r5) : Et(r5)), e5._backpressure = t4; +} +function at(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_ownerWritableStream") && e5 instanceof WritableStreamDefaultWriter); +} +function it(e5, t4) { + "pending" === e5._readyPromiseState ? Ct(e5, t4) : function(e6, t5) { + Tt(e6, t5); + }(e5, t4); +} +function st(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledWritableStream") && e5 instanceof WritableStreamDefaultController); +} +function ut(e5) { + e5._writeAlgorithm = void 0, e5._closeAlgorithm = void 0, e5._abortAlgorithm = void 0, e5._strategySizeAlgorithm = void 0; +} +function ct(e5) { + return e5._strategyHWM - e5._queueTotalSize; +} +function dt(e5) { + const t4 = e5._controlledWritableStream; + if (!e5._started) return; + if (void 0 !== t4._inFlightWriteRequest) return; + if ("erroring" === t4._state) return void tt(t4); + if (0 === e5._queue.length) return; + const r5 = e5._queue.peek().value; + r5 === lt ? function(e6) { + const t5 = e6._controlledWritableStream; + (function(e7) { + e7._inFlightCloseRequest = e7._closeRequest, e7._closeRequest = void 0; + })(t5), se(e6); + const r6 = e6._closeAlgorithm(); + ut(e6), b6(r6, () => (function(e7) { + e7._inFlightCloseRequest._resolve(void 0), e7._inFlightCloseRequest = void 0, "erroring" === e7._state && (e7._storedError = void 0, void 0 !== e7._pendingAbortRequest && (e7._pendingAbortRequest._resolve(), e7._pendingAbortRequest = void 0)), e7._state = "closed"; + const t6 = e7._writer; + void 0 !== t6 && vt(t6); + }(t5), null), (e7) => (function(e8, t6) { + e8._inFlightCloseRequest._reject(t6), e8._inFlightCloseRequest = void 0, void 0 !== e8._pendingAbortRequest && (e8._pendingAbortRequest._reject(t6), e8._pendingAbortRequest = void 0), Ze(e8, t6); + }(t5, e7), null)); + }(e5) : function(e6, t5) { + const r6 = e6._controlledWritableStream; + !function(e7) { + e7._inFlightWriteRequest = e7._writeRequests.shift(); + }(r6); + b6(e6._writeAlgorithm(t5), () => { + !function(e7) { + e7._inFlightWriteRequest._resolve(void 0), e7._inFlightWriteRequest = void 0; + }(r6); + const t6 = r6._state; + if (se(e6), !rt(r6) && "writable" === t6) { + const t7 = bt(e6); + nt(r6, t7); + } + return dt(e6), null; + }, (t6) => ("writable" === r6._state && ut(e6), function(e7, t7) { + e7._inFlightWriteRequest._reject(t7), e7._inFlightWriteRequest = void 0, Ze(e7, t7); + }(r6, t6), null)); + }(e5, r5); +} +function ft(e5, t4) { + "writable" === e5._controlledWritableStream._state && ht(e5, t4); +} +function bt(e5) { + return ct(e5) <= 0; +} +function ht(e5, t4) { + const r5 = e5._controlledWritableStream; + ut(e5), et(r5, t4); +} +function _t(e5) { + return new TypeError(`WritableStream.prototype.${e5} can only be used on a WritableStream`); +} +function pt(e5) { + return new TypeError(`WritableStreamDefaultController.prototype.${e5} can only be used on a WritableStreamDefaultController`); +} +function mt(e5) { + return new TypeError(`WritableStreamDefaultWriter.prototype.${e5} can only be used on a WritableStreamDefaultWriter`); +} +function yt(e5) { + return new TypeError("Cannot " + e5 + " a stream using a released writer"); +} +function gt(e5) { + e5._closedPromise = u2((t4, r5) => { + e5._closedPromise_resolve = t4, e5._closedPromise_reject = r5, e5._closedPromiseState = "pending"; }); } -function wt(e3, t2) { - gt(e3), St(e3, t2); +function wt(e5, t4) { + gt(e5), St(e5, t4); } -function St(e3, t2) { - void 0 !== e3._closedPromise_reject && (m4(e3._closedPromise), e3._closedPromise_reject(t2), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0, e3._closedPromiseState = "rejected"); +function St(e5, t4) { + void 0 !== e5._closedPromise_reject && (m4(e5._closedPromise), e5._closedPromise_reject(t4), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0, e5._closedPromiseState = "rejected"); } -function vt(e3) { - void 0 !== e3._closedPromise_resolve && (e3._closedPromise_resolve(void 0), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0, e3._closedPromiseState = "resolved"); +function vt(e5) { + void 0 !== e5._closedPromise_resolve && (e5._closedPromise_resolve(void 0), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0, e5._closedPromiseState = "resolved"); } -function Rt(e3) { - e3._readyPromise = u2((t2, r3) => { - e3._readyPromise_resolve = t2, e3._readyPromise_reject = r3; - }), e3._readyPromiseState = "pending"; +function Rt(e5) { + e5._readyPromise = u2((t4, r5) => { + e5._readyPromise_resolve = t4, e5._readyPromise_reject = r5; + }), e5._readyPromiseState = "pending"; } -function Tt(e3, t2) { - Rt(e3), Ct(e3, t2); +function Tt(e5, t4) { + Rt(e5), Ct(e5, t4); } -function qt(e3) { - Rt(e3), Et(e3); +function qt(e5) { + Rt(e5), Et(e5); } -function Ct(e3, t2) { - void 0 !== e3._readyPromise_reject && (m4(e3._readyPromise), e3._readyPromise_reject(t2), e3._readyPromise_resolve = void 0, e3._readyPromise_reject = void 0, e3._readyPromiseState = "rejected"); +function Ct(e5, t4) { + void 0 !== e5._readyPromise_reject && (m4(e5._readyPromise), e5._readyPromise_reject(t4), e5._readyPromise_resolve = void 0, e5._readyPromise_reject = void 0, e5._readyPromiseState = "rejected"); } -function Et(e3) { - void 0 !== e3._readyPromise_resolve && (e3._readyPromise_resolve(void 0), e3._readyPromise_resolve = void 0, e3._readyPromise_reject = void 0, e3._readyPromiseState = "fulfilled"); +function Et(e5) { + void 0 !== e5._readyPromise_resolve && (e5._readyPromise_resolve(void 0), e5._readyPromise_resolve = void 0, e5._readyPromise_reject = void 0, e5._readyPromiseState = "fulfilled"); } -function kt(e3, t2, r3, o3, n2, a4) { - const i3 = e3.getReader(), l3 = t2.getWriter(); - Vt(e3) && (e3._disturbed = true); - let s2, _7, g4, w7 = false, S6 = false, v5 = "readable", R7 = "writable", T6 = false, q6 = false; - const C5 = u2((e4) => { - g4 = e4; +function kt(e5, t4, r5, o5, n4, a6) { + const i5 = e5.getReader(), l5 = t4.getWriter(); + Vt(e5) && (e5._disturbed = true); + let s4, _8, g6, w9 = false, S6 = false, v8 = "readable", R7 = "writable", T6 = false, q8 = false; + const C6 = u2((e6) => { + g6 = e6; }); - let E4 = Promise.resolve(void 0); + let E5 = Promise.resolve(void 0); return u2((P4, W6) => { - let k7; + let k9; function O5() { - if (w7) return; - const e4 = u2((e5, t3) => { - !function r4(o4) { - o4 ? e5() : f3(function() { - if (w7) return c2(true); - return f3(l3.ready, () => f3(i3.read(), (e6) => !!e6.done || (E4 = l3.write(e6.value), m4(E4), false))); - }(), r4, t3); + if (w9) return; + const e6 = u2((e7, t5) => { + !function r6(o6) { + o6 ? e7() : f3(function() { + if (w9) return c2(true); + return f3(l5.ready, () => f3(i5.read(), (e8) => !!e8.done || (E5 = l5.write(e8.value), m4(E5), false))); + }(), r6, t5); }(false); }); - m4(e4); + m4(e6); } - function B3() { - return v5 = "closed", r3 ? L7() : z6(() => (Ge(t2) && (T6 = rt(t2), R7 = t2._state), T6 || "closed" === R7 ? c2(void 0) : "erroring" === R7 || "errored" === R7 ? d6(_7) : (T6 = true, l3.close())), false, void 0), null; + function B4() { + return v8 = "closed", r5 ? L7() : z7(() => (Ge(t4) && (T6 = rt(t4), R7 = t4._state), T6 || "closed" === R7 ? c2(void 0) : "erroring" === R7 || "errored" === R7 ? d6(_8) : (T6 = true, l5.close())), false, void 0), null; } - function A5(e4) { - return w7 || (v5 = "errored", s2 = e4, o3 ? L7(true, e4) : z6(() => l3.abort(e4), true, e4)), null; + function A6(e6) { + return w9 || (v8 = "errored", s4 = e6, o5 ? L7(true, e6) : z7(() => l5.abort(e6), true, e6)), null; } - function j4(e4) { - return S6 || (R7 = "errored", _7 = e4, n2 ? L7(true, e4) : z6(() => i3.cancel(e4), true, e4)), null; + function j6(e6) { + return S6 || (R7 = "errored", _8 = e6, n4 ? L7(true, e6) : z7(() => i5.cancel(e6), true, e6)), null; } - if (void 0 !== a4 && (k7 = () => { - const e4 = void 0 !== a4.reason ? a4.reason : new Wt("Aborted", "AbortError"), t3 = []; - o3 || t3.push(() => "writable" === R7 ? l3.abort(e4) : c2(void 0)), n2 || t3.push(() => "readable" === v5 ? i3.cancel(e4) : c2(void 0)), z6(() => Promise.all(t3.map((e5) => e5())), true, e4); - }, a4.aborted ? k7() : a4.addEventListener("abort", k7)), Vt(e3) && (v5 = e3._state, s2 = e3._storedError), Ge(t2) && (R7 = t2._state, _7 = t2._storedError, T6 = rt(t2)), Vt(e3) && Ge(t2) && (q6 = true, g4()), "errored" === v5) A5(s2); - else if ("erroring" === R7 || "errored" === R7) j4(_7); - else if ("closed" === v5) B3(); + if (void 0 !== a6 && (k9 = () => { + const e6 = void 0 !== a6.reason ? a6.reason : new Wt("Aborted", "AbortError"), t5 = []; + o5 || t5.push(() => "writable" === R7 ? l5.abort(e6) : c2(void 0)), n4 || t5.push(() => "readable" === v8 ? i5.cancel(e6) : c2(void 0)), z7(() => Promise.all(t5.map((e7) => e7())), true, e6); + }, a6.aborted ? k9() : a6.addEventListener("abort", k9)), Vt(e5) && (v8 = e5._state, s4 = e5._storedError), Ge(t4) && (R7 = t4._state, _8 = t4._storedError, T6 = rt(t4)), Vt(e5) && Ge(t4) && (q8 = true, g6()), "errored" === v8) A6(s4); + else if ("erroring" === R7 || "errored" === R7) j6(_8); + else if ("closed" === v8) B4(); else if (T6 || "closed" === R7) { - const e4 = new TypeError("the destination writable stream closed before all data could be piped to it"); - n2 ? L7(true, e4) : z6(() => i3.cancel(e4), true, e4); - } - function z6(e4, t3, r4) { - function o4() { - return "writable" !== R7 || T6 ? n3() : h3(function() { - let e5; - return c2(function t4() { - if (e5 !== E4) return e5 = E4, p3(E4, t4, t4); + const e6 = new TypeError("the destination writable stream closed before all data could be piped to it"); + n4 ? L7(true, e6) : z7(() => i5.cancel(e6), true, e6); + } + function z7(e6, t5, r6) { + function o6() { + return "writable" !== R7 || T6 ? n5() : h3(function() { + let e7; + return c2(function t6() { + if (e7 !== E5) return e7 = E5, p3(E5, t6, t6); }()); - }(), n3), null; + }(), n5), null; } - function n3() { - return e4 ? b6(e4(), () => F5(t3, r4), (e5) => F5(true, e5)) : F5(t3, r4), null; + function n5() { + return e6 ? b6(e6(), () => F6(t5, r6), (e7) => F6(true, e7)) : F6(t5, r6), null; } - w7 || (w7 = true, q6 ? o4() : h3(C5, o4)); + w9 || (w9 = true, q8 ? o6() : h3(C6, o6)); } - function L7(e4, t3) { - z6(void 0, e4, t3); + function L7(e6, t5) { + z7(void 0, e6, t5); } - function F5(e4, t3) { - return S6 = true, l3.releaseLock(), i3.releaseLock(), void 0 !== a4 && a4.removeEventListener("abort", k7), e4 ? W6(t3) : P4(void 0), null; + function F6(e6, t5) { + return S6 = true, l5.releaseLock(), i5.releaseLock(), void 0 !== a6 && a6.removeEventListener("abort", k9), e6 ? W6(t5) : P4(void 0), null; } - w7 || (b6(i3.closed, B3, A5), b6(l3.closed, function() { + w9 || (b6(i5.closed, B4, A6), b6(l5.closed, function() { return S6 || (R7 = "closed"), null; - }, j4)), q6 ? O5() : y5(() => { - q6 = true, g4(), O5(); + }, j6)), q8 ? O5() : y5(() => { + q8 = true, g6(), O5(); }); }); } -function Ot(e3, t2) { - return function(e4) { +function Ot(e5, t4) { + return function(e6) { try { - return e4.getReader({ mode: "byob" }).releaseLock(), true; - } catch (e5) { + return e6.getReader({ mode: "byob" }).releaseLock(), true; + } catch (e7) { return false; } - }(e3) ? function(e4) { - let t3, r3, o3, n2, a4, i3 = e4.getReader(), l3 = false, s2 = false, d7 = false, f4 = false, h4 = false, p4 = false; - const m5 = u2((e5) => { - a4 = e5; - }); - function y6(e5) { - _6(e5.closed, (t4) => (e5 !== i3 || (o3.error(t4), n2.error(t4), h4 && p4 || a4(void 0)), null)); - } - function g4() { - l3 && (i3.releaseLock(), i3 = e4.getReader(), y6(i3), l3 = false), b6(i3.read(), (e5) => { - var t4, r4; - if (d7 = false, f4 = false, e5.done) return h4 || o3.close(), p4 || n2.close(), null === (t4 = o3.byobRequest) || void 0 === t4 || t4.respond(0), null === (r4 = n2.byobRequest) || void 0 === r4 || r4.respond(0), h4 && p4 || a4(void 0), null; - const l4 = e5.value, u3 = l4; - let c3 = l4; - if (!h4 && !p4) try { - c3 = le2(l4); - } catch (e6) { - return o3.error(e6), n2.error(e6), a4(i3.cancel(e6)), null; - } - return h4 || o3.enqueue(u3), p4 || n2.enqueue(c3), s2 = false, d7 ? S6() : f4 && v5(), null; - }, () => (s2 = false, null)); - } - function w7(t4, r4) { - l3 || (i3.releaseLock(), i3 = e4.getReader({ mode: "byob" }), y6(i3), l3 = true); - const u3 = r4 ? n2 : o3, c3 = r4 ? o3 : n2; - b6(i3.read(t4), (e5) => { - var t5; - d7 = false, f4 = false; - const o4 = r4 ? p4 : h4, n3 = r4 ? h4 : p4; - if (e5.done) { - o4 || u3.close(), n3 || c3.close(); - const r5 = e5.value; - return void 0 !== r5 && (o4 || u3.byobRequest.respondWithNewView(r5), n3 || null === (t5 = c3.byobRequest) || void 0 === t5 || t5.respond(0)), o4 && n3 || a4(void 0), null; - } - const l4 = e5.value; - if (n3) o4 || u3.byobRequest.respondWithNewView(l4); + }(e5) ? function(e6) { + let t5, r5, o5, n4, a6, i5 = e6.getReader(), l5 = false, s4 = false, d9 = false, f6 = false, h6 = false, p6 = false; + const m7 = u2((e7) => { + a6 = e7; + }); + function y7(e7) { + _6(e7.closed, (t6) => (e7 !== i5 || (o5.error(t6), n4.error(t6), h6 && p6 || a6(void 0)), null)); + } + function g6() { + l5 && (i5.releaseLock(), i5 = e6.getReader(), y7(i5), l5 = false), b6(i5.read(), (e7) => { + var t6, r6; + if (d9 = false, f6 = false, e7.done) return h6 || o5.close(), p6 || n4.close(), null === (t6 = o5.byobRequest) || void 0 === t6 || t6.respond(0), null === (r6 = n4.byobRequest) || void 0 === r6 || r6.respond(0), h6 && p6 || a6(void 0), null; + const l6 = e7.value, u5 = l6; + let c5 = l6; + if (!h6 && !p6) try { + c5 = le2(l6); + } catch (e8) { + return o5.error(e8), n4.error(e8), a6(i5.cancel(e8)), null; + } + return h6 || o5.enqueue(u5), p6 || n4.enqueue(c5), s4 = false, d9 ? S6() : f6 && v8(), null; + }, () => (s4 = false, null)); + } + function w9(t6, r6) { + l5 || (i5.releaseLock(), i5 = e6.getReader({ mode: "byob" }), y7(i5), l5 = true); + const u5 = r6 ? n4 : o5, c5 = r6 ? o5 : n4; + b6(i5.read(t6), (e7) => { + var t7; + d9 = false, f6 = false; + const o6 = r6 ? p6 : h6, n5 = r6 ? h6 : p6; + if (e7.done) { + o6 || u5.close(), n5 || c5.close(); + const r7 = e7.value; + return void 0 !== r7 && (o6 || u5.byobRequest.respondWithNewView(r7), n5 || null === (t7 = c5.byobRequest) || void 0 === t7 || t7.respond(0)), o6 && n5 || a6(void 0), null; + } + const l6 = e7.value; + if (n5) o6 || u5.byobRequest.respondWithNewView(l6); else { - let e6; + let e8; try { - e6 = le2(l4); - } catch (e7) { - return u3.error(e7), c3.error(e7), a4(i3.cancel(e7)), null; + e8 = le2(l6); + } catch (e9) { + return u5.error(e9), c5.error(e9), a6(i5.cancel(e9)), null; } - o4 || u3.byobRequest.respondWithNewView(l4), c3.enqueue(e6); + o6 || u5.byobRequest.respondWithNewView(l6), c5.enqueue(e8); } - return s2 = false, d7 ? S6() : f4 && v5(), null; - }, () => (s2 = false, null)); + return s4 = false, d9 ? S6() : f6 && v8(), null; + }, () => (s4 = false, null)); } function S6() { - if (s2) return d7 = true, c2(void 0); - s2 = true; - const e5 = o3.byobRequest; - return null === e5 ? g4() : w7(e5.view, false), c2(void 0); - } - function v5() { - if (s2) return f4 = true, c2(void 0); - s2 = true; - const e5 = n2.byobRequest; - return null === e5 ? g4() : w7(e5.view, true), c2(void 0); - } - function R7(e5) { - if (h4 = true, t3 = e5, p4) { - const e6 = [t3, r3], o4 = i3.cancel(e6); - a4(o4); - } - return m5; - } - function T6(e5) { - if (p4 = true, r3 = e5, h4) { - const e6 = [t3, r3], o4 = i3.cancel(e6); - a4(o4); - } - return m5; - } - const q6 = new ReadableStream3({ type: "bytes", start(e5) { - o3 = e5; - }, pull: S6, cancel: R7 }), C5 = new ReadableStream3({ type: "bytes", start(e5) { - n2 = e5; - }, pull: v5, cancel: T6 }); - return y6(i3), [q6, C5]; - }(e3) : function(e4, t3) { - const r3 = e4.getReader(); - let o3, n2, a4, i3, l3, s2 = false, d7 = false, f4 = false, h4 = false; - const p4 = u2((e5) => { - l3 = e5; - }); - function m5() { - return s2 ? (d7 = true, c2(void 0)) : (s2 = true, b6(r3.read(), (e5) => { - if (d7 = false, e5.done) return f4 || a4.close(), h4 || i3.close(), f4 && h4 || l3(void 0), null; - const t4 = e5.value, r4 = t4, o4 = t4; - return f4 || a4.enqueue(r4), h4 || i3.enqueue(o4), s2 = false, d7 && m5(), null; - }, () => (s2 = false, null)), c2(void 0)); - } - function y6(e5) { - if (f4 = true, o3 = e5, h4) { - const e6 = [o3, n2], t4 = r3.cancel(e6); - l3(t4); - } - return p4; - } - function g4(e5) { - if (h4 = true, n2 = e5, f4) { - const e6 = [o3, n2], t4 = r3.cancel(e6); - l3(t4); - } - return p4; - } - const w7 = new ReadableStream3({ start(e5) { - a4 = e5; - }, pull: m5, cancel: y6 }), S6 = new ReadableStream3({ start(e5) { - i3 = e5; - }, pull: m5, cancel: g4 }); - return _6(r3.closed, (e5) => (a4.error(e5), i3.error(e5), f4 && h4 || l3(void 0), null)), [w7, S6]; - }(e3); -} -function Bt(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledReadableStream") && e3 instanceof ReadableStreamDefaultController); -} -function At(e3) { - const t2 = function(e4) { - const t3 = e4._controlledReadableStream; - if (!Ft(e4)) return false; - if (!e4._started) return false; - if (Ut(t3) && X4(t3) > 0) return true; - if (Lt(e4) > 0) return true; + if (s4) return d9 = true, c2(void 0); + s4 = true; + const e7 = o5.byobRequest; + return null === e7 ? g6() : w9(e7.view, false), c2(void 0); + } + function v8() { + if (s4) return f6 = true, c2(void 0); + s4 = true; + const e7 = n4.byobRequest; + return null === e7 ? g6() : w9(e7.view, true), c2(void 0); + } + function R7(e7) { + if (h6 = true, t5 = e7, p6) { + const e8 = [t5, r5], o6 = i5.cancel(e8); + a6(o6); + } + return m7; + } + function T6(e7) { + if (p6 = true, r5 = e7, h6) { + const e8 = [t5, r5], o6 = i5.cancel(e8); + a6(o6); + } + return m7; + } + const q8 = new ReadableStream3({ type: "bytes", start(e7) { + o5 = e7; + }, pull: S6, cancel: R7 }), C6 = new ReadableStream3({ type: "bytes", start(e7) { + n4 = e7; + }, pull: v8, cancel: T6 }); + return y7(i5), [q8, C6]; + }(e5) : function(e6, t5) { + const r5 = e6.getReader(); + let o5, n4, a6, i5, l5, s4 = false, d9 = false, f6 = false, h6 = false; + const p6 = u2((e7) => { + l5 = e7; + }); + function m7() { + return s4 ? (d9 = true, c2(void 0)) : (s4 = true, b6(r5.read(), (e7) => { + if (d9 = false, e7.done) return f6 || a6.close(), h6 || i5.close(), f6 && h6 || l5(void 0), null; + const t6 = e7.value, r6 = t6, o6 = t6; + return f6 || a6.enqueue(r6), h6 || i5.enqueue(o6), s4 = false, d9 && m7(), null; + }, () => (s4 = false, null)), c2(void 0)); + } + function y7(e7) { + if (f6 = true, o5 = e7, h6) { + const e8 = [o5, n4], t6 = r5.cancel(e8); + l5(t6); + } + return p6; + } + function g6(e7) { + if (h6 = true, n4 = e7, f6) { + const e8 = [o5, n4], t6 = r5.cancel(e8); + l5(t6); + } + return p6; + } + const w9 = new ReadableStream3({ start(e7) { + a6 = e7; + }, pull: m7, cancel: y7 }), S6 = new ReadableStream3({ start(e7) { + i5 = e7; + }, pull: m7, cancel: g6 }); + return _6(r5.closed, (e7) => (a6.error(e7), i5.error(e7), f6 && h6 || l5(void 0), null)), [w9, S6]; + }(e5); +} +function Bt(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledReadableStream") && e5 instanceof ReadableStreamDefaultController); +} +function At(e5) { + const t4 = function(e6) { + const t5 = e6._controlledReadableStream; + if (!Ft(e6)) return false; + if (!e6._started) return false; + if (Ut(t5) && X4(t5) > 0) return true; + if (Lt(e6) > 0) return true; return false; - }(e3); - if (!t2) return; - if (e3._pulling) return void (e3._pullAgain = true); - e3._pulling = true; - b6(e3._pullAlgorithm(), () => (e3._pulling = false, e3._pullAgain && (e3._pullAgain = false, At(e3)), null), (t3) => (zt(e3, t3), null)); -} -function jt(e3) { - e3._pullAlgorithm = void 0, e3._cancelAlgorithm = void 0, e3._strategySizeAlgorithm = void 0; -} -function zt(e3, t2) { - const r3 = e3._controlledReadableStream; - "readable" === r3._state && (ce2(e3), jt(e3), Jt(r3, t2)); -} -function Lt(e3) { - const t2 = e3._controlledReadableStream._state; - return "errored" === t2 ? null : "closed" === t2 ? 0 : e3._strategyHWM - e3._queueTotalSize; -} -function Ft(e3) { - return !e3._closeRequested && "readable" === e3._controlledReadableStream._state; -} -function It(e3, t2, r3, o3) { - const n2 = Object.create(ReadableStreamDefaultController.prototype); - let a4, i3, l3; - a4 = void 0 !== t2.start ? () => t2.start(n2) : () => { - }, i3 = void 0 !== t2.pull ? () => t2.pull(n2) : () => c2(void 0), l3 = void 0 !== t2.cancel ? (e4) => t2.cancel(e4) : () => c2(void 0), function(e4, t3, r4, o4, n3, a5, i4) { - t3._controlledReadableStream = e4, t3._queue = void 0, t3._queueTotalSize = void 0, ce2(t3), t3._started = false, t3._closeRequested = false, t3._pullAgain = false, t3._pulling = false, t3._strategySizeAlgorithm = i4, t3._strategyHWM = a5, t3._pullAlgorithm = o4, t3._cancelAlgorithm = n3, e4._readableStreamController = t3, b6(c2(r4()), () => (t3._started = true, At(t3), null), (e5) => (zt(t3, e5), null)); - }(e3, n2, a4, i3, l3, r3, o3); -} -function Dt(e3) { - return new TypeError(`ReadableStreamDefaultController.prototype.${e3} can only be used on a ReadableStreamDefaultController`); -} -function $t(e3, t2, r3) { - return I4(e3, r3), (r4) => w6(e3, t2, [r4]); -} -function Mt(e3, t2, r3) { - return I4(e3, r3), (r4) => w6(e3, t2, [r4]); -} -function Yt(e3, t2, r3) { - return I4(e3, r3), (r4) => g3(e3, t2, [r4]); -} -function Qt(e3, t2) { - if ("bytes" !== (e3 = `${e3}`)) throw new TypeError(`${t2} '${e3}' is not a valid enumeration value for ReadableStreamType`); - return e3; -} -function Nt(e3, t2) { - if ("byob" !== (e3 = `${e3}`)) throw new TypeError(`${t2} '${e3}' is not a valid enumeration value for ReadableStreamReaderMode`); - return e3; -} -function Ht(e3, t2) { - F4(e3, t2); - const r3 = null == e3 ? void 0 : e3.preventAbort, o3 = null == e3 ? void 0 : e3.preventCancel, n2 = null == e3 ? void 0 : e3.preventClose, a4 = null == e3 ? void 0 : e3.signal; - return void 0 !== a4 && function(e4, t3) { - if (!function(e5) { - if ("object" != typeof e5 || null === e5) return false; + }(e5); + if (!t4) return; + if (e5._pulling) return void (e5._pullAgain = true); + e5._pulling = true; + b6(e5._pullAlgorithm(), () => (e5._pulling = false, e5._pullAgain && (e5._pullAgain = false, At(e5)), null), (t5) => (zt(e5, t5), null)); +} +function jt(e5) { + e5._pullAlgorithm = void 0, e5._cancelAlgorithm = void 0, e5._strategySizeAlgorithm = void 0; +} +function zt(e5, t4) { + const r5 = e5._controlledReadableStream; + "readable" === r5._state && (ce2(e5), jt(e5), Jt(r5, t4)); +} +function Lt(e5) { + const t4 = e5._controlledReadableStream._state; + return "errored" === t4 ? null : "closed" === t4 ? 0 : e5._strategyHWM - e5._queueTotalSize; +} +function Ft(e5) { + return !e5._closeRequested && "readable" === e5._controlledReadableStream._state; +} +function It(e5, t4, r5, o5) { + const n4 = Object.create(ReadableStreamDefaultController.prototype); + let a6, i5, l5; + a6 = void 0 !== t4.start ? () => t4.start(n4) : () => { + }, i5 = void 0 !== t4.pull ? () => t4.pull(n4) : () => c2(void 0), l5 = void 0 !== t4.cancel ? (e6) => t4.cancel(e6) : () => c2(void 0), function(e6, t5, r6, o6, n5, a7, i6) { + t5._controlledReadableStream = e6, t5._queue = void 0, t5._queueTotalSize = void 0, ce2(t5), t5._started = false, t5._closeRequested = false, t5._pullAgain = false, t5._pulling = false, t5._strategySizeAlgorithm = i6, t5._strategyHWM = a7, t5._pullAlgorithm = o6, t5._cancelAlgorithm = n5, e6._readableStreamController = t5, b6(c2(r6()), () => (t5._started = true, At(t5), null), (e7) => (zt(t5, e7), null)); + }(e5, n4, a6, i5, l5, r5, o5); +} +function Dt(e5) { + return new TypeError(`ReadableStreamDefaultController.prototype.${e5} can only be used on a ReadableStreamDefaultController`); +} +function $t(e5, t4, r5) { + return I4(e5, r5), (r6) => w6(e5, t4, [r6]); +} +function Mt(e5, t4, r5) { + return I4(e5, r5), (r6) => w6(e5, t4, [r6]); +} +function Yt(e5, t4, r5) { + return I4(e5, r5), (r6) => g3(e5, t4, [r6]); +} +function Qt(e5, t4) { + if ("bytes" !== (e5 = `${e5}`)) throw new TypeError(`${t4} '${e5}' is not a valid enumeration value for ReadableStreamType`); + return e5; +} +function Nt(e5, t4) { + if ("byob" !== (e5 = `${e5}`)) throw new TypeError(`${t4} '${e5}' is not a valid enumeration value for ReadableStreamReaderMode`); + return e5; +} +function Ht(e5, t4) { + F4(e5, t4); + const r5 = null == e5 ? void 0 : e5.preventAbort, o5 = null == e5 ? void 0 : e5.preventCancel, n4 = null == e5 ? void 0 : e5.preventClose, a6 = null == e5 ? void 0 : e5.signal; + return void 0 !== a6 && function(e6, t5) { + if (!function(e7) { + if ("object" != typeof e7 || null === e7) return false; try { - return "boolean" == typeof e5.aborted; - } catch (e6) { + return "boolean" == typeof e7.aborted; + } catch (e8) { return false; } - }(e4)) throw new TypeError(`${t3} is not an AbortSignal.`); - }(a4, `${t2} has member 'signal' that`), { preventAbort: Boolean(r3), preventCancel: Boolean(o3), preventClose: Boolean(n2), signal: a4 }; + }(e6)) throw new TypeError(`${t5} is not an AbortSignal.`); + }(a6, `${t4} has member 'signal' that`), { preventAbort: Boolean(r5), preventCancel: Boolean(o5), preventClose: Boolean(n4), signal: a6 }; } -function xt(e3, t2) { - F4(e3, t2); - const r3 = null == e3 ? void 0 : e3.readable; - M4(r3, "readable", "ReadableWritablePair"), function(e4, t3) { - if (!H4(e4)) throw new TypeError(`${t3} is not a ReadableStream.`); - }(r3, `${t2} has member 'readable' that`); - const o3 = null == e3 ? void 0 : e3.writable; - return M4(o3, "writable", "ReadableWritablePair"), function(e4, t3) { - if (!x4(e4)) throw new TypeError(`${t3} is not a WritableStream.`); - }(o3, `${t2} has member 'writable' that`), { readable: r3, writable: o3 }; +function xt(e5, t4) { + F4(e5, t4); + const r5 = null == e5 ? void 0 : e5.readable; + M4(r5, "readable", "ReadableWritablePair"), function(e6, t5) { + if (!H4(e6)) throw new TypeError(`${t5} is not a ReadableStream.`); + }(r5, `${t4} has member 'readable' that`); + const o5 = null == e5 ? void 0 : e5.writable; + return M4(o5, "writable", "ReadableWritablePair"), function(e6, t5) { + if (!x4(e6)) throw new TypeError(`${t5} is not a WritableStream.`); + }(o5, `${t4} has member 'writable' that`), { readable: r5, writable: o5 }; } -function Vt(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readableStreamController") && e3 instanceof ReadableStream3); +function Vt(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readableStreamController") && e5 instanceof ReadableStream3); } -function Ut(e3) { - return void 0 !== e3._reader; +function Ut(e5) { + return void 0 !== e5._reader; } -function Gt(e3, r3) { - if (e3._disturbed = true, "closed" === e3._state) return c2(void 0); - if ("errored" === e3._state) return d6(e3._storedError); - Xt(e3); - const o3 = e3._reader; - if (void 0 !== o3 && Fe(o3)) { - const e4 = o3._readIntoRequests; - o3._readIntoRequests = new S5(), e4.forEach((e5) => { - e5._closeSteps(void 0); +function Gt(e5, r5) { + if (e5._disturbed = true, "closed" === e5._state) return c2(void 0); + if ("errored" === e5._state) return d6(e5._storedError); + Xt(e5); + const o5 = e5._reader; + if (void 0 !== o5 && Fe(o5)) { + const e6 = o5._readIntoRequests; + o5._readIntoRequests = new S5(), e6.forEach((e7) => { + e7._closeSteps(void 0); }); } - return p3(e3._readableStreamController[T5](r3), t); + return p3(e5._readableStreamController[T5](r5), t); } -function Xt(e3) { - e3._state = "closed"; - const t2 = e3._reader; - if (void 0 !== t2 && (j3(t2), K5(t2))) { - const e4 = t2._readRequests; - t2._readRequests = new S5(), e4.forEach((e5) => { - e5._closeSteps(); +function Xt(e5) { + e5._state = "closed"; + const t4 = e5._reader; + if (void 0 !== t4 && (j3(t4), K5(t4))) { + const e6 = t4._readRequests; + t4._readRequests = new S5(), e6.forEach((e7) => { + e7._closeSteps(); }); } } -function Jt(e3, t2) { - e3._state = "errored", e3._storedError = t2; - const r3 = e3._reader; - void 0 !== r3 && (A4(r3, t2), K5(r3) ? Z5(r3, t2) : Ie(r3, t2)); +function Jt(e5, t4) { + e5._state = "errored", e5._storedError = t4; + const r5 = e5._reader; + void 0 !== r5 && (A4(r5, t4), K5(r5) ? Z5(r5, t4) : Ie(r5, t4)); } -function Kt(e3) { - return new TypeError(`ReadableStream.prototype.${e3} can only be used on a ReadableStream`); +function Kt(e5) { + return new TypeError(`ReadableStream.prototype.${e5} can only be used on a ReadableStream`); } -function Zt(e3, t2) { - F4(e3, t2); - const r3 = null == e3 ? void 0 : e3.highWaterMark; - return M4(r3, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: Y2(r3) }; +function Zt(e5, t4) { + F4(e5, t4); + const r5 = null == e5 ? void 0 : e5.highWaterMark; + return M4(r5, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: Y2(r5) }; } -function tr(e3) { - return new TypeError(`ByteLengthQueuingStrategy.prototype.${e3} can only be used on a ByteLengthQueuingStrategy`); +function tr(e5) { + return new TypeError(`ByteLengthQueuingStrategy.prototype.${e5} can only be used on a ByteLengthQueuingStrategy`); } -function rr(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_byteLengthQueuingStrategyHighWaterMark") && e3 instanceof ByteLengthQueuingStrategy); +function rr(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_byteLengthQueuingStrategyHighWaterMark") && e5 instanceof ByteLengthQueuingStrategy); } -function nr(e3) { - return new TypeError(`CountQueuingStrategy.prototype.${e3} can only be used on a CountQueuingStrategy`); +function nr(e5) { + return new TypeError(`CountQueuingStrategy.prototype.${e5} can only be used on a CountQueuingStrategy`); } -function ar(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_countQueuingStrategyHighWaterMark") && e3 instanceof CountQueuingStrategy); +function ar(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_countQueuingStrategyHighWaterMark") && e5 instanceof CountQueuingStrategy); } -function ir(e3, t2, r3) { - return I4(e3, r3), (r4) => w6(e3, t2, [r4]); +function ir(e5, t4, r5) { + return I4(e5, r5), (r6) => w6(e5, t4, [r6]); } -function lr(e3, t2, r3) { - return I4(e3, r3), (r4) => g3(e3, t2, [r4]); +function lr(e5, t4, r5) { + return I4(e5, r5), (r6) => g3(e5, t4, [r6]); } -function sr(e3, t2, r3) { - return I4(e3, r3), (r4, o3) => w6(e3, t2, [r4, o3]); +function sr(e5, t4, r5) { + return I4(e5, r5), (r6, o5) => w6(e5, t4, [r6, o5]); } -function ur(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_transformStreamController") && e3 instanceof TransformStream2); +function ur(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_transformStreamController") && e5 instanceof TransformStream2); } -function cr(e3, t2) { - Sr(e3, t2), dr(e3, t2); +function cr(e5, t4) { + Sr(e5, t4), dr(e5, t4); } -function dr(e3, t2) { - hr(e3._transformStreamController), function(e4, t3) { - e4._writableController.error(t3); - "writable" === e4._writableState && Tr(e4, t3); - }(e3, t2), e3._backpressure && fr(e3, false); +function dr(e5, t4) { + hr(e5._transformStreamController), function(e6, t5) { + e6._writableController.error(t5); + "writable" === e6._writableState && Tr(e6, t5); + }(e5, t4), e5._backpressure && fr(e5, false); } -function fr(e3, t2) { - void 0 !== e3._backpressureChangePromise && e3._backpressureChangePromise_resolve(), e3._backpressureChangePromise = u2((t3) => { - e3._backpressureChangePromise_resolve = t3; - }), e3._backpressure = t2; +function fr(e5, t4) { + void 0 !== e5._backpressureChangePromise && e5._backpressureChangePromise_resolve(), e5._backpressureChangePromise = u2((t5) => { + e5._backpressureChangePromise_resolve = t5; + }), e5._backpressure = t4; } -function br(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledTransformStream") && e3 instanceof TransformStreamDefaultController); +function br(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledTransformStream") && e5 instanceof TransformStreamDefaultController); } -function hr(e3) { - e3._transformAlgorithm = void 0, e3._flushAlgorithm = void 0; +function hr(e5) { + e5._transformAlgorithm = void 0, e5._flushAlgorithm = void 0; } -function _r(e3, t2) { - const r3 = e3._controlledTransformStream; - if (!gr(r3)) throw new TypeError("Readable side is not in a state that permits enqueue"); +function _r(e5, t4) { + const r5 = e5._controlledTransformStream; + if (!gr(r5)) throw new TypeError("Readable side is not in a state that permits enqueue"); try { - !function(e4, t3) { - e4._readablePulling = false; + !function(e6, t5) { + e6._readablePulling = false; try { - e4._readableController.enqueue(t3); - } catch (t4) { - throw Sr(e4, t4), t4; - } - }(r3, t2); - } catch (e4) { - throw dr(r3, e4), r3._readableStoredError; - } - const o3 = function(e4) { - return !function(e5) { - if (!gr(e5)) return false; - if (e5._readablePulling) return true; - if (vr(e5) > 0) return true; + e6._readableController.enqueue(t5); + } catch (t6) { + throw Sr(e6, t6), t6; + } + }(r5, t4); + } catch (e6) { + throw dr(r5, e6), r5._readableStoredError; + } + const o5 = function(e6) { + return !function(e7) { + if (!gr(e7)) return false; + if (e7._readablePulling) return true; + if (vr(e7) > 0) return true; return false; - }(e4); - }(r3); - o3 !== r3._backpressure && fr(r3, true); + }(e6); + }(r5); + o5 !== r5._backpressure && fr(r5, true); } -function pr(e3, t2) { - return p3(e3._transformAlgorithm(t2), void 0, (t3) => { - throw cr(e3._controlledTransformStream, t3), t3; +function pr(e5, t4) { + return p3(e5._transformAlgorithm(t4), void 0, (t5) => { + throw cr(e5._controlledTransformStream, t5), t5; }); } -function mr(e3) { - return new TypeError(`TransformStreamDefaultController.prototype.${e3} can only be used on a TransformStreamDefaultController`); +function mr(e5) { + return new TypeError(`TransformStreamDefaultController.prototype.${e5} can only be used on a TransformStreamDefaultController`); } -function yr(e3) { - return new TypeError(`TransformStream.prototype.${e3} can only be used on a TransformStream`); +function yr(e5) { + return new TypeError(`TransformStream.prototype.${e5} can only be used on a TransformStream`); } -function gr(e3) { - return !e3._readableCloseRequested && "readable" === e3._readableState; +function gr(e5) { + return !e5._readableCloseRequested && "readable" === e5._readableState; } -function wr(e3) { - e3._readableState = "closed", e3._readableCloseRequested = true, e3._readableController.close(); +function wr(e5) { + e5._readableState = "closed", e5._readableCloseRequested = true, e5._readableController.close(); } -function Sr(e3, t2) { - "readable" === e3._readableState && (e3._readableState = "errored", e3._readableStoredError = t2), e3._readableController.error(t2); +function Sr(e5, t4) { + "readable" === e5._readableState && (e5._readableState = "errored", e5._readableStoredError = t4), e5._readableController.error(t4); } -function vr(e3) { - return e3._readableController.desiredSize; +function vr(e5) { + return e5._readableController.desiredSize; } -function Rr(e3, t2) { - "writable" !== e3._writableState ? qr(e3) : Tr(e3, t2); +function Rr(e5, t4) { + "writable" !== e5._writableState ? qr(e5) : Tr(e5, t4); } -function Tr(e3, t2) { - e3._writableState = "erroring", e3._writableStoredError = t2, !function(e4) { - return e4._writableHasInFlightOperation; - }(e3) && e3._writableStarted && qr(e3); +function Tr(e5, t4) { + e5._writableState = "erroring", e5._writableStoredError = t4, !function(e6) { + return e6._writableHasInFlightOperation; + }(e5) && e5._writableStarted && qr(e5); } -function qr(e3) { - e3._writableState = "errored"; +function qr(e5) { + e5._writableState = "errored"; } -function Cr(e3) { - "erroring" === e3._writableState && qr(e3); +function Cr(e5) { + "erroring" === e5._writableState && qr(e5); } var e2, o2, a3, i2, l2, s, y5, S5, v4, R6, T5, q5, C4, z5, L6, ReadableStreamDefaultReader, te, re2, ae2, ReadableStreamBYOBRequest, ReadableByteStreamController, ReadableStreamBYOBReader, Ue, WritableStream, WritableStreamDefaultWriter, lt, WritableStreamDefaultController, Pt, Wt, ReadableStreamDefaultController, ReadableStream3, er, ByteLengthQueuingStrategy, or, CountQueuingStrategy, TransformStream2, TransformStreamDefaultController; var init_ponyfill = __esm({ "node_modules/formdata-node/node_modules/web-streams-polyfill/dist/ponyfill.mjs"() { - e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol : (e3) => `Symbol(${e3})`; + e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol : (e5) => `Symbol(${e5})`; o2 = t; a3 = Promise; i2 = Promise.prototype.then; l2 = Promise.resolve.bind(a3); s = Promise.reject.bind(a3); - y5 = (e3) => { + y5 = (e5) => { if ("function" == typeof queueMicrotask) y5 = queueMicrotask; else { - const e4 = c2(void 0); - y5 = (t2) => f3(e4, t2); + const e6 = c2(void 0); + y5 = (t4) => f3(e6, t4); } - return y5(e3); + return y5(e5); }; S5 = class { constructor() { @@ -7357,26 +7358,26 @@ var init_ponyfill = __esm({ get length() { return this._size; } - push(e3) { - const t2 = this._back; - let r3 = t2; - 16383 === t2._elements.length && (r3 = { _elements: [], _next: void 0 }), t2._elements.push(e3), r3 !== t2 && (this._back = r3, t2._next = r3), ++this._size; + push(e5) { + const t4 = this._back; + let r5 = t4; + 16383 === t4._elements.length && (r5 = { _elements: [], _next: void 0 }), t4._elements.push(e5), r5 !== t4 && (this._back = r5, t4._next = r5), ++this._size; } shift() { - const e3 = this._front; - let t2 = e3; - const r3 = this._cursor; - let o3 = r3 + 1; - const n2 = e3._elements, a4 = n2[r3]; - return 16384 === o3 && (t2 = e3._next, o3 = 0), --this._size, this._cursor = o3, e3 !== t2 && (this._front = t2), n2[r3] = void 0, a4; + const e5 = this._front; + let t4 = e5; + const r5 = this._cursor; + let o5 = r5 + 1; + const n4 = e5._elements, a6 = n4[r5]; + return 16384 === o5 && (t4 = e5._next, o5 = 0), --this._size, this._cursor = o5, e5 !== t4 && (this._front = t4), n4[r5] = void 0, a6; } - forEach(e3) { - let t2 = this._cursor, r3 = this._front, o3 = r3._elements; - for (; !(t2 === o3.length && void 0 === r3._next || t2 === o3.length && (r3 = r3._next, o3 = r3._elements, t2 = 0, 0 === o3.length)); ) e3(o3[t2]), ++t2; + forEach(e5) { + let t4 = this._cursor, r5 = this._front, o5 = r5._elements; + for (; !(t4 === o5.length && void 0 === r5._next || t4 === o5.length && (r5 = r5._next, o5 = r5._elements, t4 = 0, 0 === o5.length)); ) e5(o5[t4]), ++t4; } peek() { - const e3 = this._front, t2 = this._cursor; - return e3._elements[t2]; + const e5 = this._front, t4 = this._cursor; + return e5._elements[t4]; } }; v4 = e2("[[AbortSteps]]"); @@ -7384,90 +7385,90 @@ var init_ponyfill = __esm({ T5 = e2("[[CancelSteps]]"); q5 = e2("[[PullSteps]]"); C4 = e2("[[ReleaseSteps]]"); - z5 = Number.isFinite || function(e3) { - return "number" == typeof e3 && isFinite(e3); + z5 = Number.isFinite || function(e5) { + return "number" == typeof e5 && isFinite(e5); }; - L6 = Math.trunc || function(e3) { - return e3 < 0 ? Math.ceil(e3) : Math.floor(e3); + L6 = Math.trunc || function(e5) { + return e5 < 0 ? Math.ceil(e5) : Math.floor(e5); }; ReadableStreamDefaultReader = class { - constructor(e3) { - if ($5(e3, 1, "ReadableStreamDefaultReader"), V5(e3, "First parameter"), Ut(e3)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); - E3(this, e3), this._readRequests = new S5(); + constructor(e5) { + if ($5(e5, 1, "ReadableStreamDefaultReader"), V5(e5, "First parameter"), Ut(e5)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + E3(this, e5), this._readRequests = new S5(); } get closed() { return K5(this) ? this._closedPromise : d6(ee2("closed")); } - cancel(e3) { - return K5(this) ? void 0 === this._ownerReadableStream ? d6(k6("cancel")) : P3(this, e3) : d6(ee2("cancel")); + cancel(e5) { + return K5(this) ? void 0 === this._ownerReadableStream ? d6(k6("cancel")) : P3(this, e5) : d6(ee2("cancel")); } read() { if (!K5(this)) return d6(ee2("read")); if (void 0 === this._ownerReadableStream) return d6(k6("read from")); - let e3, t2; - const r3 = u2((r4, o3) => { - e3 = r4, t2 = o3; + let e5, t4; + const r5 = u2((r6, o5) => { + e5 = r6, t4 = o5; }); - return function(e4, t3) { - const r4 = e4._ownerReadableStream; - r4._disturbed = true, "closed" === r4._state ? t3._closeSteps() : "errored" === r4._state ? t3._errorSteps(r4._storedError) : r4._readableStreamController[q5](t3); - }(this, { _chunkSteps: (t3) => e3({ value: t3, done: false }), _closeSteps: () => e3({ value: void 0, done: true }), _errorSteps: (e4) => t2(e4) }), r3; + return function(e6, t5) { + const r6 = e6._ownerReadableStream; + r6._disturbed = true, "closed" === r6._state ? t5._closeSteps() : "errored" === r6._state ? t5._errorSteps(r6._storedError) : r6._readableStreamController[q5](t5); + }(this, { _chunkSteps: (t5) => e5({ value: t5, done: false }), _closeSteps: () => e5({ value: void 0, done: true }), _errorSteps: (e6) => t4(e6) }), r5; } releaseLock() { if (!K5(this)) throw ee2("releaseLock"); - void 0 !== this._ownerReadableStream && function(e3) { - W5(e3); - const t2 = new TypeError("Reader was released"); - Z5(e3, t2); + void 0 !== this._ownerReadableStream && function(e5) { + W5(e5); + const t4 = new TypeError("Reader was released"); + Z5(e5, t4); }(this); } }; Object.defineProperties(ReadableStreamDefaultReader.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), n(ReadableStreamDefaultReader.prototype.cancel, "cancel"), n(ReadableStreamDefaultReader.prototype.read, "read"), n(ReadableStreamDefaultReader.prototype.releaseLock, "releaseLock"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamDefaultReader.prototype, e2.toStringTag, { value: "ReadableStreamDefaultReader", configurable: true }); te = class { - constructor(e3, t2) { - this._ongoingPromise = void 0, this._isFinished = false, this._reader = e3, this._preventCancel = t2; + constructor(e5, t4) { + this._ongoingPromise = void 0, this._isFinished = false, this._reader = e5, this._preventCancel = t4; } next() { - const e3 = () => this._nextSteps(); - return this._ongoingPromise = this._ongoingPromise ? p3(this._ongoingPromise, e3, e3) : e3(), this._ongoingPromise; + const e5 = () => this._nextSteps(); + return this._ongoingPromise = this._ongoingPromise ? p3(this._ongoingPromise, e5, e5) : e5(), this._ongoingPromise; } - return(e3) { - const t2 = () => this._returnSteps(e3); - return this._ongoingPromise ? p3(this._ongoingPromise, t2, t2) : t2(); + return(e5) { + const t4 = () => this._returnSteps(e5); + return this._ongoingPromise ? p3(this._ongoingPromise, t4, t4) : t4(); } _nextSteps() { if (this._isFinished) return Promise.resolve({ value: void 0, done: true }); - const e3 = this._reader; - return void 0 === e3 ? d6(k6("iterate")) : f3(e3.read(), (e4) => { - var t2; - return this._ongoingPromise = void 0, e4.done && (this._isFinished = true, null === (t2 = this._reader) || void 0 === t2 || t2.releaseLock(), this._reader = void 0), e4; - }, (e4) => { - var t2; - throw this._ongoingPromise = void 0, this._isFinished = true, null === (t2 = this._reader) || void 0 === t2 || t2.releaseLock(), this._reader = void 0, e4; + const e5 = this._reader; + return void 0 === e5 ? d6(k6("iterate")) : f3(e5.read(), (e6) => { + var t4; + return this._ongoingPromise = void 0, e6.done && (this._isFinished = true, null === (t4 = this._reader) || void 0 === t4 || t4.releaseLock(), this._reader = void 0), e6; + }, (e6) => { + var t4; + throw this._ongoingPromise = void 0, this._isFinished = true, null === (t4 = this._reader) || void 0 === t4 || t4.releaseLock(), this._reader = void 0, e6; }); } - _returnSteps(e3) { - if (this._isFinished) return Promise.resolve({ value: e3, done: true }); + _returnSteps(e5) { + if (this._isFinished) return Promise.resolve({ value: e5, done: true }); this._isFinished = true; - const t2 = this._reader; - if (void 0 === t2) return d6(k6("finish iterating")); + const t4 = this._reader; + if (void 0 === t4) return d6(k6("finish iterating")); if (this._reader = void 0, !this._preventCancel) { - const r3 = t2.cancel(e3); - return t2.releaseLock(), p3(r3, () => ({ value: e3, done: true })); + const r5 = t4.cancel(e5); + return t4.releaseLock(), p3(r5, () => ({ value: e5, done: true })); } - return t2.releaseLock(), c2({ value: e3, done: true }); + return t4.releaseLock(), c2({ value: e5, done: true }); } }; re2 = { next() { return oe(this) ? this._asyncIteratorImpl.next() : d6(ne("next")); - }, return(e3) { - return oe(this) ? this._asyncIteratorImpl.return(e3) : d6(ne("return")); + }, return(e5) { + return oe(this) ? this._asyncIteratorImpl.return(e5) : d6(ne("return")); } }; "symbol" == typeof e2.asyncIterator && Object.defineProperty(re2, e2.asyncIterator, { value() { return this; }, writable: true, configurable: true }); - ae2 = Number.isNaN || function(e3) { - return e3 != e3; + ae2 = Number.isNaN || function(e5) { + return e5 != e5; }; ReadableStreamBYOBRequest = class { constructor() { @@ -7477,35 +7478,35 @@ var init_ponyfill = __esm({ if (!fe(this)) throw Be("view"); return this._view; } - respond(e3) { + respond(e5) { if (!fe(this)) throw Be("respond"); - if ($5(e3, 1, "respond"), e3 = N5(e3, "First parameter"), void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); - this._view.buffer, function(e4, t2) { - const r3 = e4._pendingPullIntos.peek(); - if ("closed" === e4._controlledReadableByteStream._state) { - if (0 !== t2) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); + if ($5(e5, 1, "respond"), e5 = N5(e5, "First parameter"), void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); + this._view.buffer, function(e6, t4) { + const r5 = e6._pendingPullIntos.peek(); + if ("closed" === e6._controlledReadableByteStream._state) { + if (0 !== t4) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); } else { - if (0 === t2) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream"); - if (r3.bytesFilled + t2 > r3.byteLength) throw new RangeError("bytesWritten out of range"); + if (0 === t4) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream"); + if (r5.bytesFilled + t4 > r5.byteLength) throw new RangeError("bytesWritten out of range"); } - r3.buffer = r3.buffer, qe(e4, t2); - }(this._associatedReadableByteStreamController, e3); + r5.buffer = r5.buffer, qe(e6, t4); + }(this._associatedReadableByteStreamController, e5); } - respondWithNewView(e3) { + respondWithNewView(e5) { if (!fe(this)) throw Be("respondWithNewView"); - if ($5(e3, 1, "respondWithNewView"), !ArrayBuffer.isView(e3)) throw new TypeError("You can only respond with array buffer views"); + if ($5(e5, 1, "respondWithNewView"), !ArrayBuffer.isView(e5)) throw new TypeError("You can only respond with array buffer views"); if (void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); - e3.buffer, function(e4, t2) { - const r3 = e4._pendingPullIntos.peek(); - if ("closed" === e4._controlledReadableByteStream._state) { - if (0 !== t2.byteLength) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); - } else if (0 === t2.byteLength) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); - if (r3.byteOffset + r3.bytesFilled !== t2.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); - if (r3.bufferByteLength !== t2.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); - if (r3.bytesFilled + t2.byteLength > r3.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); - const o3 = t2.byteLength; - r3.buffer = t2.buffer, qe(e4, o3); - }(this._associatedReadableByteStreamController, e3); + e5.buffer, function(e6, t4) { + const r5 = e6._pendingPullIntos.peek(); + if ("closed" === e6._controlledReadableByteStream._state) { + if (0 !== t4.byteLength) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); + } else if (0 === t4.byteLength) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); + if (r5.byteOffset + r5.bytesFilled !== t4.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); + if (r5.bufferByteLength !== t4.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); + if (r5.bytesFilled + t4.byteLength > r5.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); + const o5 = t4.byteLength; + r5.buffer = t4.buffer, qe(e6, o5); + }(this._associatedReadableByteStreamController, e5); } }; Object.defineProperties(ReadableStreamBYOBRequest.prototype, { respond: { enumerable: true }, respondWithNewView: { enumerable: true }, view: { enumerable: true } }), n(ReadableStreamBYOBRequest.prototype.respond, "respond"), n(ReadableStreamBYOBRequest.prototype.respondWithNewView, "respondWithNewView"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamBYOBRequest.prototype, e2.toStringTag, { value: "ReadableStreamBYOBRequest", configurable: true }); @@ -7515,14 +7516,14 @@ var init_ponyfill = __esm({ } get byobRequest() { if (!de(this)) throw Ae("byobRequest"); - return function(e3) { - if (null === e3._byobRequest && e3._pendingPullIntos.length > 0) { - const t2 = e3._pendingPullIntos.peek(), r3 = new Uint8Array(t2.buffer, t2.byteOffset + t2.bytesFilled, t2.byteLength - t2.bytesFilled), o3 = Object.create(ReadableStreamBYOBRequest.prototype); - !function(e4, t3, r4) { - e4._associatedReadableByteStreamController = t3, e4._view = r4; - }(o3, e3, r3), e3._byobRequest = o3; - } - return e3._byobRequest; + return function(e5) { + if (null === e5._byobRequest && e5._pendingPullIntos.length > 0) { + const t4 = e5._pendingPullIntos.peek(), r5 = new Uint8Array(t4.buffer, t4.byteOffset + t4.bytesFilled, t4.byteLength - t4.bytesFilled), o5 = Object.create(ReadableStreamBYOBRequest.prototype); + !function(e6, t5, r6) { + e6._associatedReadableByteStreamController = t5, e6._view = r6; + }(o5, e5, r5), e5._byobRequest = o5; + } + return e5._byobRequest; }(this); } get desiredSize() { @@ -7532,182 +7533,182 @@ var init_ponyfill = __esm({ close() { if (!de(this)) throw Ae("close"); if (this._closeRequested) throw new TypeError("The stream has already been closed; do not close it again!"); - const e3 = this._controlledReadableByteStream._state; - if ("readable" !== e3) throw new TypeError(`The stream (in ${e3} state) is not in the readable state and cannot be closed`); - !function(e4) { - const t2 = e4._controlledReadableByteStream; - if (e4._closeRequested || "readable" !== t2._state) return; - if (e4._queueTotalSize > 0) return void (e4._closeRequested = true); - if (e4._pendingPullIntos.length > 0) { - if (e4._pendingPullIntos.peek().bytesFilled > 0) { - const t3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - throw Pe(e4, t3), t3; + const e5 = this._controlledReadableByteStream._state; + if ("readable" !== e5) throw new TypeError(`The stream (in ${e5} state) is not in the readable state and cannot be closed`); + !function(e6) { + const t4 = e6._controlledReadableByteStream; + if (e6._closeRequested || "readable" !== t4._state) return; + if (e6._queueTotalSize > 0) return void (e6._closeRequested = true); + if (e6._pendingPullIntos.length > 0) { + if (e6._pendingPullIntos.peek().bytesFilled > 0) { + const t5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + throw Pe(e6, t5), t5; } } - Ee(e4), Xt(t2); + Ee(e6), Xt(t4); }(this); } - enqueue(e3) { + enqueue(e5) { if (!de(this)) throw Ae("enqueue"); - if ($5(e3, 1, "enqueue"), !ArrayBuffer.isView(e3)) throw new TypeError("chunk must be an array buffer view"); - if (0 === e3.byteLength) throw new TypeError("chunk must have non-zero byteLength"); - if (0 === e3.buffer.byteLength) throw new TypeError("chunk's buffer must have non-zero byteLength"); + if ($5(e5, 1, "enqueue"), !ArrayBuffer.isView(e5)) throw new TypeError("chunk must be an array buffer view"); + if (0 === e5.byteLength) throw new TypeError("chunk must have non-zero byteLength"); + if (0 === e5.buffer.byteLength) throw new TypeError("chunk's buffer must have non-zero byteLength"); if (this._closeRequested) throw new TypeError("stream is closed or draining"); - const t2 = this._controlledReadableByteStream._state; - if ("readable" !== t2) throw new TypeError(`The stream (in ${t2} state) is not in the readable state and cannot be enqueued to`); - !function(e4, t3) { - const r3 = e4._controlledReadableByteStream; - if (e4._closeRequested || "readable" !== r3._state) return; - const o3 = t3.buffer, n2 = t3.byteOffset, a4 = t3.byteLength, i3 = o3; - if (e4._pendingPullIntos.length > 0) { - const t4 = e4._pendingPullIntos.peek(); - t4.buffer, 0, Re(e4), t4.buffer = t4.buffer, "none" === t4.readerType && ge(e4, t4); - } - if (J4(r3)) if (function(e5) { - const t4 = e5._controlledReadableByteStream._reader; - for (; t4._readRequests.length > 0; ) { - if (0 === e5._queueTotalSize) return; - We(e5, t4._readRequests.shift()); + const t4 = this._controlledReadableByteStream._state; + if ("readable" !== t4) throw new TypeError(`The stream (in ${t4} state) is not in the readable state and cannot be enqueued to`); + !function(e6, t5) { + const r5 = e6._controlledReadableByteStream; + if (e6._closeRequested || "readable" !== r5._state) return; + const o5 = t5.buffer, n4 = t5.byteOffset, a6 = t5.byteLength, i5 = o5; + if (e6._pendingPullIntos.length > 0) { + const t6 = e6._pendingPullIntos.peek(); + t6.buffer, 0, Re(e6), t6.buffer = t6.buffer, "none" === t6.readerType && ge(e6, t6); + } + if (J4(r5)) if (function(e7) { + const t6 = e7._controlledReadableByteStream._reader; + for (; t6._readRequests.length > 0; ) { + if (0 === e7._queueTotalSize) return; + We(e7, t6._readRequests.shift()); } - }(e4), 0 === X4(r3)) me(e4, i3, n2, a4); + }(e6), 0 === X4(r5)) me(e6, i5, n4, a6); else { - e4._pendingPullIntos.length > 0 && Ce(e4); - G5(r3, new Uint8Array(i3, n2, a4), false); + e6._pendingPullIntos.length > 0 && Ce(e6); + G5(r5, new Uint8Array(i5, n4, a6), false); } - else Le(r3) ? (me(e4, i3, n2, a4), Te(e4)) : me(e4, i3, n2, a4); - be(e4); - }(this, e3); + else Le(r5) ? (me(e6, i5, n4, a6), Te(e6)) : me(e6, i5, n4, a6); + be(e6); + }(this, e5); } - error(e3) { + error(e5) { if (!de(this)) throw Ae("error"); - Pe(this, e3); + Pe(this, e5); } - [T5](e3) { + [T5](e5) { he(this), ce2(this); - const t2 = this._cancelAlgorithm(e3); - return Ee(this), t2; - } - [q5](e3) { - const t2 = this._controlledReadableByteStream; - if (this._queueTotalSize > 0) return void We(this, e3); - const r3 = this._autoAllocateChunkSize; - if (void 0 !== r3) { - let t3; + const t4 = this._cancelAlgorithm(e5); + return Ee(this), t4; + } + [q5](e5) { + const t4 = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) return void We(this, e5); + const r5 = this._autoAllocateChunkSize; + if (void 0 !== r5) { + let t5; try { - t3 = new ArrayBuffer(r3); - } catch (t4) { - return void e3._errorSteps(t4); + t5 = new ArrayBuffer(r5); + } catch (t6) { + return void e5._errorSteps(t6); } - const o3 = { buffer: t3, bufferByteLength: r3, byteOffset: 0, byteLength: r3, bytesFilled: 0, elementSize: 1, viewConstructor: Uint8Array, readerType: "default" }; - this._pendingPullIntos.push(o3); + const o5 = { buffer: t5, bufferByteLength: r5, byteOffset: 0, byteLength: r5, bytesFilled: 0, elementSize: 1, viewConstructor: Uint8Array, readerType: "default" }; + this._pendingPullIntos.push(o5); } - U6(t2, e3), be(this); + U6(t4, e5), be(this); } [C4]() { if (this._pendingPullIntos.length > 0) { - const e3 = this._pendingPullIntos.peek(); - e3.readerType = "none", this._pendingPullIntos = new S5(), this._pendingPullIntos.push(e3); + const e5 = this._pendingPullIntos.peek(); + e5.readerType = "none", this._pendingPullIntos = new S5(), this._pendingPullIntos.push(e5); } } }; Object.defineProperties(ReadableByteStreamController.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, byobRequest: { enumerable: true }, desiredSize: { enumerable: true } }), n(ReadableByteStreamController.prototype.close, "close"), n(ReadableByteStreamController.prototype.enqueue, "enqueue"), n(ReadableByteStreamController.prototype.error, "error"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableByteStreamController.prototype, e2.toStringTag, { value: "ReadableByteStreamController", configurable: true }); ReadableStreamBYOBReader = class { - constructor(e3) { - if ($5(e3, 1, "ReadableStreamBYOBReader"), V5(e3, "First parameter"), Ut(e3)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); - if (!de(e3._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source"); - E3(this, e3), this._readIntoRequests = new S5(); + constructor(e5) { + if ($5(e5, 1, "ReadableStreamBYOBReader"), V5(e5, "First parameter"), Ut(e5)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + if (!de(e5._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source"); + E3(this, e5), this._readIntoRequests = new S5(); } get closed() { return Fe(this) ? this._closedPromise : d6(De("closed")); } - cancel(e3) { - return Fe(this) ? void 0 === this._ownerReadableStream ? d6(k6("cancel")) : P3(this, e3) : d6(De("cancel")); + cancel(e5) { + return Fe(this) ? void 0 === this._ownerReadableStream ? d6(k6("cancel")) : P3(this, e5) : d6(De("cancel")); } - read(e3) { + read(e5) { if (!Fe(this)) return d6(De("read")); - if (!ArrayBuffer.isView(e3)) return d6(new TypeError("view must be an array buffer view")); - if (0 === e3.byteLength) return d6(new TypeError("view must have non-zero byteLength")); - if (0 === e3.buffer.byteLength) return d6(new TypeError("view's buffer must have non-zero byteLength")); - if (e3.buffer, void 0 === this._ownerReadableStream) return d6(k6("read from")); - let t2, r3; - const o3 = u2((e4, o4) => { - t2 = e4, r3 = o4; + if (!ArrayBuffer.isView(e5)) return d6(new TypeError("view must be an array buffer view")); + if (0 === e5.byteLength) return d6(new TypeError("view must have non-zero byteLength")); + if (0 === e5.buffer.byteLength) return d6(new TypeError("view's buffer must have non-zero byteLength")); + if (e5.buffer, void 0 === this._ownerReadableStream) return d6(k6("read from")); + let t4, r5; + const o5 = u2((e6, o6) => { + t4 = e6, r5 = o6; }); - return function(e4, t3, r4) { - const o4 = e4._ownerReadableStream; - o4._disturbed = true, "errored" === o4._state ? r4._errorSteps(o4._storedError) : function(e5, t4, r5) { - const o5 = e5._controlledReadableByteStream; - let n2 = 1; - t4.constructor !== DataView && (n2 = t4.constructor.BYTES_PER_ELEMENT); - const a4 = t4.constructor, i3 = t4.buffer, l3 = { buffer: i3, bufferByteLength: i3.byteLength, byteOffset: t4.byteOffset, byteLength: t4.byteLength, bytesFilled: 0, elementSize: n2, viewConstructor: a4, readerType: "byob" }; - if (e5._pendingPullIntos.length > 0) return e5._pendingPullIntos.push(l3), void je(o5, r5); - if ("closed" !== o5._state) { - if (e5._queueTotalSize > 0) { - if (we(e5, l3)) { - const t5 = pe(l3); - return ve(e5), void r5._chunkSteps(t5); + return function(e6, t5, r6) { + const o6 = e6._ownerReadableStream; + o6._disturbed = true, "errored" === o6._state ? r6._errorSteps(o6._storedError) : function(e7, t6, r7) { + const o7 = e7._controlledReadableByteStream; + let n4 = 1; + t6.constructor !== DataView && (n4 = t6.constructor.BYTES_PER_ELEMENT); + const a6 = t6.constructor, i5 = t6.buffer, l5 = { buffer: i5, bufferByteLength: i5.byteLength, byteOffset: t6.byteOffset, byteLength: t6.byteLength, bytesFilled: 0, elementSize: n4, viewConstructor: a6, readerType: "byob" }; + if (e7._pendingPullIntos.length > 0) return e7._pendingPullIntos.push(l5), void je(o7, r7); + if ("closed" !== o7._state) { + if (e7._queueTotalSize > 0) { + if (we(e7, l5)) { + const t7 = pe(l5); + return ve(e7), void r7._chunkSteps(t7); } - if (e5._closeRequested) { - const t5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - return Pe(e5, t5), void r5._errorSteps(t5); + if (e7._closeRequested) { + const t7 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + return Pe(e7, t7), void r7._errorSteps(t7); } } - e5._pendingPullIntos.push(l3), je(o5, r5), be(e5); + e7._pendingPullIntos.push(l5), je(o7, r7), be(e7); } else { - const e6 = new a4(l3.buffer, l3.byteOffset, 0); - r5._closeSteps(e6); + const e8 = new a6(l5.buffer, l5.byteOffset, 0); + r7._closeSteps(e8); } - }(o4._readableStreamController, t3, r4); - }(this, e3, { _chunkSteps: (e4) => t2({ value: e4, done: false }), _closeSteps: (e4) => t2({ value: e4, done: true }), _errorSteps: (e4) => r3(e4) }), o3; + }(o6._readableStreamController, t5, r6); + }(this, e5, { _chunkSteps: (e6) => t4({ value: e6, done: false }), _closeSteps: (e6) => t4({ value: e6, done: true }), _errorSteps: (e6) => r5(e6) }), o5; } releaseLock() { if (!Fe(this)) throw De("releaseLock"); - void 0 !== this._ownerReadableStream && function(e3) { - W5(e3); - const t2 = new TypeError("Reader was released"); - Ie(e3, t2); + void 0 !== this._ownerReadableStream && function(e5) { + W5(e5); + const t4 = new TypeError("Reader was released"); + Ie(e5, t4); }(this); } }; Object.defineProperties(ReadableStreamBYOBReader.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), n(ReadableStreamBYOBReader.prototype.cancel, "cancel"), n(ReadableStreamBYOBReader.prototype.read, "read"), n(ReadableStreamBYOBReader.prototype.releaseLock, "releaseLock"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamBYOBReader.prototype, e2.toStringTag, { value: "ReadableStreamBYOBReader", configurable: true }); Ue = "function" == typeof AbortController; WritableStream = class { - constructor(e3 = {}, t2 = {}) { - void 0 === e3 ? e3 = null : D4(e3, "First parameter"); - const r3 = Ye(t2, "Second parameter"), o3 = function(e4, t3) { - F4(e4, t3); - const r4 = null == e4 ? void 0 : e4.abort, o4 = null == e4 ? void 0 : e4.close, n3 = null == e4 ? void 0 : e4.start, a5 = null == e4 ? void 0 : e4.type, i3 = null == e4 ? void 0 : e4.write; - return { abort: void 0 === r4 ? void 0 : Ne(r4, e4, `${t3} has member 'abort' that`), close: void 0 === o4 ? void 0 : He(o4, e4, `${t3} has member 'close' that`), start: void 0 === n3 ? void 0 : xe(n3, e4, `${t3} has member 'start' that`), write: void 0 === i3 ? void 0 : Ve(i3, e4, `${t3} has member 'write' that`), type: a5 }; - }(e3, "First parameter"); - var n2; - (n2 = this)._state = "writable", n2._storedError = void 0, n2._writer = void 0, n2._writableStreamController = void 0, n2._writeRequests = new S5(), n2._inFlightWriteRequest = void 0, n2._closeRequest = void 0, n2._inFlightCloseRequest = void 0, n2._pendingAbortRequest = void 0, n2._backpressure = false; - if (void 0 !== o3.type) throw new RangeError("Invalid type is specified"); - const a4 = Me(r3); - !function(e4, t3, r4, o4) { - const n3 = Object.create(WritableStreamDefaultController.prototype); - let a5, i3, l3, s2; - a5 = void 0 !== t3.start ? () => t3.start(n3) : () => { + constructor(e5 = {}, t4 = {}) { + void 0 === e5 ? e5 = null : D4(e5, "First parameter"); + const r5 = Ye(t4, "Second parameter"), o5 = function(e6, t5) { + F4(e6, t5); + const r6 = null == e6 ? void 0 : e6.abort, o6 = null == e6 ? void 0 : e6.close, n5 = null == e6 ? void 0 : e6.start, a7 = null == e6 ? void 0 : e6.type, i5 = null == e6 ? void 0 : e6.write; + return { abort: void 0 === r6 ? void 0 : Ne(r6, e6, `${t5} has member 'abort' that`), close: void 0 === o6 ? void 0 : He(o6, e6, `${t5} has member 'close' that`), start: void 0 === n5 ? void 0 : xe(n5, e6, `${t5} has member 'start' that`), write: void 0 === i5 ? void 0 : Ve(i5, e6, `${t5} has member 'write' that`), type: a7 }; + }(e5, "First parameter"); + var n4; + (n4 = this)._state = "writable", n4._storedError = void 0, n4._writer = void 0, n4._writableStreamController = void 0, n4._writeRequests = new S5(), n4._inFlightWriteRequest = void 0, n4._closeRequest = void 0, n4._inFlightCloseRequest = void 0, n4._pendingAbortRequest = void 0, n4._backpressure = false; + if (void 0 !== o5.type) throw new RangeError("Invalid type is specified"); + const a6 = Me(r5); + !function(e6, t5, r6, o6) { + const n5 = Object.create(WritableStreamDefaultController.prototype); + let a7, i5, l5, s4; + a7 = void 0 !== t5.start ? () => t5.start(n5) : () => { }; - i3 = void 0 !== t3.write ? (e5) => t3.write(e5, n3) : () => c2(void 0); - l3 = void 0 !== t3.close ? () => t3.close() : () => c2(void 0); - s2 = void 0 !== t3.abort ? (e5) => t3.abort(e5) : () => c2(void 0); - !function(e5, t4, r5, o5, n4, a6, i4, l4) { - t4._controlledWritableStream = e5, e5._writableStreamController = t4, t4._queue = void 0, t4._queueTotalSize = void 0, ce2(t4), t4._abortReason = void 0, t4._abortController = function() { + i5 = void 0 !== t5.write ? (e7) => t5.write(e7, n5) : () => c2(void 0); + l5 = void 0 !== t5.close ? () => t5.close() : () => c2(void 0); + s4 = void 0 !== t5.abort ? (e7) => t5.abort(e7) : () => c2(void 0); + !function(e7, t6, r7, o7, n6, a8, i6, l6) { + t6._controlledWritableStream = e7, e7._writableStreamController = t6, t6._queue = void 0, t6._queueTotalSize = void 0, ce2(t6), t6._abortReason = void 0, t6._abortController = function() { if (Ue) return new AbortController(); - }(), t4._started = false, t4._strategySizeAlgorithm = l4, t4._strategyHWM = i4, t4._writeAlgorithm = o5, t4._closeAlgorithm = n4, t4._abortAlgorithm = a6; - const s3 = bt(t4); - nt(e5, s3); - const u3 = r5(); - b6(c2(u3), () => (t4._started = true, dt(t4), null), (r6) => (t4._started = true, Ze(e5, r6), null)); - }(e4, n3, a5, i3, l3, s2, r4, o4); - }(this, o3, $e(r3, 1), a4); + }(), t6._started = false, t6._strategySizeAlgorithm = l6, t6._strategyHWM = i6, t6._writeAlgorithm = o7, t6._closeAlgorithm = n6, t6._abortAlgorithm = a8; + const s5 = bt(t6); + nt(e7, s5); + const u5 = r7(); + b6(c2(u5), () => (t6._started = true, dt(t6), null), (r8) => (t6._started = true, Ze(e7, r8), null)); + }(e6, n5, a7, i5, l5, s4, r6, o6); + }(this, o5, $e(r5, 1), a6); } get locked() { if (!Ge(this)) throw _t("locked"); return Xe(this); } - abort(e3) { - return Ge(this) ? Xe(this) ? d6(new TypeError("Cannot abort a stream that already has a writer")) : Je(this, e3) : d6(_t("abort")); + abort(e5) { + return Ge(this) ? Xe(this) ? d6(new TypeError("Cannot abort a stream that already has a writer")) : Je(this, e5) : d6(_t("abort")); } close() { return Ge(this) ? Xe(this) ? d6(new TypeError("Cannot close a stream that already has a writer")) : rt(this) ? d6(new TypeError("Cannot close an already-closing stream")) : Ke(this) : d6(_t("close")); @@ -7719,20 +7720,20 @@ var init_ponyfill = __esm({ }; Object.defineProperties(WritableStream.prototype, { abort: { enumerable: true }, close: { enumerable: true }, getWriter: { enumerable: true }, locked: { enumerable: true } }), n(WritableStream.prototype.abort, "abort"), n(WritableStream.prototype.close, "close"), n(WritableStream.prototype.getWriter, "getWriter"), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStream.prototype, e2.toStringTag, { value: "WritableStream", configurable: true }); WritableStreamDefaultWriter = class { - constructor(e3) { - if ($5(e3, 1, "WritableStreamDefaultWriter"), function(e4, t3) { - if (!Ge(e4)) throw new TypeError(`${t3} is not a WritableStream.`); - }(e3, "First parameter"), Xe(e3)) throw new TypeError("This stream has already been locked for exclusive writing by another writer"); - this._ownerWritableStream = e3, e3._writer = this; - const t2 = e3._state; - if ("writable" === t2) !rt(e3) && e3._backpressure ? Rt(this) : qt(this), gt(this); - else if ("erroring" === t2) Tt(this, e3._storedError), gt(this); - else if ("closed" === t2) qt(this), gt(r3 = this), vt(r3); + constructor(e5) { + if ($5(e5, 1, "WritableStreamDefaultWriter"), function(e6, t5) { + if (!Ge(e6)) throw new TypeError(`${t5} is not a WritableStream.`); + }(e5, "First parameter"), Xe(e5)) throw new TypeError("This stream has already been locked for exclusive writing by another writer"); + this._ownerWritableStream = e5, e5._writer = this; + const t4 = e5._state; + if ("writable" === t4) !rt(e5) && e5._backpressure ? Rt(this) : qt(this), gt(this); + else if ("erroring" === t4) Tt(this, e5._storedError), gt(this); + else if ("closed" === t4) qt(this), gt(r5 = this), vt(r5); else { - const t3 = e3._storedError; - Tt(this, t3), wt(this, t3); + const t5 = e5._storedError; + Tt(this, t5), wt(this, t5); } - var r3; + var r5; } get closed() { return at(this) ? this._closedPromise : d6(mt("closed")); @@ -7740,70 +7741,70 @@ var init_ponyfill = __esm({ get desiredSize() { if (!at(this)) throw mt("desiredSize"); if (void 0 === this._ownerWritableStream) throw yt("desiredSize"); - return function(e3) { - const t2 = e3._ownerWritableStream, r3 = t2._state; - if ("errored" === r3 || "erroring" === r3) return null; - if ("closed" === r3) return 0; - return ct(t2._writableStreamController); + return function(e5) { + const t4 = e5._ownerWritableStream, r5 = t4._state; + if ("errored" === r5 || "erroring" === r5) return null; + if ("closed" === r5) return 0; + return ct(t4._writableStreamController); }(this); } get ready() { return at(this) ? this._readyPromise : d6(mt("ready")); } - abort(e3) { - return at(this) ? void 0 === this._ownerWritableStream ? d6(yt("abort")) : function(e4, t2) { - return Je(e4._ownerWritableStream, t2); - }(this, e3) : d6(mt("abort")); + abort(e5) { + return at(this) ? void 0 === this._ownerWritableStream ? d6(yt("abort")) : function(e6, t4) { + return Je(e6._ownerWritableStream, t4); + }(this, e5) : d6(mt("abort")); } close() { if (!at(this)) return d6(mt("close")); - const e3 = this._ownerWritableStream; - return void 0 === e3 ? d6(yt("close")) : rt(e3) ? d6(new TypeError("Cannot close an already-closing stream")) : Ke(this._ownerWritableStream); + const e5 = this._ownerWritableStream; + return void 0 === e5 ? d6(yt("close")) : rt(e5) ? d6(new TypeError("Cannot close an already-closing stream")) : Ke(this._ownerWritableStream); } releaseLock() { if (!at(this)) throw mt("releaseLock"); - void 0 !== this._ownerWritableStream && function(e3) { - const t2 = e3._ownerWritableStream, r3 = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); - it(e3, r3), function(e4, t3) { - "pending" === e4._closedPromiseState ? St(e4, t3) : function(e5, t4) { - wt(e5, t4); - }(e4, t3); - }(e3, r3), t2._writer = void 0, e3._ownerWritableStream = void 0; + void 0 !== this._ownerWritableStream && function(e5) { + const t4 = e5._ownerWritableStream, r5 = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); + it(e5, r5), function(e6, t5) { + "pending" === e6._closedPromiseState ? St(e6, t5) : function(e7, t6) { + wt(e7, t6); + }(e6, t5); + }(e5, r5), t4._writer = void 0, e5._ownerWritableStream = void 0; }(this); } - write(e3) { - return at(this) ? void 0 === this._ownerWritableStream ? d6(yt("write to")) : function(e4, t2) { - const r3 = e4._ownerWritableStream, o3 = r3._writableStreamController, n2 = function(e5, t3) { + write(e5) { + return at(this) ? void 0 === this._ownerWritableStream ? d6(yt("write to")) : function(e6, t4) { + const r5 = e6._ownerWritableStream, o5 = r5._writableStreamController, n4 = function(e7, t5) { try { - return e5._strategySizeAlgorithm(t3); - } catch (t4) { - return ft(e5, t4), 1; + return e7._strategySizeAlgorithm(t5); + } catch (t6) { + return ft(e7, t6), 1; } - }(o3, t2); - if (r3 !== e4._ownerWritableStream) return d6(yt("write to")); - const a4 = r3._state; - if ("errored" === a4) return d6(r3._storedError); - if (rt(r3) || "closed" === a4) return d6(new TypeError("The stream is closing or closed and cannot be written to")); - if ("erroring" === a4) return d6(r3._storedError); - const i3 = function(e5) { - return u2((t3, r4) => { - const o4 = { _resolve: t3, _reject: r4 }; - e5._writeRequests.push(o4); + }(o5, t4); + if (r5 !== e6._ownerWritableStream) return d6(yt("write to")); + const a6 = r5._state; + if ("errored" === a6) return d6(r5._storedError); + if (rt(r5) || "closed" === a6) return d6(new TypeError("The stream is closing or closed and cannot be written to")); + if ("erroring" === a6) return d6(r5._storedError); + const i5 = function(e7) { + return u2((t5, r6) => { + const o6 = { _resolve: t5, _reject: r6 }; + e7._writeRequests.push(o6); }); - }(r3); - return function(e5, t3, r4) { + }(r5); + return function(e7, t5, r6) { try { - ue2(e5, t3, r4); - } catch (t4) { - return void ft(e5, t4); + ue2(e7, t5, r6); + } catch (t6) { + return void ft(e7, t6); } - const o4 = e5._controlledWritableStream; - if (!rt(o4) && "writable" === o4._state) { - nt(o4, bt(e5)); + const o6 = e7._controlledWritableStream; + if (!rt(o6) && "writable" === o6._state) { + nt(o6, bt(e7)); } - dt(e5); - }(o3, t2, n2), i3; - }(this, e3) : d6(mt("write")); + dt(e7); + }(o5, t4, n4), i5; + }(this, e5) : d6(mt("write")); } }; Object.defineProperties(WritableStreamDefaultWriter.prototype, { abort: { enumerable: true }, close: { enumerable: true }, releaseLock: { enumerable: true }, write: { enumerable: true }, closed: { enumerable: true }, desiredSize: { enumerable: true }, ready: { enumerable: true } }), n(WritableStreamDefaultWriter.prototype.abort, "abort"), n(WritableStreamDefaultWriter.prototype.close, "close"), n(WritableStreamDefaultWriter.prototype.releaseLock, "releaseLock"), n(WritableStreamDefaultWriter.prototype.write, "write"), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStreamDefaultWriter.prototype, e2.toStringTag, { value: "WritableStreamDefaultWriter", configurable: true }); @@ -7821,13 +7822,13 @@ var init_ponyfill = __esm({ if (void 0 === this._abortController) throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported"); return this._abortController.signal; } - error(e3) { + error(e5) { if (!st(this)) throw pt("error"); - "writable" === this._controlledWritableStream._state && ht(this, e3); + "writable" === this._controlledWritableStream._state && ht(this, e5); } - [v4](e3) { - const t2 = this._abortAlgorithm(e3); - return ut(this), t2; + [v4](e5) { + const t4 = this._abortAlgorithm(e5); + return ut(this), t4; } [R6]() { ce2(this); @@ -7835,18 +7836,18 @@ var init_ponyfill = __esm({ }; Object.defineProperties(WritableStreamDefaultController.prototype, { abortReason: { enumerable: true }, signal: { enumerable: true }, error: { enumerable: true } }), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStreamDefaultController.prototype, e2.toStringTag, { value: "WritableStreamDefaultController", configurable: true }); Pt = "undefined" != typeof DOMException ? DOMException : void 0; - Wt = function(e3) { - if ("function" != typeof e3 && "object" != typeof e3) return false; + Wt = function(e5) { + if ("function" != typeof e5 && "object" != typeof e5) return false; try { - return new e3(), true; - } catch (e4) { + return new e5(), true; + } catch (e6) { return false; } }(Pt) ? Pt : function() { - const e3 = function(e4, t2) { - this.message = e4 || "", this.name = t2 || "Error", Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); + const e5 = function(e6, t4) { + this.message = e6 || "", this.name = t4 || "Error", Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); }; - return e3.prototype = Object.create(Error.prototype), Object.defineProperty(e3.prototype, "constructor", { value: e3, writable: true, configurable: true }), e3; + return e5.prototype = Object.create(Error.prototype), Object.defineProperty(e5.prototype, "constructor", { value: e5, writable: true, configurable: true }), e5; }(); ReadableStreamDefaultController = class { constructor() { @@ -7859,132 +7860,132 @@ var init_ponyfill = __esm({ close() { if (!Bt(this)) throw Dt("close"); if (!Ft(this)) throw new TypeError("The stream is not in a state that permits close"); - !function(e3) { - if (!Ft(e3)) return; - const t2 = e3._controlledReadableStream; - e3._closeRequested = true, 0 === e3._queue.length && (jt(e3), Xt(t2)); + !function(e5) { + if (!Ft(e5)) return; + const t4 = e5._controlledReadableStream; + e5._closeRequested = true, 0 === e5._queue.length && (jt(e5), Xt(t4)); }(this); } - enqueue(e3) { + enqueue(e5) { if (!Bt(this)) throw Dt("enqueue"); if (!Ft(this)) throw new TypeError("The stream is not in a state that permits enqueue"); - return function(e4, t2) { - if (!Ft(e4)) return; - const r3 = e4._controlledReadableStream; - if (Ut(r3) && X4(r3) > 0) G5(r3, t2, false); + return function(e6, t4) { + if (!Ft(e6)) return; + const r5 = e6._controlledReadableStream; + if (Ut(r5) && X4(r5) > 0) G5(r5, t4, false); else { - let r4; + let r6; try { - r4 = e4._strategySizeAlgorithm(t2); - } catch (t3) { - throw zt(e4, t3), t3; + r6 = e6._strategySizeAlgorithm(t4); + } catch (t5) { + throw zt(e6, t5), t5; } try { - ue2(e4, t2, r4); - } catch (t3) { - throw zt(e4, t3), t3; + ue2(e6, t4, r6); + } catch (t5) { + throw zt(e6, t5), t5; } } - At(e4); - }(this, e3); + At(e6); + }(this, e5); } - error(e3) { + error(e5) { if (!Bt(this)) throw Dt("error"); - zt(this, e3); + zt(this, e5); } - [T5](e3) { + [T5](e5) { ce2(this); - const t2 = this._cancelAlgorithm(e3); - return jt(this), t2; + const t4 = this._cancelAlgorithm(e5); + return jt(this), t4; } - [q5](e3) { - const t2 = this._controlledReadableStream; + [q5](e5) { + const t4 = this._controlledReadableStream; if (this._queue.length > 0) { - const r3 = se(this); - this._closeRequested && 0 === this._queue.length ? (jt(this), Xt(t2)) : At(this), e3._chunkSteps(r3); - } else U6(t2, e3), At(this); + const r5 = se(this); + this._closeRequested && 0 === this._queue.length ? (jt(this), Xt(t4)) : At(this), e5._chunkSteps(r5); + } else U6(t4, e5), At(this); } [C4]() { } }; Object.defineProperties(ReadableStreamDefaultController.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, desiredSize: { enumerable: true } }), n(ReadableStreamDefaultController.prototype.close, "close"), n(ReadableStreamDefaultController.prototype.enqueue, "enqueue"), n(ReadableStreamDefaultController.prototype.error, "error"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamDefaultController.prototype, e2.toStringTag, { value: "ReadableStreamDefaultController", configurable: true }); ReadableStream3 = class { - constructor(e3 = {}, t2 = {}) { - void 0 === e3 ? e3 = null : D4(e3, "First parameter"); - const r3 = Ye(t2, "Second parameter"), o3 = function(e4, t3) { - F4(e4, t3); - const r4 = e4, o4 = null == r4 ? void 0 : r4.autoAllocateChunkSize, n3 = null == r4 ? void 0 : r4.cancel, a4 = null == r4 ? void 0 : r4.pull, i3 = null == r4 ? void 0 : r4.start, l3 = null == r4 ? void 0 : r4.type; - return { autoAllocateChunkSize: void 0 === o4 ? void 0 : N5(o4, `${t3} has member 'autoAllocateChunkSize' that`), cancel: void 0 === n3 ? void 0 : $t(n3, r4, `${t3} has member 'cancel' that`), pull: void 0 === a4 ? void 0 : Mt(a4, r4, `${t3} has member 'pull' that`), start: void 0 === i3 ? void 0 : Yt(i3, r4, `${t3} has member 'start' that`), type: void 0 === l3 ? void 0 : Qt(l3, `${t3} has member 'type' that`) }; - }(e3, "First parameter"); - var n2; - if ((n2 = this)._state = "readable", n2._reader = void 0, n2._storedError = void 0, n2._disturbed = false, "bytes" === o3.type) { - if (void 0 !== r3.size) throw new RangeError("The strategy for a byte stream cannot have a size function"); - Oe(this, o3, $e(r3, 0)); + constructor(e5 = {}, t4 = {}) { + void 0 === e5 ? e5 = null : D4(e5, "First parameter"); + const r5 = Ye(t4, "Second parameter"), o5 = function(e6, t5) { + F4(e6, t5); + const r6 = e6, o6 = null == r6 ? void 0 : r6.autoAllocateChunkSize, n5 = null == r6 ? void 0 : r6.cancel, a6 = null == r6 ? void 0 : r6.pull, i5 = null == r6 ? void 0 : r6.start, l5 = null == r6 ? void 0 : r6.type; + return { autoAllocateChunkSize: void 0 === o6 ? void 0 : N5(o6, `${t5} has member 'autoAllocateChunkSize' that`), cancel: void 0 === n5 ? void 0 : $t(n5, r6, `${t5} has member 'cancel' that`), pull: void 0 === a6 ? void 0 : Mt(a6, r6, `${t5} has member 'pull' that`), start: void 0 === i5 ? void 0 : Yt(i5, r6, `${t5} has member 'start' that`), type: void 0 === l5 ? void 0 : Qt(l5, `${t5} has member 'type' that`) }; + }(e5, "First parameter"); + var n4; + if ((n4 = this)._state = "readable", n4._reader = void 0, n4._storedError = void 0, n4._disturbed = false, "bytes" === o5.type) { + if (void 0 !== r5.size) throw new RangeError("The strategy for a byte stream cannot have a size function"); + Oe(this, o5, $e(r5, 0)); } else { - const e4 = Me(r3); - It(this, o3, $e(r3, 1), e4); + const e6 = Me(r5); + It(this, o5, $e(r5, 1), e6); } } get locked() { if (!Vt(this)) throw Kt("locked"); return Ut(this); } - cancel(e3) { - return Vt(this) ? Ut(this) ? d6(new TypeError("Cannot cancel a stream that already has a reader")) : Gt(this, e3) : d6(Kt("cancel")); + cancel(e5) { + return Vt(this) ? Ut(this) ? d6(new TypeError("Cannot cancel a stream that already has a reader")) : Gt(this, e5) : d6(Kt("cancel")); } - getReader(e3) { + getReader(e5) { if (!Vt(this)) throw Kt("getReader"); - return void 0 === function(e4, t2) { - F4(e4, t2); - const r3 = null == e4 ? void 0 : e4.mode; - return { mode: void 0 === r3 ? void 0 : Nt(r3, `${t2} has member 'mode' that`) }; - }(e3, "First parameter").mode ? new ReadableStreamDefaultReader(this) : function(e4) { - return new ReadableStreamBYOBReader(e4); + return void 0 === function(e6, t4) { + F4(e6, t4); + const r5 = null == e6 ? void 0 : e6.mode; + return { mode: void 0 === r5 ? void 0 : Nt(r5, `${t4} has member 'mode' that`) }; + }(e5, "First parameter").mode ? new ReadableStreamDefaultReader(this) : function(e6) { + return new ReadableStreamBYOBReader(e6); }(this); } - pipeThrough(e3, t2 = {}) { + pipeThrough(e5, t4 = {}) { if (!H4(this)) throw Kt("pipeThrough"); - $5(e3, 1, "pipeThrough"); - const r3 = xt(e3, "First parameter"), o3 = Ht(t2, "Second parameter"); + $5(e5, 1, "pipeThrough"); + const r5 = xt(e5, "First parameter"), o5 = Ht(t4, "Second parameter"); if (this.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream"); - if (r3.writable.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream"); - return m4(kt(this, r3.writable, o3.preventClose, o3.preventAbort, o3.preventCancel, o3.signal)), r3.readable; + if (r5.writable.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream"); + return m4(kt(this, r5.writable, o5.preventClose, o5.preventAbort, o5.preventCancel, o5.signal)), r5.readable; } - pipeTo(e3, t2 = {}) { + pipeTo(e5, t4 = {}) { if (!H4(this)) return d6(Kt("pipeTo")); - if (void 0 === e3) return d6("Parameter 1 is required in 'pipeTo'."); - if (!x4(e3)) return d6(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); - let r3; + if (void 0 === e5) return d6("Parameter 1 is required in 'pipeTo'."); + if (!x4(e5)) return d6(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); + let r5; try { - r3 = Ht(t2, "Second parameter"); - } catch (e4) { - return d6(e4); + r5 = Ht(t4, "Second parameter"); + } catch (e6) { + return d6(e6); } - return this.locked ? d6(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : e3.locked ? d6(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : kt(this, e3, r3.preventClose, r3.preventAbort, r3.preventCancel, r3.signal); + return this.locked ? d6(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : e5.locked ? d6(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : kt(this, e5, r5.preventClose, r5.preventAbort, r5.preventCancel, r5.signal); } tee() { if (!H4(this)) throw Kt("tee"); if (this.locked) throw new TypeError("Cannot tee a stream that already has a reader"); return Ot(this); } - values(e3) { + values(e5) { if (!H4(this)) throw Kt("values"); - return function(e4, t2) { - const r3 = e4.getReader(), o3 = new te(r3, t2), n2 = Object.create(re2); - return n2._asyncIteratorImpl = o3, n2; - }(this, function(e4, t2) { - F4(e4, t2); - const r3 = null == e4 ? void 0 : e4.preventCancel; - return { preventCancel: Boolean(r3) }; - }(e3, "First parameter").preventCancel); + return function(e6, t4) { + const r5 = e6.getReader(), o5 = new te(r5, t4), n4 = Object.create(re2); + return n4._asyncIteratorImpl = o5, n4; + }(this, function(e6, t4) { + F4(e6, t4); + const r5 = null == e6 ? void 0 : e6.preventCancel; + return { preventCancel: Boolean(r5) }; + }(e5, "First parameter").preventCancel); } }; Object.defineProperties(ReadableStream3.prototype, { cancel: { enumerable: true }, getReader: { enumerable: true }, pipeThrough: { enumerable: true }, pipeTo: { enumerable: true }, tee: { enumerable: true }, values: { enumerable: true }, locked: { enumerable: true } }), n(ReadableStream3.prototype.cancel, "cancel"), n(ReadableStream3.prototype.getReader, "getReader"), n(ReadableStream3.prototype.pipeThrough, "pipeThrough"), n(ReadableStream3.prototype.pipeTo, "pipeTo"), n(ReadableStream3.prototype.tee, "tee"), n(ReadableStream3.prototype.values, "values"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStream3.prototype, e2.toStringTag, { value: "ReadableStream", configurable: true }), "symbol" == typeof e2.asyncIterator && Object.defineProperty(ReadableStream3.prototype, e2.asyncIterator, { value: ReadableStream3.prototype.values, writable: true, configurable: true }); - er = (e3) => e3.byteLength; + er = (e5) => e5.byteLength; n(er, "size"); ByteLengthQueuingStrategy = class { - constructor(e3) { - $5(e3, 1, "ByteLengthQueuingStrategy"), e3 = Zt(e3, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = e3.highWaterMark; + constructor(e5) { + $5(e5, 1, "ByteLengthQueuingStrategy"), e5 = Zt(e5, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = e5.highWaterMark; } get highWaterMark() { if (!rr(this)) throw tr("highWaterMark"); @@ -7999,8 +8000,8 @@ var init_ponyfill = __esm({ or = () => 1; n(or, "size"); CountQueuingStrategy = class { - constructor(e3) { - $5(e3, 1, "CountQueuingStrategy"), e3 = Zt(e3, "First parameter"), this._countQueuingStrategyHighWaterMark = e3.highWaterMark; + constructor(e5) { + $5(e5, 1, "CountQueuingStrategy"), e5 = Zt(e5, "First parameter"), this._countQueuingStrategyHighWaterMark = e5.highWaterMark; } get highWaterMark() { if (!ar(this)) throw nr("highWaterMark"); @@ -8013,113 +8014,113 @@ var init_ponyfill = __esm({ }; Object.defineProperties(CountQueuingStrategy.prototype, { highWaterMark: { enumerable: true }, size: { enumerable: true } }), "symbol" == typeof e2.toStringTag && Object.defineProperty(CountQueuingStrategy.prototype, e2.toStringTag, { value: "CountQueuingStrategy", configurable: true }); TransformStream2 = class { - constructor(e3 = {}, t2 = {}, r3 = {}) { - void 0 === e3 && (e3 = null); - const o3 = Ye(t2, "Second parameter"), n2 = Ye(r3, "Third parameter"), a4 = function(e4, t3) { - F4(e4, t3); - const r4 = null == e4 ? void 0 : e4.flush, o4 = null == e4 ? void 0 : e4.readableType, n3 = null == e4 ? void 0 : e4.start, a5 = null == e4 ? void 0 : e4.transform, i4 = null == e4 ? void 0 : e4.writableType; - return { flush: void 0 === r4 ? void 0 : ir(r4, e4, `${t3} has member 'flush' that`), readableType: o4, start: void 0 === n3 ? void 0 : lr(n3, e4, `${t3} has member 'start' that`), transform: void 0 === a5 ? void 0 : sr(a5, e4, `${t3} has member 'transform' that`), writableType: i4 }; - }(e3, "First parameter"); - if (void 0 !== a4.readableType) throw new RangeError("Invalid readableType specified"); - if (void 0 !== a4.writableType) throw new RangeError("Invalid writableType specified"); - const i3 = $e(n2, 0), l3 = Me(n2), s2 = $e(o3, 1), f4 = Me(o3); - let b7; - !function(e4, t3, r4, o4, n3, a5) { - function i4() { - return t3; - } - function l4(t4) { - return function(e5, t5) { - const r5 = e5._transformStreamController; - if (e5._backpressure) { - return p3(e5._backpressureChangePromise, () => { - if ("erroring" === (Ge(e5._writable) ? e5._writable._state : e5._writableState)) throw Ge(e5._writable) ? e5._writable._storedError : e5._writableStoredError; - return pr(r5, t5); + constructor(e5 = {}, t4 = {}, r5 = {}) { + void 0 === e5 && (e5 = null); + const o5 = Ye(t4, "Second parameter"), n4 = Ye(r5, "Third parameter"), a6 = function(e6, t5) { + F4(e6, t5); + const r6 = null == e6 ? void 0 : e6.flush, o6 = null == e6 ? void 0 : e6.readableType, n5 = null == e6 ? void 0 : e6.start, a7 = null == e6 ? void 0 : e6.transform, i6 = null == e6 ? void 0 : e6.writableType; + return { flush: void 0 === r6 ? void 0 : ir(r6, e6, `${t5} has member 'flush' that`), readableType: o6, start: void 0 === n5 ? void 0 : lr(n5, e6, `${t5} has member 'start' that`), transform: void 0 === a7 ? void 0 : sr(a7, e6, `${t5} has member 'transform' that`), writableType: i6 }; + }(e5, "First parameter"); + if (void 0 !== a6.readableType) throw new RangeError("Invalid readableType specified"); + if (void 0 !== a6.writableType) throw new RangeError("Invalid writableType specified"); + const i5 = $e(n4, 0), l5 = Me(n4), s4 = $e(o5, 1), f6 = Me(o5); + let b9; + !function(e6, t5, r6, o6, n5, a7) { + function i6() { + return t5; + } + function l6(t6) { + return function(e7, t7) { + const r7 = e7._transformStreamController; + if (e7._backpressure) { + return p3(e7._backpressureChangePromise, () => { + if ("erroring" === (Ge(e7._writable) ? e7._writable._state : e7._writableState)) throw Ge(e7._writable) ? e7._writable._storedError : e7._writableStoredError; + return pr(r7, t7); }); } - return pr(r5, t5); - }(e4, t4); - } - function s3(t4) { - return function(e5, t5) { - return cr(e5, t5), c2(void 0); - }(e4, t4); - } - function u3() { - return function(e5) { - const t4 = e5._transformStreamController, r5 = t4._flushAlgorithm(); - return hr(t4), p3(r5, () => { - if ("errored" === e5._readableState) throw e5._readableStoredError; - gr(e5) && wr(e5); - }, (t5) => { - throw cr(e5, t5), e5._readableStoredError; + return pr(r7, t7); + }(e6, t6); + } + function s5(t6) { + return function(e7, t7) { + return cr(e7, t7), c2(void 0); + }(e6, t6); + } + function u5() { + return function(e7) { + const t6 = e7._transformStreamController, r7 = t6._flushAlgorithm(); + return hr(t6), p3(r7, () => { + if ("errored" === e7._readableState) throw e7._readableStoredError; + gr(e7) && wr(e7); + }, (t7) => { + throw cr(e7, t7), e7._readableStoredError; }); - }(e4); + }(e6); } - function d7() { - return function(e5) { - return fr(e5, false), e5._backpressureChangePromise; - }(e4); + function d9() { + return function(e7) { + return fr(e7, false), e7._backpressureChangePromise; + }(e6); } - function f5(t4) { - return dr(e4, t4), c2(void 0); + function f7(t6) { + return dr(e6, t6), c2(void 0); } - e4._writableState = "writable", e4._writableStoredError = void 0, e4._writableHasInFlightOperation = false, e4._writableStarted = false, e4._writable = function(e5, t4, r5, o5, n4, a6, i5) { - return new WritableStream({ start(r6) { - e5._writableController = r6; + e6._writableState = "writable", e6._writableStoredError = void 0, e6._writableHasInFlightOperation = false, e6._writableStarted = false, e6._writable = function(e7, t6, r7, o7, n6, a8, i7) { + return new WritableStream({ start(r8) { + e7._writableController = r8; try { - const t5 = r6.signal; - void 0 !== t5 && t5.addEventListener("abort", () => { - "writable" === e5._writableState && (e5._writableState = "erroring", t5.reason && (e5._writableStoredError = t5.reason)); + const t7 = r8.signal; + void 0 !== t7 && t7.addEventListener("abort", () => { + "writable" === e7._writableState && (e7._writableState = "erroring", t7.reason && (e7._writableStoredError = t7.reason)); }); - } catch (e6) { + } catch (e8) { } - return p3(t4(), () => (e5._writableStarted = true, Cr(e5), null), (t5) => { - throw e5._writableStarted = true, Rr(e5, t5), t5; + return p3(t6(), () => (e7._writableStarted = true, Cr(e7), null), (t7) => { + throw e7._writableStarted = true, Rr(e7, t7), t7; }); - }, write: (t5) => (function(e6) { - e6._writableHasInFlightOperation = true; - }(e5), p3(r5(t5), () => (function(e6) { - e6._writableHasInFlightOperation = false; - }(e5), Cr(e5), null), (t6) => { - throw function(e6, t7) { - e6._writableHasInFlightOperation = false, Rr(e6, t7); - }(e5, t6), t6; - })), close: () => (function(e6) { - e6._writableHasInFlightOperation = true; - }(e5), p3(o5(), () => (function(e6) { - e6._writableHasInFlightOperation = false; - "erroring" === e6._writableState && (e6._writableStoredError = void 0); - e6._writableState = "closed"; - }(e5), null), (t5) => { - throw function(e6, t6) { - e6._writableHasInFlightOperation = false, e6._writableState, Rr(e6, t6); - }(e5, t5), t5; - })), abort: (t5) => (e5._writableState = "errored", e5._writableStoredError = t5, n4(t5)) }, { highWaterMark: a6, size: i5 }); - }(e4, i4, l4, u3, s3, r4, o4), e4._readableState = "readable", e4._readableStoredError = void 0, e4._readableCloseRequested = false, e4._readablePulling = false, e4._readable = function(e5, t4, r5, o5, n4, a6) { - return new ReadableStream3({ start: (r6) => (e5._readableController = r6, t4().catch((t5) => { - Sr(e5, t5); - })), pull: () => (e5._readablePulling = true, r5().catch((t5) => { - Sr(e5, t5); - })), cancel: (t5) => (e5._readableState = "closed", o5(t5)) }, { highWaterMark: n4, size: a6 }); - }(e4, i4, d7, f5, n3, a5), e4._backpressure = void 0, e4._backpressureChangePromise = void 0, e4._backpressureChangePromise_resolve = void 0, fr(e4, true), e4._transformStreamController = void 0; - }(this, u2((e4) => { - b7 = e4; - }), s2, f4, i3, l3), function(e4, t3) { - const r4 = Object.create(TransformStreamDefaultController.prototype); - let o4, n3; - o4 = void 0 !== t3.transform ? (e5) => t3.transform(e5, r4) : (e5) => { + }, write: (t7) => (function(e8) { + e8._writableHasInFlightOperation = true; + }(e7), p3(r7(t7), () => (function(e8) { + e8._writableHasInFlightOperation = false; + }(e7), Cr(e7), null), (t8) => { + throw function(e8, t9) { + e8._writableHasInFlightOperation = false, Rr(e8, t9); + }(e7, t8), t8; + })), close: () => (function(e8) { + e8._writableHasInFlightOperation = true; + }(e7), p3(o7(), () => (function(e8) { + e8._writableHasInFlightOperation = false; + "erroring" === e8._writableState && (e8._writableStoredError = void 0); + e8._writableState = "closed"; + }(e7), null), (t7) => { + throw function(e8, t8) { + e8._writableHasInFlightOperation = false, e8._writableState, Rr(e8, t8); + }(e7, t7), t7; + })), abort: (t7) => (e7._writableState = "errored", e7._writableStoredError = t7, n6(t7)) }, { highWaterMark: a8, size: i7 }); + }(e6, i6, l6, u5, s5, r6, o6), e6._readableState = "readable", e6._readableStoredError = void 0, e6._readableCloseRequested = false, e6._readablePulling = false, e6._readable = function(e7, t6, r7, o7, n6, a8) { + return new ReadableStream3({ start: (r8) => (e7._readableController = r8, t6().catch((t7) => { + Sr(e7, t7); + })), pull: () => (e7._readablePulling = true, r7().catch((t7) => { + Sr(e7, t7); + })), cancel: (t7) => (e7._readableState = "closed", o7(t7)) }, { highWaterMark: n6, size: a8 }); + }(e6, i6, d9, f7, n5, a7), e6._backpressure = void 0, e6._backpressureChangePromise = void 0, e6._backpressureChangePromise_resolve = void 0, fr(e6, true), e6._transformStreamController = void 0; + }(this, u2((e6) => { + b9 = e6; + }), s4, f6, i5, l5), function(e6, t5) { + const r6 = Object.create(TransformStreamDefaultController.prototype); + let o6, n5; + o6 = void 0 !== t5.transform ? (e7) => t5.transform(e7, r6) : (e7) => { try { - return _r(r4, e5), c2(void 0); - } catch (e6) { - return d6(e6); + return _r(r6, e7), c2(void 0); + } catch (e8) { + return d6(e8); } }; - n3 = void 0 !== t3.flush ? () => t3.flush(r4) : () => c2(void 0); - !function(e5, t4, r5, o5) { - t4._controlledTransformStream = e5, e5._transformStreamController = t4, t4._transformAlgorithm = r5, t4._flushAlgorithm = o5; - }(e4, r4, o4, n3); - }(this, a4), void 0 !== a4.start ? b7(a4.start(this._transformStreamController)) : b7(void 0); + n5 = void 0 !== t5.flush ? () => t5.flush(r6) : () => c2(void 0); + !function(e7, t6, r7, o7) { + t6._controlledTransformStream = e7, e7._transformStreamController = t6, t6._transformAlgorithm = r7, t6._flushAlgorithm = o7; + }(e6, r6, o6, n5); + }(this, a6), void 0 !== a6.start ? b9(a6.start(this._transformStreamController)) : b9(void 0); } get readable() { if (!ur(this)) throw yr("readable"); @@ -8139,22 +8140,22 @@ var init_ponyfill = __esm({ if (!br(this)) throw mr("desiredSize"); return vr(this._controlledTransformStream); } - enqueue(e3) { + enqueue(e5) { if (!br(this)) throw mr("enqueue"); - _r(this, e3); + _r(this, e5); } - error(e3) { + error(e5) { if (!br(this)) throw mr("error"); - var t2; - t2 = e3, cr(this._controlledTransformStream, t2); + var t4; + t4 = e5, cr(this._controlledTransformStream, t4); } terminate() { if (!br(this)) throw mr("terminate"); - !function(e3) { - const t2 = e3._controlledTransformStream; - gr(t2) && wr(t2); - const r3 = new TypeError("TransformStream terminated"); - dr(t2, r3); + !function(e5) { + const t4 = e5._controlledTransformStream; + gr(t4) && wr(t4); + const r5 = new TypeError("TransformStream terminated"); + dr(t4, r5); }(this); } }; @@ -8249,16 +8250,16 @@ var init_Blob = __esm({ init_ponyfill(); init_isFunction(); init_blobHelpers(); - __classPrivateFieldGet = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; - __classPrivateFieldSet = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; Blob3 = class _Blob { constructor(blobParts = [], options = {}) { @@ -8360,16 +8361,16 @@ var __classPrivateFieldSet2, __classPrivateFieldGet2, _File_name, _File_lastModi var init_File = __esm({ "node_modules/formdata-node/lib/esm/File.js"() { init_Blob(); - __classPrivateFieldSet2 = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet2 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - __classPrivateFieldGet2 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet2 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; File3 = class extends Blob3 { constructor(fileBits, name, options = {}) { @@ -8416,17 +8417,17 @@ var init_isFile = __esm({ // node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/ms/index.js"(exports2, module2) { - var s2 = 1e3; - var m5 = s2 * 60; - var h4 = m5 * 60; - var d7 = h4 * 24; - var w7 = d7 * 7; - var y6 = d7 * 365.25; + var s4 = 1e3; + var m7 = s4 * 60; + var h6 = m7 * 60; + var d9 = h6 * 24; + var w9 = d9 * 7; + var y7 = d9 * 365.25; module2.exports = function(val, options) { options = options || {}; var type2 = typeof val; if (type2 === "string" && val.length > 0) { - return parse(val); + return parse3(val); } else if (type2 === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } @@ -8434,7 +8435,7 @@ var require_ms = __commonJS({ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse(str2) { + function parse3(str2) { str2 = String(str2); if (str2.length > 100) { return; @@ -8445,7 +8446,7 @@ var require_ms = __commonJS({ if (!match) { return; } - var n2 = parseFloat(match[1]); + var n4 = parseFloat(match[1]); var type2 = (match[2] || "ms").toLowerCase(); switch (type2) { case "years": @@ -8453,78 +8454,78 @@ var require_ms = __commonJS({ case "yrs": case "yr": case "y": - return n2 * y6; + return n4 * y7; case "weeks": case "week": case "w": - return n2 * w7; + return n4 * w9; case "days": case "day": case "d": - return n2 * d7; + return n4 * d9; case "hours": case "hour": case "hrs": case "hr": case "h": - return n2 * h4; + return n4 * h6; case "minutes": case "minute": case "mins": case "min": case "m": - return n2 * m5; + return n4 * m7; case "seconds": case "second": case "secs": case "sec": case "s": - return n2 * s2; + return n4 * s4; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": - return n2; + return n4; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); - if (msAbs >= d7) { - return Math.round(ms / d7) + "d"; + if (msAbs >= d9) { + return Math.round(ms / d9) + "d"; } - if (msAbs >= h4) { - return Math.round(ms / h4) + "h"; + if (msAbs >= h6) { + return Math.round(ms / h6) + "h"; } - if (msAbs >= m5) { - return Math.round(ms / m5) + "m"; + if (msAbs >= m7) { + return Math.round(ms / m7) + "m"; } - if (msAbs >= s2) { - return Math.round(ms / s2) + "s"; + if (msAbs >= s4) { + return Math.round(ms / s4) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); - if (msAbs >= d7) { - return plural(ms, msAbs, d7, "day"); + if (msAbs >= d9) { + return plural(ms, msAbs, d9, "day"); } - if (msAbs >= h4) { - return plural(ms, msAbs, h4, "hour"); + if (msAbs >= h6) { + return plural(ms, msAbs, h6, "hour"); } - if (msAbs >= m5) { - return plural(ms, msAbs, m5, "minute"); + if (msAbs >= m7) { + return plural(ms, msAbs, m7, "minute"); } - if (msAbs >= s2) { - return plural(ms, msAbs, s2, "second"); + if (msAbs >= s4) { + return plural(ms, msAbs, s4, "second"); } return ms + " ms"; } - function plural(ms, msAbs, n2, name) { - var isPlural = msAbs >= n2 * 1.5; - return Math.round(ms / n2) + " " + name + (isPlural ? "s" : ""); + function plural(ms, msAbs, n4, name) { + var isPlural = msAbs >= n4 * 1.5; + return Math.round(ms / n4) + " " + name + (isPlural ? "s" : ""); } } }); @@ -8535,14 +8536,14 @@ var require_humanize_ms = __commonJS({ "use strict"; var util4 = require("util"); var ms = require_ms(); - module2.exports = function(t2) { - if (typeof t2 === "number") return t2; - var r3 = ms(t2); - if (r3 === void 0) { - var err = new Error(util4.format("humanize-ms(%j) result undefined", t2)); + module2.exports = function(t4) { + if (typeof t4 === "number") return t4; + var r5 = ms(t4); + if (r5 === void 0) { + var err = new Error(util4.format("humanize-ms(%j) result undefined", t4)); console.warn(err.stack); } - return r3; + return r5; }; } }); @@ -8829,7 +8830,7 @@ var require_agent = __commonJS({ reqTimeoutListenerCount ); if (debug3.enabled) { - debug3("timeout listeners: %s", socket.listeners("timeout").map((f4) => f4.name).join(", ")); + debug3("timeout listeners: %s", socket.listeners("timeout").map((f6) => f6.name).join(", ")); } agent.timeoutSocketCount++; const name = agent.getName(options); @@ -8997,8 +8998,8 @@ var require_event_target_shim = __commonJS({ }); Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); const keys = Object.keys(event); - for (let i3 = 0; i3 < keys.length; ++i3) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; ++i5) { + const key = keys[i5]; if (!(key in this)) { Object.defineProperty(this, key, defineRedirectDescriptor(key)); } @@ -9227,8 +9228,8 @@ var require_event_target_shim = __commonJS({ CustomEvent.prototype = Object.create(BaseEvent.prototype, { constructor: { value: CustomEvent, configurable: true, writable: true } }); - for (let i3 = 0; i3 < keys.length; ++i3) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; ++i5) { + const key = keys[i5]; if (!(key in BaseEvent.prototype)) { const descriptor = Object.getOwnPropertyDescriptor(proto2, key); const isFunc = typeof descriptor.value === "function"; @@ -9272,8 +9273,8 @@ var require_event_target_shim = __commonJS({ var CAPTURE = 1; var BUBBLE = 2; var ATTRIBUTE = 3; - function isObject3(x5) { - return x5 !== null && typeof x5 === "object"; + function isObject3(x7) { + return x7 !== null && typeof x7 === "object"; } function getListeners(eventTarget) { const listeners = listenersMap.get(eventTarget); @@ -9355,8 +9356,8 @@ var require_event_target_shim = __commonJS({ writable: true } }); - for (let i3 = 0; i3 < eventNames.length; ++i3) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i3]); + for (let i5 = 0; i5 < eventNames.length; ++i5) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i5]); } return CustomEventTarget; } @@ -9370,8 +9371,8 @@ var require_event_target_shim = __commonJS({ } if (arguments.length > 0) { const types = new Array(arguments.length); - for (let i3 = 0; i3 < arguments.length; ++i3) { - types[i3] = arguments[i3]; + for (let i5 = 0; i5 < arguments.length; ++i5) { + types[i5] = arguments[i5]; } return defineCustomEventTarget(types); } @@ -9627,8 +9628,8 @@ var require_ponyfill_es2018 = __commonJS({ function noop2() { return void 0; } - function typeIsObject(x5) { - return typeof x5 === "object" && x5 !== null || typeof x5 === "function"; + function typeIsObject(x7) { + return typeof x7 === "object" && x7 !== null || typeof x7 === "function"; } const rethrowAssertionErrorRejection = noop2; function setFunctionName(fn, name) { @@ -9637,7 +9638,7 @@ var require_ponyfill_es2018 = __commonJS({ value: name, configurable: true }); - } catch (_a6) { + } catch (_a7) { } } const originalPromise = Promise; @@ -9679,15 +9680,15 @@ var require_ponyfill_es2018 = __commonJS({ } return _queueMicrotask(callback); }; - function reflectCall(F5, V6, args) { - if (typeof F5 !== "function") { + function reflectCall(F6, V6, args) { + if (typeof F6 !== "function") { throw new TypeError("Argument is not a function"); } - return Function.prototype.apply.call(F5, V6, args); + return Function.prototype.apply.call(F6, V6, args); } - function promiseCall(F5, V6, args) { + function promiseCall(F6, V6, args) { try { - return promiseResolvedWith(reflectCall(F5, V6, args)); + return promiseResolvedWith(reflectCall(F6, V6, args)); } catch (value) { return promiseRejectedWith(value); } @@ -9758,20 +9759,20 @@ var require_ponyfill_es2018 = __commonJS({ // with undefined values until we either "catch up" with elements that still // exist or reach the back of the queue. forEach(callback) { - let i3 = this._cursor; + let i5 = this._cursor; let node = this._front; let elements = node._elements; - while (i3 !== elements.length || node._next !== void 0) { - if (i3 === elements.length) { + while (i5 !== elements.length || node._next !== void 0) { + if (i5 === elements.length) { node = node._next; elements = node._elements; - i3 = 0; + i5 = 0; if (elements.length === 0) { break; } } - callback(elements[i3]); - ++i3; + callback(elements[i5]); + ++i5; } } // Return the element that would be returned if shift() was called now, @@ -9850,71 +9851,71 @@ var require_ponyfill_es2018 = __commonJS({ reader._closedPromise_resolve = void 0; reader._closedPromise_reject = void 0; } - const NumberIsFinite = Number.isFinite || function(x5) { - return typeof x5 === "number" && isFinite(x5); + const NumberIsFinite = Number.isFinite || function(x7) { + return typeof x7 === "number" && isFinite(x7); }; - const MathTrunc = Math.trunc || function(v5) { - return v5 < 0 ? Math.ceil(v5) : Math.floor(v5); + const MathTrunc = Math.trunc || function(v8) { + return v8 < 0 ? Math.ceil(v8) : Math.floor(v8); }; - function isDictionary(x5) { - return typeof x5 === "object" || typeof x5 === "function"; + function isDictionary(x7) { + return typeof x7 === "object" || typeof x7 === "function"; } function assertDictionary(obj, context) { if (obj !== void 0 && !isDictionary(obj)) { throw new TypeError(`${context} is not an object.`); } } - function assertFunction(x5, context) { - if (typeof x5 !== "function") { + function assertFunction(x7, context) { + if (typeof x7 !== "function") { throw new TypeError(`${context} is not a function.`); } } - function isObject3(x5) { - return typeof x5 === "object" && x5 !== null || typeof x5 === "function"; + function isObject3(x7) { + return typeof x7 === "object" && x7 !== null || typeof x7 === "function"; } - function assertObject(x5, context) { - if (!isObject3(x5)) { + function assertObject(x7, context) { + if (!isObject3(x7)) { throw new TypeError(`${context} is not an object.`); } } - function assertRequiredArgument(x5, position, context) { - if (x5 === void 0) { + function assertRequiredArgument(x7, position, context) { + if (x7 === void 0) { throw new TypeError(`Parameter ${position} is required in '${context}'.`); } } - function assertRequiredField(x5, field, context) { - if (x5 === void 0) { + function assertRequiredField(x7, field, context) { + if (x7 === void 0) { throw new TypeError(`${field} is required in '${context}'.`); } } function convertUnrestrictedDouble(value) { return Number(value); } - function censorNegativeZero(x5) { - return x5 === 0 ? 0 : x5; + function censorNegativeZero(x7) { + return x7 === 0 ? 0 : x7; } - function integerPart(x5) { - return censorNegativeZero(MathTrunc(x5)); + function integerPart(x7) { + return censorNegativeZero(MathTrunc(x7)); } function convertUnsignedLongLongWithEnforceRange(value, context) { const lowerBound = 0; const upperBound = Number.MAX_SAFE_INTEGER; - let x5 = Number(value); - x5 = censorNegativeZero(x5); - if (!NumberIsFinite(x5)) { + let x7 = Number(value); + x7 = censorNegativeZero(x7); + if (!NumberIsFinite(x7)) { throw new TypeError(`${context} is not a finite number`); } - x5 = integerPart(x5); - if (x5 < lowerBound || x5 > upperBound) { + x7 = integerPart(x7); + if (x7 < lowerBound || x7 > upperBound) { throw new TypeError(`${context} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`); } - if (!NumberIsFinite(x5) || x5 === 0) { + if (!NumberIsFinite(x7) || x7 === 0) { return 0; } - return x5; + return x7; } - function assertReadableStream(x5, context) { - if (!IsReadableStream(x5)) { + function assertReadableStream(x7, context) { + if (!IsReadableStream(x7)) { throw new TypeError(`${context} is not a ReadableStream.`); } } @@ -9999,7 +10000,7 @@ var require_ponyfill_es2018 = __commonJS({ const readRequest = { _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }), _closeSteps: () => resolvePromise({ value: void 0, done: true }), - _errorSteps: (e3) => rejectPromise(e3) + _errorSteps: (e5) => rejectPromise(e5) }; ReadableStreamDefaultReaderRead(this, readRequest); return promise; @@ -10038,14 +10039,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamDefaultReader(x5) { - if (!typeIsObject(x5)) { + function IsReadableStreamDefaultReader(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_readRequests")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_readRequests")) { return false; } - return x5 instanceof ReadableStreamDefaultReader2; + return x7 instanceof ReadableStreamDefaultReader2; } function ReadableStreamDefaultReaderRead(reader, readRequest) { const stream4 = reader._ownerReadableStream; @@ -10060,14 +10061,14 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableStreamDefaultReaderRelease(reader) { ReadableStreamReaderGenericRelease(reader); - const e3 = new TypeError("Reader was released"); - ReadableStreamDefaultReaderErrorReadRequests(reader, e3); + const e5 = new TypeError("Reader was released"); + ReadableStreamDefaultReaderErrorReadRequests(reader, e5); } - function ReadableStreamDefaultReaderErrorReadRequests(reader, e3) { + function ReadableStreamDefaultReaderErrorReadRequests(reader, e5) { const readRequests = reader._readRequests; reader._readRequests = new SimpleQueue(); readRequests.forEach((readRequest) => { - readRequest._errorSteps(e3); + readRequest._errorSteps(e5); }); } function defaultReaderBrandCheckException(name) { @@ -10160,31 +10161,31 @@ var require_ponyfill_es2018 = __commonJS({ iterator2._asyncIteratorImpl = impl; return iterator2; } - function IsReadableStreamAsyncIterator(x5) { - if (!typeIsObject(x5)) { + function IsReadableStreamAsyncIterator(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_asyncIteratorImpl")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_asyncIteratorImpl")) { return false; } try { - return x5._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl; - } catch (_a6) { + return x7._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl; + } catch (_a7) { return false; } } function streamAsyncIteratorBrandCheckException(name) { return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`); } - const NumberIsNaN = Number.isNaN || function(x5) { - return x5 !== x5; + const NumberIsNaN = Number.isNaN || function(x7) { + return x7 !== x7; }; - var _a5, _b2, _c2; + var _a6, _b2, _c2; function CreateArrayFromList(elements) { return elements.slice(); } - function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n2) { - new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n2), destOffset); + function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n4) { + new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n4), destOffset); } let TransferArrayBuffer = (O5) => { if (typeof O5.transfer === "function") { @@ -10233,7 +10234,7 @@ var require_ponyfill_es2018 = __commonJS({ const nextMethod = asyncIterator2.next; return { iterator: asyncIterator2, nextMethod, done: false }; } - const SymbolAsyncIterator = (_c2 = (_a5 = Symbol.asyncIterator) !== null && _a5 !== void 0 ? _a5 : (_b2 = Symbol.for) === null || _b2 === void 0 ? void 0 : _b2.call(Symbol, "Symbol.asyncIterator")) !== null && _c2 !== void 0 ? _c2 : "@@asyncIterator"; + const SymbolAsyncIterator = (_c2 = (_a6 = Symbol.asyncIterator) !== null && _a6 !== void 0 ? _a6 : (_b2 = Symbol.for) === null || _b2 === void 0 ? void 0 : _b2.call(Symbol, "Symbol.asyncIterator")) !== null && _c2 !== void 0 ? _c2 : "@@asyncIterator"; function GetIterator(obj, hint = "sync", method) { if (method === void 0) { if (hint === "async") { @@ -10270,14 +10271,14 @@ var require_ponyfill_es2018 = __commonJS({ function IteratorValue(iterResult) { return iterResult.value; } - function IsNonNegativeNumber(v5) { - if (typeof v5 !== "number") { + function IsNonNegativeNumber(v8) { + if (typeof v8 !== "number") { return false; } - if (NumberIsNaN(v5)) { + if (NumberIsNaN(v8)) { return false; } - if (v5 < 0) { + if (v8 < 0) { return false; } return true; @@ -10412,9 +10413,9 @@ var require_ponyfill_es2018 = __commonJS({ if (this._closeRequested) { throw new TypeError("The stream has already been closed; do not close it again!"); } - const state2 = this._controlledReadableByteStream._state; - if (state2 !== "readable") { - throw new TypeError(`The stream (in ${state2} state) is not in the readable state and cannot be closed`); + const state3 = this._controlledReadableByteStream._state; + if (state3 !== "readable") { + throw new TypeError(`The stream (in ${state3} state) is not in the readable state and cannot be closed`); } ReadableByteStreamControllerClose(this); } @@ -10435,20 +10436,20 @@ var require_ponyfill_es2018 = __commonJS({ if (this._closeRequested) { throw new TypeError("stream is closed or draining"); } - const state2 = this._controlledReadableByteStream._state; - if (state2 !== "readable") { - throw new TypeError(`The stream (in ${state2} state) is not in the readable state and cannot be enqueued to`); + const state3 = this._controlledReadableByteStream._state; + if (state3 !== "readable") { + throw new TypeError(`The stream (in ${state3} state) is not in the readable state and cannot be enqueued to`); } ReadableByteStreamControllerEnqueue(this, chunk); } /** * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsReadableByteStreamController(this)) { throw byteStreamControllerBrandCheckException("error"); } - ReadableByteStreamControllerError(this, e3); + ReadableByteStreamControllerError(this, e5); } /** @internal */ [CancelSteps](reason) { @@ -10516,23 +10517,23 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableByteStreamController(x5) { - if (!typeIsObject(x5)) { + function IsReadableByteStreamController(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_controlledReadableByteStream")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_controlledReadableByteStream")) { return false; } - return x5 instanceof ReadableByteStreamController2; + return x7 instanceof ReadableByteStreamController2; } - function IsReadableStreamBYOBRequest(x5) { - if (!typeIsObject(x5)) { + function IsReadableStreamBYOBRequest(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_associatedReadableByteStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_associatedReadableByteStreamController")) { return false; } - return x5 instanceof ReadableStreamBYOBRequest2; + return x7 instanceof ReadableStreamBYOBRequest2; } function ReadableByteStreamControllerCallPullIfNeeded(controller) { const shouldPull = ReadableByteStreamControllerShouldCallPull(controller); @@ -10552,8 +10553,8 @@ var require_ponyfill_es2018 = __commonJS({ ReadableByteStreamControllerCallPullIfNeeded(controller); } return null; - }, (e3) => { - ReadableByteStreamControllerError(controller, e3); + }, (e5) => { + ReadableByteStreamControllerError(controller, e5); return null; }); } @@ -10677,8 +10678,8 @@ var require_ponyfill_es2018 = __commonJS({ let buffer; try { buffer = TransferArrayBuffer(view.buffer); - } catch (e3) { - readIntoRequest._errorSteps(e3); + } catch (e5) { + readIntoRequest._errorSteps(e5); return; } const pullIntoDescriptor = { @@ -10710,9 +10711,9 @@ var require_ponyfill_es2018 = __commonJS({ return; } if (controller._closeRequested) { - const e3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - ReadableByteStreamControllerError(controller, e3); - readIntoRequest._errorSteps(e3); + const e5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + ReadableByteStreamControllerError(controller, e5); + readIntoRequest._errorSteps(e5); return; } } @@ -10755,8 +10756,8 @@ var require_ponyfill_es2018 = __commonJS({ function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { const firstDescriptor = controller._pendingPullIntos.peek(); ReadableByteStreamControllerInvalidateBYOBRequest(controller); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor); } else { ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); @@ -10806,9 +10807,9 @@ var require_ponyfill_es2018 = __commonJS({ if (controller._pendingPullIntos.length > 0) { const firstPendingPullInto = controller._pendingPullIntos.peek(); if (firstPendingPullInto.bytesFilled % firstPendingPullInto.elementSize !== 0) { - const e3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - ReadableByteStreamControllerError(controller, e3); - throw e3; + const e5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + ReadableByteStreamControllerError(controller, e5); + throw e5; } } ReadableByteStreamControllerClearAlgorithms(controller); @@ -10854,7 +10855,7 @@ var require_ponyfill_es2018 = __commonJS({ } ReadableByteStreamControllerCallPullIfNeeded(controller); } - function ReadableByteStreamControllerError(controller, e3) { + function ReadableByteStreamControllerError(controller, e5) { const stream4 = controller._controlledReadableByteStream; if (stream4._state !== "readable") { return; @@ -10862,7 +10863,7 @@ var require_ponyfill_es2018 = __commonJS({ ReadableByteStreamControllerClearPendingPullIntos(controller); ResetQueue(controller); ReadableByteStreamControllerClearAlgorithms(controller); - ReadableStreamError(stream4, e3); + ReadableStreamError(stream4, e5); } function ReadableByteStreamControllerFillReadRequestFromQueue(controller, readRequest) { const entry = controller._queue.shift(); @@ -10882,19 +10883,19 @@ var require_ponyfill_es2018 = __commonJS({ return controller._byobRequest; } function ReadableByteStreamControllerGetDesiredSize(controller) { - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "errored") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "errored") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return controller._strategyHWM - controller._queueTotalSize; } function ReadableByteStreamControllerRespond(controller, bytesWritten) { const firstDescriptor = controller._pendingPullIntos.peek(); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { if (bytesWritten !== 0) { throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); } @@ -10911,8 +10912,8 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableByteStreamControllerRespondWithNewView(controller, view) { const firstDescriptor = controller._pendingPullIntos.peek(); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { if (view.byteLength !== 0) { throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); } @@ -10954,8 +10955,8 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; ReadableByteStreamControllerCallPullIfNeeded(controller); return null; - }, (r3) => { - ReadableByteStreamControllerError(controller, r3); + }, (r5) => { + ReadableByteStreamControllerError(controller, r5); return null; }); } @@ -11010,9 +11011,9 @@ var require_ponyfill_es2018 = __commonJS({ return mode; } function convertByobReadOptions(options, context) { - var _a6; + var _a7; assertDictionary(options, context); - const min = (_a6 = options === null || options === void 0 ? void 0 : options.min) !== null && _a6 !== void 0 ? _a6 : 1; + const min = (_a7 = options === null || options === void 0 ? void 0 : options.min) !== null && _a7 !== void 0 ? _a7 : 1; return { min: convertUnsignedLongLongWithEnforceRange(min, `${context} has member 'min' that`) }; @@ -11099,8 +11100,8 @@ var require_ponyfill_es2018 = __commonJS({ let options; try { options = convertByobReadOptions(rawOptions, "options"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const min = options.min; if (min === 0) { @@ -11125,7 +11126,7 @@ var require_ponyfill_es2018 = __commonJS({ const readIntoRequest = { _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }), _closeSteps: (chunk) => resolvePromise({ value: chunk, done: true }), - _errorSteps: (e3) => rejectPromise(e3) + _errorSteps: (e5) => rejectPromise(e5) }; ReadableStreamBYOBReaderRead(this, view, min, readIntoRequest); return promise; @@ -11164,14 +11165,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamBYOBReader(x5) { - if (!typeIsObject(x5)) { + function IsReadableStreamBYOBReader(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_readIntoRequests")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_readIntoRequests")) { return false; } - return x5 instanceof ReadableStreamBYOBReader2; + return x7 instanceof ReadableStreamBYOBReader2; } function ReadableStreamBYOBReaderRead(reader, view, min, readIntoRequest) { const stream4 = reader._ownerReadableStream; @@ -11184,14 +11185,14 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableStreamBYOBReaderRelease(reader) { ReadableStreamReaderGenericRelease(reader); - const e3 = new TypeError("Reader was released"); - ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3); + const e5 = new TypeError("Reader was released"); + ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5); } - function ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3) { + function ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5) { const readIntoRequests = reader._readIntoRequests; reader._readIntoRequests = new SimpleQueue(); readIntoRequests.forEach((readIntoRequest) => { - readIntoRequest._errorSteps(e3); + readIntoRequest._errorSteps(e5); }); } function byobReaderBrandCheckException(name) { @@ -11258,8 +11259,8 @@ var require_ponyfill_es2018 = __commonJS({ assertFunction(fn, context); return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); } - function assertWritableStream(x5, context) { - if (!IsWritableStream(x5)) { + function assertWritableStream(x7, context) { + if (!IsWritableStream(x7)) { throw new TypeError(`${context} is not a WritableStream.`); } } @@ -11269,7 +11270,7 @@ var require_ponyfill_es2018 = __commonJS({ } try { return typeof value.aborted === "boolean"; - } catch (_a6) { + } catch (_a7) { return false; } } @@ -11397,14 +11398,14 @@ var require_ponyfill_es2018 = __commonJS({ stream4._pendingAbortRequest = void 0; stream4._backpressure = false; } - function IsWritableStream(x5) { - if (!typeIsObject(x5)) { + function IsWritableStream(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_writableStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_writableStreamController")) { return false; } - return x5 instanceof WritableStream2; + return x7 instanceof WritableStream2; } function IsWritableStreamLocked(stream4) { if (stream4._writer === void 0) { @@ -11413,21 +11414,21 @@ var require_ponyfill_es2018 = __commonJS({ return true; } function WritableStreamAbort(stream4, reason) { - var _a6; + var _a7; if (stream4._state === "closed" || stream4._state === "errored") { return promiseResolvedWith(void 0); } stream4._writableStreamController._abortReason = reason; - (_a6 = stream4._writableStreamController._abortController) === null || _a6 === void 0 ? void 0 : _a6.abort(reason); - const state2 = stream4._state; - if (state2 === "closed" || state2 === "errored") { + (_a7 = stream4._writableStreamController._abortController) === null || _a7 === void 0 ? void 0 : _a7.abort(reason); + const state3 = stream4._state; + if (state3 === "closed" || state3 === "errored") { return promiseResolvedWith(void 0); } if (stream4._pendingAbortRequest !== void 0) { return stream4._pendingAbortRequest._promise; } let wasAlreadyErroring = false; - if (state2 === "erroring") { + if (state3 === "erroring") { wasAlreadyErroring = true; reason = void 0; } @@ -11447,9 +11448,9 @@ var require_ponyfill_es2018 = __commonJS({ return promise; } function WritableStreamClose(stream4) { - const state2 = stream4._state; - if (state2 === "closed" || state2 === "errored") { - return promiseRejectedWith(new TypeError(`The stream (in ${state2} state) is not in the writable state and cannot be closed`)); + const state3 = stream4._state; + if (state3 === "closed" || state3 === "errored") { + return promiseRejectedWith(new TypeError(`The stream (in ${state3} state) is not in the writable state and cannot be closed`)); } const promise = newPromise((resolve, reject) => { const closeRequest = { @@ -11459,7 +11460,7 @@ var require_ponyfill_es2018 = __commonJS({ stream4._closeRequest = closeRequest; }); const writer = stream4._writer; - if (writer !== void 0 && stream4._backpressure && state2 === "writable") { + if (writer !== void 0 && stream4._backpressure && state3 === "writable") { defaultWriterReadyPromiseResolve(writer); } WritableStreamDefaultControllerClose(stream4._writableStreamController); @@ -11476,8 +11477,8 @@ var require_ponyfill_es2018 = __commonJS({ return promise; } function WritableStreamDealWithRejection(stream4, error) { - const state2 = stream4._state; - if (state2 === "writable") { + const state3 = stream4._state; + if (state3 === "writable") { WritableStreamStartErroring(stream4, error); return; } @@ -11537,8 +11538,8 @@ var require_ponyfill_es2018 = __commonJS({ function WritableStreamFinishInFlightClose(stream4) { stream4._inFlightCloseRequest._resolve(void 0); stream4._inFlightCloseRequest = void 0; - const state2 = stream4._state; - if (state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "erroring") { stream4._storedError = void 0; if (stream4._pendingAbortRequest !== void 0) { stream4._pendingAbortRequest._resolve(); @@ -11609,18 +11610,18 @@ var require_ponyfill_es2018 = __commonJS({ } this._ownerWritableStream = stream4; stream4._writer = this; - const state2 = stream4._state; - if (state2 === "writable") { + const state3 = stream4._state; + if (state3 === "writable") { if (!WritableStreamCloseQueuedOrInFlight(stream4) && stream4._backpressure) { defaultWriterReadyPromiseInitialize(this); } else { defaultWriterReadyPromiseInitializeAsResolved(this); } defaultWriterClosedPromiseInitialize(this); - } else if (state2 === "erroring") { + } else if (state3 === "erroring") { defaultWriterReadyPromiseInitializeAsRejected(this, stream4._storedError); defaultWriterClosedPromiseInitialize(this); - } else if (state2 === "closed") { + } else if (state3 === "closed") { defaultWriterReadyPromiseInitializeAsResolved(this); defaultWriterClosedPromiseInitializeAsResolved(this); } else { @@ -11747,14 +11748,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsWritableStreamDefaultWriter(x5) { - if (!typeIsObject(x5)) { + function IsWritableStreamDefaultWriter(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_ownerWritableStream")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_ownerWritableStream")) { return false; } - return x5 instanceof WritableStreamDefaultWriter2; + return x7 instanceof WritableStreamDefaultWriter2; } function WritableStreamDefaultWriterAbort(writer, reason) { const stream4 = writer._ownerWritableStream; @@ -11766,11 +11767,11 @@ var require_ponyfill_es2018 = __commonJS({ } function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { const stream4 = writer._ownerWritableStream; - const state2 = stream4._state; - if (WritableStreamCloseQueuedOrInFlight(stream4) || state2 === "closed") { + const state3 = stream4._state; + if (WritableStreamCloseQueuedOrInFlight(stream4) || state3 === "closed") { return promiseResolvedWith(void 0); } - if (state2 === "errored") { + if (state3 === "errored") { return promiseRejectedWith(stream4._storedError); } return WritableStreamDefaultWriterClose(writer); @@ -11791,11 +11792,11 @@ var require_ponyfill_es2018 = __commonJS({ } function WritableStreamDefaultWriterGetDesiredSize(writer) { const stream4 = writer._ownerWritableStream; - const state2 = stream4._state; - if (state2 === "errored" || state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "errored" || state3 === "erroring") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return WritableStreamDefaultControllerGetDesiredSize(stream4._writableStreamController); @@ -11815,14 +11816,14 @@ var require_ponyfill_es2018 = __commonJS({ if (stream4 !== writer._ownerWritableStream) { return promiseRejectedWith(defaultWriterLockException("write to")); } - const state2 = stream4._state; - if (state2 === "errored") { + const state3 = stream4._state; + if (state3 === "errored") { return promiseRejectedWith(stream4._storedError); } - if (WritableStreamCloseQueuedOrInFlight(stream4) || state2 === "closed") { + if (WritableStreamCloseQueuedOrInFlight(stream4) || state3 === "closed") { return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to")); } - if (state2 === "erroring") { + if (state3 === "erroring") { return promiseRejectedWith(stream4._storedError); } const promise = WritableStreamAddWriteRequest(stream4); @@ -11866,15 +11867,15 @@ var require_ponyfill_es2018 = __commonJS({ * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the * normal lifecycle of interactions with the underlying sink. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsWritableStreamDefaultController(this)) { throw defaultControllerBrandCheckException$2("error"); } - const state2 = this._controlledWritableStream._state; - if (state2 !== "writable") { + const state3 = this._controlledWritableStream._state; + if (state3 !== "writable") { return; } - WritableStreamDefaultControllerError(this, e3); + WritableStreamDefaultControllerError(this, e5); } /** @internal */ [AbortSteps](reason) { @@ -11898,14 +11899,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsWritableStreamDefaultController(x5) { - if (!typeIsObject(x5)) { + function IsWritableStreamDefaultController(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_controlledWritableStream")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_controlledWritableStream")) { return false; } - return x5 instanceof WritableStreamDefaultController2; + return x7 instanceof WritableStreamDefaultController2; } function SetUpWritableStreamDefaultController(stream4, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { controller._controlledWritableStream = stream4; @@ -11929,9 +11930,9 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); return null; - }, (r3) => { + }, (r5) => { controller._started = true; - WritableStreamDealWithRejection(stream4, r3); + WritableStreamDealWithRejection(stream4, r5); return null; }); } @@ -12006,8 +12007,8 @@ var require_ponyfill_es2018 = __commonJS({ if (stream4._inFlightWriteRequest !== void 0) { return; } - const state2 = stream4._state; - if (state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "erroring") { WritableStreamFinishErroring(stream4); return; } @@ -12046,9 +12047,9 @@ var require_ponyfill_es2018 = __commonJS({ const sinkWritePromise = controller._writeAlgorithm(chunk); uponPromise(sinkWritePromise, () => { WritableStreamFinishInFlightWrite(stream4); - const state2 = stream4._state; + const state3 = stream4._state; DequeueValue(controller); - if (!WritableStreamCloseQueuedOrInFlight(stream4) && state2 === "writable") { + if (!WritableStreamCloseQueuedOrInFlight(stream4) && state3 === "writable") { const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); WritableStreamUpdateBackpressure(stream4, backpressure); } @@ -12181,7 +12182,7 @@ var require_ponyfill_es2018 = __commonJS({ try { new ctor(); return true; - } catch (_a6) { + } catch (_a7) { return false; } } @@ -12399,11 +12400,11 @@ var require_ponyfill_es2018 = __commonJS({ /** * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsReadableStreamDefaultController(this)) { throw defaultControllerBrandCheckException$1("error"); } - ReadableStreamDefaultControllerError(this, e3); + ReadableStreamDefaultControllerError(this, e5); } /** @internal */ [CancelSteps](reason) { @@ -12448,14 +12449,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamDefaultController(x5) { - if (!typeIsObject(x5)) { + function IsReadableStreamDefaultController(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_controlledReadableStream")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_controlledReadableStream")) { return false; } - return x5 instanceof ReadableStreamDefaultController2; + return x7 instanceof ReadableStreamDefaultController2; } function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); @@ -12475,8 +12476,8 @@ var require_ponyfill_es2018 = __commonJS({ ReadableStreamDefaultControllerCallPullIfNeeded(controller); } return null; - }, (e3) => { - ReadableStreamDefaultControllerError(controller, e3); + }, (e5) => { + ReadableStreamDefaultControllerError(controller, e5); return null; }); } @@ -12537,21 +12538,21 @@ var require_ponyfill_es2018 = __commonJS({ } ReadableStreamDefaultControllerCallPullIfNeeded(controller); } - function ReadableStreamDefaultControllerError(controller, e3) { + function ReadableStreamDefaultControllerError(controller, e5) { const stream4 = controller._controlledReadableStream; if (stream4._state !== "readable") { return; } ResetQueue(controller); ReadableStreamDefaultControllerClearAlgorithms(controller); - ReadableStreamError(stream4, e3); + ReadableStreamError(stream4, e5); } function ReadableStreamDefaultControllerGetDesiredSize(controller) { - const state2 = controller._controlledReadableStream._state; - if (state2 === "errored") { + const state3 = controller._controlledReadableStream._state; + if (state3 === "errored") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return controller._strategyHWM - controller._queueTotalSize; @@ -12563,8 +12564,8 @@ var require_ponyfill_es2018 = __commonJS({ return true; } function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { - const state2 = controller._controlledReadableStream._state; - if (!controller._closeRequested && state2 === "readable") { + const state3 = controller._controlledReadableStream._state; + if (!controller._closeRequested && state3 === "readable") { return true; } return false; @@ -12588,8 +12589,8 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; ReadableStreamDefaultControllerCallPullIfNeeded(controller); return null; - }, (r3) => { - ReadableStreamDefaultControllerError(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(controller, r5); return null; }); } @@ -12705,9 +12706,9 @@ var require_ponyfill_es2018 = __commonJS({ } branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); - uponRejection(reader._closedPromise, (r3) => { - ReadableStreamDefaultControllerError(branch1._readableStreamController, r3); - ReadableStreamDefaultControllerError(branch2._readableStreamController, r3); + uponRejection(reader._closedPromise, (r5) => { + ReadableStreamDefaultControllerError(branch1._readableStreamController, r5); + ReadableStreamDefaultControllerError(branch2._readableStreamController, r5); if (!canceled1 || !canceled2) { resolveCancelPromise(void 0); } @@ -12731,12 +12732,12 @@ var require_ponyfill_es2018 = __commonJS({ resolveCancelPromise = resolve; }); function forwardReaderError(thisReader) { - uponRejection(thisReader._closedPromise, (r3) => { + uponRejection(thisReader._closedPromise, (r5) => { if (thisReader !== reader) { return null; } - ReadableByteStreamControllerError(branch1._readableStreamController, r3); - ReadableByteStreamControllerError(branch2._readableStreamController, r3); + ReadableByteStreamControllerError(branch1._readableStreamController, r5); + ReadableByteStreamControllerError(branch2._readableStreamController, r5); if (!canceled1 || !canceled2) { resolveCancelPromise(void 0); } @@ -12945,8 +12946,8 @@ var require_ponyfill_es2018 = __commonJS({ let nextResult; try { nextResult = IteratorNext(iteratorRecord); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const nextPromise = promiseResolvedWith(nextResult); return transformPromiseWith(nextPromise, (iterResult) => { @@ -12967,8 +12968,8 @@ var require_ponyfill_es2018 = __commonJS({ let returnMethod; try { returnMethod = GetMethod(iterator2, "return"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } if (returnMethod === void 0) { return promiseResolvedWith(void 0); @@ -12976,8 +12977,8 @@ var require_ponyfill_es2018 = __commonJS({ let returnResult; try { returnResult = reflectCall(returnMethod, iterator2, [reason]); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const returnPromise = promiseResolvedWith(returnResult); return transformPromiseWith(returnPromise, (iterResult) => { @@ -12997,8 +12998,8 @@ var require_ponyfill_es2018 = __commonJS({ let readPromise; try { readPromise = reader.read(); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } return transformPromiseWith(readPromise, (readResult) => { if (!typeIsObject(readResult)) { @@ -13015,8 +13016,8 @@ var require_ponyfill_es2018 = __commonJS({ function cancelAlgorithm(reason) { try { return promiseResolvedWith(reader.cancel(reason)); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } } stream4 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, 0); @@ -13179,8 +13180,8 @@ var require_ponyfill_es2018 = __commonJS({ let options; try { options = convertPipeOptions(rawOptions, "Second parameter"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } if (IsReadableStreamLocked(this)) { return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")); @@ -13278,14 +13279,14 @@ var require_ponyfill_es2018 = __commonJS({ stream4._storedError = void 0; stream4._disturbed = false; } - function IsReadableStream(x5) { - if (!typeIsObject(x5)) { + function IsReadableStream(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_readableStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_readableStreamController")) { return false; } - return x5 instanceof ReadableStream7; + return x7 instanceof ReadableStream7; } function IsReadableStreamLocked(stream4) { if (stream4._reader === void 0) { @@ -13328,18 +13329,18 @@ var require_ponyfill_es2018 = __commonJS({ }); } } - function ReadableStreamError(stream4, e3) { + function ReadableStreamError(stream4, e5) { stream4._state = "errored"; - stream4._storedError = e3; + stream4._storedError = e5; const reader = stream4._reader; if (reader === void 0) { return; } - defaultReaderClosedPromiseReject(reader, e3); + defaultReaderClosedPromiseReject(reader, e5); if (IsReadableStreamDefaultReader(reader)) { - ReadableStreamDefaultReaderErrorReadRequests(reader, e3); + ReadableStreamDefaultReaderErrorReadRequests(reader, e5); } else { - ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3); + ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5); } } function streamBrandCheckException$1(name) { @@ -13395,14 +13396,14 @@ var require_ponyfill_es2018 = __commonJS({ function byteLengthBrandCheckException(name) { return new TypeError(`ByteLengthQueuingStrategy.prototype.${name} can only be used on a ByteLengthQueuingStrategy`); } - function IsByteLengthQueuingStrategy(x5) { - if (!typeIsObject(x5)) { + function IsByteLengthQueuingStrategy(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_byteLengthQueuingStrategyHighWaterMark")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_byteLengthQueuingStrategyHighWaterMark")) { return false; } - return x5 instanceof ByteLengthQueuingStrategy2; + return x7 instanceof ByteLengthQueuingStrategy2; } const countSizeFunction = () => { return 1; @@ -13447,14 +13448,14 @@ var require_ponyfill_es2018 = __commonJS({ function countBrandCheckException(name) { return new TypeError(`CountQueuingStrategy.prototype.${name} can only be used on a CountQueuingStrategy`); } - function IsCountQueuingStrategy(x5) { - if (!typeIsObject(x5)) { + function IsCountQueuingStrategy(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_countQueuingStrategyHighWaterMark")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_countQueuingStrategyHighWaterMark")) { return false; } - return x5 instanceof CountQueuingStrategy2; + return x7 instanceof CountQueuingStrategy2; } function convertTransformer(original, context) { assertDictionary(original, context); @@ -13575,22 +13576,22 @@ var require_ponyfill_es2018 = __commonJS({ TransformStreamSetBackpressure(stream4, true); stream4._transformStreamController = void 0; } - function IsTransformStream(x5) { - if (!typeIsObject(x5)) { + function IsTransformStream(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_transformStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_transformStreamController")) { return false; } - return x5 instanceof TransformStream3; + return x7 instanceof TransformStream3; } - function TransformStreamError(stream4, e3) { - ReadableStreamDefaultControllerError(stream4._readable._readableStreamController, e3); - TransformStreamErrorWritableAndUnblockWrite(stream4, e3); + function TransformStreamError(stream4, e5) { + ReadableStreamDefaultControllerError(stream4._readable._readableStreamController, e5); + TransformStreamErrorWritableAndUnblockWrite(stream4, e5); } - function TransformStreamErrorWritableAndUnblockWrite(stream4, e3) { + function TransformStreamErrorWritableAndUnblockWrite(stream4, e5) { TransformStreamDefaultControllerClearAlgorithms(stream4._transformStreamController); - WritableStreamDefaultControllerErrorIfNeeded(stream4._writable._writableStreamController, e3); + WritableStreamDefaultControllerErrorIfNeeded(stream4._writable._writableStreamController, e5); TransformStreamUnblockWrite(stream4); } function TransformStreamUnblockWrite(stream4) { @@ -13663,14 +13664,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsTransformStreamDefaultController(x5) { - if (!typeIsObject(x5)) { + function IsTransformStreamDefaultController(x7) { + if (!typeIsObject(x7)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x5, "_controlledTransformStream")) { + if (!Object.prototype.hasOwnProperty.call(x7, "_controlledTransformStream")) { return false; } - return x5 instanceof TransformStreamDefaultController2; + return x7 instanceof TransformStreamDefaultController2; } function SetUpTransformStreamDefaultController(stream4, controller, transformAlgorithm, flushAlgorithm, cancelAlgorithm) { controller._controlledTransformStream = stream4; @@ -13724,8 +13725,8 @@ var require_ponyfill_es2018 = __commonJS({ } try { ReadableStreamDefaultControllerEnqueue(readableController, chunk); - } catch (e3) { - TransformStreamErrorWritableAndUnblockWrite(stream4, e3); + } catch (e5) { + TransformStreamErrorWritableAndUnblockWrite(stream4, e5); throw stream4._readable._storedError; } const backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); @@ -13733,14 +13734,14 @@ var require_ponyfill_es2018 = __commonJS({ TransformStreamSetBackpressure(stream4, true); } } - function TransformStreamDefaultControllerError(controller, e3) { - TransformStreamError(controller._controlledTransformStream, e3); + function TransformStreamDefaultControllerError(controller, e5) { + TransformStreamError(controller._controlledTransformStream, e5); } function TransformStreamDefaultControllerPerformTransform(controller, chunk) { const transformPromise = controller._transformAlgorithm(chunk); - return transformPromiseWith(transformPromise, void 0, (r3) => { - TransformStreamError(controller._controlledTransformStream, r3); - throw r3; + return transformPromiseWith(transformPromise, void 0, (r5) => { + TransformStreamError(controller._controlledTransformStream, r5); + throw r5; }); } function TransformStreamDefaultControllerTerminate(controller) { @@ -13756,8 +13757,8 @@ var require_ponyfill_es2018 = __commonJS({ const backpressureChangePromise = stream4._backpressureChangePromise; return transformPromiseWith(backpressureChangePromise, () => { const writable = stream4._writable; - const state2 = writable._state; - if (state2 === "erroring") { + const state3 = writable._state; + if (state3 === "erroring") { throw writable._storedError; } return TransformStreamDefaultControllerPerformTransform(controller, chunk); @@ -13785,9 +13786,9 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - ReadableStreamDefaultControllerError(readable._readableStreamController, r3); - defaultControllerFinishPromiseReject(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(readable._readableStreamController, r5); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -13812,9 +13813,9 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - ReadableStreamDefaultControllerError(readable._readableStreamController, r3); - defaultControllerFinishPromiseReject(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(readable._readableStreamController, r5); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -13844,10 +13845,10 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, r3); + }, (r5) => { + WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, r5); TransformStreamUnblockWrite(stream4); - defaultControllerFinishPromiseReject(controller, r3); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -13967,16 +13968,16 @@ var init_fileFromPath = __esm({ init_File(); init_isPlainObject(); init_isFile(); - __classPrivateFieldSet4 = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet4 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - __classPrivateFieldGet5 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet5 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; MESSAGE = "The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired."; FileFromPath = class _FileFromPath { @@ -14078,9 +14079,9 @@ var require_delayed_stream = __commonJS({ this._bufferedEvents = []; }; DelayedStream.prototype.pipe = function() { - var r3 = Stream3.prototype.pipe.apply(this, arguments); + var r5 = Stream3.prototype.pipe.apply(this, arguments); this.resume(); - return r3; + return r5; }; DelayedStream.prototype._handleEmit = function(args) { if (this._released) { @@ -22882,8 +22883,8 @@ var require_mime_types = __commonJS({ return; } extensions[type2] = exts; - for (var i3 = 0; i3 < exts.length; i3++) { - var extension2 = exts[i3]; + for (var i5 = 0; i5 < exts.length; i5++) { + var extension2 = exts[i5]; if (types[extension2]) { var from = preference.indexOf(db[types[extension2]].source); var to = preference.indexOf(mime.source); @@ -22940,9 +22941,9 @@ var require_async = __commonJS({ var require_abort = __commonJS({ "node_modules/asynckit/lib/abort.js"(exports2, module2) { module2.exports = abort; - function abort(state2) { - Object.keys(state2.jobs).forEach(clean.bind(state2)); - state2.jobs = {}; + function abort(state3) { + Object.keys(state3.jobs).forEach(clean.bind(state3)); + state3.jobs = {}; } function clean(key) { if (typeof this.jobs[key] == "function") { @@ -22958,19 +22959,19 @@ var require_iterate = __commonJS({ var async = require_async(); var abort = require_abort(); module2.exports = iterate; - function iterate(list, iterator2, state2, callback) { - var key = state2["keyedList"] ? state2["keyedList"][state2.index] : state2.index; - state2.jobs[key] = runJob(iterator2, key, list[key], function(error, output) { - if (!(key in state2.jobs)) { + function iterate(list, iterator2, state3, callback) { + var key = state3["keyedList"] ? state3["keyedList"][state3.index] : state3.index; + state3.jobs[key] = runJob(iterator2, key, list[key], function(error, output) { + if (!(key in state3.jobs)) { return; } - delete state2.jobs[key]; + delete state3.jobs[key]; if (error) { - abort(state2); + abort(state3); } else { - state2.results[key] = output; + state3.results[key] = output; } - callback(error, state2.results); + callback(error, state3.results); }); } function runJob(iterator2, key, item, callback) { @@ -22988,8 +22989,8 @@ var require_iterate = __commonJS({ // node_modules/asynckit/lib/state.js var require_state = __commonJS({ "node_modules/asynckit/lib/state.js"(exports2, module2) { - module2.exports = state2; - function state2(list, sortMethod) { + module2.exports = state3; + function state3(list, sortMethod) { var isNamedList = !Array.isArray(list), initState = { index: 0, keyedList: isNamedList || sortMethod ? Object.keys(list) : null, @@ -22998,8 +22999,8 @@ var require_state = __commonJS({ size: isNamedList ? Object.keys(list).length : list.length }; if (sortMethod) { - initState.keyedList.sort(isNamedList ? sortMethod : function(a4, b7) { - return sortMethod(list[a4], list[b7]); + initState.keyedList.sort(isNamedList ? sortMethod : function(a6, b9) { + return sortMethod(list[a6], list[b9]); }); } return initState; @@ -23032,21 +23033,21 @@ var require_parallel = __commonJS({ var terminator = require_terminator(); module2.exports = parallel; function parallel(list, iterator2, callback) { - var state2 = initState(list); - while (state2.index < (state2["keyedList"] || list).length) { - iterate(list, iterator2, state2, function(error, result) { + var state3 = initState(list); + while (state3.index < (state3["keyedList"] || list).length) { + iterate(list, iterator2, state3, function(error, result) { if (error) { callback(error, result); return; } - if (Object.keys(state2.jobs).length === 0) { - callback(null, state2.results); + if (Object.keys(state3.jobs).length === 0) { + callback(null, state3.results); return; } }); - state2.index++; + state3.index++; } - return terminator.bind(state2, callback); + return terminator.bind(state3, callback); } } }); @@ -23061,26 +23062,26 @@ var require_serialOrdered = __commonJS({ module2.exports.ascending = ascending; module2.exports.descending = descending; function serialOrdered(list, iterator2, sortMethod, callback) { - var state2 = initState(list, sortMethod); - iterate(list, iterator2, state2, function iteratorHandler(error, result) { + var state3 = initState(list, sortMethod); + iterate(list, iterator2, state3, function iteratorHandler(error, result) { if (error) { callback(error, result); return; } - state2.index++; - if (state2.index < (state2["keyedList"] || list).length) { - iterate(list, iterator2, state2, iteratorHandler); + state3.index++; + if (state3.index < (state3["keyedList"] || list).length) { + iterate(list, iterator2, state3, iteratorHandler); return; } - callback(null, state2.results); + callback(null, state3.results); }); - return terminator.bind(state2, callback); + return terminator.bind(state3, callback); } - function ascending(a4, b7) { - return a4 < b7 ? -1 : a4 > b7 ? 1 : 0; + function ascending(a6, b9) { + return a6 < b9 ? -1 : a6 > b9 ? 1 : 0; } - function descending(a4, b7) { - return -1 * ascending(a4, b7); + function descending(a6, b9) { + return -1 * ascending(a6, b9); } } }); @@ -23127,7 +23128,7 @@ var require_form_data = __commonJS({ var path5 = require("path"); var http3 = require("http"); var https3 = require("https"); - var parseUrl = require("url").parse; + var parseUrl3 = require("url").parse; var fs7 = require("fs"); var Stream3 = require("stream").Stream; var mime = require_mime_types(); @@ -23317,14 +23318,14 @@ var require_form_data = __commonJS({ FormData6.prototype.getBuffer = function() { var dataBuffer = new Buffer.alloc(0); var boundary = this.getBoundary(); - for (var i3 = 0, len = this._streams.length; i3 < len; i3++) { - if (typeof this._streams[i3] !== "function") { - if (Buffer.isBuffer(this._streams[i3])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i3]]); + for (var i5 = 0, len = this._streams.length; i5 < len; i5++) { + if (typeof this._streams[i5] !== "function") { + if (Buffer.isBuffer(this._streams[i5])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i5]]); } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i3])]); + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i5])]); } - if (typeof this._streams[i3] !== "string" || this._streams[i3].substring(2, boundary.length + 2) !== boundary) { + if (typeof this._streams[i5] !== "string" || this._streams[i5].substring(2, boundary.length + 2) !== boundary) { dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData6.LINE_BREAK)]); } } @@ -23333,7 +23334,7 @@ var require_form_data = __commonJS({ }; FormData6.prototype._generateBoundary = function() { var boundary = "--------------------------"; - for (var i3 = 0; i3 < 24; i3++) { + for (var i5 = 0; i5 < 24; i5++) { boundary += Math.floor(Math.random() * 10).toString(16); } this._boundary = boundary; @@ -23378,7 +23379,7 @@ var require_form_data = __commonJS({ FormData6.prototype.submit = function(params, cb) { var request3, options, defaults2 = { method: "post" }; if (typeof params == "string") { - params = parseUrl(params); + params = parseUrl3(params); options = populate({ port: params.port, path: params.pathname, @@ -23437,7 +23438,7 @@ var require_form_data = __commonJS({ var require_proxy_from_env = __commonJS({ "node_modules/proxy-from-env/index.js"(exports2) { "use strict"; - var parseUrl = require("url").parse; + var parseUrl3 = require("url").parse; var DEFAULT_PORTS = { ftp: 21, gopher: 70, @@ -23446,11 +23447,11 @@ var require_proxy_from_env = __commonJS({ ws: 80, wss: 443 }; - var stringEndsWith = String.prototype.endsWith || function(s2) { - return s2.length <= this.length && this.indexOf(s2, this.length - s2.length) !== -1; + var stringEndsWith = String.prototype.endsWith || function(s4) { + return s4.length <= this.length && this.indexOf(s4, this.length - s4.length) !== -1; }; function getProxyForUrl(url2) { - var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; + var parsedUrl = typeof url2 === "string" ? parseUrl3(url2) : url2 || {}; var proto2 = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; @@ -23523,8 +23524,8 @@ var require_common = __commonJS({ createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; - for (let i3 = 0; i3 < namespace.length; i3++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i3); + for (let i5 = 0; i5 < namespace.length; i5++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i5); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; @@ -23587,8 +23588,8 @@ var require_common = __commonJS({ } return enabledCache; }, - set: (v5) => { - enableOverride = v5; + set: (v8) => { + enableOverride = v8; } }); if (typeof createDebug.init === "function") { @@ -23606,14 +23607,14 @@ var require_common = __commonJS({ createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; - let i3; + let i5; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; - for (i3 = 0; i3 < len; i3++) { - if (!split[i3]) { + for (i5 = 0; i5 < len; i5++) { + if (!split[i5]) { continue; } - namespaces = split[i3].replace(/\*/g, ".*?"); + namespaces = split[i5].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { @@ -23633,15 +23634,15 @@ var require_common = __commonJS({ if (name[name.length - 1] === "*") { return true; } - let i3; + let i5; let len; - for (i3 = 0, len = createDebug.skips.length; i3 < len; i3++) { - if (createDebug.skips[i3].test(name)) { + for (i5 = 0, len = createDebug.skips.length; i5 < len; i5++) { + if (createDebug.skips[i5].test(name)) { return false; } } - for (i3 = 0, len = createDebug.names.length; i3 < len; i3++) { - if (createDebug.names[i3].test(name)) { + for (i5 = 0, len = createDebug.names.length; i5 < len; i5++) { + if (createDebug.names[i5].test(name)) { return true; } } @@ -23779,8 +23780,8 @@ var require_browser = __commonJS({ if (!this.useColors) { return; } - const c3 = "color: " + this.color; - args.splice(1, 0, c3, "color: inherit"); + const c5 = "color: " + this.color; + args.splice(1, 0, c5, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { @@ -23792,7 +23793,7 @@ var require_browser = __commonJS({ lastC = index; } }); - args.splice(lastC, 0, c3); + args.splice(lastC, 0, c5); } exports2.log = console.debug || console.log || (() => { }); @@ -23807,15 +23808,15 @@ var require_browser = __commonJS({ } } function load() { - let r3; + let r5; try { - r3 = exports2.storage.getItem("debug"); + r5 = exports2.storage.getItem("debug"); } catch (error) { } - if (!r3 && typeof process !== "undefined" && "env" in process) { - r3 = process.env.DEBUG; + if (!r5 && typeof process !== "undefined" && "env" in process) { + r5 = process.env.DEBUG; } - return r3; + return r5; } function localstorage() { try { @@ -23825,9 +23826,9 @@ var require_browser = __commonJS({ } module2.exports = require_common()(exports2); var { formatters } = module2.exports; - formatters.j = function(v5) { + formatters.j = function(v8) { try { - return JSON.stringify(v5); + return JSON.stringify(v8); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } @@ -23919,10 +23920,10 @@ var require_supports_color = __commonJS({ return 3; } if ("TERM_PROGRAM" in env2) { - const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env2.TERM_PROGRAM) { case "iTerm.app": - return version >= 3 ? 3 : 2; + return version3 >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } @@ -24054,8 +24055,8 @@ var require_node = __commonJS({ 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, (_7, k7) => { - return k7.toUpperCase(); + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_8, k9) => { + return k9.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { @@ -24076,8 +24077,8 @@ var require_node = __commonJS({ function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { - const c3 = this.color; - const colorCode = "\x1B[3" + (c3 < 8 ? c3 : "8;5;" + c3); + const c5 = this.color; + const colorCode = "\x1B[3" + (c5 < 8 ? c5 : "8;5;" + c5); 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"); @@ -24107,19 +24108,19 @@ var require_node = __commonJS({ function init(debug3) { debug3.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); - for (let i3 = 0; i3 < keys.length; i3++) { - debug3.inspectOpts[keys[i3]] = exports2.inspectOpts[keys[i3]]; + for (let i5 = 0; i5 < keys.length; i5++) { + debug3.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; } } module2.exports = require_common()(exports2); var { formatters } = module2.exports; - formatters.o = function(v5) { + formatters.o = function(v8) { this.inspectOpts.colors = this.useColors; - return util4.inspect(v5, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util4.inspect(v8, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); }; - formatters.O = function(v5) { + formatters.O = function(v8) { this.inspectOpts.colors = this.useColors; - return util4.inspect(v5, this.inspectOpts); + return util4.inspect(v8, this.inspectOpts); }; } }); @@ -24159,7 +24160,7 @@ var require_debug = __commonJS({ var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { var url2 = require("url"); - var URL2 = url2.URL; + var URL4 = url2.URL; var http3 = require("http"); var https3 = require("https"); var Writable = require("stream").Writable; @@ -24167,7 +24168,7 @@ var require_follow_redirects = __commonJS({ var debug3 = require_debug(); var useNativeURL = false; try { - assert(new URL2()); + assert(new URL4()); } catch (error) { useNativeURL = error.code === "ERR_INVALID_URL"; } @@ -24357,8 +24358,8 @@ var require_follow_redirects = __commonJS({ "setNoDelay", "setSocketKeepAlive" ].forEach(function(method) { - RedirectableRequest.prototype[method] = function(a4, b7) { - return this._currentRequest[method](a4, b7); + RedirectableRequest.prototype[method] = function(a6, b9) { + return this._currentRequest[method](a6, b9); }; }); ["aborted", "connection", "socket"].forEach(function(property) { @@ -24409,15 +24410,15 @@ var require_follow_redirects = __commonJS({ this._options.path ); if (this._isRedirect) { - var i3 = 0; + var i5 = 0; var self2 = this; var buffers = this._requestBodyBuffers; (function writeNext(error) { if (request3 === self2._currentRequest) { if (error) { self2.emit("error", error); - } else if (i3 < buffers.length) { - var buffer = buffers[i3++]; + } else if (i5 < buffers.length) { + var buffer = buffers[i5++]; if (!request3.finished) { request3.write(buffer.data, buffer.encoding, writeNext); } @@ -24469,7 +24470,7 @@ var require_follow_redirects = __commonJS({ removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = parseUrl(this._currentUrl); + var currentUrlParts = parseUrl3(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); @@ -24508,7 +24509,7 @@ var require_follow_redirects = __commonJS({ if (isURL(input)) { input = spreadUrlObject(input); } else if (isString2(input)) { - input = spreadUrlObject(parseUrl(input)); + input = spreadUrlObject(parseUrl3(input)); } else { callback = options; options = validateUrl(input); @@ -24530,24 +24531,24 @@ var require_follow_redirects = __commonJS({ debug3("options", options); return new RedirectableRequest(options, callback); } - function get(input, options, callback) { + function get2(input, options, callback) { var wrappedRequest = wrappedProtocol.request(input, options, callback); wrappedRequest.end(); return wrappedRequest; } Object.defineProperties(wrappedProtocol, { request: { value: request3, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true } + get: { value: get2, configurable: true, enumerable: true, writable: true } }); }); return exports3; } function noop2() { } - function parseUrl(input) { + function parseUrl3(input) { var parsed; if (useNativeURL) { - parsed = new URL2(input); + parsed = new URL4(input); } else { parsed = validateUrl(url2.parse(input)); if (!isString2(parsed.protocol)) { @@ -24557,7 +24558,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative, base) { - return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative)); + return useNativeURL ? new URL4(relative, base) : parseUrl3(url2.resolve(base, relative)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -24634,7 +24635,7 @@ var require_follow_redirects = __commonJS({ return typeof value === "object" && "length" in value; } function isURL(value) { - return URL2 && value instanceof URL2; + return URL4 && value instanceof URL4; } module2.exports = wrap({ http: http3, https: https3 }); module2.exports.wrap = wrap; @@ -24713,8 +24714,8 @@ var require_tiktoken_bg = __commonJS({ WASM_VECTOR_LEN = offset; return ptr; } - function isLikeNone(x5) { - return x5 === void 0 || x5 === null; + function isLikeNone(x7) { + return x7 === void 0 || x7 === null; } var cachedInt32Memory0 = null; function getInt32Memory0() { @@ -24764,11 +24765,11 @@ var require_tiktoken_bg = __commonJS({ ptr = ptr >>> 0; return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); } - function handleError(f4, args) { + function handleError(f6, args) { try { - return f4.apply(this, args); - } catch (e3) { - wasm.__wbindgen_export_3(addHeapObject(e3)); + return f6.apply(this, args); + } catch (e5) { + wasm.__wbindgen_export_3(addHeapObject(e5)); } } var TiktokenFinalization = new FinalizationRegistry((ptr) => wasm.__wbg_tiktoken_free(ptr >>> 0)); @@ -24795,12 +24796,12 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_name(retptr, this.__wbg_ptr); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - let v1; + let v13; if (r0 !== 0) { - v1 = getStringFromWasm0(r0, r1).slice(); + v13 = getStringFromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 1, 1); } - return v1; + return v13; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -24832,8 +24833,8 @@ var require_tiktoken_bg = __commonJS({ var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; var r22 = getInt32Memory0()[retptr / 4 + 2]; - var r3 = getInt32Memory0()[retptr / 4 + 3]; - if (r3) { + var r32 = getInt32Memory0()[retptr / 4 + 3]; + if (r32) { throw takeObject(r22); } var v22 = getArrayU32FromWasm0(r0, r1).slice(); @@ -24929,9 +24930,9 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_decode_single_token_bytes(retptr, this.__wbg_ptr, token); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v1 = getArrayU8FromWasm0(r0, r1).slice(); + var v13 = getArrayU8FromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 1, 1); - return v1; + return v13; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -24990,7 +24991,7 @@ var require_tiktoken = __commonJS({ imports["./tiktoken_bg.js"] = wasm; var path5 = require("path"); var fs7 = require("fs"); - var candidates = __dirname.split(path5.sep).reduce((memo, _7, index, array) => { + var candidates = __dirname.split(path5.sep).reduce((memo, _8, index, array) => { const prefix = array.slice(0, index + 1).join(path5.sep) + path5.sep; if (!prefix.includes("node_modules" + path5.sep)) { memo.unshift( @@ -25022,41 +25023,524 @@ var require_tiktoken = __commonJS({ } }); +// 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: () => __classPrivateFieldGet8, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet7, + __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, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d9, b9) { + if (typeof b9 !== "function" && b9 !== null) + throw new TypeError("Class extends value " + String(b9) + " is not a constructor or null"); + extendStatics(d9, b9); + function __() { + this.constructor = d9; + } + d9.prototype = b9 === null ? Object.create(b9) : (__.prototype = b9.prototype, new __()); +} +function __rest(s4, e5) { + var t4 = {}; + for (var p6 in s4) if (Object.prototype.hasOwnProperty.call(s4, p6) && e5.indexOf(p6) < 0) + t4[p6] = s4[p6]; + if (s4 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i5 = 0, p6 = Object.getOwnPropertySymbols(s4); i5 < p6.length; i5++) { + if (e5.indexOf(p6[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p6[i5])) + t4[p6[i5]] = s4[p6[i5]]; + } + return t4; +} +function __decorate(decorators, target, key, desc) { + var c5 = arguments.length, r5 = c5 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d9; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r5 = Reflect.decorate(decorators, target, key, desc); + else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d9 = decorators[i5]) r5 = (c5 < 3 ? d9(r5) : c5 > 3 ? d9(target, key, r5) : d9(target, key)) || r5; + return c5 > 3 && r5 && Object.defineProperty(target, key, r5), r5; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f6) { + if (f6 !== void 0 && typeof f6 !== "function") throw new TypeError("Function expected"); + return f6; + } + var kind3 = contextIn.kind, key = kind3 === "getter" ? "get" : kind3 === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _8, done = false; + for (var i5 = decorators.length - 1; i5 >= 0; i5--) { + var context = {}; + for (var p6 in contextIn) context[p6] = p6 === "access" ? {} : contextIn[p6]; + for (var p6 in contextIn.access) context.access[p6] = contextIn.access[p6]; + context.addInitializer = function(f6) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f6 || null)); + }; + var result = (0, decorators[i5])(kind3 === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind3 === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_8 = accept(result.get)) descriptor.get = _8; + if (_8 = accept(result.set)) descriptor.set = _8; + if (_8 = accept(result.init)) initializers.unshift(_8); + } else if (_8 = accept(result)) { + if (kind3 === "field") initializers.unshift(_8); + else descriptor[key] = _8; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i5 = 0; i5 < initializers.length; i5++) { + value = useValue ? initializers[i5].call(thisArg, value) : initializers[i5].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x7) { + return typeof x7 === "symbol" ? x7 : "".concat(x7); +} +function __setFunctionName(f6, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f6, "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, P4, generator) { + function adopt(value) { + return value instanceof P4 ? value : new P4(function(resolve) { + resolve(value); + }); + } + return new (P4 || (P4 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _8 = { label: 0, sent: function() { + if (t4[0] & 1) throw t4[1]; + return t4[1]; + }, trys: [], ops: [] }, f6, y7, t4, g6; + return g6 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g6[Symbol.iterator] = function() { + return this; + }), g6; + function verb(n4) { + return function(v8) { + return step([n4, v8]); + }; + } + function step(op) { + if (f6) throw new TypeError("Generator is already executing."); + while (g6 && (g6 = 0, op[0] && (_8 = 0)), _8) try { + if (f6 = 1, y7 && (t4 = op[0] & 2 ? y7["return"] : op[0] ? y7["throw"] || ((t4 = y7["return"]) && t4.call(y7), 0) : y7.next) && !(t4 = t4.call(y7, op[1])).done) return t4; + if (y7 = 0, t4) op = [op[0] & 2, t4.value]; + switch (op[0]) { + case 0: + case 1: + t4 = op; + break; + case 4: + _8.label++; + return { value: op[1], done: false }; + case 5: + _8.label++; + y7 = op[1]; + op = [0]; + continue; + case 7: + op = _8.ops.pop(); + _8.trys.pop(); + continue; + default: + if (!(t4 = _8.trys, t4 = t4.length > 0 && t4[t4.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _8 = 0; + continue; + } + if (op[0] === 3 && (!t4 || op[1] > t4[0] && op[1] < t4[3])) { + _8.label = op[1]; + break; + } + if (op[0] === 6 && _8.label < t4[1]) { + _8.label = t4[1]; + t4 = op; + break; + } + if (t4 && _8.label < t4[2]) { + _8.label = t4[2]; + _8.ops.push(op); + break; + } + if (t4[2]) _8.ops.pop(); + _8.trys.pop(); + continue; + } + op = body.call(thisArg, _8); + } catch (e5) { + op = [6, e5]; + y7 = 0; + } finally { + f6 = t4 = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m7, o5) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(o5, p6)) __createBinding(o5, m7, p6); +} +function __values(o5) { + var s4 = typeof Symbol === "function" && Symbol.iterator, m7 = s4 && o5[s4], i5 = 0; + if (m7) return m7.call(o5); + if (o5 && typeof o5.length === "number") return { + next: function() { + if (o5 && i5 >= o5.length) o5 = void 0; + return { value: o5 && o5[i5++], done: !o5 }; + } + }; + throw new TypeError(s4 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o5, n4) { + var m7 = typeof Symbol === "function" && o5[Symbol.iterator]; + if (!m7) return o5; + var i5 = m7.call(o5), r5, ar2 = [], e5; + try { + while ((n4 === void 0 || n4-- > 0) && !(r5 = i5.next()).done) ar2.push(r5.value); + } catch (error) { + e5 = { error }; + } finally { + try { + if (r5 && !r5.done && (m7 = i5["return"])) m7.call(i5); + } finally { + if (e5) throw e5.error; + } + } + return ar2; +} +function __spread() { + for (var ar2 = [], i5 = 0; i5 < arguments.length; i5++) + ar2 = ar2.concat(__read(arguments[i5])); + return ar2; +} +function __spreadArrays() { + for (var s4 = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s4 += arguments[i5].length; + for (var r5 = Array(s4), k9 = 0, i5 = 0; i5 < il; i5++) + for (var a6 = arguments[i5], j6 = 0, jl = a6.length; j6 < jl; j6++, k9++) + r5[k9] = a6[j6]; + return r5; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i5 = 0, l5 = from.length, ar2; i5 < l5; i5++) { + if (ar2 || !(i5 in from)) { + if (!ar2) ar2 = Array.prototype.slice.call(from, 0, i5); + ar2[i5] = from[i5]; + } + } + return to.concat(ar2 || Array.prototype.slice.call(from)); +} +function __await(v8) { + return this instanceof __await ? (this.v = v8, this) : new __await(v8); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g6 = generator.apply(thisArg, _arguments || []), i5, q8 = []; + return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5; + function verb(n4) { + if (g6[n4]) i5[n4] = function(v8) { + return new Promise(function(a6, b9) { + q8.push([n4, v8, a6, b9]) > 1 || resume(n4, v8); + }); + }; + } + function resume(n4, v8) { + try { + step(g6[n4](v8)); + } catch (e5) { + settle2(q8[0][3], e5); + } + } + function step(r5) { + r5.value instanceof __await ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle2(q8[0][2], r5); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle2(f6, v8) { + if (f6(v8), q8.shift(), q8.length) resume(q8[0][0], q8[0][1]); + } +} +function __asyncDelegator(o5) { + var i5, p6; + return i5 = {}, verb("next"), verb("throw", function(e5) { + throw e5; + }), verb("return"), i5[Symbol.iterator] = function() { + return this; + }, i5; + function verb(n4, f6) { + i5[n4] = o5[n4] ? function(v8) { + return (p6 = !p6) ? { value: __await(o5[n4](v8)), done: false } : f6 ? f6(v8) : v8; + } : f6; + } +} +function __asyncValues(o5) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m7 = o5[Symbol.asyncIterator], i5; + return m7 ? m7.call(o5) : (o5 = typeof __values === "function" ? __values(o5) : o5[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5); + function verb(n4) { + i5[n4] = o5[n4] && function(v8) { + return new Promise(function(resolve, reject) { + v8 = o5[n4](v8), settle2(resolve, reject, v8.done, v8.value); + }); + }; + } + function settle2(resolve, reject, d9, v8) { + Promise.resolve(v8).then(function(v9) { + resolve({ value: v9, done: d9 }); + }, reject); + } +} +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 k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding(result, mod, k9); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet8(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); +} +function __classPrivateFieldSet7(receiver, state3, value, kind3, f6) { + if (kind3 === "m") throw new TypeError("Private method is not writable"); + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; +} +function __classPrivateFieldIn(state3, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state3 === "function" ? receiver === state3 : state3.has(receiver); +} +function __addDisposableResource(env2, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env2.stack.push({ value, dispose, async }); + } else if (async) { + env2.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env2) { + function fail(e5) { + env2.error = env2.hasError ? new _SuppressedError(e5, env2.error, "An error was suppressed during disposal.") : e5; + env2.hasError = true; + } + function next() { + while (env2.stack.length) { + var rec = env2.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e5) { + fail(e5); + return next(); + }); + } catch (e5) { + fail(e5); + } + } + if (env2.hasError) throw env2.error; + } + return next(); +} +var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d9, b9) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d10, b10) { + d10.__proto__ = b10; + } || function(d10, b10) { + for (var p6 in b10) if (Object.prototype.hasOwnProperty.call(b10, p6)) d10[p6] = b10[p6]; + }; + return extendStatics(d9, b9); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t4) { + for (var s4, i5 = 1, n4 = arguments.length; i5 < n4; i5++) { + s4 = arguments[i5]; + for (var p6 in s4) if (Object.prototype.hasOwnProperty.call(s4, p6)) t4[p6] = s4[p6]; + } + return t4; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m7[k9]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; + }; + __setModuleDefault = Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e5 = new Error(message); + return e5.name = "SuppressedError", e5.error = error, e5.suppressed = suppressed, e5; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet8, + __classPrivateFieldSet: __classPrivateFieldSet7, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources + }; + } +}); + // node_modules/agent-base/dist/helpers.js var require_helpers = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http3 = __importStar(require("http")); - var https3 = __importStar(require("https")); + var http3 = __importStar2(require("http")); + var https3 = __importStar2(require("https")); async function toBuffer(stream4) { let length = 0; const chunks = []; @@ -25096,42 +25580,42 @@ var require_helpers = __commonJS({ var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar(require("net")); - var http3 = __importStar(require("http")); + var net = __importStar2(require("net")); + var http3 = __importStar2(require("http")); var https_1 = require("https"); - __exportStar(require_helpers(), exports2); + __exportStar2(require_helpers(), exports2); var INTERNAL = Symbol("AgentBaseInternalState"); var Agent3 = class extends http3.Agent { constructor(opts) { @@ -25153,7 +25637,7 @@ var require_dist = __commonJS({ const { stack } = new Error(); if (typeof stack !== "string") return false; - return stack.split("\n").some((l3) => l3.indexOf("(https.js:") !== -1 || l3.indexOf("node:https:") !== -1); + return stack.split("\n").some((l5) => l5.indexOf("(https.js:") !== -1 || l5.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 @@ -25226,17 +25710,17 @@ var require_dist = __commonJS({ get defaultPort() { return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); } - set defaultPort(v5) { + set defaultPort(v8) { if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v5; + this[INTERNAL].defaultPort = v8; } } get protocol() { return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); } - set protocol(v5) { + set protocol(v8) { if (this[INTERNAL]) { - this[INTERNAL].protocol = v5; + this[INTERNAL].protocol = v8; } } }; @@ -25248,21 +25732,21 @@ var require_dist = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importDefault(require_src2()); + var debug_1 = __importDefault2(require_src2()); var debug3 = (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 b7 = socket.read(); - if (b7) - ondata(b7); + const b9 = socket.read(); + if (b9) + ondata(b9); else socket.once("readable", read); } @@ -25281,9 +25765,9 @@ var require_parse_proxy_response = __commonJS({ debug3("onerror %o", err); reject(err); } - function ondata(b7) { - buffers.push(b7); - buffersLength += b7.length; + function ondata(b9) { + buffers.push(b9); + buffersLength += b9.length; const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { @@ -25344,42 +25828,42 @@ var require_parse_proxy_response = __commonJS({ var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var assert_1 = __importDefault(require("assert")); - var debug_1 = __importDefault(require_src2()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src2()); var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); @@ -25460,11 +25944,11 @@ var require_dist2 = __commonJS({ socket.destroy(); const fakeSocket = new net.Socket({ writable: false }); fakeSocket.readable = true; - req.once("socket", (s2) => { + req.once("socket", (s4) => { debug3("Replaying proxy buffer for failed request"); - (0, assert_1.default)(s2.listenerCount("data") > 0); - s2.push(buffered); - s2.push(null); + (0, assert_1.default)(s4.listenerCount("data") > 0); + s4.push(buffered); + s4.push(null); }); return fakeSocket; } @@ -25491,41 +25975,41 @@ var require_dist2 = __commonJS({ var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var debug_1 = __importDefault(require_src2()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src2()); var events_1 = require("events"); var agent_base_1 = require_dist(); var url_1 = require("url"); @@ -25784,28 +26268,28 @@ var require_implementation = __commonJS({ var toStr = Object.prototype.toString; var max = Math.max; var funcType = "[object Function]"; - var concatty = function concatty2(a4, b7) { + var concatty = function concatty2(a6, b9) { var arr = []; - for (var i3 = 0; i3 < a4.length; i3 += 1) { - arr[i3] = a4[i3]; + for (var i5 = 0; i5 < a6.length; i5 += 1) { + arr[i5] = a6[i5]; } - for (var j4 = 0; j4 < b7.length; j4 += 1) { - arr[j4 + a4.length] = b7[j4]; + for (var j6 = 0; j6 < b9.length; j6 += 1) { + arr[j6 + a6.length] = b9[j6]; } return arr; }; var slicy = function slicy2(arrLike, offset) { var arr = []; - for (var i3 = offset || 0, j4 = 0; i3 < arrLike.length; i3 += 1, j4 += 1) { - arr[j4] = arrLike[i3]; + for (var i5 = offset || 0, j6 = 0; i5 < arrLike.length; i5 += 1, j6 += 1) { + arr[j6] = arrLike[i5]; } return arr; }; var joiny = function(arr, joiner) { var str2 = ""; - for (var i3 = 0; i3 < arr.length; i3 += 1) { - str2 += arr[i3]; - if (i3 + 1 < arr.length) { + for (var i5 = 0; i5 < arr.length; i5 += 1) { + str2 += arr[i5]; + if (i5 + 1 < arr.length) { str2 += joiner; } } @@ -25836,8 +26320,8 @@ var require_implementation = __commonJS({ }; var boundLength = max(0, target.length - args.length); var boundArgs = []; - for (var i3 = 0; i3 < boundLength; i3++) { - boundArgs[i3] = "$" + i3; + for (var i5 = 0; i5 < boundLength; i5++) { + boundArgs[i5] = "$" + i5; } bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { @@ -25888,14 +26372,14 @@ var require_get_intrinsic = __commonJS({ var getEvalledConstructor = function(expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); - } catch (e3) { + } catch (e5) { } }; var $gOPD = Object.getOwnPropertyDescriptor; if ($gOPD) { try { $gOPD({}, ""); - } catch (e3) { + } catch (e5) { $gOPD = null; } } @@ -25916,8 +26400,8 @@ var require_get_intrinsic = __commonJS({ }() : throwTypeError; var hasSymbols = require_has_symbols()(); var hasProto = require_has_proto()(); - var getProto = Object.getPrototypeOf || (hasProto ? function(x5) { - return x5.__proto__; + var getProto = Object.getPrototypeOf || (hasProto ? function(x7) { + return x7.__proto__; } : null); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); @@ -25994,8 +26478,8 @@ var require_get_intrinsic = __commonJS({ if (getProto) { try { null.error; - } catch (e3) { - errorProto = getProto(getProto(e3)); + } catch (e5) { + errorProto = getProto(getProto(e5)); INTRINSICS["%Error.prototype%"] = errorProto; } } @@ -26143,8 +26627,8 @@ var require_get_intrinsic = __commonJS({ intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } - for (var i3 = 1, isOwn = true; i3 < parts.length; i3 += 1) { - var part = parts[i3]; + for (var i5 = 1, isOwn = true; i5 < parts.length; i5 += 1) { + var part = parts[i5]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { @@ -26164,7 +26648,7 @@ var require_get_intrinsic = __commonJS({ } return void undefined2; } - if ($gOPD && i3 + 1 >= parts.length) { + if ($gOPD && i5 + 1 >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; if (isOwn && "get" in desc && !("originalValue" in desc.get)) { @@ -26195,7 +26679,7 @@ var require_es_define_property = __commonJS({ if ($defineProperty) { try { $defineProperty({}, "a", { value: 1 }); - } catch (e3) { + } catch (e5) { $defineProperty = false; } } @@ -26212,7 +26696,7 @@ var require_gopd = __commonJS({ if ($gOPD) { try { $gOPD([], "length"); - } catch (e3) { + } catch (e5) { $gOPD = null; } } @@ -26282,7 +26766,7 @@ var require_has_property_descriptors = __commonJS({ } try { return $defineProperty([], "length", { value: 1 }).length !== 1; - } catch (e3) { + } catch (e5) { return true; } }; @@ -26540,17 +27024,17 @@ var require_object_inspect = __commonJS({ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { - var s2 = "<" + $toLowerCase.call(String(obj.nodeName)); + var s4 = "<" + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; - for (var i3 = 0; i3 < attrs.length; i3++) { - s2 += " " + attrs[i3].name + "=" + wrapQuotes(quote(attrs[i3].value), "double", opts); + for (var i5 = 0; i5 < attrs.length; i5++) { + s4 += " " + attrs[i5].name + "=" + wrapQuotes(quote(attrs[i5].value), "double", opts); } - s2 += ">"; + s4 += ">"; if (obj.childNodes && obj.childNodes.length) { - s2 += "..."; + s4 += "..."; } - s2 += ""; - return s2; + s4 += ""; + return s4; } if (isArray2(obj)) { if (obj.length === 0) { @@ -26641,12 +27125,12 @@ var require_object_inspect = __commonJS({ } return String(obj); }; - function wrapQuotes(s2, defaultStyle, opts) { + function wrapQuotes(s4, defaultStyle, opts) { var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'"; - return quoteChar + s2 + quoteChar; + return quoteChar + s4 + quoteChar; } - function quote(s2) { - return $replace.call(String(s2), /"/g, """); + function quote(s4) { + return $replace.call(String(s4), /"/g, """); } function isArray2(obj) { return toStr(obj) === "[object Array]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); @@ -26682,7 +27166,7 @@ var require_object_inspect = __commonJS({ try { symToString.call(obj); return true; - } catch (e3) { + } catch (e5) { } return false; } @@ -26693,7 +27177,7 @@ var require_object_inspect = __commonJS({ try { bigIntValueOf.call(obj); return true; - } catch (e3) { + } catch (e5) { } return false; } @@ -26706,110 +27190,110 @@ var require_object_inspect = __commonJS({ function toStr(obj) { return objectToString.call(obj); } - function nameOf(f4) { - if (f4.name) { - return f4.name; + function nameOf(f6) { + if (f6.name) { + return f6.name; } - var m5 = $match.call(functionToString.call(f4), /^function\s*([\w$]+)/); - if (m5) { - return m5[1]; + var m7 = $match.call(functionToString.call(f6), /^function\s*([\w$]+)/); + if (m7) { + return m7[1]; } return null; } - function indexOf(xs, x5) { + function indexOf(xs, x7) { if (xs.indexOf) { - return xs.indexOf(x5); + return xs.indexOf(x7); } - for (var i3 = 0, l3 = xs.length; i3 < l3; i3++) { - if (xs[i3] === x5) { - return i3; + for (var i5 = 0, l5 = xs.length; i5 < l5; i5++) { + if (xs[i5] === x7) { + return i5; } } return -1; } - function isMap(x5) { - if (!mapSize || !x5 || typeof x5 !== "object") { + function isMap(x7) { + if (!mapSize || !x7 || typeof x7 !== "object") { return false; } try { - mapSize.call(x5); + mapSize.call(x7); try { - setSize.call(x5); - } catch (s2) { + setSize.call(x7); + } catch (s4) { return true; } - return x5 instanceof Map; - } catch (e3) { + return x7 instanceof Map; + } catch (e5) { } return false; } - function isWeakMap(x5) { - if (!weakMapHas || !x5 || typeof x5 !== "object") { + function isWeakMap(x7) { + if (!weakMapHas || !x7 || typeof x7 !== "object") { return false; } try { - weakMapHas.call(x5, weakMapHas); + weakMapHas.call(x7, weakMapHas); try { - weakSetHas.call(x5, weakSetHas); - } catch (s2) { + weakSetHas.call(x7, weakSetHas); + } catch (s4) { return true; } - return x5 instanceof WeakMap; - } catch (e3) { + return x7 instanceof WeakMap; + } catch (e5) { } return false; } - function isWeakRef(x5) { - if (!weakRefDeref || !x5 || typeof x5 !== "object") { + function isWeakRef(x7) { + if (!weakRefDeref || !x7 || typeof x7 !== "object") { return false; } try { - weakRefDeref.call(x5); + weakRefDeref.call(x7); return true; - } catch (e3) { + } catch (e5) { } return false; } - function isSet(x5) { - if (!setSize || !x5 || typeof x5 !== "object") { + function isSet(x7) { + if (!setSize || !x7 || typeof x7 !== "object") { return false; } try { - setSize.call(x5); + setSize.call(x7); try { - mapSize.call(x5); - } catch (m5) { + mapSize.call(x7); + } catch (m7) { return true; } - return x5 instanceof Set; - } catch (e3) { + return x7 instanceof Set; + } catch (e5) { } return false; } - function isWeakSet(x5) { - if (!weakSetHas || !x5 || typeof x5 !== "object") { + function isWeakSet(x7) { + if (!weakSetHas || !x7 || typeof x7 !== "object") { return false; } try { - weakSetHas.call(x5, weakSetHas); + weakSetHas.call(x7, weakSetHas); try { - weakMapHas.call(x5, weakMapHas); - } catch (s2) { + weakMapHas.call(x7, weakMapHas); + } catch (s4) { return true; } - return x5 instanceof WeakSet; - } catch (e3) { + return x7 instanceof WeakSet; + } catch (e5) { } return false; } - function isElement(x5) { - if (!x5 || typeof x5 !== "object") { + function isElement(x7) { + if (!x7 || typeof x7 !== "object") { return false; } - if (typeof HTMLElement !== "undefined" && x5 instanceof HTMLElement) { + if (typeof HTMLElement !== "undefined" && x7 instanceof HTMLElement) { return true; } - return typeof x5.nodeName === "string" && typeof x5.getAttribute === "function"; + return typeof x7.nodeName === "string" && typeof x7.getAttribute === "function"; } function inspectString(str2, opts) { if (str2.length > opts.maxStringLength) { @@ -26817,22 +27301,22 @@ var require_object_inspect = __commonJS({ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); return inspectString($slice.call(str2, 0, opts.maxStringLength), opts) + trailer; } - var s2 = $replace.call($replace.call(str2, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s2, "single", opts); + var s4 = $replace.call($replace.call(str2, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s4, "single", opts); } - function lowbyte(c3) { - var n2 = c3.charCodeAt(0); - var x5 = { + function lowbyte(c5) { + var n4 = c5.charCodeAt(0); + var x7 = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" - }[n2]; - if (x5) { - return "\\" + x5; + }[n4]; + if (x7) { + return "\\" + x7; } - return "\\x" + (n2 < 16 ? "0" : "") + $toUpperCase.call(n2.toString(16)); + return "\\x" + (n4 < 16 ? "0" : "") + $toUpperCase.call(n4.toString(16)); } function markBoxed(str2) { return "Object(" + str2 + ")"; @@ -26845,8 +27329,8 @@ var require_object_inspect = __commonJS({ return type2 + " (" + size + ") {" + joinedEntries + "}"; } function singleLineValues(xs) { - for (var i3 = 0; i3 < xs.length; i3++) { - if (indexOf(xs[i3], "\n") >= 0) { + for (var i5 = 0; i5 < xs.length; i5++) { + if (indexOf(xs[i5], "\n") >= 0) { return false; } } @@ -26878,16 +27362,16 @@ var require_object_inspect = __commonJS({ var xs = []; if (isArr) { xs.length = obj.length; - for (var i3 = 0; i3 < obj.length; i3++) { - xs[i3] = has(obj, i3) ? inspect3(obj[i3], obj) : ""; + for (var i5 = 0; i5 < obj.length; i5++) { + xs[i5] = has(obj, i5) ? inspect3(obj[i5], obj) : ""; } } var syms = typeof gOPS === "function" ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; - for (var k7 = 0; k7 < syms.length; k7++) { - symMap["$" + syms[k7]] = syms[k7]; + for (var k9 = 0; k9 < syms.length; k9++) { + symMap["$" + syms[k9]] = syms[k9]; } } for (var key in obj) { @@ -26906,9 +27390,9 @@ var require_object_inspect = __commonJS({ } } if (typeof gOPS === "function") { - for (var j4 = 0; j4 < syms.length; j4++) { - if (isEnumerable.call(obj, syms[j4])) { - xs.push("[" + inspect3(syms[j4]) + "]: " + inspect3(obj[syms[j4]], obj)); + for (var j6 = 0; j6 < syms.length; j6++) { + if (isEnumerable.call(obj, syms[j6])) { + xs.push("[" + inspect3(syms[j6]) + "]: " + inspect3(obj[syms[j6]], obj)); } } } @@ -27067,8 +27551,8 @@ var require_utils2 = __commonJS({ var isArray2 = Array.isArray; var hexTable = function() { var array = []; - for (var i3 = 0; i3 < 256; ++i3) { - array.push("%" + ((i3 < 16 ? "0" : "") + i3.toString(16)).toUpperCase()); + for (var i5 = 0; i5 < 256; ++i5) { + array.push("%" + ((i5 < 16 ? "0" : "") + i5.toString(16)).toUpperCase()); } return array; }(); @@ -27078,9 +27562,9 @@ var require_utils2 = __commonJS({ var obj = item.obj[item.prop]; if (isArray2(obj)) { var compacted = []; - for (var j4 = 0; j4 < obj.length; ++j4) { - if (typeof obj[j4] !== "undefined") { - compacted.push(obj[j4]); + for (var j6 = 0; j6 < obj.length; ++j6) { + if (typeof obj[j6] !== "undefined") { + compacted.push(obj[j6]); } } item.obj[item.prop] = compacted; @@ -27089,9 +27573,9 @@ var require_utils2 = __commonJS({ }; var arrayToObject2 = function arrayToObject3(source, options) { var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; - for (var i3 = 0; i3 < source.length; ++i3) { - if (typeof source[i3] !== "undefined") { - obj[i3] = source[i3]; + for (var i5 = 0; i5 < source.length; ++i5) { + if (typeof source[i5] !== "undefined") { + obj[i5] = source[i5]; } } return obj; @@ -27120,16 +27604,16 @@ var require_utils2 = __commonJS({ mergeTarget = arrayToObject2(target, options); } if (isArray2(target) && isArray2(source)) { - source.forEach(function(item, i3) { - if (has.call(target, i3)) { - var targetItem = target[i3]; + source.forEach(function(item, i5) { + if (has.call(target, i5)) { + var targetItem = target[i5]; if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { - target[i3] = merge3(targetItem, item, options); + target[i5] = merge3(targetItem, item, options); } else { target.push(item); } } else { - target[i3] = item; + target[i5] = item; } }); return target; @@ -27157,7 +27641,7 @@ var require_utils2 = __commonJS({ } try { return decodeURIComponent(strWithoutPlus); - } catch (e3) { + } catch (e5) { return strWithoutPlus; } }; @@ -27178,30 +27662,30 @@ var require_utils2 = __commonJS({ }); } var out = ""; - for (var j4 = 0; j4 < string.length; j4 += limit) { - var segment = string.length >= limit ? string.slice(j4, j4 + limit) : string; + for (var j6 = 0; j6 < string.length; j6 += limit) { + var segment = string.length >= limit ? string.slice(j6, j6 + limit) : string; var arr = []; - for (var i3 = 0; i3 < segment.length; ++i3) { - var c3 = segment.charCodeAt(i3); - if (c3 === 45 || c3 === 46 || c3 === 95 || c3 === 126 || c3 >= 48 && c3 <= 57 || c3 >= 65 && c3 <= 90 || c3 >= 97 && c3 <= 122 || format === formats.RFC1738 && (c3 === 40 || c3 === 41)) { - arr[arr.length] = segment.charAt(i3); + for (var i5 = 0; i5 < segment.length; ++i5) { + var c5 = segment.charCodeAt(i5); + if (c5 === 45 || c5 === 46 || c5 === 95 || c5 === 126 || c5 >= 48 && c5 <= 57 || c5 >= 65 && c5 <= 90 || c5 >= 97 && c5 <= 122 || format === formats.RFC1738 && (c5 === 40 || c5 === 41)) { + arr[arr.length] = segment.charAt(i5); continue; } - if (c3 < 128) { - arr[arr.length] = hexTable[c3]; + if (c5 < 128) { + arr[arr.length] = hexTable[c5]; continue; } - if (c3 < 2048) { - arr[arr.length] = hexTable[192 | c3 >> 6] + hexTable[128 | c3 & 63]; + if (c5 < 2048) { + arr[arr.length] = hexTable[192 | c5 >> 6] + hexTable[128 | c5 & 63]; continue; } - if (c3 < 55296 || c3 >= 57344) { - arr[arr.length] = hexTable[224 | c3 >> 12] + hexTable[128 | c3 >> 6 & 63] + hexTable[128 | c3 & 63]; + if (c5 < 55296 || c5 >= 57344) { + arr[arr.length] = hexTable[224 | c5 >> 12] + hexTable[128 | c5 >> 6 & 63] + hexTable[128 | c5 & 63]; continue; } - i3 += 1; - c3 = 65536 + ((c3 & 1023) << 10 | segment.charCodeAt(i3) & 1023); - arr[arr.length] = hexTable[240 | c3 >> 18] + hexTable[128 | c3 >> 12 & 63] + hexTable[128 | c3 >> 6 & 63] + hexTable[128 | c3 & 63]; + i5 += 1; + c5 = 65536 + ((c5 & 1023) << 10 | segment.charCodeAt(i5) & 1023); + arr[arr.length] = hexTable[240 | c5 >> 18] + hexTable[128 | c5 >> 12 & 63] + hexTable[128 | c5 >> 6 & 63] + hexTable[128 | c5 & 63]; } out += arr.join(""); } @@ -27210,12 +27694,12 @@ var require_utils2 = __commonJS({ var compact = function compact2(value) { var queue = [{ obj: { o: value }, prop: "o" }]; var refs = []; - for (var i3 = 0; i3 < queue.length; ++i3) { - var item = queue[i3]; + for (var i5 = 0; i5 < queue.length; ++i5) { + var item = queue[i5]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); - for (var j4 = 0; j4 < keys.length; ++j4) { - var key = keys[j4]; + for (var j6 = 0; j6 < keys.length; ++j6) { + var key = keys[j6]; var val = obj[key]; if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { queue.push({ obj, prop: key }); @@ -27235,14 +27719,14 @@ var require_utils2 = __commonJS({ } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; - var combine = function combine2(a4, b7) { - return [].concat(a4, b7); + var combine = function combine2(a6, b9) { + return [].concat(a6, b9); }; var maybeMap = function maybeMap2(val, fn) { if (isArray2(val)) { var mapped = []; - for (var i3 = 0; i3 < val.length; i3 += 1) { - mapped.push(fn(val[i3])); + for (var i5 = 0; i5 < val.length; i5 += 1) { + mapped.push(fn(val[i5])); } return mapped; } @@ -27312,11 +27796,11 @@ var require_stringify = __commonJS({ skipNulls: false, strictNullHandling: false }; - var isNonNullishPrimitive = function isNonNullishPrimitive2(v5) { - return typeof v5 === "string" || typeof v5 === "number" || typeof v5 === "boolean" || typeof v5 === "symbol" || typeof v5 === "bigint"; + var isNonNullishPrimitive = function isNonNullishPrimitive2(v8) { + return typeof v8 === "string" || typeof v8 === "number" || typeof v8 === "boolean" || typeof v8 === "symbol" || typeof v8 === "bigint"; }; var sentinel = {}; - var stringify2 = function stringify3(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { + var stringify4 = function stringify5(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { var obj = object; var tmpSc = sideChannel; var step = 0; @@ -27381,8 +27865,8 @@ var require_stringify = __commonJS({ if (allowEmptyArrays && isArray2(obj) && obj.length === 0) { return adjustedPrefix + "[]"; } - for (var j4 = 0; j4 < objKeys.length; ++j4) { - var key = objKeys[j4]; + for (var j6 = 0; j6 < objKeys.length; ++j6) { + var key = objKeys[j6]; var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key]; if (skipNulls && value === null) { continue; @@ -27392,7 +27876,7 @@ var require_stringify = __commonJS({ sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify3( + pushToArray(values, stringify5( value, keyPrefix, generateArrayPrefix, @@ -27503,12 +27987,12 @@ var require_stringify = __commonJS({ objKeys.sort(options.sort); } var sideChannel = getSideChannel(); - for (var i3 = 0; i3 < objKeys.length; ++i3) { - var key = objKeys[i3]; + for (var i5 = 0; i5 < objKeys.length; ++i5) { + var key = objKeys[i5]; if (options.skipNulls && obj[key] === null) { continue; } - pushToArray(keys, stringify2( + pushToArray(keys, stringify4( obj[key], key, generateArrayPrefix, @@ -27592,26 +28076,26 @@ var require_parse2 = __commonJS({ var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; - var i3; + var i5; var charset = options.charset; if (options.charsetSentinel) { - for (i3 = 0; i3 < parts.length; ++i3) { - if (parts[i3].indexOf("utf8=") === 0) { - if (parts[i3] === charsetSentinel) { + for (i5 = 0; i5 < parts.length; ++i5) { + if (parts[i5].indexOf("utf8=") === 0) { + if (parts[i5] === charsetSentinel) { charset = "utf-8"; - } else if (parts[i3] === isoSentinel) { + } else if (parts[i5] === isoSentinel) { charset = "iso-8859-1"; } - skipIndex = i3; - i3 = parts.length; + skipIndex = i5; + i5 = parts.length; } } } - for (i3 = 0; i3 < parts.length; ++i3) { - if (i3 === skipIndex) { + for (i5 = 0; i5 < parts.length; ++i5) { + if (i5 === skipIndex) { continue; } - var part = parts[i3]; + var part = parts[i5]; var bracketEqualsPos = part.indexOf("]="); var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; var key, val; @@ -27644,9 +28128,9 @@ var require_parse2 = __commonJS({ }; var parseObject = function(chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); - for (var i3 = chain.length - 1; i3 >= 0; --i3) { + for (var i5 = chain.length - 1; i5 >= 0; --i5) { var obj; - var root = chain[i3]; + var root = chain[i5]; if (root === "[]" && options.parseArrays) { obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : [].concat(leaf); } else { @@ -27685,9 +28169,9 @@ var require_parse2 = __commonJS({ } keys.push(parent); } - var i3 = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i3 < options.depth) { - i3 += 1; + var i5 = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i5 < options.depth) { + i5 += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; @@ -27757,8 +28241,8 @@ var require_parse2 = __commonJS({ var tempObj = typeof str2 === "string" ? parseValues(str2, options) : str2; var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; var keys = Object.keys(tempObj); - for (var i3 = 0; i3 < keys.length; ++i3) { - var key = keys[i3]; + for (var i5 = 0; i5 < keys.length; ++i5) { + var key = keys[i5]; var newObj = parseKeys(key, tempObj[key], options, typeof str2 === "string"); obj = utils.merge(obj, newObj, options); } @@ -27774,13 +28258,13 @@ var require_parse2 = __commonJS({ var require_lib3 = __commonJS({ "node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; - var stringify2 = require_stringify(); - var parse = require_parse2(); + var stringify4 = require_stringify(); + var parse3 = require_parse2(); var formats = require_formats(); module2.exports = { formats, - parse, - stringify: stringify2 + parse: parse3, + stringify: stringify4 }; } }); @@ -27795,7 +28279,7 @@ var require_url = __commonJS({ function pathToFunc(pathPattern, options) { const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; return function buildURLPath(params = {}) { - return pathPattern.replace(paramRE, function(_7, placeholder) { + return pathPattern.replace(paramRE, function(_8, placeholder) { if (!hasOwn3.call(params, placeholder)) { throw new Error(`Parameter '${placeholder}' is required`); } @@ -27823,15 +28307,15 @@ var require_config = __commonJS({ [exports2.ServerEu]: "https://api.mistral.ai" }; function serverURLFromOptions(options) { - var _a5; + var _a6; let serverURL = options.serverURL; const params = {}; if (!serverURL) { - const server = (_a5 = options.server) !== null && _a5 !== void 0 ? _a5 : exports2.ServerEu; + const server = (_a6 = options.server) !== null && _a6 !== void 0 ? _a6 : exports2.ServerEu; serverURL = exports2.ServerList[server] || ""; } - const u3 = (0, url_js_1.pathToFunc)(serverURL)(params); - return new URL(u3); + const u5 = (0, url_js_1.pathToFunc)(serverURL)(params); + return new URL(u5); } exports2.SDK_METADATA = { language: "typescript", @@ -27882,9 +28366,9 @@ var require_custom_user_agent = __commonJS({ exports2.CustomUserAgentHook = void 0; var config_1 = require_config(); var CustomUserAgentHook = class { - beforeRequest(_7, request3) { - const version = config_1.SDK_METADATA.sdkVersion; - const ua = `mistral-client-typescript/${version}`; + beforeRequest(_8, request3) { + const version3 = config_1.SDK_METADATA.sdkVersion; + const ua = `mistral-client-typescript/${version3}`; request3.headers.set("user-agent", ua); if (!request3.headers.get("user-agent")) { request3.headers.set("x-mistral-user-agent", ua); @@ -27904,7 +28388,7 @@ var require_deprecation_warning = __commonJS({ exports2.DeprecationWarningHook = void 0; var HEADER_MODEL_DEPRECATION_TIMESTAMP = "x-model-deprecation-timestamp"; var DeprecationWarningHook = class { - afterSuccess(_7, response) { + afterSuccess(_8, response) { if (response.headers.has(HEADER_MODEL_DEPRECATION_TIMESTAMP)) { response.clone().json().then((body) => { const model = body.model; @@ -28078,18 +28562,18 @@ var require_fp = __commonJS({ function ERR(error) { return { ok: false, error }; } - function unwrap(r3) { - if (!r3.ok) { - throw r3.error; + function unwrap(r5) { + if (!r5.ok) { + throw r5.error; } - return r3.value; + return r5.value; } async function unwrapAsync(pr2) { - const r3 = await pr2; - if (!r3.ok) { - throw r3.error; + const r5 = await pr2; + if (!r5.ok) { + throw r5.error; } - return r3.value; + return r5.value; } } }); @@ -28118,16 +28602,16 @@ var require_util = __commonJS({ return obj; }; util5.getValidEnumValues = (obj) => { - const validKeys = util5.objectKeys(obj).filter((k7) => typeof obj[obj[k7]] !== "number"); + const validKeys = util5.objectKeys(obj).filter((k9) => typeof obj[obj[k9]] !== "number"); const filtered = {}; - for (const k7 of validKeys) { - filtered[k7] = obj[k7]; + for (const k9 of validKeys) { + filtered[k9] = obj[k9]; } return util5.objectValues(filtered); }; util5.objectValues = (obj) => { - return util5.objectKeys(obj).map(function(e3) { - return obj[e3]; + return util5.objectKeys(obj).map(function(e5) { + return obj[e5]; }); }; util5.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => { @@ -28151,7 +28635,7 @@ var require_util = __commonJS({ return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator); } util5.joinValues = joinValues; - util5.jsonStringifyReplacer = (_7, value) => { + util5.jsonStringifyReplacer = (_8, value) => { if (typeof value === "bigint") { return value.toString(); } @@ -28191,8 +28675,8 @@ var require_util = __commonJS({ "set" ]); var getParsedType = (data) => { - const t2 = typeof data; - switch (t2) { + const t4 = typeof data; + switch (t4) { case "undefined": return exports2.ZodParsedType.undefined; case "string": @@ -28304,10 +28788,10 @@ var require_ZodError = __commonJS({ fieldErrors._errors.push(mapper(issue)); } else { let curr = fieldErrors; - let i3 = 0; - while (i3 < issue.path.length) { - const el = issue.path[i3]; - const terminal = i3 === issue.path.length - 1; + let i5 = 0; + while (i5 < issue.path.length) { + const el = issue.path[i5]; + const terminal = i5 === issue.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { @@ -28315,7 +28799,7 @@ var require_ZodError = __commonJS({ curr[el]._errors.push(mapper(issue)); } curr = curr[el]; - i3++; + i5++; } } } @@ -28475,16 +28959,16 @@ var require_en = __commonJS({ var require_errors = __commonJS({ "node_modules/zod/lib/errors.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getErrorMap = exports2.setErrorMap = exports2.defaultErrorMap = void 0; - var en_1 = __importDefault(require_en()); + var en_1 = __importDefault2(require_en()); exports2.defaultErrorMap = en_1.default; var overrideErrorMap = en_1.default; - function setErrorMap(map) { - overrideErrorMap = map; + function setErrorMap(map2) { + overrideErrorMap = map2; } exports2.setErrorMap = setErrorMap; function getErrorMap() { @@ -28498,13 +28982,13 @@ var require_errors = __commonJS({ var require_parseUtil = __commonJS({ "node_modules/zod/lib/helpers/parseUtil.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAsync = exports2.isValid = exports2.isDirty = exports2.isAborted = exports2.OK = exports2.DIRTY = exports2.INVALID = exports2.ParseStatus = exports2.addIssueToContext = exports2.EMPTY_PATH = exports2.makeIssue = void 0; var errors_1 = require_errors(); - var en_1 = __importDefault(require_en()); + var en_1 = __importDefault2(require_en()); var makeIssue = (params) => { const { data, path: path5, errorMaps, issueData } = params; const fullPath = [...path5, ...issueData.path || []]; @@ -28520,9 +29004,9 @@ var require_parseUtil = __commonJS({ }; } let errorMessage = ""; - const maps = errorMaps.filter((m5) => !!m5).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + const maps = errorMaps.filter((m7) => !!m7).slice().reverse(); + for (const map2 of maps) { + errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message; } return { ...issueData, @@ -28544,7 +29028,7 @@ var require_parseUtil = __commonJS({ overrideMap, overrideMap === en_1.default ? void 0 : en_1.default // then global default map - ].filter((x5) => !!x5) + ].filter((x7) => !!x7) }); ctx.common.issues.push(issue); } @@ -28563,12 +29047,12 @@ var require_parseUtil = __commonJS({ } static mergeArray(status, results) { const arrayValue = []; - for (const s2 of results) { - if (s2.status === "aborted") + for (const s4 of results) { + if (s4.status === "aborted") return exports2.INVALID; - if (s2.status === "dirty") + if (s4.status === "dirty") status.dirty(); - arrayValue.push(s2.value); + arrayValue.push(s4.value); } return { status: status.value, value: arrayValue }; } @@ -28611,13 +29095,13 @@ var require_parseUtil = __commonJS({ exports2.DIRTY = DIRTY; var OK = (value) => ({ status: "valid", value }); exports2.OK = OK; - var isAborted = (x5) => x5.status === "aborted"; + var isAborted = (x7) => x7.status === "aborted"; exports2.isAborted = isAborted; - var isDirty = (x5) => x5.status === "dirty"; + var isDirty = (x7) => x7.status === "dirty"; exports2.isDirty = isDirty; - var isValid = (x5) => x5.status === "valid"; + var isValid = (x7) => x7.status === "valid"; exports2.isValid = isValid; - var isAsync = (x5) => typeof Promise !== "undefined" && x5 instanceof Promise; + var isAsync = (x7) => typeof Promise !== "undefined" && x7 instanceof Promise; exports2.isAsync = isAsync; } }); @@ -28648,16 +29132,16 @@ var require_errorUtil = __commonJS({ var require_types = __commonJS({ "node_modules/zod/lib/types.js"(exports2) { "use strict"; - var __classPrivateFieldGet13 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + var __classPrivateFieldGet14 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; - var __classPrivateFieldSet11 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state2, value, kind3, f4) { + var __classPrivateFieldSet12 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; var _ZodEnum_cache; var _ZodNativeEnum_cache; @@ -28717,13 +29201,13 @@ var require_types = __commonJS({ if (errorMap) return { errorMap, description }; const customMap = (iss, ctx) => { - var _a5, _b2; + var _a6, _b2; const { message } = params; if (iss.code === "invalid_enum_value") { return { message: message !== null && message !== void 0 ? message : ctx.defaultError }; } if (typeof ctx.data === "undefined") { - return { message: (_a5 = message !== null && message !== void 0 ? message : required_error) !== null && _a5 !== void 0 ? _a5 : ctx.defaultError }; + return { message: (_a6 = message !== null && message !== void 0 ? message : required_error) !== null && _a6 !== void 0 ? _a6 : ctx.defaultError }; } if (iss.code !== "invalid_type") return { message: ctx.defaultError }; @@ -28807,11 +29291,11 @@ var require_types = __commonJS({ throw result.error; } safeParse(data, params) { - var _a5; + var _a6; const ctx = { common: { issues: [], - async: (_a5 = params === null || params === void 0 ? void 0 : params.async) !== null && _a5 !== void 0 ? _a5 : false, + async: (_a6 = params === null || params === void 0 ? void 0 : params.async) !== null && _a6 !== void 0 ? _a6 : false, contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap }, path: (params === null || params === void 0 ? void 0 : params.path) || [], @@ -29013,11 +29497,11 @@ var require_types = __commonJS({ return new RegExp(`^${regex}$`); } exports2.datetimeRegex = datetimeRegex; - function isValidIP(ip, version) { - if ((version === "v4" || !version) && ipv4Regex.test(ip)) { + function isValidIP(ip, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex.test(ip)) { return true; } - if ((version === "v6" || !version) && ipv6Regex.test(ip)) { + if ((version3 === "v6" || !version3) && ipv6Regex.test(ip)) { return true; } return false; @@ -29168,7 +29652,7 @@ var require_types = __commonJS({ } else if (check.kind === "url") { try { new URL(input.data); - } catch (_a5) { + } catch (_a6) { ctx = this._getOrReturnCtx(input, ctx); (0, parseUtil_1.addIssueToContext)(ctx, { validation: "url", @@ -29338,7 +29822,7 @@ var require_types = __commonJS({ return this._addCheck({ kind: "ip", ...errorUtil_1.errorUtil.errToObj(options) }); } datetime(options) { - var _a5, _b2; + var _a6, _b2; if (typeof options === "string") { return this._addCheck({ kind: "datetime", @@ -29351,7 +29835,7 @@ var require_types = __commonJS({ return this._addCheck({ kind: "datetime", precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, - offset: (_a5 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a5 !== void 0 ? _a5 : false, + offset: (_a6 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a6 !== void 0 ? _a6 : false, local: (_b2 = options === null || options === void 0 ? void 0 : options.local) !== null && _b2 !== void 0 ? _b2 : false, ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) }); @@ -29516,11 +30000,11 @@ var require_types = __commonJS({ }; exports2.ZodString = ZodString; ZodString.create = (params) => { - var _a5; + var _a6; return new ZodString({ checks: [], typeName: ZodFirstPartyTypeKind.ZodString, - coerce: (_a5 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a5 !== void 0 ? _a5 : false, + coerce: (_a6 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a6 !== void 0 ? _a6 : false, ...processCreateParams(params) }); }; @@ -29923,11 +30407,11 @@ var require_types = __commonJS({ }; exports2.ZodBigInt = ZodBigInt; ZodBigInt.create = (params) => { - var _a5; + var _a6; return new ZodBigInt({ checks: [], typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: (_a5 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a5 !== void 0 ? _a5 : false, + coerce: (_a6 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a6 !== void 0 ? _a6 : false, ...processCreateParams(params) }); }; @@ -30260,14 +30744,14 @@ var require_types = __commonJS({ } } if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i3) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3)); + return Promise.all([...ctx.data].map((item, i5) => { + return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i5)); })).then((result2) => { return parseUtil_1.ParseStatus.mergeArray(status, result2); }); } - const result = [...ctx.data].map((item, i3) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3)); + const result = [...ctx.data].map((item, i5) => { + return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i5)); }); return parseUtil_1.ParseStatus.mergeArray(status, result); } @@ -30443,8 +30927,8 @@ var require_types = __commonJS({ unknownKeys: "strict", ...message !== void 0 ? { errorMap: (issue, ctx) => { - var _a5, _b2, _c2, _d2; - const defaultError = (_c2 = (_b2 = (_a5 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a5, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError; + var _a6, _b2, _c2, _d2; + const defaultError = (_c2 = (_b2 = (_a6 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a6, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError; if (issue.code === "unrecognized_keys") return { message: (_d2 = errorUtil_1.errorUtil.errToObj(message).message) !== null && _d2 !== void 0 ? _d2 : defaultError @@ -30872,17 +31356,17 @@ var require_types = __commonJS({ } }; exports2.ZodDiscriminatedUnion = ZodDiscriminatedUnion; - function mergeValues(a4, b7) { - const aType = (0, util_1.getParsedType)(a4); - const bType = (0, util_1.getParsedType)(b7); - if (a4 === b7) { - return { valid: true, data: a4 }; + function mergeValues(a6, b9) { + const aType = (0, util_1.getParsedType)(a6); + const bType = (0, util_1.getParsedType)(b9); + if (a6 === b9) { + return { valid: true, data: a6 }; } else if (aType === util_1.ZodParsedType.object && bType === util_1.ZodParsedType.object) { - const bKeys = util_1.util.objectKeys(b7); - const sharedKeys = util_1.util.objectKeys(a4).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a4, ...b7 }; + const bKeys = util_1.util.objectKeys(b9); + const sharedKeys = util_1.util.objectKeys(a6).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a6, ...b9 }; for (const key of sharedKeys) { - const sharedValue = mergeValues(a4[key], b7[key]); + const sharedValue = mergeValues(a6[key], b9[key]); if (!sharedValue.valid) { return { valid: false }; } @@ -30890,13 +31374,13 @@ var require_types = __commonJS({ } return { valid: true, data: newObj }; } else if (aType === util_1.ZodParsedType.array && bType === util_1.ZodParsedType.array) { - if (a4.length !== b7.length) { + if (a6.length !== b9.length) { return { valid: false }; } const newArray = []; - for (let index = 0; index < a4.length; index++) { - const itemA = a4[index]; - const itemB = b7[index]; + for (let index = 0; index < a6.length; index++) { + const itemA = a6[index]; + const itemB = b9[index]; const sharedValue = mergeValues(itemA, itemB); if (!sharedValue.valid) { return { valid: false }; @@ -30904,8 +31388,8 @@ var require_types = __commonJS({ newArray.push(sharedValue.data); } return { valid: true, data: newArray }; - } else if (aType === util_1.ZodParsedType.date && bType === util_1.ZodParsedType.date && +a4 === +b7) { - return { valid: true, data: a4 }; + } else if (aType === util_1.ZodParsedType.date && bType === util_1.ZodParsedType.date && +a6 === +b9) { + return { valid: true, data: a6 }; } else { return { valid: false }; } @@ -31001,7 +31485,7 @@ var require_types = __commonJS({ if (!schema) return null; return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }).filter((x5) => !!x5); + }).filter((x7) => !!x7); if (ctx.common.async) { return Promise.all(items).then((results) => { return parseUtil_1.ParseStatus.mergeArray(status, results); @@ -31203,7 +31687,7 @@ var require_types = __commonJS({ } return { status: status.value, value: parsedSet }; } - const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3))); + const elements = [...ctx.data.values()].map((item, i5) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i5))); if (ctx.common.async) { return Promise.all(elements).then((elements2) => finalizeSet(elements2)); } else { @@ -31263,7 +31747,7 @@ var require_types = __commonJS({ ctx.schemaErrorMap, (0, errors_1.getErrorMap)(), errors_1.defaultErrorMap - ].filter((x5) => !!x5), + ].filter((x7) => !!x7), issueData: { code: ZodError_1.ZodIssueCode.invalid_arguments, argumentsError: error @@ -31279,7 +31763,7 @@ var require_types = __commonJS({ ctx.schemaErrorMap, (0, errors_1.getErrorMap)(), errors_1.defaultErrorMap - ].filter((x5) => !!x5), + ].filter((x7) => !!x7), issueData: { code: ZodError_1.ZodIssueCode.invalid_return_type, returnTypeError: error @@ -31292,13 +31776,13 @@ var require_types = __commonJS({ const me2 = this; return (0, parseUtil_1.OK)(async function(...args) { const error = new ZodError_1.ZodError([]); - const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e3) => { - error.addIssue(makeArgsIssue(args, e3)); + const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e5) => { + error.addIssue(makeArgsIssue(args, e5)); throw error; }); const result = await Reflect.apply(fn, this, parsedArgs); - const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e3) => { - error.addIssue(makeReturnsIssue(result, e3)); + const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e5) => { + error.addIssue(makeReturnsIssue(result, e5)); throw error; }); return parsedReturns; @@ -31421,10 +31905,10 @@ var require_types = __commonJS({ }); return parseUtil_1.INVALID; } - if (!__classPrivateFieldGet13(this, _ZodEnum_cache, "f")) { - __classPrivateFieldSet11(this, _ZodEnum_cache, new Set(this._def.values), "f"); + if (!__classPrivateFieldGet14(this, _ZodEnum_cache, "f")) { + __classPrivateFieldSet12(this, _ZodEnum_cache, new Set(this._def.values), "f"); } - if (!__classPrivateFieldGet13(this, _ZodEnum_cache, "f").has(input.data)) { + if (!__classPrivateFieldGet14(this, _ZodEnum_cache, "f").has(input.data)) { const ctx = this._getOrReturnCtx(input); const expectedValues = this._def.values; (0, parseUtil_1.addIssueToContext)(ctx, { @@ -31493,10 +31977,10 @@ var require_types = __commonJS({ }); return parseUtil_1.INVALID; } - if (!__classPrivateFieldGet13(this, _ZodNativeEnum_cache, "f")) { - __classPrivateFieldSet11(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), "f"); + if (!__classPrivateFieldGet14(this, _ZodNativeEnum_cache, "f")) { + __classPrivateFieldSet12(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), "f"); } - if (!__classPrivateFieldGet13(this, _ZodNativeEnum_cache, "f").has(input.data)) { + if (!__classPrivateFieldGet14(this, _ZodNativeEnum_cache, "f").has(input.data)) { const expectedValues = util_1.util.objectValues(nativeEnumValues); (0, parseUtil_1.addIssueToContext)(ctx, { received: ctx.data, @@ -31894,10 +32378,10 @@ var require_types = __commonJS({ } } } - static create(a4, b7) { + static create(a6, b9) { return new _ZodPipeline({ - in: a4, - out: b7, + in: a6, + out: b9, typeName: ZodFirstPartyTypeKind.ZodPipeline }); } @@ -31929,11 +32413,11 @@ var require_types = __commonJS({ function custom2(check, params = {}, fatal) { if (check) return ZodAny.create().superRefine((data, ctx) => { - var _a5, _b2; + var _a6, _b2; if (!check(data)) { - const p4 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const _fatal = (_b2 = (_a5 = p4.fatal) !== null && _a5 !== void 0 ? _a5 : fatal) !== null && _b2 !== void 0 ? _b2 : true; - const p22 = typeof p4 === "string" ? { message: p4 } : p4; + const p6 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; + const _fatal = (_b2 = (_a6 = p6.fatal) !== null && _a6 !== void 0 ? _a6 : fatal) !== null && _b2 !== void 0 ? _b2 : true; + const p22 = typeof p6 === "string" ? { message: p6 } : p6; ctx.addIssue({ code: "custom", ...p22, fatal: _fatal }); } }); @@ -32079,25 +32563,25 @@ var require_types = __commonJS({ var require_external = __commonJS({ "node_modules/zod/lib/external.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m5[k7]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m7[k9]; } }); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_errors(), exports2); - __exportStar(require_parseUtil(), exports2); - __exportStar(require_typeAliases(), exports2); - __exportStar(require_util(), exports2); - __exportStar(require_types(), exports2); - __exportStar(require_ZodError(), exports2); + __exportStar2(require_errors(), exports2); + __exportStar2(require_parseUtil(), exports2); + __exportStar2(require_typeAliases(), exports2); + __exportStar2(require_util(), exports2); + __exportStar2(require_types(), exports2); + __exportStar2(require_ZodError(), exports2); } }); @@ -32105,38 +32589,38 @@ var require_external = __commonJS({ var require_lib4 = __commonJS({ "node_modules/zod/lib/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m5[k7]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m7[k9]; } }); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.z = void 0; - var z6 = __importStar(require_external()); - exports2.z = z6; - __exportStar(require_external(), exports2); - exports2.default = z6; + var z7 = __importStar2(require_external()); + exports2.z = z7; + __exportStar2(require_external(), exports2); + exports2.default = z7; } }); @@ -32144,62 +32628,62 @@ var require_lib4 = __commonJS({ var require_base64 = __commonJS({ "node_modules/@mistralai/mistralai/lib/base64.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.zodInbound = exports2.zodOutbound = void 0; exports2.bytesToBase64 = bytesToBase64; exports2.bytesFromBase64 = bytesFromBase64; - exports2.stringToBytes = stringToBytes; + exports2.stringToBytes = stringToBytes3; exports2.stringFromBytes = stringFromBytes; exports2.stringToBase64 = stringToBase64; exports2.stringFromBase64 = stringFromBase64; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); function bytesToBase64(u8arr) { return btoa(String.fromCodePoint(...u8arr)); } function bytesFromBase64(encoded) { - return Uint8Array.from(atob(encoded), (c3) => c3.charCodeAt(0)); + return Uint8Array.from(atob(encoded), (c5) => c5.charCodeAt(0)); } - function stringToBytes(str2) { + function stringToBytes3(str2) { return new TextEncoder().encode(str2); } function stringFromBytes(u8arr) { return new TextDecoder().decode(u8arr); } function stringToBase64(str2) { - return bytesToBase64(stringToBytes(str2)); + return bytesToBase64(stringToBytes3(str2)); } function stringFromBase64(b64str) { return stringFromBytes(bytesFromBase64(b64str)); } - exports2.zodOutbound = z6.instanceof(Uint8Array).or(z6.string().transform(stringToBytes)); - exports2.zodInbound = z6.instanceof(Uint8Array).or(z6.string().transform(bytesFromBase64)); + exports2.zodOutbound = z7.instanceof(Uint8Array).or(z7.string().transform(stringToBytes3)); + exports2.zodInbound = z7.instanceof(Uint8Array).or(z7.string().transform(bytesFromBase64)); } }); @@ -32245,20 +32729,20 @@ var require_encodings = __commonJS({ function encodeMatrix(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; - const encodeValue = (v5) => encodeString(serializeValue(v5)); + const encodeValue = (v8) => encodeString(serializeValue(v8)); pairs.forEach(([pk, pv]) => { let tmp = ""; let encValue = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v5) => `${encodeValue(v5)}`).join(","); + encValue = mapDefined(pv, (v8) => `${encodeValue(v8)}`).join(","); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k7, v5]) => { - return `,${encodeString(k7)},${encodeValue(v5)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k9, v8]) => { + return `,${encodeString(k9)},${encodeValue(v8)}`; }).join(""); encValue = encValue.slice(1); } else { @@ -32279,24 +32763,24 @@ var require_encodings = __commonJS({ function encodeLabel(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; - const encodeValue = (v5) => encodeString(serializeValue(v5)); + const encodeValue = (v8) => encodeString(serializeValue(v8)); pairs.forEach(([pk, pv]) => { let encValue = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v5) => `${encodeValue(v5)}`).join("."); + encValue = mapDefined(pv, (v8) => `${encodeValue(v8)}`).join("."); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k7, v5]) => { - return `.${encodeString(k7)}.${encodeValue(v5)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k9, v8]) => { + return `.${encodeString(k9)}.${encodeValue(v8)}`; }).join(""); encValue = encValue.slice(1); } else { - const k7 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${encodeString(pk)}=` : ""; - encValue = `${k7}${encodeValue(pv)}`; + const k9 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k9}${encodeValue(pv)}`; } out += `.${encValue}`; }); @@ -32306,10 +32790,10 @@ var require_encodings = __commonJS({ return (key, value, options) => { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; - const encodeValue = (v5) => encodeString(serializeValue(v5)); + const encodeValue = (v8) => encodeString(serializeValue(v8)); const encodedSep = encodeString(sep); pairs.forEach(([pk, pv]) => { let tmp = ""; @@ -32317,10 +32801,10 @@ var require_encodings = __commonJS({ if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v5) => `${encodeValue(v5)}`).join(encodedSep); + encValue = mapDefined(pv, (v8) => `${encodeValue(v8)}`).join(encodedSep); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k7, v5]) => { - return `${encodeString(k7)}${encodedSep}${encodeValue(v5)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k9, v8]) => { + return `${encodeString(k9)}${encodedSep}${encodeValue(v8)}`; }).join(encodedSep); } else { encValue = `${encodeValue(pv)}`; @@ -32340,10 +32824,10 @@ var require_encodings = __commonJS({ function encodeBodyForm(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; - const encodeValue = (v5) => encodeString(serializeValue(v5)); + const encodeValue = (v8) => encodeString(serializeValue(v8)); pairs.forEach(([pk, pv]) => { let tmp = ""; let encValue = ""; @@ -32378,8 +32862,8 @@ var require_encodings = __commonJS({ return ""; } let out = ""; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; if (!(0, is_plain_object_js_1.isPlainObject)(value)) { throw new EncodingError(`Expected parameter '${key}' to be an object.`); @@ -32396,8 +32880,8 @@ var require_encodings = __commonJS({ } const pairs = Array.isArray(cv) ? cv : [cv]; let encoded = ""; - encoded = mapDefined(pairs, (v5) => { - return `${encodeString(pk)}=${encodeString(serializeValue(v5))}`; + encoded = mapDefined(pairs, (v8) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v8))}`; }).join("&"); out += `&${encoded}`; }); @@ -32407,8 +32891,8 @@ var require_encodings = __commonJS({ if (typeof value === "undefined") { return ""; } - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; const encVal = encodeString(JSON.stringify(value, jsonReplacer)); return (options === null || options === void 0 ? void 0 : options.explode) ? encVal : `${encodeString(key)}=${encVal}`; @@ -32416,24 +32900,24 @@ var require_encodings = __commonJS({ var encodeSimple = (key, value, options) => { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v5) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v5) : v5; + const encodeString = (v8) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v8) : v8; }; - const encodeValue = (v5) => encodeString(serializeValue(v5)); + const encodeValue = (v8) => encodeString(serializeValue(v8)); pairs.forEach(([pk, pv]) => { let tmp = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v5) => `${encodeValue(v5)}`).join(","); + tmp = mapDefined(pv, (v8) => `${encodeValue(v8)}`).join(","); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k7, v5]) => { - return `,${encodeString(k7)},${encodeValue(v5)}`; + tmp = mapDefinedEntries(Object.entries(pv), ([k9, v8]) => { + return `,${encodeString(k9)},${encodeValue(v8)}`; }).join(""); tmp = tmp.slice(1); } else { - const k7 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${pk}=` : ""; - tmp = `${k7}${encodeValue(pv)}`; + const k9 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${pk}=` : ""; + tmp = `${k9}${encodeValue(pv)}`; } if (!tmp) { return; @@ -32445,10 +32929,10 @@ var require_encodings = __commonJS({ exports2.encodeSimple = encodeSimple; function explode(key, value) { if (Array.isArray(value)) { - return value.map((v5) => [key, v5]); + return value.map((v8) => [key, v8]); } else if ((0, is_plain_object_js_1.isPlainObject)(value)) { - const o3 = value !== null && value !== void 0 ? value : {}; - return Object.entries(o3).map(([k7, v5]) => [k7, v5]); + const o5 = value !== null && value !== void 0 ? value : {}; + return Object.entries(o5).map(([k9, v8]) => [k9, v8]); } else { return [[key, value]]; } @@ -32467,7 +32951,7 @@ var require_encodings = __commonJS({ } return `${value}`; } - function jsonReplacer(_7, value) { + function jsonReplacer(_8, value) { if (value instanceof Uint8Array) { return (0, base64_js_1.bytesToBase64)(value); } else { @@ -32475,45 +32959,45 @@ var require_encodings = __commonJS({ } } function mapDefined(inp, mapper) { - return inp.reduce((acc, v5) => { - if (v5 === void 0) { + return inp.reduce((acc, v8) => { + if (v8 === void 0) { return acc; } - const m5 = mapper(v5); - if (m5 === void 0) { + const m7 = mapper(v8); + if (m7 === void 0) { return acc; } - acc.push(m5); + acc.push(m7); return acc; }, []); } function mapDefinedEntries(inp, mapper) { const acc = []; - for (const [k7, v5] of inp) { - if (v5 === void 0) { + for (const [k9, v8] of inp) { + if (v8 === void 0) { continue; } - const m5 = mapper([k7, v5]); - if (m5 === void 0) { + const m7 = mapper([k9, v8]); + if (m7 === void 0) { continue; } - acc.push(m5); + acc.push(m7); } return acc; } function queryJoin(...args) { return args.filter(Boolean).join("&"); } - function queryEncoder(f4) { + function queryEncoder(f6) { const bulkEncode = function(values, options) { - var _a5, _b2; + var _a6, _b2; const opts = { ...options, - explode: (_a5 = options === null || options === void 0 ? void 0 : options.explode) !== null && _a5 !== void 0 ? _a5 : true, + explode: (_a6 = options === null || options === void 0 ? void 0 : options.explode) !== null && _a6 !== void 0 ? _a6 : true, charEncoding: (_b2 = options === null || options === void 0 ? void 0 : options.charEncoding) !== null && _b2 !== void 0 ? _b2 : "percent" }; const encoded = Object.entries(values).map(([key, value]) => { - return f4(key, value, opts); + return f6(key, value, opts); }); return queryJoin(...encoded); }; @@ -32533,11 +33017,11 @@ var require_dlv = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.dlv = dlv; - function dlv(obj, key, def, p4, undef) { + function dlv(obj, key, def, p6, undef) { key = Array.isArray(key) ? key : key.split("."); - for (p4 = 0; p4 < key.length; p4++) { - const k7 = key[p4]; - obj = k7 != null && obj ? obj[k7] : undef; + for (p6 = 0; p6 < key.length; p6++) { + const k9 = key[p6]; + obj = k9 != null && obj ? obj[k9] : undef; } return obj === undef ? def : obj; } @@ -32548,31 +33032,31 @@ var require_dlv = __commonJS({ var require_env = __commonJS({ "node_modules/@mistralai/mistralai/lib/env.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -32580,18 +33064,18 @@ var require_env = __commonJS({ exports2.env = env2; exports2.resetEnv = resetEnv; var dlv_js_1 = require_dlv(); - var z6 = __importStar(require_lib4()); - exports2.envSchema = z6.object({ - MISTRAL_API_KEY: z6.string().optional(), - MISTRAL_DEBUG: z6.coerce.boolean().optional() + var z7 = __importStar2(require_lib4()); + exports2.envSchema = z7.object({ + MISTRAL_API_KEY: z7.string().optional(), + MISTRAL_DEBUG: z7.coerce.boolean().optional() }); var envMemo = void 0; function env2() { - var _a5, _b2; + var _a6, _b2; if (envMemo) { return envMemo; } - envMemo = exports2.envSchema.parse((_b2 = (_a5 = (0, dlv_js_1.dlv)(globalThis, "process.env")) !== null && _a5 !== void 0 ? _a5 : (0, dlv_js_1.dlv)(globalThis, "Deno.env")) !== null && _b2 !== void 0 ? _b2 : {}); + envMemo = exports2.envSchema.parse((_b2 = (_a6 = (0, dlv_js_1.dlv)(globalThis, "process.env")) !== null && _a6 !== void 0 ? _a6 : (0, dlv_js_1.dlv)(globalThis, "Deno.env")) !== null && _b2 !== void 0 ? _b2 : {}); return envMemo; } function resetEnv() { @@ -32671,7 +33155,7 @@ var require_http = __commonJS({ } else { throw new Error(`Invalid hook type: ${args[0]}`); } - const index = target.findIndex((v5) => v5 === args[1]); + const index = target.findIndex((v8) => v8 === args[1]); if (index >= 0) { target.splice(index, 1); } @@ -32688,11 +33172,11 @@ var require_http = __commonJS({ exports2.HTTPClient = HTTPClient; var mediaParamSeparator = /\s*;\s*/g; function matchContentType(response, pattern) { - var _a5; + var _a6; if (pattern === "*") { return true; } - let contentType = ((_a5 = response.headers.get("content-type")) === null || _a5 === void 0 ? void 0 : _a5.trim()) || "application/octet-stream"; + let contentType = ((_a6 = response.headers.get("content-type")) === null || _a6 === void 0 ? void 0 : _a6.trim()) || "application/octet-stream"; contentType = contentType.toLowerCase(); const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); const [wantType = "", ...wantParams] = wantParts; @@ -32818,13 +33302,13 @@ var require_retries = __commonJS({ }; exports2.TemporaryError = TemporaryError; async function retry(fetchFn, options) { - var _a5; + var _a6; switch (options.config.strategy) { case "backoff": return retryBackoff(wrapFetcher(fetchFn, { statusCodes: options.statusCodes, retryConnectionErrors: !!options.config.retryConnectionErrors - }), (_a5 = options.config.backoff) !== null && _a5 !== void 0 ? _a5 : defaultBackoff); + }), (_a6 = options.config.backoff) !== null && _a6 !== void 0 ? _a6 : defaultBackoff); default: return await fetchFn(); } @@ -32869,7 +33353,7 @@ var require_retries = __commonJS({ async function retryBackoff(fn, strategy) { const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; const start = Date.now(); - let x5 = 0; + let x7 = 0; while (true) { try { const res = await fn(); @@ -32890,11 +33374,11 @@ var require_retries = __commonJS({ retryInterval = retryIntervalFromResponse(err.response); } if (retryInterval <= 0) { - retryInterval = initialInterval * Math.pow(x5, exponent) + Math.random() * 1e3; + retryInterval = initialInterval * Math.pow(x7, exponent) + Math.random() * 1e3; } - const d7 = Math.min(retryInterval, maxInterval); - await delay4(d7); - x5++; + const d9 = Math.min(retryInterval, maxInterval); + await delay4(d9); + x7++; } } } @@ -32924,16 +33408,16 @@ var require_retries = __commonJS({ var require_sdks = __commonJS({ "node_modules/@mistralai/mistralai/lib/sdks.js"(exports2) { "use strict"; - var __classPrivateFieldSet11 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state2, value, kind3, f4) { + var __classPrivateFieldSet12 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - var __classPrivateFieldGet13 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + var __classPrivateFieldGet14 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _ClientSDK_httpClient; var _ClientSDK_hooks; @@ -32959,30 +33443,30 @@ var require_sdks = __commonJS({ _ClientSDK_logger.set(this, void 0); const opt = options; if (typeof opt === "object" && opt != null && "hooks" in opt && opt.hooks instanceof hooks_js_1.SDKHooks) { - __classPrivateFieldSet11(this, _ClientSDK_hooks, opt.hooks, "f"); + __classPrivateFieldSet12(this, _ClientSDK_hooks, opt.hooks, "f"); } else { - __classPrivateFieldSet11(this, _ClientSDK_hooks, new hooks_js_1.SDKHooks(), "f"); + __classPrivateFieldSet12(this, _ClientSDK_hooks, new hooks_js_1.SDKHooks(), "f"); } - this._options = { ...options, hooks: __classPrivateFieldGet13(this, _ClientSDK_hooks, "f") }; + this._options = { ...options, hooks: __classPrivateFieldGet14(this, _ClientSDK_hooks, "f") }; const url2 = (0, config_js_1.serverURLFromOptions)(options); if (url2) { url2.pathname = url2.pathname.replace(/\/+$/, "") + "/"; } - const { baseURL, client } = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").sdkInit({ + const { baseURL, client } = __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").sdkInit({ baseURL: url2, client: options.httpClient || new http_js_1.HTTPClient() }); this._baseURL = baseURL; - __classPrivateFieldSet11(this, _ClientSDK_httpClient, client, "f"); - __classPrivateFieldSet11(this, _ClientSDK_logger, options.debugLogger, "f"); - if (!__classPrivateFieldGet13(this, _ClientSDK_logger, "f") && (0, env_js_1.env)().MISTRAL_DEBUG) { - __classPrivateFieldSet11(this, _ClientSDK_logger, console, "f"); + __classPrivateFieldSet12(this, _ClientSDK_httpClient, client, "f"); + __classPrivateFieldSet12(this, _ClientSDK_logger, options.debugLogger, "f"); + if (!__classPrivateFieldGet14(this, _ClientSDK_logger, "f") && (0, env_js_1.env)().MISTRAL_DEBUG) { + __classPrivateFieldSet12(this, _ClientSDK_logger, console, "f"); } } _createRequest(context, conf, options) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const { method, path: path5, query, headers: opHeaders, security } = conf; - const base = (_a5 = conf.baseURL) !== null && _a5 !== void 0 ? _a5 : this._baseURL; + const base = (_a6 = conf.baseURL) !== null && _a6 !== void 0 ? _a6 : this._baseURL; if (!base) { return (0, fp_js_1.ERR)(new httpclienterrors_js_1.InvalidRequestError("No base URL provided for operation")); } @@ -32993,15 +33477,15 @@ var require_sdks = __commonJS({ } let finalQuery = query || ""; const secQuery = []; - for (const [k7, v5] of Object.entries((security === null || security === void 0 ? void 0 : security.queryParams) || {})) { - secQuery.push((0, encodings_js_1.encodeForm)(k7, v5, { charEncoding: "percent" })); + for (const [k9, v8] of Object.entries((security === null || security === void 0 ? void 0 : security.queryParams) || {})) { + secQuery.push((0, encodings_js_1.encodeForm)(k9, v8, { charEncoding: "percent" })); } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; } if (finalQuery) { - const q6 = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q6}`; + const q8 = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q8}`; } const headers = new Headers(opHeaders); const username = security === null || security === void 0 ? void 0 : security.basic.username; @@ -33011,18 +33495,18 @@ var require_sdks = __commonJS({ headers.set("Authorization", `Basic ${encoded}`); } const securityHeaders = new Headers((security === null || security === void 0 ? void 0 : security.headers) || {}); - for (const [k7, v5] of securityHeaders) { - headers.set(k7, v5); + for (const [k9, v8] of securityHeaders) { + headers.set(k9, v8); } let cookie = headers.get("cookie") || ""; - for (const [k7, v5] of Object.entries((security === null || security === void 0 ? void 0 : security.cookies) || {})) { - cookie += `; ${k7}=${v5}`; + for (const [k9, v8] of Object.entries((security === null || security === void 0 ? void 0 : security.cookies) || {})) { + cookie += `; ${k9}=${v8}`; } cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; headers.set("cookie", cookie); const userHeaders = new Headers((_b2 = options === null || options === void 0 ? void 0 : options.fetchOptions) === null || _b2 === void 0 ? void 0 : _b2.headers); - for (const [k7, v5] of userHeaders) { - headers.set(k7, v5); + for (const [k9, v8] of userHeaders) { + headers.set(k9, v8); } if (!isBrowserLike) { headers.set((_c2 = conf.uaHeader) !== null && _c2 !== void 0 ? _c2 : "user-agent", config_js_1.SDK_METADATA.userAgent); @@ -33048,7 +33532,7 @@ var require_sdks = __commonJS({ } let input; try { - input = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeCreateRequest(context, { + input = __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").beforeCreateRequest(context, { url: reqURL, options: { ...fetchOptions, @@ -33067,30 +33551,30 @@ var require_sdks = __commonJS({ async _do(request3, options) { const { context, errorCodes } = options; return (0, retries_js_1.retry)(async () => { - const req = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeRequest(context, request3.clone()); - await logRequest(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), req).catch((e3) => { - var _a5; - return (_a5 = __classPrivateFieldGet13(this, _ClientSDK_logger, "f")) === null || _a5 === void 0 ? void 0 : _a5.log("Failed to log request:", e3); + const req = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").beforeRequest(context, request3.clone()); + await logRequest(__classPrivateFieldGet14(this, _ClientSDK_logger, "f"), req).catch((e5) => { + var _a6; + return (_a6 = __classPrivateFieldGet14(this, _ClientSDK_logger, "f")) === null || _a6 === void 0 ? void 0 : _a6.log("Failed to log request:", e5); }); - let response = await __classPrivateFieldGet13(this, _ClientSDK_httpClient, "f").request(req); + let response = await __classPrivateFieldGet14(this, _ClientSDK_httpClient, "f").request(req); try { if ((0, http_js_1.matchStatusCode)(response, errorCodes)) { - const result = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterError(context, response, null); + const result = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").afterError(context, response, null); if (result.error) { throw result.error; } response = result.response || response; } else { - response = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterSuccess(context, response); + response = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").afterSuccess(context, response); } } finally { - await logResponse(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), response, req).catch((e3) => { - var _a5; - return (_a5 = __classPrivateFieldGet13(this, _ClientSDK_logger, "f")) === null || _a5 === void 0 ? void 0 : _a5.log("Failed to log response:", e3); + await logResponse(__classPrivateFieldGet14(this, _ClientSDK_logger, "f"), response, req).catch((e5) => { + var _a6; + return (_a6 = __classPrivateFieldGet14(this, _ClientSDK_logger, "f")) === null || _a6 === void 0 ? void 0 : _a6.log("Failed to log response:", e5); }); } return response; - }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r3) => (0, fp_js_1.OK)(r3), (err) => { + }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r5) => (0, fp_js_1.OK)(r5), (err) => { switch (true) { case (0, http_js_1.isAbortError)(err): return (0, fp_js_1.ERR)(new httpclienterrors_js_1.RequestAbortedError("Request aborted by client", { @@ -33111,79 +33595,79 @@ var require_sdks = __commonJS({ exports2.ClientSDK = ClientSDK; _ClientSDK_httpClient = /* @__PURE__ */ new WeakMap(), _ClientSDK_hooks = /* @__PURE__ */ new WeakMap(), _ClientSDK_logger = /* @__PURE__ */ new WeakMap(); var jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; - async function logRequest(logger3, req) { - if (!logger3) { + async function logRequest(logger5, req) { + if (!logger5) { return; } const contentType = req.headers.get("content-type"); const ct2 = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || ""; - logger3.group(`> Request: ${req.method} ${req.url}`); - logger3.group("Headers:"); - for (const [k7, v5] of req.headers.entries()) { - logger3.log(`${k7}: ${v5}`); + logger5.group(`> Request: ${req.method} ${req.url}`); + logger5.group("Headers:"); + for (const [k9, v8] of req.headers.entries()) { + logger5.log(`${k9}: ${v8}`); } - logger3.groupEnd(); - logger3.group("Body:"); + logger5.groupEnd(); + logger5.group("Body:"); switch (true) { case jsonLikeContentTypeRE.test(ct2): - logger3.log(await req.clone().json()); + logger5.log(await req.clone().json()); break; case ct2.startsWith("text/"): - logger3.log(await req.clone().text()); + logger5.log(await req.clone().text()); break; case ct2 === "multipart/form-data": { const body = await req.clone().formData(); - for (const [k7, v5] of body) { - const vlabel = v5 instanceof Blob ? "" : v5; - logger3.log(`${k7}: ${vlabel}`); + for (const [k9, v8] of body) { + const vlabel = v8 instanceof Blob ? "" : v8; + logger5.log(`${k9}: ${vlabel}`); } break; } default: - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; } - logger3.groupEnd(); - logger3.groupEnd(); + logger5.groupEnd(); + logger5.groupEnd(); } - async function logResponse(logger3, res, req) { - if (!logger3) { + async function logResponse(logger5, res, req) { + if (!logger5) { return; } const contentType = res.headers.get("content-type"); const ct2 = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || ""; - logger3.group(`< Response: ${req.method} ${req.url}`); - logger3.log("Status Code:", res.status, res.statusText); - logger3.group("Headers:"); - for (const [k7, v5] of res.headers.entries()) { - logger3.log(`${k7}: ${v5}`); - } - logger3.groupEnd(); - logger3.group("Body:"); + logger5.group(`< Response: ${req.method} ${req.url}`); + logger5.log("Status Code:", res.status, res.statusText); + logger5.group("Headers:"); + for (const [k9, v8] of res.headers.entries()) { + logger5.log(`${k9}: ${v8}`); + } + logger5.groupEnd(); + logger5.group("Body:"); switch (true) { case ((0, http_js_1.matchContentType)(res, "application/json") || jsonLikeContentTypeRE.test(ct2)): - logger3.log(await res.clone().json()); + logger5.log(await res.clone().json()); break; case (0, http_js_1.matchContentType)(res, "text/event-stream"): - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; case (0, http_js_1.matchContentType)(res, "text/*"): - logger3.log(await res.clone().text()); + logger5.log(await res.clone().text()); break; case (0, http_js_1.matchContentType)(res, "multipart/form-data"): { const body = await res.clone().formData(); - for (const [k7, v5] of body) { - const vlabel = v5 instanceof Blob ? "" : v5; - logger3.log(`${k7}: ${vlabel}`); + for (const [k9, v8] of body) { + const vlabel = v8 instanceof Blob ? "" : v8; + logger5.log(`${k9}: ${vlabel}`); } break; } default: - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; } - logger3.groupEnd(); - logger3.groupEnd(); + logger5.groupEnd(); + logger5.groupEnd(); } } }); @@ -33246,13 +33730,13 @@ var require_event_streams = __commonJS({ newBuffer.set(buffer); newBuffer.set(value, buffer.length); buffer = newBuffer; - for (let i3 = position; i3 < buffer.length; i3++) { - const boundary = findBoundary(buffer, i3); + for (let i5 = position; i5 < buffer.length; i5++) { + const boundary = findBoundary(buffer, i5); if (boundary == null) { continue; } - const chunk = buffer.slice(position, i3); - position = i3 + boundary.length; + const chunk = buffer.slice(position, i5); + position = i5 + boundary.length; const event = parseEvent(chunk, this.decoder); if (event != null) { yield event; @@ -33269,11 +33753,11 @@ var require_event_streams = __commonJS({ yield event; } } - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") { + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") { return; } - throw e3; + throw e5; } finally { reader.releaseLock(); } @@ -33286,8 +33770,8 @@ var require_event_streams = __commonJS({ if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) { return null; } - for (const s2 of MESSAGE_BOUNDARIES) { - const seq = peekSequence(start, buffer, s2); + for (const s4 of MESSAGE_BOUNDARIES) { + const seq = peekSequence(start, buffer, s4); if (seq != null) { return seq; } @@ -33298,15 +33782,15 @@ var require_event_streams = __commonJS({ if (sequence.length > buffer.length - position) { return null; } - for (let i3 = 0; i3 < sequence.length; i3++) { - if (buffer[position + i3] !== sequence[i3]) { + for (let i5 = 0; i5 < sequence.length; i5++) { + if (buffer[position + i5] !== sequence[i5]) { return null; } } return sequence; } function parseEvent(chunk, decoder) { - var _a5; + var _a6; if (!chunk.length) { return null; } @@ -33336,7 +33820,7 @@ var require_event_streams = __commonJS({ } case "data": { publish = true; - (_a5 = rawEvent.data) !== null && _a5 !== void 0 ? _a5 : rawEvent.data = ""; + (_a6 = rawEvent.data) !== null && _a6 !== void 0 ? _a6 : rawEvent.data = ""; rawEvent.data += value + "\n"; break; } @@ -33346,10 +33830,10 @@ var require_event_streams = __commonJS({ break; } case "retry": { - const r3 = parseInt(value, 10); - if (!Number.isNaN(r3)) { + const r5 = parseInt(value, 10); + if (!Number.isNaN(r5)) { publish = true; - rawEvent.retry = r3; + rawEvent.retry = r5; } break; } @@ -33386,14 +33870,14 @@ var require_event_streams = __commonJS({ newBuffer.set(buffer); newBuffer.set(value, buffer.length); buffer = newBuffer; - for (let i3 = position; i3 < buffer.length; i3++) { - const boundary = findBoundary(buffer, i3); + for (let i5 = position; i5 < buffer.length; i5++) { + const boundary = findBoundary(buffer, i5); if (boundary == null) { continue; } const start = position; - const chunk = buffer.slice(start, i3); - position = i3 + boundary.length; + const chunk = buffer.slice(start, i5); + position = i5 + boundary.length; const event = parseEvent(chunk, id); if ((event === null || event === void 0 ? void 0 : event.data) === sentinel) { controller.enqueue(buffer.slice(0, start)); @@ -33405,8 +33889,8 @@ var require_event_streams = __commonJS({ } } } - } catch (e3) { - controller.error(e3); + } catch (e5) { + controller.error(e5); } finally { controller.close(); rdr.releaseLock(); @@ -33414,8 +33898,8 @@ var require_event_streams = __commonJS({ } }); } - function id(v5) { - return v5; + function id(v8) { + return v8; } } }); @@ -33424,37 +33908,37 @@ var require_event_streams = __commonJS({ var require_sdkvalidationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/sdkvalidationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SDKValidationError = void 0; exports2.formatZodError = formatZodError; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var SDKValidationError = class extends Error { constructor(message, cause, rawValue) { super(`${message}: ${cause}`); @@ -33469,7 +33953,7 @@ var require_sdkvalidationerror = __commonJS({ * default error message. */ pretty() { - if (this.cause instanceof z6.ZodError) { + if (this.cause instanceof z7.ZodError) { return `${this.rawMessage} ${formatZodError(this.cause)}`; } else { @@ -33517,8 +34001,8 @@ ${pre}${str2}`; case "invalid_union": { const len2 = issue.unionErrors.length; append2(`\u2502 \u2716\uFE0E Attemped to deserialize into one of ${len2} union members:`); - issue.unionErrors.forEach((err2, i3) => { - append2(`\u2502 \u2716\uFE0E Member ${i3 + 1} of ${len2}`); + issue.unionErrors.forEach((err2, i5) => { + append2(`\u2502 \u2716\uFE0E Member ${i5 + 1} of ${len2}`); append2(`${formatZodError(err2, level + 1)}`); }); } @@ -33537,13 +34021,13 @@ var require_schemas = __commonJS({ "node_modules/@mistralai/mistralai/lib/schemas.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parse = parse; + exports2.parse = parse3; exports2.safeParse = safeParse; exports2.collectExtraKeys = collectExtraKeys; var zod_1 = require_lib4(); var sdkvalidationerror_js_1 = require_sdkvalidationerror(); var fp_js_1 = require_fp(); - function parse(rawValue, fn, errorMessage) { + function parse3(rawValue, fn, errorMessage) { try { return fn(rawValue); } catch (err) { @@ -33568,11 +34052,11 @@ var require_schemas = __commonJS({ if (key in shape) { continue; } - const v5 = val[key]; - if (typeof v5 === "undefined") { + const v8 = val[key]; + if (typeof v8 === "undefined") { continue; } - extras[key] = v5; + extras[key] = v8; delete val[key]; } return { ...val, [extrasKey]: extras }; @@ -33734,11 +34218,11 @@ var require_matchers = __commonJS({ data = raw; } if ("err" in matcher) { - const result = (0, schemas_js_1.safeParse)(data, (v5) => matcher.schema.parse(v5), "Response validation failed"); + const result = (0, schemas_js_1.safeParse)(data, (v8) => matcher.schema.parse(v8), "Response validation failed"); return [result.ok ? { ok: false, error: result.value } : result, raw]; } else { return [ - (0, schemas_js_1.safeParse)(data, (v5) => matcher.schema.parse(v5), "Response validation failed"), + (0, schemas_js_1.safeParse)(data, (v8) => matcher.schema.parse(v8), "Response validation failed"), raw ]; } @@ -33747,14 +34231,14 @@ var require_matchers = __commonJS({ var headerValRE = /, */; function unpackHeaders(headers) { const out = {}; - for (const [k7, v5] of headers.entries()) { - out[k7] = v5.split(headerValRE); + for (const [k9, v8] of headers.entries()) { + out[k9] = v8.split(headerValRE); } return out; } async function discardResponseBody(res) { - var _a5; - const reader = (_a5 = res.body) === null || _a5 === void 0 ? void 0 : _a5.getReader(); + var _a6; + const reader = (_a6 = res.body) === null || _a6 === void 0 ? void 0 : _a6.getReader(); if (reader == null) { return; } @@ -33801,7 +34285,7 @@ var require_security = __commonJS({ }; exports2.SecurityError = SecurityError; function resolveSecurity(...options) { - const state2 = { + const state3 = { basic: { username: "", password: "" }, headers: {}, queryParams: {}, @@ -33809,21 +34293,21 @@ var require_security = __commonJS({ oauth2: { type: "none" } }; const option = options.find((opts) => { - return opts.every((o3) => { - if (o3.value == null) { + return opts.every((o5) => { + if (o5.value == null) { return false; - } else if (o3.type === "http:basic") { - return o3.value.username != null || o3.value.password != null; - } else if (o3.type === "http:custom") { + } else if (o5.type === "http:basic") { + return o5.value.username != null || o5.value.password != null; + } else if (o5.type === "http:custom") { return null; - } else if (o3.type === "oauth2:password") { - return typeof o3.value === "string" && !!o3.value; - } else if (o3.type === "oauth2:client_credentials") { - return o3.value.clientID != null || o3.value.clientSecret != null; - } else if (typeof o3.value === "string") { - return !!o3.value; + } else if (o5.type === "oauth2:password") { + return typeof o5.value === "string" && !!o5.value; + } else if (o5.type === "oauth2:client_credentials") { + return o5.value.clientID != null || o5.value.clientSecret != null; + } else if (typeof o5.value === "string") { + return !!o5.value; } else { - throw new Error(`Unrecognized security type: ${o3.type} (value type: ${typeof o3.value})`); + throw new Error(`Unrecognized security type: ${o5.type} (value type: ${typeof o5.value})`); } }); }); @@ -33837,47 +34321,47 @@ var require_security = __commonJS({ const { type: type2 } = spec; switch (type2) { case "apiKey:header": - state2.headers[spec.fieldName] = spec.value; + state3.headers[spec.fieldName] = spec.value; break; case "apiKey:query": - state2.queryParams[spec.fieldName] = spec.value; + state3.queryParams[spec.fieldName] = spec.value; break; case "apiKey:cookie": - state2.cookies[spec.fieldName] = spec.value; + state3.cookies[spec.fieldName] = spec.value; break; case "http:basic": - applyBasic(state2, spec); + applyBasic(state3, spec); break; case "http:custom": break; case "http:bearer": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2:password": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2:client_credentials": break; case "openIdConnect": - applyBearer(state2, spec); + applyBearer(state3, spec); break; default: spec; throw SecurityError.unrecognizedType(type2); } }); - return state2; + return state3; } - function applyBasic(state2, spec) { + function applyBasic(state3, spec) { if (spec.value == null) { return; } - state2.basic = spec.value; + state3.basic = spec.value; } - function applyBearer(state2, spec) { + function applyBearer(state3, spec) { if (typeof spec.value !== "string" || !spec.value) { return; } @@ -33885,15 +34369,15 @@ var require_security = __commonJS({ if (value.slice(0, 7).toLowerCase() !== "bearer ") { value = `Bearer ${value}`; } - state2.headers[spec.fieldName] = value; + state3.headers[spec.fieldName] = value; } function resolveGlobalSecurity(security) { - var _a5; + var _a6; return resolveSecurity([ { fieldName: "Authorization", type: "http:bearer", - value: (_a5 = security === null || security === void 0 ? void 0 : security.apiKey) !== null && _a5 !== void 0 ? _a5 : (0, env_js_1.env)().MISTRAL_API_KEY + value: (_a6 = security === null || security === void 0 ? void 0 : security.apiKey) !== null && _a6 !== void 0 ? _a6 : (0, env_js_1.env)().MISTRAL_API_KEY } ]); } @@ -33932,12 +34416,12 @@ var require_primitives = __commonJS({ out = inp; return out; } - for (const [k7, v5] of Object.entries(inp)) { - const j4 = mappings[k7]; - if (j4 === null) { + for (const [k9, v8] of Object.entries(inp)) { + const j6 = mappings[k9]; + if (j6 === null) { continue; } - out[j4 !== null && j4 !== void 0 ? j4 : k7] = v5; + out[j6 !== null && j6 !== void 0 ? j6 : k9] = v8; } return out; } @@ -33999,46 +34483,46 @@ var require_primitives = __commonJS({ var require_imageurl = __commonJS({ "node_modules/@mistralai/mistralai/models/components/imageurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ImageURL$ = exports2.ImageURL$outboundSchema = exports2.ImageURL$inboundSchema = void 0; exports2.imageURLToJSON = imageURLToJSON; exports2.imageURLFromJSON = imageURLFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.ImageURL$inboundSchema = z6.object({ - url: z6.string(), - detail: z6.nullable(z6.string()).optional() + exports2.ImageURL$inboundSchema = z7.object({ + url: z7.string(), + detail: z7.nullable(z7.string()).optional() }); - exports2.ImageURL$outboundSchema = z6.object({ - url: z6.string(), - detail: z6.nullable(z6.string()).optional() + exports2.ImageURL$outboundSchema = z7.object({ + url: z7.string(), + detail: z7.nullable(z7.string()).optional() }); var ImageURL$; (function(ImageURL$2) { @@ -34049,7 +34533,7 @@ var require_imageurl = __commonJS({ return JSON.stringify(exports2.ImageURL$outboundSchema.parse(imageURL)); } function imageURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ImageURL$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ImageURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ImageURL$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ImageURL' from JSON`); } } }); @@ -34058,31 +34542,31 @@ var require_imageurl = __commonJS({ var require_imageurlchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/imageurlchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -34091,15 +34575,15 @@ var require_imageurlchunk = __commonJS({ exports2.imageURLChunkImageURLFromJSON = imageURLChunkImageURLFromJSON; exports2.imageURLChunkToJSON = imageURLChunkToJSON; exports2.imageURLChunkFromJSON = imageURLChunkFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var imageurl_js_1 = require_imageurl(); exports2.ImageURLChunkType = { ImageUrl: "image_url" }; - exports2.ImageURLChunkImageURL$inboundSchema = z6.union([imageurl_js_1.ImageURL$inboundSchema, z6.string()]); - exports2.ImageURLChunkImageURL$outboundSchema = z6.union([imageurl_js_1.ImageURL$outboundSchema, z6.string()]); + exports2.ImageURLChunkImageURL$inboundSchema = z7.union([imageurl_js_1.ImageURL$inboundSchema, z7.string()]); + exports2.ImageURLChunkImageURL$outboundSchema = z7.union([imageurl_js_1.ImageURL$outboundSchema, z7.string()]); var ImageURLChunkImageURL$; (function(ImageURLChunkImageURL$2) { ImageURLChunkImageURL$2.inboundSchema = exports2.ImageURLChunkImageURL$inboundSchema; @@ -34109,28 +34593,28 @@ var require_imageurlchunk = __commonJS({ return JSON.stringify(exports2.ImageURLChunkImageURL$outboundSchema.parse(imageURLChunkImageURL)); } function imageURLChunkImageURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ImageURLChunkImageURL$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ImageURLChunkImageURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ImageURLChunkImageURL$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ImageURLChunkImageURL' from JSON`); } - exports2.ImageURLChunkType$inboundSchema = z6.nativeEnum(exports2.ImageURLChunkType); + exports2.ImageURLChunkType$inboundSchema = z7.nativeEnum(exports2.ImageURLChunkType); exports2.ImageURLChunkType$outboundSchema = exports2.ImageURLChunkType$inboundSchema; var ImageURLChunkType$; (function(ImageURLChunkType$2) { ImageURLChunkType$2.inboundSchema = exports2.ImageURLChunkType$inboundSchema; ImageURLChunkType$2.outboundSchema = exports2.ImageURLChunkType$outboundSchema; })(ImageURLChunkType$ || (exports2.ImageURLChunkType$ = ImageURLChunkType$ = {})); - exports2.ImageURLChunk$inboundSchema = z6.object({ - image_url: z6.union([imageurl_js_1.ImageURL$inboundSchema, z6.string()]), + exports2.ImageURLChunk$inboundSchema = z7.object({ + image_url: z7.union([imageurl_js_1.ImageURL$inboundSchema, z7.string()]), type: exports2.ImageURLChunkType$inboundSchema.default("image_url") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "image_url": "imageUrl" }); }); - exports2.ImageURLChunk$outboundSchema = z6.object({ - imageUrl: z6.union([imageurl_js_1.ImageURL$outboundSchema, z6.string()]), + exports2.ImageURLChunk$outboundSchema = z7.object({ + imageUrl: z7.union([imageurl_js_1.ImageURL$outboundSchema, z7.string()]), type: exports2.ImageURLChunkType$outboundSchema.default("image_url") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { imageUrl: "image_url" }); }); @@ -34143,7 +34627,7 @@ var require_imageurlchunk = __commonJS({ return JSON.stringify(exports2.ImageURLChunk$outboundSchema.parse(imageURLChunk)); } function imageURLChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ImageURLChunk$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ImageURLChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ImageURLChunk$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ImageURLChunk' from JSON`); } } }); @@ -34152,63 +34636,63 @@ var require_imageurlchunk = __commonJS({ var require_referencechunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/referencechunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ReferenceChunk$ = exports2.ReferenceChunk$outboundSchema = exports2.ReferenceChunk$inboundSchema = exports2.ReferenceChunkType$ = exports2.ReferenceChunkType$outboundSchema = exports2.ReferenceChunkType$inboundSchema = exports2.ReferenceChunkType = void 0; exports2.referenceChunkToJSON = referenceChunkToJSON; exports2.referenceChunkFromJSON = referenceChunkFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.ReferenceChunkType = { Reference: "reference" }; - exports2.ReferenceChunkType$inboundSchema = z6.nativeEnum(exports2.ReferenceChunkType); + exports2.ReferenceChunkType$inboundSchema = z7.nativeEnum(exports2.ReferenceChunkType); exports2.ReferenceChunkType$outboundSchema = exports2.ReferenceChunkType$inboundSchema; var ReferenceChunkType$; (function(ReferenceChunkType$2) { ReferenceChunkType$2.inboundSchema = exports2.ReferenceChunkType$inboundSchema; ReferenceChunkType$2.outboundSchema = exports2.ReferenceChunkType$outboundSchema; })(ReferenceChunkType$ || (exports2.ReferenceChunkType$ = ReferenceChunkType$ = {})); - exports2.ReferenceChunk$inboundSchema = z6.object({ - reference_ids: z6.array(z6.number().int()), + exports2.ReferenceChunk$inboundSchema = z7.object({ + reference_ids: z7.array(z7.number().int()), type: exports2.ReferenceChunkType$inboundSchema.default("reference") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "reference_ids": "referenceIds" }); }); - exports2.ReferenceChunk$outboundSchema = z6.object({ - referenceIds: z6.array(z6.number().int()), + exports2.ReferenceChunk$outboundSchema = z7.object({ + referenceIds: z7.array(z7.number().int()), type: exports2.ReferenceChunkType$outboundSchema.default("reference") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { referenceIds: "reference_ids" }); }); @@ -34221,7 +34705,7 @@ var require_referencechunk = __commonJS({ return JSON.stringify(exports2.ReferenceChunk$outboundSchema.parse(referenceChunk)); } function referenceChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ReferenceChunk$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ReferenceChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ReferenceChunk$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ReferenceChunk' from JSON`); } } }); @@ -34230,55 +34714,55 @@ var require_referencechunk = __commonJS({ var require_textchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/textchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TextChunk$ = exports2.TextChunk$outboundSchema = exports2.TextChunk$inboundSchema = exports2.TextChunkType$ = exports2.TextChunkType$outboundSchema = exports2.TextChunkType$inboundSchema = exports2.TextChunkType = void 0; exports2.textChunkToJSON = textChunkToJSON; exports2.textChunkFromJSON = textChunkFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); exports2.TextChunkType = { Text: "text" }; - exports2.TextChunkType$inboundSchema = z6.nativeEnum(exports2.TextChunkType); + exports2.TextChunkType$inboundSchema = z7.nativeEnum(exports2.TextChunkType); exports2.TextChunkType$outboundSchema = exports2.TextChunkType$inboundSchema; var TextChunkType$; (function(TextChunkType$2) { TextChunkType$2.inboundSchema = exports2.TextChunkType$inboundSchema; TextChunkType$2.outboundSchema = exports2.TextChunkType$outboundSchema; })(TextChunkType$ || (exports2.TextChunkType$ = TextChunkType$ = {})); - exports2.TextChunk$inboundSchema = z6.object({ - text: z6.string(), + exports2.TextChunk$inboundSchema = z7.object({ + text: z7.string(), type: exports2.TextChunkType$inboundSchema.default("text") }); - exports2.TextChunk$outboundSchema = z6.object({ - text: z6.string(), + exports2.TextChunk$outboundSchema = z7.object({ + text: z7.string(), type: exports2.TextChunkType$outboundSchema.default("text") }); var TextChunk$; @@ -34290,7 +34774,7 @@ var require_textchunk = __commonJS({ return JSON.stringify(exports2.TextChunk$outboundSchema.parse(textChunk)); } function textChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.TextChunk$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'TextChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.TextChunk$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'TextChunk' from JSON`); } } }); @@ -34299,58 +34783,58 @@ var require_textchunk = __commonJS({ var require_contentchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/contentchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ContentChunk$ = exports2.ContentChunk$outboundSchema = exports2.ContentChunk$inboundSchema = void 0; exports2.contentChunkToJSON = contentChunkToJSON; exports2.contentChunkFromJSON = contentChunkFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var imageurlchunk_js_1 = require_imageurlchunk(); var referencechunk_js_1 = require_referencechunk(); var textchunk_js_1 = require_textchunk(); - exports2.ContentChunk$inboundSchema = z6.union([ - imageurlchunk_js_1.ImageURLChunk$inboundSchema.and(z6.object({ type: z6.literal("image_url") }).transform((v5) => ({ - type: v5.type + exports2.ContentChunk$inboundSchema = z7.union([ + imageurlchunk_js_1.ImageURLChunk$inboundSchema.and(z7.object({ type: z7.literal("image_url") }).transform((v8) => ({ + type: v8.type }))), - textchunk_js_1.TextChunk$inboundSchema.and(z6.object({ type: z6.literal("text") }).transform((v5) => ({ type: v5.type }))), - referencechunk_js_1.ReferenceChunk$inboundSchema.and(z6.object({ type: z6.literal("reference") }).transform((v5) => ({ - type: v5.type + textchunk_js_1.TextChunk$inboundSchema.and(z7.object({ type: z7.literal("text") }).transform((v8) => ({ type: v8.type }))), + referencechunk_js_1.ReferenceChunk$inboundSchema.and(z7.object({ type: z7.literal("reference") }).transform((v8) => ({ + type: v8.type }))) ]); - exports2.ContentChunk$outboundSchema = z6.union([ - imageurlchunk_js_1.ImageURLChunk$outboundSchema.and(z6.object({ type: z6.literal("image_url") }).transform((v5) => ({ - type: v5.type + exports2.ContentChunk$outboundSchema = z7.union([ + imageurlchunk_js_1.ImageURLChunk$outboundSchema.and(z7.object({ type: z7.literal("image_url") }).transform((v8) => ({ + type: v8.type }))), - textchunk_js_1.TextChunk$outboundSchema.and(z6.object({ type: z6.literal("text") }).transform((v5) => ({ type: v5.type }))), - referencechunk_js_1.ReferenceChunk$outboundSchema.and(z6.object({ type: z6.literal("reference") }).transform((v5) => ({ - type: v5.type + textchunk_js_1.TextChunk$outboundSchema.and(z7.object({ type: z7.literal("text") }).transform((v8) => ({ type: v8.type }))), + referencechunk_js_1.ReferenceChunk$outboundSchema.and(z7.object({ type: z7.literal("reference") }).transform((v8) => ({ + type: v8.type }))) ]); var ContentChunk$; @@ -34362,7 +34846,7 @@ var require_contentchunk = __commonJS({ return JSON.stringify(exports2.ContentChunk$outboundSchema.parse(contentChunk)); } function contentChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ContentChunk$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ContentChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ContentChunk$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ContentChunk' from JSON`); } } }); @@ -34371,31 +34855,31 @@ var require_contentchunk = __commonJS({ var require_functioncall = __commonJS({ "node_modules/@mistralai/mistralai/models/components/functioncall.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -34404,10 +34888,10 @@ var require_functioncall = __commonJS({ exports2.argumentsFromJSON = argumentsFromJSON; exports2.functionCallToJSON = functionCallToJSON; exports2.functionCallFromJSON = functionCallFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.Arguments$inboundSchema = z6.union([z6.record(z6.any()), z6.string()]); - exports2.Arguments$outboundSchema = z6.union([z6.record(z6.any()), z6.string()]); + exports2.Arguments$inboundSchema = z7.union([z7.record(z7.any()), z7.string()]); + exports2.Arguments$outboundSchema = z7.union([z7.record(z7.any()), z7.string()]); var Arguments$; (function(Arguments$2) { Arguments$2.inboundSchema = exports2.Arguments$inboundSchema; @@ -34417,15 +34901,15 @@ var require_functioncall = __commonJS({ return JSON.stringify(exports2.Arguments$outboundSchema.parse(value)); } function argumentsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Arguments$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Arguments' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Arguments$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Arguments' from JSON`); } - exports2.FunctionCall$inboundSchema = z6.object({ - name: z6.string(), - arguments: z6.union([z6.record(z6.any()), z6.string()]) + exports2.FunctionCall$inboundSchema = z7.object({ + name: z7.string(), + arguments: z7.union([z7.record(z7.any()), z7.string()]) }); - exports2.FunctionCall$outboundSchema = z6.object({ - name: z6.string(), - arguments: z6.union([z6.record(z6.any()), z6.string()]) + exports2.FunctionCall$outboundSchema = z7.object({ + name: z7.string(), + arguments: z7.union([z7.record(z7.any()), z7.string()]) }); var FunctionCall$; (function(FunctionCall$2) { @@ -34436,7 +34920,7 @@ var require_functioncall = __commonJS({ return JSON.stringify(exports2.FunctionCall$outboundSchema.parse(functionCall)); } function functionCallFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FunctionCall$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FunctionCall' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FunctionCall$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FunctionCall' from JSON`); } } }); @@ -34457,47 +34941,47 @@ var require_enums = __commonJS({ var require_tooltypes = __commonJS({ "node_modules/@mistralai/mistralai/models/components/tooltypes.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolTypes$ = exports2.ToolTypes$outboundSchema = exports2.ToolTypes$inboundSchema = exports2.ToolTypes = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var enums_js_1 = require_enums(); exports2.ToolTypes = { Function: "function" }; - exports2.ToolTypes$inboundSchema = z6.union([ - z6.nativeEnum(exports2.ToolTypes), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.ToolTypes$inboundSchema = z7.union([ + z7.nativeEnum(exports2.ToolTypes), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.ToolTypes$outboundSchema = z6.union([ - z6.nativeEnum(exports2.ToolTypes), - z6.string().and(z6.custom()) + exports2.ToolTypes$outboundSchema = z7.union([ + z7.nativeEnum(exports2.ToolTypes), + z7.string().and(z7.custom()) ]); var ToolTypes$; (function(ToolTypes$2) { @@ -34511,48 +34995,48 @@ var require_tooltypes = __commonJS({ var require_toolcall = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolcall.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolCall$ = exports2.ToolCall$outboundSchema = exports2.ToolCall$inboundSchema = void 0; exports2.toolCallToJSON = toolCallToJSON; exports2.toolCallFromJSON = toolCallFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var functioncall_js_1 = require_functioncall(); var tooltypes_js_1 = require_tooltypes(); - exports2.ToolCall$inboundSchema = z6.object({ - id: z6.string().default("null"), + exports2.ToolCall$inboundSchema = z7.object({ + id: z7.string().default("null"), type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: functioncall_js_1.FunctionCall$inboundSchema }); - exports2.ToolCall$outboundSchema = z6.object({ - id: z6.string().default("null"), + exports2.ToolCall$outboundSchema = z7.object({ + id: z7.string().default("null"), type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: functioncall_js_1.FunctionCall$outboundSchema }); @@ -34565,7 +35049,7 @@ var require_toolcall = __commonJS({ return JSON.stringify(exports2.ToolCall$outboundSchema.parse(toolCall)); } function toolCallFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ToolCall$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ToolCall' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ToolCall$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ToolCall' from JSON`); } } }); @@ -34574,31 +35058,31 @@ var require_toolcall = __commonJS({ var require_assistantmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/assistantmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -34607,7 +35091,7 @@ var require_assistantmessage = __commonJS({ exports2.assistantMessageContentFromJSON = assistantMessageContentFromJSON; exports2.assistantMessageToJSON = assistantMessageToJSON; exports2.assistantMessageFromJSON = assistantMessageFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); @@ -34615,8 +35099,8 @@ var require_assistantmessage = __commonJS({ exports2.AssistantMessageRole = { Assistant: "assistant" }; - exports2.AssistantMessageContent$inboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.AssistantMessageContent$outboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.AssistantMessageContent$inboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.AssistantMessageContent$outboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var AssistantMessageContent$; (function(AssistantMessageContent$2) { AssistantMessageContent$2.inboundSchema = exports2.AssistantMessageContent$inboundSchema; @@ -34626,32 +35110,32 @@ var require_assistantmessage = __commonJS({ return JSON.stringify(exports2.AssistantMessageContent$outboundSchema.parse(assistantMessageContent)); } function assistantMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AssistantMessageContent$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AssistantMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AssistantMessageContent$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AssistantMessageContent' from JSON`); } - exports2.AssistantMessageRole$inboundSchema = z6.nativeEnum(exports2.AssistantMessageRole); + exports2.AssistantMessageRole$inboundSchema = z7.nativeEnum(exports2.AssistantMessageRole); exports2.AssistantMessageRole$outboundSchema = exports2.AssistantMessageRole$inboundSchema; var AssistantMessageRole$; (function(AssistantMessageRole$2) { AssistantMessageRole$2.inboundSchema = exports2.AssistantMessageRole$inboundSchema; AssistantMessageRole$2.outboundSchema = exports2.AssistantMessageRole$outboundSchema; })(AssistantMessageRole$ || (exports2.AssistantMessageRole$ = AssistantMessageRole$ = {})); - exports2.AssistantMessage$inboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), - tool_calls: z6.nullable(z6.array(toolcall_js_1.ToolCall$inboundSchema)).optional(), - prefix: z6.boolean().default(false), + exports2.AssistantMessage$inboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), + tool_calls: z7.nullable(z7.array(toolcall_js_1.ToolCall$inboundSchema)).optional(), + prefix: z7.boolean().default(false), role: exports2.AssistantMessageRole$inboundSchema.default("assistant") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "tool_calls": "toolCalls" }); }); - exports2.AssistantMessage$outboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), - toolCalls: z6.nullable(z6.array(toolcall_js_1.ToolCall$outboundSchema)).optional(), - prefix: z6.boolean().default(false), + exports2.AssistantMessage$outboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), + toolCalls: z7.nullable(z7.array(toolcall_js_1.ToolCall$outboundSchema)).optional(), + prefix: z7.boolean().default(false), role: exports2.AssistantMessageRole$outboundSchema.default("assistant") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { toolCalls: "tool_calls" }); }); @@ -34664,7 +35148,7 @@ var require_assistantmessage = __commonJS({ return JSON.stringify(exports2.AssistantMessage$outboundSchema.parse(assistantMessage)); } function assistantMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AssistantMessage$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AssistantMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AssistantMessage$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AssistantMessage' from JSON`); } } }); @@ -34673,41 +35157,41 @@ var require_assistantmessage = __commonJS({ var require_responseformats = __commonJS({ "node_modules/@mistralai/mistralai/models/components/responseformats.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ResponseFormats$ = exports2.ResponseFormats$outboundSchema = exports2.ResponseFormats$inboundSchema = exports2.ResponseFormats = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); exports2.ResponseFormats = { Text: "text", JsonObject: "json_object" }; - exports2.ResponseFormats$inboundSchema = z6.nativeEnum(exports2.ResponseFormats); + exports2.ResponseFormats$inboundSchema = z7.nativeEnum(exports2.ResponseFormats); exports2.ResponseFormats$outboundSchema = exports2.ResponseFormats$inboundSchema; var ResponseFormats$; (function(ResponseFormats$2) { @@ -34721,44 +35205,44 @@ var require_responseformats = __commonJS({ var require_responseformat = __commonJS({ "node_modules/@mistralai/mistralai/models/components/responseformat.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ResponseFormat$ = exports2.ResponseFormat$outboundSchema = exports2.ResponseFormat$inboundSchema = void 0; exports2.responseFormatToJSON = responseFormatToJSON; exports2.responseFormatFromJSON = responseFormatFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var responseformats_js_1 = require_responseformats(); - exports2.ResponseFormat$inboundSchema = z6.object({ + exports2.ResponseFormat$inboundSchema = z7.object({ type: responseformats_js_1.ResponseFormats$inboundSchema.optional() }); - exports2.ResponseFormat$outboundSchema = z6.object({ + exports2.ResponseFormat$outboundSchema = z7.object({ type: responseformats_js_1.ResponseFormats$outboundSchema.optional() }); var ResponseFormat$; @@ -34770,7 +35254,7 @@ var require_responseformat = __commonJS({ return JSON.stringify(exports2.ResponseFormat$outboundSchema.parse(responseFormat)); } function responseFormatFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ResponseFormat$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ResponseFormat' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ResponseFormat$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ResponseFormat' from JSON`); } } }); @@ -34779,31 +35263,31 @@ var require_responseformat = __commonJS({ var require_systemmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/systemmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -34812,14 +35296,14 @@ var require_systemmessage = __commonJS({ exports2.systemMessageContentFromJSON = systemMessageContentFromJSON; exports2.systemMessageToJSON = systemMessageToJSON; exports2.systemMessageFromJSON = systemMessageFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var textchunk_js_1 = require_textchunk(); exports2.Role = { System: "system" }; - exports2.SystemMessageContent$inboundSchema = z6.union([z6.string(), z6.array(textchunk_js_1.TextChunk$inboundSchema)]); - exports2.SystemMessageContent$outboundSchema = z6.union([z6.string(), z6.array(textchunk_js_1.TextChunk$outboundSchema)]); + exports2.SystemMessageContent$inboundSchema = z7.union([z7.string(), z7.array(textchunk_js_1.TextChunk$inboundSchema)]); + exports2.SystemMessageContent$outboundSchema = z7.union([z7.string(), z7.array(textchunk_js_1.TextChunk$outboundSchema)]); var SystemMessageContent$; (function(SystemMessageContent$2) { SystemMessageContent$2.inboundSchema = exports2.SystemMessageContent$inboundSchema; @@ -34829,21 +35313,21 @@ var require_systemmessage = __commonJS({ return JSON.stringify(exports2.SystemMessageContent$outboundSchema.parse(systemMessageContent)); } function systemMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.SystemMessageContent$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'SystemMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.SystemMessageContent$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'SystemMessageContent' from JSON`); } - exports2.Role$inboundSchema = z6.nativeEnum(exports2.Role); + exports2.Role$inboundSchema = z7.nativeEnum(exports2.Role); exports2.Role$outboundSchema = exports2.Role$inboundSchema; var Role$; (function(Role$2) { Role$2.inboundSchema = exports2.Role$inboundSchema; Role$2.outboundSchema = exports2.Role$outboundSchema; })(Role$ || (exports2.Role$ = Role$ = {})); - exports2.SystemMessage$inboundSchema = z6.object({ - content: z6.union([z6.string(), z6.array(textchunk_js_1.TextChunk$inboundSchema)]), + exports2.SystemMessage$inboundSchema = z7.object({ + content: z7.union([z7.string(), z7.array(textchunk_js_1.TextChunk$inboundSchema)]), role: exports2.Role$inboundSchema.default("system") }); - exports2.SystemMessage$outboundSchema = z6.object({ - content: z6.union([z6.string(), z6.array(textchunk_js_1.TextChunk$outboundSchema)]), + exports2.SystemMessage$outboundSchema = z7.object({ + content: z7.union([z7.string(), z7.array(textchunk_js_1.TextChunk$outboundSchema)]), role: exports2.Role$outboundSchema.default("system") }); var SystemMessage$; @@ -34855,7 +35339,7 @@ var require_systemmessage = __commonJS({ return JSON.stringify(exports2.SystemMessage$outboundSchema.parse(systemMessage)); } function systemMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.SystemMessage$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'SystemMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.SystemMessage$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'SystemMessage' from JSON`); } } }); @@ -34864,48 +35348,48 @@ var require_systemmessage = __commonJS({ var require_function = __commonJS({ "node_modules/@mistralai/mistralai/models/components/function.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FunctionT$ = exports2.FunctionT$outboundSchema = exports2.FunctionT$inboundSchema = void 0; exports2.functionToJSON = functionToJSON; exports2.functionFromJSON = functionFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.FunctionT$inboundSchema = z6.object({ - name: z6.string(), - description: z6.string().default(""), - parameters: z6.record(z6.any()) + exports2.FunctionT$inboundSchema = z7.object({ + name: z7.string(), + description: z7.string().default(""), + parameters: z7.record(z7.any()) }); - exports2.FunctionT$outboundSchema = z6.object({ - name: z6.string(), - description: z6.string().default(""), - parameters: z6.record(z6.any()) + exports2.FunctionT$outboundSchema = z7.object({ + name: z7.string(), + description: z7.string().default(""), + parameters: z7.record(z7.any()) }); var FunctionT$; (function(FunctionT$2) { @@ -34916,7 +35400,7 @@ var require_function = __commonJS({ return JSON.stringify(exports2.FunctionT$outboundSchema.parse(functionT)); } function functionFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FunctionT$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FunctionT' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FunctionT$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FunctionT' from JSON`); } } }); @@ -34925,46 +35409,46 @@ var require_function = __commonJS({ var require_tool = __commonJS({ "node_modules/@mistralai/mistralai/models/components/tool.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Tool$ = exports2.Tool$outboundSchema = exports2.Tool$inboundSchema = void 0; exports2.toolToJSON = toolToJSON; exports2.toolFromJSON = toolFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var function_js_1 = require_function(); var tooltypes_js_1 = require_tooltypes(); - exports2.Tool$inboundSchema = z6.object({ + exports2.Tool$inboundSchema = z7.object({ type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: function_js_1.FunctionT$inboundSchema }); - exports2.Tool$outboundSchema = z6.object({ + exports2.Tool$outboundSchema = z7.object({ type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: function_js_1.FunctionT$outboundSchema }); @@ -34977,7 +35461,7 @@ var require_tool = __commonJS({ return JSON.stringify(exports2.Tool$outboundSchema.parse(tool)); } function toolFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Tool$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Tool' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Tool$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Tool' from JSON`); } } }); @@ -34986,44 +35470,44 @@ var require_tool = __commonJS({ var require_functionname = __commonJS({ "node_modules/@mistralai/mistralai/models/components/functionname.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FunctionName$ = exports2.FunctionName$outboundSchema = exports2.FunctionName$inboundSchema = void 0; exports2.functionNameToJSON = functionNameToJSON; exports2.functionNameFromJSON = functionNameFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.FunctionName$inboundSchema = z6.object({ - name: z6.string() + exports2.FunctionName$inboundSchema = z7.object({ + name: z7.string() }); - exports2.FunctionName$outboundSchema = z6.object({ - name: z6.string() + exports2.FunctionName$outboundSchema = z7.object({ + name: z7.string() }); var FunctionName$; (function(FunctionName$2) { @@ -35034,7 +35518,7 @@ var require_functionname = __commonJS({ return JSON.stringify(exports2.FunctionName$outboundSchema.parse(functionName)); } function functionNameFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FunctionName$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FunctionName' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FunctionName$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FunctionName' from JSON`); } } }); @@ -35043,46 +35527,46 @@ var require_functionname = __commonJS({ var require_toolchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolChoice$ = exports2.ToolChoice$outboundSchema = exports2.ToolChoice$inboundSchema = void 0; exports2.toolChoiceToJSON = toolChoiceToJSON; exports2.toolChoiceFromJSON = toolChoiceFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var functionname_js_1 = require_functionname(); var tooltypes_js_1 = require_tooltypes(); - exports2.ToolChoice$inboundSchema = z6.object({ + exports2.ToolChoice$inboundSchema = z7.object({ type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: functionname_js_1.FunctionName$inboundSchema }); - exports2.ToolChoice$outboundSchema = z6.object({ + exports2.ToolChoice$outboundSchema = z7.object({ type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: functionname_js_1.FunctionName$outboundSchema }); @@ -35095,7 +35579,7 @@ var require_toolchoice = __commonJS({ return JSON.stringify(exports2.ToolChoice$outboundSchema.parse(toolChoice)); } function toolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ToolChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ToolChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ToolChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ToolChoice' from JSON`); } } }); @@ -35104,43 +35588,43 @@ var require_toolchoice = __commonJS({ var require_toolchoiceenum = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolchoiceenum.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolChoiceEnum$ = exports2.ToolChoiceEnum$outboundSchema = exports2.ToolChoiceEnum$inboundSchema = exports2.ToolChoiceEnum = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); exports2.ToolChoiceEnum = { Auto: "auto", None: "none", Any: "any", Required: "required" }; - exports2.ToolChoiceEnum$inboundSchema = z6.nativeEnum(exports2.ToolChoiceEnum); + exports2.ToolChoiceEnum$inboundSchema = z7.nativeEnum(exports2.ToolChoiceEnum); exports2.ToolChoiceEnum$outboundSchema = exports2.ToolChoiceEnum$inboundSchema; var ToolChoiceEnum$; (function(ToolChoiceEnum$2) { @@ -35154,31 +35638,31 @@ var require_toolchoiceenum = __commonJS({ var require_toolmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -35187,15 +35671,15 @@ var require_toolmessage = __commonJS({ exports2.toolMessageContentFromJSON = toolMessageContentFromJSON; exports2.toolMessageToJSON = toolMessageToJSON; exports2.toolMessageFromJSON = toolMessageFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); exports2.ToolMessageRole = { Tool: "tool" }; - exports2.ToolMessageContent$inboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.ToolMessageContent$outboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.ToolMessageContent$inboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.ToolMessageContent$outboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var ToolMessageContent$; (function(ToolMessageContent$2) { ToolMessageContent$2.inboundSchema = exports2.ToolMessageContent$inboundSchema; @@ -35205,32 +35689,32 @@ var require_toolmessage = __commonJS({ return JSON.stringify(exports2.ToolMessageContent$outboundSchema.parse(toolMessageContent)); } function toolMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ToolMessageContent$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ToolMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ToolMessageContent$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ToolMessageContent' from JSON`); } - exports2.ToolMessageRole$inboundSchema = z6.nativeEnum(exports2.ToolMessageRole); + exports2.ToolMessageRole$inboundSchema = z7.nativeEnum(exports2.ToolMessageRole); exports2.ToolMessageRole$outboundSchema = exports2.ToolMessageRole$inboundSchema; var ToolMessageRole$; (function(ToolMessageRole$2) { ToolMessageRole$2.inboundSchema = exports2.ToolMessageRole$inboundSchema; ToolMessageRole$2.outboundSchema = exports2.ToolMessageRole$outboundSchema; })(ToolMessageRole$ || (exports2.ToolMessageRole$ = ToolMessageRole$ = {})); - exports2.ToolMessage$inboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)])), - tool_call_id: z6.nullable(z6.string()).optional(), - name: z6.nullable(z6.string()).optional(), + exports2.ToolMessage$inboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)])), + tool_call_id: z7.nullable(z7.string()).optional(), + name: z7.nullable(z7.string()).optional(), role: exports2.ToolMessageRole$inboundSchema.default("tool") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "tool_call_id": "toolCallId" }); }); - exports2.ToolMessage$outboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)])), - toolCallId: z6.nullable(z6.string()).optional(), - name: z6.nullable(z6.string()).optional(), + exports2.ToolMessage$outboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)])), + toolCallId: z7.nullable(z7.string()).optional(), + name: z7.nullable(z7.string()).optional(), role: exports2.ToolMessageRole$outboundSchema.default("tool") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { toolCallId: "tool_call_id" }); }); @@ -35243,7 +35727,7 @@ var require_toolmessage = __commonJS({ return JSON.stringify(exports2.ToolMessage$outboundSchema.parse(toolMessage)); } function toolMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ToolMessage$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ToolMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ToolMessage$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ToolMessage' from JSON`); } } }); @@ -35252,31 +35736,31 @@ var require_toolmessage = __commonJS({ var require_usermessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/usermessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -35285,14 +35769,14 @@ var require_usermessage = __commonJS({ exports2.userMessageContentFromJSON = userMessageContentFromJSON; exports2.userMessageToJSON = userMessageToJSON; exports2.userMessageFromJSON = userMessageFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); exports2.UserMessageRole = { User: "user" }; - exports2.UserMessageContent$inboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.UserMessageContent$outboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.UserMessageContent$inboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.UserMessageContent$outboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var UserMessageContent$; (function(UserMessageContent$2) { UserMessageContent$2.inboundSchema = exports2.UserMessageContent$inboundSchema; @@ -35302,21 +35786,21 @@ var require_usermessage = __commonJS({ return JSON.stringify(exports2.UserMessageContent$outboundSchema.parse(userMessageContent)); } function userMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UserMessageContent$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UserMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UserMessageContent$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UserMessageContent' from JSON`); } - exports2.UserMessageRole$inboundSchema = z6.nativeEnum(exports2.UserMessageRole); + exports2.UserMessageRole$inboundSchema = z7.nativeEnum(exports2.UserMessageRole); exports2.UserMessageRole$outboundSchema = exports2.UserMessageRole$inboundSchema; var UserMessageRole$; (function(UserMessageRole$2) { UserMessageRole$2.inboundSchema = exports2.UserMessageRole$inboundSchema; UserMessageRole$2.outboundSchema = exports2.UserMessageRole$outboundSchema; })(UserMessageRole$ || (exports2.UserMessageRole$ = UserMessageRole$ = {})); - exports2.UserMessage$inboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)])), + exports2.UserMessage$inboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)])), role: exports2.UserMessageRole$inboundSchema.default("user") }); - exports2.UserMessage$outboundSchema = z6.object({ - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)])), + exports2.UserMessage$outboundSchema = z7.object({ + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)])), role: exports2.UserMessageRole$outboundSchema.default("user") }); var UserMessage$; @@ -35328,7 +35812,7 @@ var require_usermessage = __commonJS({ return JSON.stringify(exports2.UserMessage$outboundSchema.parse(userMessage)); } function userMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UserMessage$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UserMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UserMessage$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UserMessage' from JSON`); } } }); @@ -35337,31 +35821,31 @@ var require_usermessage = __commonJS({ var require_agentscompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/agentscompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -35374,7 +35858,7 @@ var require_agentscompletionrequest = __commonJS({ exports2.agentsCompletionRequestToolChoiceFromJSON = agentsCompletionRequestToolChoiceFromJSON; exports2.agentsCompletionRequestToJSON = agentsCompletionRequestToJSON; exports2.agentsCompletionRequestFromJSON = agentsCompletionRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -35385,8 +35869,8 @@ var require_agentscompletionrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.AgentsCompletionRequestStop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.AgentsCompletionRequestStop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.AgentsCompletionRequestStop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.AgentsCompletionRequestStop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var AgentsCompletionRequestStop$; (function(AgentsCompletionRequestStop$2) { AgentsCompletionRequestStop$2.inboundSchema = exports2.AgentsCompletionRequestStop$inboundSchema; @@ -35396,27 +35880,27 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestStop$outboundSchema.parse(agentsCompletionRequestStop)); } function agentsCompletionRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionRequestStop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionRequestStop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionRequestStop' from JSON`); } - exports2.AgentsCompletionRequestMessages$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionRequestMessages$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); - exports2.AgentsCompletionRequestMessages$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionRequestMessages$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); var AgentsCompletionRequestMessages$; (function(AgentsCompletionRequestMessages$2) { @@ -35427,10 +35911,10 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestMessages$outboundSchema.parse(agentsCompletionRequestMessages)); } function agentsCompletionRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionRequestMessages$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionRequestMessages$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionRequestMessages' from JSON`); } - exports2.AgentsCompletionRequestToolChoice$inboundSchema = z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.AgentsCompletionRequestToolChoice$outboundSchema = z6.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.AgentsCompletionRequestToolChoice$inboundSchema = z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.AgentsCompletionRequestToolChoice$outboundSchema = z7.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var AgentsCompletionRequestToolChoice$; (function(AgentsCompletionRequestToolChoice$2) { AgentsCompletionRequestToolChoice$2.inboundSchema = exports2.AgentsCompletionRequestToolChoice$inboundSchema; @@ -35440,36 +35924,36 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestToolChoice$outboundSchema.parse(agentsCompletionRequestToolChoice)); } function agentsCompletionRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionRequestToolChoice' from JSON`); - } - exports2.AgentsCompletionRequest$inboundSchema = z6.object({ - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionRequestToolChoice' from JSON`); + } + exports2.AgentsCompletionRequest$inboundSchema = z7.object({ + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z6.number().optional(), - frequency_penalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - agent_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + tools: z7.nullable(z7.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z7.number().optional(), + frequency_penalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + agent_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "max_tokens": "maxTokens", "random_seed": "randomSeed", "response_format": "responseFormat", @@ -35479,37 +35963,37 @@ var require_agentscompletionrequest = __commonJS({ "agent_id": "agentId" }); }); - exports2.AgentsCompletionRequest$outboundSchema = z6.object({ - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionRequest$outboundSchema = z7.object({ + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z6.union([ + tools: z7.nullable(z7.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z7.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z6.number().optional(), - frequencyPenalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - agentId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + presencePenalty: z7.number().optional(), + frequencyPenalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + agentId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { maxTokens: "max_tokens", randomSeed: "random_seed", responseFormat: "response_format", @@ -35528,7 +36012,7 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequest$outboundSchema.parse(agentsCompletionRequest)); } function agentsCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionRequest' from JSON`); } } }); @@ -35537,31 +36021,31 @@ var require_agentscompletionrequest = __commonJS({ var require_agentscompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/agentscompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -35574,7 +36058,7 @@ var require_agentscompletionstreamrequest = __commonJS({ exports2.agentsCompletionStreamRequestToolChoiceFromJSON = agentsCompletionStreamRequestToolChoiceFromJSON; exports2.agentsCompletionStreamRequestToJSON = agentsCompletionStreamRequestToJSON; exports2.agentsCompletionStreamRequestFromJSON = agentsCompletionStreamRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -35585,8 +36069,8 @@ var require_agentscompletionstreamrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.AgentsCompletionStreamRequestStop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.AgentsCompletionStreamRequestStop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.AgentsCompletionStreamRequestStop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.AgentsCompletionStreamRequestStop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var AgentsCompletionStreamRequestStop$; (function(AgentsCompletionStreamRequestStop$2) { AgentsCompletionStreamRequestStop$2.inboundSchema = exports2.AgentsCompletionStreamRequestStop$inboundSchema; @@ -35596,27 +36080,27 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestStop$outboundSchema.parse(agentsCompletionStreamRequestStop)); } function agentsCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionStreamRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionStreamRequestStop' from JSON`); } - exports2.AgentsCompletionStreamRequestMessages$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionStreamRequestMessages$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); - exports2.AgentsCompletionStreamRequestMessages$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionStreamRequestMessages$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); var AgentsCompletionStreamRequestMessages$; (function(AgentsCompletionStreamRequestMessages$2) { @@ -35627,10 +36111,10 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestMessages$outboundSchema.parse(agentsCompletionStreamRequestMessages)); } function agentsCompletionStreamRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionStreamRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionStreamRequestMessages' from JSON`); } - exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema = z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema = z6.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema = z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema = z7.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var AgentsCompletionStreamRequestToolChoice$; (function(AgentsCompletionStreamRequestToolChoice$2) { AgentsCompletionStreamRequestToolChoice$2.inboundSchema = exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema; @@ -35640,36 +36124,36 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema.parse(agentsCompletionStreamRequestToolChoice)); } function agentsCompletionStreamRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionStreamRequestToolChoice' from JSON`); - } - exports2.AgentsCompletionStreamRequest$inboundSchema = z6.object({ - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionStreamRequestToolChoice' from JSON`); + } + exports2.AgentsCompletionStreamRequest$inboundSchema = z7.object({ + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z6.number().optional(), - frequency_penalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - agent_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + tools: z7.nullable(z7.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z7.number().optional(), + frequency_penalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + agent_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "max_tokens": "maxTokens", "random_seed": "randomSeed", "response_format": "responseFormat", @@ -35679,37 +36163,37 @@ var require_agentscompletionstreamrequest = __commonJS({ "agent_id": "agentId" }); }); - exports2.AgentsCompletionStreamRequest$outboundSchema = z6.object({ - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.AgentsCompletionStreamRequest$outboundSchema = z7.object({ + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z6.union([ + tools: z7.nullable(z7.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z7.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z6.number().optional(), - frequencyPenalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - agentId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + presencePenalty: z7.number().optional(), + frequencyPenalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + agentId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { maxTokens: "max_tokens", randomSeed: "random_seed", responseFormat: "response_format", @@ -35728,7 +36212,7 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequest$outboundSchema.parse(agentsCompletionStreamRequest)); } function agentsCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.AgentsCompletionStreamRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'AgentsCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.AgentsCompletionStreamRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'AgentsCompletionStreamRequest' from JSON`); } } }); @@ -35737,36 +36221,36 @@ var require_agentscompletionstreamrequest = __commonJS({ var require_apiendpoint = __commonJS({ "node_modules/@mistralai/mistralai/models/components/apiendpoint.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ApiEndpoint$ = exports2.ApiEndpoint$outboundSchema = exports2.ApiEndpoint$inboundSchema = exports2.ApiEndpoint = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var enums_js_1 = require_enums(); exports2.ApiEndpoint = { RootV1ChatCompletions: "/v1/chat/completions", @@ -35775,13 +36259,13 @@ var require_apiendpoint = __commonJS({ RootV1Moderations: "/v1/moderations", RootV1ChatModerations: "/v1/chat/moderations" }; - exports2.ApiEndpoint$inboundSchema = z6.union([ - z6.nativeEnum(exports2.ApiEndpoint), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.ApiEndpoint$inboundSchema = z7.union([ + z7.nativeEnum(exports2.ApiEndpoint), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.ApiEndpoint$outboundSchema = z6.union([ - z6.nativeEnum(exports2.ApiEndpoint), - z6.string().and(z6.custom()) + exports2.ApiEndpoint$outboundSchema = z7.union([ + z7.nativeEnum(exports2.ApiEndpoint), + z7.string().and(z7.custom()) ]); var ApiEndpoint$; (function(ApiEndpoint$2) { @@ -35795,58 +36279,58 @@ var require_apiendpoint = __commonJS({ var require_archiveftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/archiveftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArchiveFTModelOut$ = exports2.ArchiveFTModelOut$outboundSchema = exports2.ArchiveFTModelOut$inboundSchema = exports2.ArchiveFTModelOutObject$ = exports2.ArchiveFTModelOutObject$outboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema = exports2.ArchiveFTModelOutObject = void 0; exports2.archiveFTModelOutToJSON = archiveFTModelOutToJSON; exports2.archiveFTModelOutFromJSON = archiveFTModelOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); exports2.ArchiveFTModelOutObject = { Model: "model" }; - exports2.ArchiveFTModelOutObject$inboundSchema = z6.nativeEnum(exports2.ArchiveFTModelOutObject); + exports2.ArchiveFTModelOutObject$inboundSchema = z7.nativeEnum(exports2.ArchiveFTModelOutObject); exports2.ArchiveFTModelOutObject$outboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema; var ArchiveFTModelOutObject$; (function(ArchiveFTModelOutObject$2) { ArchiveFTModelOutObject$2.inboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema; ArchiveFTModelOutObject$2.outboundSchema = exports2.ArchiveFTModelOutObject$outboundSchema; })(ArchiveFTModelOutObject$ || (exports2.ArchiveFTModelOutObject$ = ArchiveFTModelOutObject$ = {})); - exports2.ArchiveFTModelOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - archived: z6.boolean().default(true) + exports2.ArchiveFTModelOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + archived: z7.boolean().default(true) }); - exports2.ArchiveFTModelOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - archived: z6.boolean().default(true) + exports2.ArchiveFTModelOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + archived: z7.boolean().default(true) }); var ArchiveFTModelOut$; (function(ArchiveFTModelOut$2) { @@ -35857,7 +36341,7 @@ var require_archiveftmodelout = __commonJS({ return JSON.stringify(exports2.ArchiveFTModelOut$outboundSchema.parse(archiveFTModelOut)); } function archiveFTModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ArchiveFTModelOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ArchiveFTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ArchiveFTModelOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ArchiveFTModelOut' from JSON`); } } }); @@ -35866,62 +36350,62 @@ var require_archiveftmodelout = __commonJS({ var require_modelcapabilities = __commonJS({ "node_modules/@mistralai/mistralai/models/components/modelcapabilities.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ModelCapabilities$ = exports2.ModelCapabilities$outboundSchema = exports2.ModelCapabilities$inboundSchema = void 0; exports2.modelCapabilitiesToJSON = modelCapabilitiesToJSON; exports2.modelCapabilitiesFromJSON = modelCapabilitiesFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ModelCapabilities$inboundSchema = z6.object({ - completion_chat: z6.boolean().default(true), - completion_fim: z6.boolean().default(false), - function_calling: z6.boolean().default(true), - fine_tuning: z6.boolean().default(false), - vision: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ModelCapabilities$inboundSchema = z7.object({ + completion_chat: z7.boolean().default(true), + completion_fim: z7.boolean().default(false), + function_calling: z7.boolean().default(true), + fine_tuning: z7.boolean().default(false), + vision: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "completion_chat": "completionChat", "completion_fim": "completionFim", "function_calling": "functionCalling", "fine_tuning": "fineTuning" }); }); - exports2.ModelCapabilities$outboundSchema = z6.object({ - completionChat: z6.boolean().default(true), - completionFim: z6.boolean().default(false), - functionCalling: z6.boolean().default(true), - fineTuning: z6.boolean().default(false), - vision: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ModelCapabilities$outboundSchema = z7.object({ + completionChat: z7.boolean().default(true), + completionFim: z7.boolean().default(false), + functionCalling: z7.boolean().default(true), + fineTuning: z7.boolean().default(false), + vision: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { completionChat: "completion_chat", completionFim: "completion_fim", functionCalling: "function_calling", @@ -35937,7 +36421,7 @@ var require_modelcapabilities = __commonJS({ return JSON.stringify(exports2.ModelCapabilities$outboundSchema.parse(modelCapabilities)); } function modelCapabilitiesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ModelCapabilities$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ModelCapabilities' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ModelCapabilities$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ModelCapabilities' from JSON`); } } }); @@ -35946,86 +36430,86 @@ var require_modelcapabilities = __commonJS({ var require_basemodelcard = __commonJS({ "node_modules/@mistralai/mistralai/models/components/basemodelcard.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BaseModelCard$ = exports2.BaseModelCard$outboundSchema = exports2.BaseModelCard$inboundSchema = exports2.Type$ = exports2.Type$outboundSchema = exports2.Type$inboundSchema = exports2.Type = void 0; exports2.baseModelCardToJSON = baseModelCardToJSON; exports2.baseModelCardFromJSON = baseModelCardFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var modelcapabilities_js_1 = require_modelcapabilities(); exports2.Type = { Base: "base" }; - exports2.Type$inboundSchema = z6.nativeEnum(exports2.Type); + exports2.Type$inboundSchema = z7.nativeEnum(exports2.Type); exports2.Type$outboundSchema = exports2.Type$inboundSchema; var Type$; (function(Type$2) { Type$2.inboundSchema = exports2.Type$inboundSchema; Type$2.outboundSchema = exports2.Type$outboundSchema; })(Type$ || (exports2.Type$ = Type$ = {})); - exports2.BaseModelCard$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - created: z6.number().int().optional(), - owned_by: z6.string().default("mistralai"), + exports2.BaseModelCard$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + created: z7.number().int().optional(), + owned_by: z7.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$inboundSchema, - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), - max_context_length: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - deprecation: z6.nullable(z6.string().datetime({ offset: true }).transform((v5) => new Date(v5))).optional(), - default_model_temperature: z6.nullable(z6.number()).optional(), - type: z6.literal("base").default("base") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), + max_context_length: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + deprecation: z7.nullable(z7.string().datetime({ offset: true }).transform((v8) => new Date(v8))).optional(), + default_model_temperature: z7.nullable(z7.number()).optional(), + type: z7.literal("base").default("base") + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", "default_model_temperature": "defaultModelTemperature" }); }); - exports2.BaseModelCard$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - created: z6.number().int().optional(), - ownedBy: z6.string().default("mistralai"), + exports2.BaseModelCard$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + created: z7.number().int().optional(), + ownedBy: z7.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$outboundSchema, - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), - maxContextLength: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - deprecation: z6.nullable(z6.date().transform((v5) => v5.toISOString())).optional(), - defaultModelTemperature: z6.nullable(z6.number()).optional(), - type: z6.literal("base").default("base") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), + maxContextLength: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + deprecation: z7.nullable(z7.date().transform((v8) => v8.toISOString())).optional(), + defaultModelTemperature: z7.nullable(z7.number()).optional(), + type: z7.literal("base").default("base") + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { ownedBy: "owned_by", maxContextLength: "max_context_length", defaultModelTemperature: "default_model_temperature" @@ -36040,7 +36524,7 @@ var require_basemodelcard = __commonJS({ return JSON.stringify(exports2.BaseModelCard$outboundSchema.parse(baseModelCard)); } function baseModelCardFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.BaseModelCard$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'BaseModelCard' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.BaseModelCard$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'BaseModelCard' from JSON`); } } }); @@ -36049,46 +36533,46 @@ var require_basemodelcard = __commonJS({ var require_batcherror = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batcherror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchError$ = exports2.BatchError$outboundSchema = exports2.BatchError$inboundSchema = void 0; exports2.batchErrorToJSON = batchErrorToJSON; exports2.batchErrorFromJSON = batchErrorFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.BatchError$inboundSchema = z6.object({ - message: z6.string(), - count: z6.number().int().default(1) + exports2.BatchError$inboundSchema = z7.object({ + message: z7.string(), + count: z7.number().int().default(1) }); - exports2.BatchError$outboundSchema = z6.object({ - message: z6.string(), - count: z6.number().int().default(1) + exports2.BatchError$outboundSchema = z7.object({ + message: z7.string(), + count: z7.number().int().default(1) }); var BatchError$; (function(BatchError$2) { @@ -36099,7 +36583,7 @@ var require_batcherror = __commonJS({ return JSON.stringify(exports2.BatchError$outboundSchema.parse(batchError)); } function batchErrorFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.BatchError$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'BatchError' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.BatchError$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'BatchError' from JSON`); } } }); @@ -36108,61 +36592,61 @@ var require_batcherror = __commonJS({ var require_batchjobin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobIn$ = exports2.BatchJobIn$outboundSchema = exports2.BatchJobIn$inboundSchema = void 0; exports2.batchJobInToJSON = batchJobInToJSON; exports2.batchJobInFromJSON = batchJobInFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var apiendpoint_js_1 = require_apiendpoint(); - exports2.BatchJobIn$inboundSchema = z6.object({ - input_files: z6.array(z6.string()), + exports2.BatchJobIn$inboundSchema = z7.object({ + input_files: z7.array(z7.string()), endpoint: apiendpoint_js_1.ApiEndpoint$inboundSchema, - model: z6.string(), - metadata: z6.nullable(z6.record(z6.string())).optional(), - timeout_hours: z6.number().int().default(24) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + model: z7.string(), + metadata: z7.nullable(z7.record(z7.string())).optional(), + timeout_hours: z7.number().int().default(24) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "input_files": "inputFiles", "timeout_hours": "timeoutHours" }); }); - exports2.BatchJobIn$outboundSchema = z6.object({ - inputFiles: z6.array(z6.string()), + exports2.BatchJobIn$outboundSchema = z7.object({ + inputFiles: z7.array(z7.string()), endpoint: apiendpoint_js_1.ApiEndpoint$outboundSchema, - model: z6.string(), - metadata: z6.nullable(z6.record(z6.string())).optional(), - timeoutHours: z6.number().int().default(24) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + model: z7.string(), + metadata: z7.nullable(z7.record(z7.string())).optional(), + timeoutHours: z7.number().int().default(24) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { inputFiles: "input_files", timeoutHours: "timeout_hours" }); @@ -36176,7 +36660,7 @@ var require_batchjobin = __commonJS({ return JSON.stringify(exports2.BatchJobIn$outboundSchema.parse(batchJobIn)); } function batchJobInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.BatchJobIn$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'BatchJobIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.BatchJobIn$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'BatchJobIn' from JSON`); } } }); @@ -36185,36 +36669,36 @@ var require_batchjobin = __commonJS({ var require_batchjobstatus = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobstatus.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobStatus$ = exports2.BatchJobStatus$outboundSchema = exports2.BatchJobStatus$inboundSchema = exports2.BatchJobStatus = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); exports2.BatchJobStatus = { Queued: "QUEUED", Running: "RUNNING", @@ -36224,7 +36708,7 @@ var require_batchjobstatus = __commonJS({ CancellationRequested: "CANCELLATION_REQUESTED", Cancelled: "CANCELLED" }; - exports2.BatchJobStatus$inboundSchema = z6.nativeEnum(exports2.BatchJobStatus); + exports2.BatchJobStatus$inboundSchema = z7.nativeEnum(exports2.BatchJobStatus); exports2.BatchJobStatus$outboundSchema = exports2.BatchJobStatus$inboundSchema; var BatchJobStatus$; (function(BatchJobStatus$2) { @@ -36238,38 +36722,38 @@ var require_batchjobstatus = __commonJS({ var require_batchjobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobOut$ = exports2.BatchJobOut$outboundSchema = exports2.BatchJobOut$inboundSchema = exports2.BatchJobOutObject$ = exports2.BatchJobOutObject$outboundSchema = exports2.BatchJobOutObject$inboundSchema = exports2.BatchJobOutObject = void 0; exports2.batchJobOutToJSON = batchJobOutToJSON; exports2.batchJobOutFromJSON = batchJobOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var batcherror_js_1 = require_batcherror(); @@ -36277,33 +36761,33 @@ var require_batchjobout = __commonJS({ exports2.BatchJobOutObject = { Batch: "batch" }; - exports2.BatchJobOutObject$inboundSchema = z6.nativeEnum(exports2.BatchJobOutObject); + exports2.BatchJobOutObject$inboundSchema = z7.nativeEnum(exports2.BatchJobOutObject); exports2.BatchJobOutObject$outboundSchema = exports2.BatchJobOutObject$inboundSchema; var BatchJobOutObject$; (function(BatchJobOutObject$2) { BatchJobOutObject$2.inboundSchema = exports2.BatchJobOutObject$inboundSchema; BatchJobOutObject$2.outboundSchema = exports2.BatchJobOutObject$outboundSchema; })(BatchJobOutObject$ || (exports2.BatchJobOutObject$ = BatchJobOutObject$ = {})); - exports2.BatchJobOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("batch").default("batch"), - input_files: z6.array(z6.string()), - metadata: z6.nullable(z6.record(z6.any())).optional(), - endpoint: z6.string(), - model: z6.string(), - output_file: z6.nullable(z6.string()).optional(), - error_file: z6.nullable(z6.string()).optional(), - errors: z6.array(batcherror_js_1.BatchError$inboundSchema), + exports2.BatchJobOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("batch").default("batch"), + input_files: z7.array(z7.string()), + metadata: z7.nullable(z7.record(z7.any())).optional(), + endpoint: z7.string(), + model: z7.string(), + output_file: z7.nullable(z7.string()).optional(), + error_file: z7.nullable(z7.string()).optional(), + errors: z7.array(batcherror_js_1.BatchError$inboundSchema), status: batchjobstatus_js_1.BatchJobStatus$inboundSchema, - created_at: z6.number().int(), - total_requests: z6.number().int(), - completed_requests: z6.number().int(), - succeeded_requests: z6.number().int(), - failed_requests: z6.number().int(), - started_at: z6.nullable(z6.number().int()).optional(), - completed_at: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + created_at: z7.number().int(), + total_requests: z7.number().int(), + completed_requests: z7.number().int(), + succeeded_requests: z7.number().int(), + failed_requests: z7.number().int(), + started_at: z7.nullable(z7.number().int()).optional(), + completed_at: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "input_files": "inputFiles", "output_file": "outputFile", "error_file": "errorFile", @@ -36316,26 +36800,26 @@ var require_batchjobout = __commonJS({ "completed_at": "completedAt" }); }); - exports2.BatchJobOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("batch").default("batch"), - inputFiles: z6.array(z6.string()), - metadata: z6.nullable(z6.record(z6.any())).optional(), - endpoint: z6.string(), - model: z6.string(), - outputFile: z6.nullable(z6.string()).optional(), - errorFile: z6.nullable(z6.string()).optional(), - errors: z6.array(batcherror_js_1.BatchError$outboundSchema), + exports2.BatchJobOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("batch").default("batch"), + inputFiles: z7.array(z7.string()), + metadata: z7.nullable(z7.record(z7.any())).optional(), + endpoint: z7.string(), + model: z7.string(), + outputFile: z7.nullable(z7.string()).optional(), + errorFile: z7.nullable(z7.string()).optional(), + errors: z7.array(batcherror_js_1.BatchError$outboundSchema), status: batchjobstatus_js_1.BatchJobStatus$outboundSchema, - createdAt: z6.number().int(), - totalRequests: z6.number().int(), - completedRequests: z6.number().int(), - succeededRequests: z6.number().int(), - failedRequests: z6.number().int(), - startedAt: z6.nullable(z6.number().int()).optional(), - completedAt: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + createdAt: z7.number().int(), + totalRequests: z7.number().int(), + completedRequests: z7.number().int(), + succeededRequests: z7.number().int(), + failedRequests: z7.number().int(), + startedAt: z7.nullable(z7.number().int()).optional(), + completedAt: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { inputFiles: "input_files", outputFile: "output_file", errorFile: "error_file", @@ -36357,7 +36841,7 @@ var require_batchjobout = __commonJS({ return JSON.stringify(exports2.BatchJobOut$outboundSchema.parse(batchJobOut)); } function batchJobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.BatchJobOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'BatchJobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.BatchJobOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'BatchJobOut' from JSON`); } } }); @@ -36366,59 +36850,59 @@ var require_batchjobout = __commonJS({ var require_batchjobsout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobsout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobsOut$ = exports2.BatchJobsOut$outboundSchema = exports2.BatchJobsOut$inboundSchema = exports2.BatchJobsOutObject$ = exports2.BatchJobsOutObject$outboundSchema = exports2.BatchJobsOutObject$inboundSchema = exports2.BatchJobsOutObject = void 0; exports2.batchJobsOutToJSON = batchJobsOutToJSON; exports2.batchJobsOutFromJSON = batchJobsOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var batchjobout_js_1 = require_batchjobout(); exports2.BatchJobsOutObject = { List: "list" }; - exports2.BatchJobsOutObject$inboundSchema = z6.nativeEnum(exports2.BatchJobsOutObject); + exports2.BatchJobsOutObject$inboundSchema = z7.nativeEnum(exports2.BatchJobsOutObject); exports2.BatchJobsOutObject$outboundSchema = exports2.BatchJobsOutObject$inboundSchema; var BatchJobsOutObject$; (function(BatchJobsOutObject$2) { BatchJobsOutObject$2.inboundSchema = exports2.BatchJobsOutObject$inboundSchema; BatchJobsOutObject$2.outboundSchema = exports2.BatchJobsOutObject$outboundSchema; })(BatchJobsOutObject$ || (exports2.BatchJobsOutObject$ = BatchJobsOutObject$ = {})); - exports2.BatchJobsOut$inboundSchema = z6.object({ - data: z6.array(batchjobout_js_1.BatchJobOut$inboundSchema).optional(), - object: z6.literal("list").default("list"), - total: z6.number().int() + exports2.BatchJobsOut$inboundSchema = z7.object({ + data: z7.array(batchjobout_js_1.BatchJobOut$inboundSchema).optional(), + object: z7.literal("list").default("list"), + total: z7.number().int() }); - exports2.BatchJobsOut$outboundSchema = z6.object({ - data: z6.array(batchjobout_js_1.BatchJobOut$outboundSchema).optional(), - object: z6.literal("list").default("list"), - total: z6.number().int() + exports2.BatchJobsOut$outboundSchema = z7.object({ + data: z7.array(batchjobout_js_1.BatchJobOut$outboundSchema).optional(), + object: z7.literal("list").default("list"), + total: z7.number().int() }); var BatchJobsOut$; (function(BatchJobsOut$2) { @@ -36429,7 +36913,7 @@ var require_batchjobsout = __commonJS({ return JSON.stringify(exports2.BatchJobsOut$outboundSchema.parse(batchJobsOut)); } function batchJobsOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.BatchJobsOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'BatchJobsOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.BatchJobsOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'BatchJobsOut' from JSON`); } } }); @@ -36438,31 +36922,31 @@ var require_batchjobsout = __commonJS({ var require_chatclassificationrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatclassificationrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -36475,39 +36959,39 @@ var require_chatclassificationrequest = __commonJS({ exports2.chatClassificationRequestInputsFromJSON = chatClassificationRequestInputsFromJSON; exports2.chatClassificationRequestToJSON = chatClassificationRequestToJSON; exports2.chatClassificationRequestFromJSON = chatClassificationRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); var systemmessage_js_1 = require_systemmessage(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.Two$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.Two$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]); - exports2.Two$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.Two$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]); var Two$; @@ -36519,34 +37003,34 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.Two$outboundSchema.parse(two)); } function twoFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Two$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Two' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Two$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Two' from JSON`); } - exports2.One$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.One$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]); - exports2.One$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.One$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]); var One$; @@ -36558,65 +37042,65 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.One$outboundSchema.parse(one)); } function oneFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.One$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'One' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.One$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'One' from JSON`); } - exports2.ChatClassificationRequestInputs$inboundSchema = z6.union([ - z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatClassificationRequestInputs$inboundSchema = z7.union([ + z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), - z6.array(z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + z7.array(z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]))) ]); - exports2.ChatClassificationRequestInputs$outboundSchema = z6.union([ - z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatClassificationRequestInputs$outboundSchema = z7.union([ + z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), - z6.array(z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + z7.array(z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]))) ]); @@ -36629,79 +37113,79 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.ChatClassificationRequestInputs$outboundSchema.parse(chatClassificationRequestInputs)); } function chatClassificationRequestInputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatClassificationRequestInputs$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatClassificationRequestInputs' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatClassificationRequestInputs$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatClassificationRequestInputs' from JSON`); } - exports2.ChatClassificationRequest$inboundSchema = z6.object({ - input: z6.union([ - z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatClassificationRequest$inboundSchema = z7.object({ + input: z7.union([ + z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), - z6.array(z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + z7.array(z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]))) ]), - model: z6.nullable(z6.string()) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + model: z7.nullable(z7.string()) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "input": "inputs" }); }); - exports2.ChatClassificationRequest$outboundSchema = z6.object({ - inputs: z6.union([ - z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatClassificationRequest$outboundSchema = z7.object({ + inputs: z7.union([ + z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), - z6.array(z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + z7.array(z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ]))) ]), - model: z6.nullable(z6.string()) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + model: z7.nullable(z7.string()) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { inputs: "input" }); }); @@ -36714,7 +37198,7 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.ChatClassificationRequest$outboundSchema.parse(chatClassificationRequest)); } function chatClassificationRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatClassificationRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatClassificationRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatClassificationRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatClassificationRequest' from JSON`); } } }); @@ -36723,38 +37207,38 @@ var require_chatclassificationrequest = __commonJS({ var require_chatcompletionchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ChatCompletionChoice$ = exports2.ChatCompletionChoice$outboundSchema = exports2.ChatCompletionChoice$inboundSchema = exports2.FinishReason$ = exports2.FinishReason$outboundSchema = exports2.FinishReason$inboundSchema = exports2.FinishReason = void 0; exports2.chatCompletionChoiceToJSON = chatCompletionChoiceToJSON; exports2.chatCompletionChoiceFromJSON = chatCompletionChoiceFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var enums_js_1 = require_enums(); @@ -36766,34 +37250,34 @@ var require_chatcompletionchoice = __commonJS({ Error: "error", ToolCalls: "tool_calls" }; - exports2.FinishReason$inboundSchema = z6.union([ - z6.nativeEnum(exports2.FinishReason), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.FinishReason$inboundSchema = z7.union([ + z7.nativeEnum(exports2.FinishReason), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.FinishReason$outboundSchema = z6.union([ - z6.nativeEnum(exports2.FinishReason), - z6.string().and(z6.custom()) + exports2.FinishReason$outboundSchema = z7.union([ + z7.nativeEnum(exports2.FinishReason), + z7.string().and(z7.custom()) ]); var FinishReason$; (function(FinishReason$2) { FinishReason$2.inboundSchema = exports2.FinishReason$inboundSchema; FinishReason$2.outboundSchema = exports2.FinishReason$outboundSchema; })(FinishReason$ || (exports2.FinishReason$ = FinishReason$ = {})); - exports2.ChatCompletionChoice$inboundSchema = z6.object({ - index: z6.number().int(), + exports2.ChatCompletionChoice$inboundSchema = z7.object({ + index: z7.number().int(), message: assistantmessage_js_1.AssistantMessage$inboundSchema, finish_reason: exports2.FinishReason$inboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "finish_reason": "finishReason" }); }); - exports2.ChatCompletionChoice$outboundSchema = z6.object({ - index: z6.number().int(), + exports2.ChatCompletionChoice$outboundSchema = z7.object({ + index: z7.number().int(), message: assistantmessage_js_1.AssistantMessage$outboundSchema, finishReason: exports2.FinishReason$outboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { finishReason: "finish_reason" }); }); @@ -36806,7 +37290,7 @@ var require_chatcompletionchoice = __commonJS({ return JSON.stringify(exports2.ChatCompletionChoice$outboundSchema.parse(chatCompletionChoice)); } function chatCompletionChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionChoice' from JSON`); } } }); @@ -36815,31 +37299,31 @@ var require_chatcompletionchoice = __commonJS({ var require_chatcompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -36852,7 +37336,7 @@ var require_chatcompletionrequest = __commonJS({ exports2.chatCompletionRequestToolChoiceFromJSON = chatCompletionRequestToolChoiceFromJSON; exports2.chatCompletionRequestToJSON = chatCompletionRequestToJSON; exports2.chatCompletionRequestFromJSON = chatCompletionRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -36863,8 +37347,8 @@ var require_chatcompletionrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.Stop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.Stop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.Stop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.Stop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var Stop$; (function(Stop$2) { Stop$2.inboundSchema = exports2.Stop$inboundSchema; @@ -36874,27 +37358,27 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.Stop$outboundSchema.parse(stop)); } function stopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Stop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Stop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Stop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Stop' from JSON`); } - exports2.Messages$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.Messages$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); - exports2.Messages$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.Messages$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); var Messages$; (function(Messages$2) { @@ -36905,10 +37389,10 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.Messages$outboundSchema.parse(messages)); } function messagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Messages$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Messages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Messages$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Messages' from JSON`); } - exports2.ChatCompletionRequestToolChoice$inboundSchema = z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.ChatCompletionRequestToolChoice$outboundSchema = z6.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.ChatCompletionRequestToolChoice$inboundSchema = z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.ChatCompletionRequestToolChoice$outboundSchema = z7.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var ChatCompletionRequestToolChoice$; (function(ChatCompletionRequestToolChoice$2) { ChatCompletionRequestToolChoice$2.inboundSchema = exports2.ChatCompletionRequestToolChoice$inboundSchema; @@ -36918,39 +37402,39 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionRequestToolChoice$outboundSchema.parse(chatCompletionRequestToolChoice)); } function chatCompletionRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionRequestToolChoice' from JSON`); - } - exports2.ChatCompletionRequest$inboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - top_p: z6.number().default(1), - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionRequestToolChoice' from JSON`); + } + exports2.ChatCompletionRequest$inboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + top_p: z7.number().default(1), + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z6.number().optional(), - frequency_penalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - safe_prompt: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + tools: z7.nullable(z7.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z7.number().optional(), + frequency_penalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + safe_prompt: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", @@ -36961,40 +37445,40 @@ var require_chatcompletionrequest = __commonJS({ "safe_prompt": "safePrompt" }); }); - exports2.ChatCompletionRequest$outboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - topP: z6.number().default(1), - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatCompletionRequest$outboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + topP: z7.number().default(1), + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z6.union([ + tools: z7.nullable(z7.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z7.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z6.number().optional(), - frequencyPenalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - safePrompt: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + presencePenalty: z7.number().optional(), + frequencyPenalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + safePrompt: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -37014,7 +37498,7 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionRequest$outboundSchema.parse(chatCompletionRequest)); } function chatCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionRequest' from JSON`); } } }); @@ -37023,57 +37507,57 @@ var require_chatcompletionrequest = __commonJS({ var require_usageinfo = __commonJS({ "node_modules/@mistralai/mistralai/models/components/usageinfo.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UsageInfo$ = exports2.UsageInfo$outboundSchema = exports2.UsageInfo$inboundSchema = void 0; exports2.usageInfoToJSON = usageInfoToJSON; exports2.usageInfoFromJSON = usageInfoFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.UsageInfo$inboundSchema = z6.object({ - prompt_tokens: z6.number().int(), - completion_tokens: z6.number().int(), - total_tokens: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.UsageInfo$inboundSchema = z7.object({ + prompt_tokens: z7.number().int(), + completion_tokens: z7.number().int(), + total_tokens: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "prompt_tokens": "promptTokens", "completion_tokens": "completionTokens", "total_tokens": "totalTokens" }); }); - exports2.UsageInfo$outboundSchema = z6.object({ - promptTokens: z6.number().int(), - completionTokens: z6.number().int(), - totalTokens: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.UsageInfo$outboundSchema = z7.object({ + promptTokens: z7.number().int(), + completionTokens: z7.number().int(), + totalTokens: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { promptTokens: "prompt_tokens", completionTokens: "completion_tokens", totalTokens: "total_tokens" @@ -37088,7 +37572,7 @@ var require_usageinfo = __commonJS({ return JSON.stringify(exports2.UsageInfo$outboundSchema.parse(usageInfo)); } function usageInfoFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UsageInfo$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UsageInfo' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UsageInfo$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UsageInfo' from JSON`); } } }); @@ -37097,56 +37581,56 @@ var require_usageinfo = __commonJS({ var require_chatcompletionresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ChatCompletionResponse$ = exports2.ChatCompletionResponse$outboundSchema = exports2.ChatCompletionResponse$inboundSchema = void 0; exports2.chatCompletionResponseToJSON = chatCompletionResponseToJSON; exports2.chatCompletionResponseFromJSON = chatCompletionResponseFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var chatcompletionchoice_js_1 = require_chatcompletionchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.ChatCompletionResponse$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.ChatCompletionResponse$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - created: z6.number().int().optional(), - choices: z6.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() + created: z7.number().int().optional(), + choices: z7.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() }); - exports2.ChatCompletionResponse$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.ChatCompletionResponse$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - created: z6.number().int().optional(), - choices: z6.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() + created: z7.number().int().optional(), + choices: z7.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() }); var ChatCompletionResponse$; (function(ChatCompletionResponse$2) { @@ -37157,7 +37641,7 @@ var require_chatcompletionresponse = __commonJS({ return JSON.stringify(exports2.ChatCompletionResponse$outboundSchema.parse(chatCompletionResponse)); } function chatCompletionResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionResponse$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionResponse$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionResponse' from JSON`); } } }); @@ -37166,31 +37650,31 @@ var require_chatcompletionresponse = __commonJS({ var require_chatcompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -37203,7 +37687,7 @@ var require_chatcompletionstreamrequest = __commonJS({ exports2.chatCompletionStreamRequestToolChoiceFromJSON = chatCompletionStreamRequestToolChoiceFromJSON; exports2.chatCompletionStreamRequestToJSON = chatCompletionStreamRequestToJSON; exports2.chatCompletionStreamRequestFromJSON = chatCompletionStreamRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -37214,8 +37698,8 @@ var require_chatcompletionstreamrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.ChatCompletionStreamRequestStop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.ChatCompletionStreamRequestStop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.ChatCompletionStreamRequestStop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.ChatCompletionStreamRequestStop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var ChatCompletionStreamRequestStop$; (function(ChatCompletionStreamRequestStop$2) { ChatCompletionStreamRequestStop$2.inboundSchema = exports2.ChatCompletionStreamRequestStop$inboundSchema; @@ -37225,27 +37709,27 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestStop$outboundSchema.parse(chatCompletionStreamRequestStop)); } function chatCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionStreamRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionStreamRequestStop' from JSON`); } - exports2.ChatCompletionStreamRequestMessages$inboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatCompletionStreamRequestMessages$inboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); - exports2.ChatCompletionStreamRequestMessages$outboundSchema = z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatCompletionStreamRequestMessages$outboundSchema = z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ role: v5.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ role: v8.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ role: v5.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ role: v8.role }))) ]); var ChatCompletionStreamRequestMessages$; (function(ChatCompletionStreamRequestMessages$2) { @@ -37256,10 +37740,10 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestMessages$outboundSchema.parse(chatCompletionStreamRequestMessages)); } function chatCompletionStreamRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionStreamRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionStreamRequestMessages' from JSON`); } - exports2.ChatCompletionStreamRequestToolChoice$inboundSchema = z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.ChatCompletionStreamRequestToolChoice$outboundSchema = z6.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.ChatCompletionStreamRequestToolChoice$inboundSchema = z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.ChatCompletionStreamRequestToolChoice$outboundSchema = z7.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var ChatCompletionStreamRequestToolChoice$; (function(ChatCompletionStreamRequestToolChoice$2) { ChatCompletionStreamRequestToolChoice$2.inboundSchema = exports2.ChatCompletionStreamRequestToolChoice$inboundSchema; @@ -37269,39 +37753,39 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestToolChoice$outboundSchema.parse(chatCompletionStreamRequestToolChoice)); } function chatCompletionStreamRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionStreamRequestToolChoice' from JSON`); - } - exports2.ChatCompletionStreamRequest$inboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - top_p: z6.number().default(1), - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionStreamRequestToolChoice' from JSON`); + } + exports2.ChatCompletionStreamRequest$inboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + top_p: z7.number().default(1), + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$inboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z6.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z6.number().optional(), - frequency_penalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - safe_prompt: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + tools: z7.nullable(z7.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z7.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z7.number().optional(), + frequency_penalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + safe_prompt: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", @@ -37312,40 +37796,40 @@ var require_chatcompletionstreamrequest = __commonJS({ "safe_prompt": "safePrompt" }); }); - exports2.ChatCompletionStreamRequest$outboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - topP: z6.number().default(1), - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - messages: z6.array(z6.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z6.object({ role: z6.literal("system") }).transform((v5) => ({ - role: v5.role + exports2.ChatCompletionStreamRequest$outboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + topP: z7.number().default(1), + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + messages: z7.array(z7.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z7.object({ role: z7.literal("system") }).transform((v8) => ({ + role: v8.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z6.object({ role: z6.literal("user") }).transform((v5) => ({ - role: v5.role + usermessage_js_1.UserMessage$outboundSchema.and(z7.object({ role: z7.literal("user") }).transform((v8) => ({ + role: v8.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z6.object({ role: z6.literal("assistant") }).transform((v5) => ({ - role: v5.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z7.object({ role: z7.literal("assistant") }).transform((v8) => ({ + role: v8.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z6.object({ role: z6.literal("tool") }).transform((v5) => ({ - role: v5.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z7.object({ role: z7.literal("tool") }).transform((v8) => ({ + role: v8.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z6.nullable(z6.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z6.union([ + tools: z7.nullable(z7.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z7.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z6.number().optional(), - frequencyPenalty: z6.number().optional(), - n: z6.nullable(z6.number().int()).optional(), - safePrompt: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + presencePenalty: z7.number().optional(), + frequencyPenalty: z7.number().optional(), + n: z7.nullable(z7.number().int()).optional(), + safePrompt: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -37365,7 +37849,7 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequest$outboundSchema.parse(chatCompletionStreamRequest)); } function chatCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ChatCompletionStreamRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ChatCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ChatCompletionStreamRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ChatCompletionStreamRequest' from JSON`); } } }); @@ -37374,57 +37858,57 @@ var require_chatcompletionstreamrequest = __commonJS({ var require_metricout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/metricout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MetricOut$ = exports2.MetricOut$outboundSchema = exports2.MetricOut$inboundSchema = void 0; exports2.metricOutToJSON = metricOutToJSON; exports2.metricOutFromJSON = metricOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.MetricOut$inboundSchema = z6.object({ - train_loss: z6.nullable(z6.number()).optional(), - valid_loss: z6.nullable(z6.number()).optional(), - valid_mean_token_accuracy: z6.nullable(z6.number()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.MetricOut$inboundSchema = z7.object({ + train_loss: z7.nullable(z7.number()).optional(), + valid_loss: z7.nullable(z7.number()).optional(), + valid_mean_token_accuracy: z7.nullable(z7.number()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "train_loss": "trainLoss", "valid_loss": "validLoss", "valid_mean_token_accuracy": "validMeanTokenAccuracy" }); }); - exports2.MetricOut$outboundSchema = z6.object({ - trainLoss: z6.nullable(z6.number()).optional(), - validLoss: z6.nullable(z6.number()).optional(), - validMeanTokenAccuracy: z6.nullable(z6.number()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.MetricOut$outboundSchema = z7.object({ + trainLoss: z7.nullable(z7.number()).optional(), + validLoss: z7.nullable(z7.number()).optional(), + validMeanTokenAccuracy: z7.nullable(z7.number()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { trainLoss: "train_loss", validLoss: "valid_loss", validMeanTokenAccuracy: "valid_mean_token_accuracy" @@ -37439,7 +37923,7 @@ var require_metricout = __commonJS({ return JSON.stringify(exports2.MetricOut$outboundSchema.parse(metricOut)); } function metricOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.MetricOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'MetricOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.MetricOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'MetricOut' from JSON`); } } }); @@ -37448,57 +37932,57 @@ var require_metricout = __commonJS({ var require_checkpointout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/checkpointout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CheckpointOut$ = exports2.CheckpointOut$outboundSchema = exports2.CheckpointOut$inboundSchema = void 0; exports2.checkpointOutToJSON = checkpointOutToJSON; exports2.checkpointOutFromJSON = checkpointOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var metricout_js_1 = require_metricout(); - exports2.CheckpointOut$inboundSchema = z6.object({ + exports2.CheckpointOut$inboundSchema = z7.object({ metrics: metricout_js_1.MetricOut$inboundSchema, - step_number: z6.number().int(), - created_at: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + step_number: z7.number().int(), + created_at: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "step_number": "stepNumber", "created_at": "createdAt" }); }); - exports2.CheckpointOut$outboundSchema = z6.object({ + exports2.CheckpointOut$outboundSchema = z7.object({ metrics: metricout_js_1.MetricOut$outboundSchema, - stepNumber: z6.number().int(), - createdAt: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + stepNumber: z7.number().int(), + createdAt: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { stepNumber: "step_number", createdAt: "created_at" }); @@ -37512,7 +37996,7 @@ var require_checkpointout = __commonJS({ return JSON.stringify(exports2.CheckpointOut$outboundSchema.parse(checkpointOut)); } function checkpointOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.CheckpointOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'CheckpointOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.CheckpointOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'CheckpointOut' from JSON`); } } }); @@ -37521,53 +38005,53 @@ var require_checkpointout = __commonJS({ var require_classificationobject = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationobject.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClassificationObject$ = exports2.ClassificationObject$outboundSchema = exports2.ClassificationObject$inboundSchema = void 0; exports2.classificationObjectToJSON = classificationObjectToJSON; exports2.classificationObjectFromJSON = classificationObjectFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ClassificationObject$inboundSchema = z6.object({ - categories: z6.record(z6.boolean()).optional(), - category_scores: z6.record(z6.number()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ClassificationObject$inboundSchema = z7.object({ + categories: z7.record(z7.boolean()).optional(), + category_scores: z7.record(z7.number()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "category_scores": "categoryScores" }); }); - exports2.ClassificationObject$outboundSchema = z6.object({ - categories: z6.record(z6.boolean()).optional(), - categoryScores: z6.record(z6.number()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ClassificationObject$outboundSchema = z7.object({ + categories: z7.record(z7.boolean()).optional(), + categoryScores: z7.record(z7.number()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { categoryScores: "category_scores" }); }); @@ -37580,7 +38064,7 @@ var require_classificationobject = __commonJS({ return JSON.stringify(exports2.ClassificationObject$outboundSchema.parse(classificationObject)); } function classificationObjectFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ClassificationObject$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ClassificationObject' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ClassificationObject$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ClassificationObject' from JSON`); } } }); @@ -37589,31 +38073,31 @@ var require_classificationobject = __commonJS({ var require_classificationrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -37622,11 +38106,11 @@ var require_classificationrequest = __commonJS({ exports2.classificationRequestInputsFromJSON = classificationRequestInputsFromJSON; exports2.classificationRequestToJSON = classificationRequestToJSON; exports2.classificationRequestFromJSON = classificationRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ClassificationRequestInputs$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.ClassificationRequestInputs$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.ClassificationRequestInputs$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.ClassificationRequestInputs$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var ClassificationRequestInputs$; (function(ClassificationRequestInputs$2) { ClassificationRequestInputs$2.inboundSchema = exports2.ClassificationRequestInputs$inboundSchema; @@ -37636,21 +38120,21 @@ var require_classificationrequest = __commonJS({ return JSON.stringify(exports2.ClassificationRequestInputs$outboundSchema.parse(classificationRequestInputs)); } function classificationRequestInputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ClassificationRequestInputs$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ClassificationRequestInputs' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ClassificationRequestInputs$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ClassificationRequestInputs' from JSON`); } - exports2.ClassificationRequest$inboundSchema = z6.object({ - input: z6.union([z6.string(), z6.array(z6.string())]), - model: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ClassificationRequest$inboundSchema = z7.object({ + input: z7.union([z7.string(), z7.array(z7.string())]), + model: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "input": "inputs" }); }); - exports2.ClassificationRequest$outboundSchema = z6.object({ - inputs: z6.union([z6.string(), z6.array(z6.string())]), - model: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.ClassificationRequest$outboundSchema = z7.object({ + inputs: z7.union([z7.string(), z7.array(z7.string())]), + model: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { inputs: "input" }); }); @@ -37663,7 +38147,7 @@ var require_classificationrequest = __commonJS({ return JSON.stringify(exports2.ClassificationRequest$outboundSchema.parse(classificationRequest)); } function classificationRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ClassificationRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ClassificationRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ClassificationRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ClassificationRequest' from JSON`); } } }); @@ -37672,49 +38156,49 @@ var require_classificationrequest = __commonJS({ var require_classificationresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClassificationResponse$ = exports2.ClassificationResponse$outboundSchema = exports2.ClassificationResponse$inboundSchema = void 0; exports2.classificationResponseToJSON = classificationResponseToJSON; exports2.classificationResponseFromJSON = classificationResponseFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var classificationobject_js_1 = require_classificationobject(); - exports2.ClassificationResponse$inboundSchema = z6.object({ - id: z6.string().optional(), - model: z6.string().optional(), - results: z6.array(classificationobject_js_1.ClassificationObject$inboundSchema).optional() + exports2.ClassificationResponse$inboundSchema = z7.object({ + id: z7.string().optional(), + model: z7.string().optional(), + results: z7.array(classificationobject_js_1.ClassificationObject$inboundSchema).optional() }); - exports2.ClassificationResponse$outboundSchema = z6.object({ - id: z6.string().optional(), - model: z6.string().optional(), - results: z6.array(classificationobject_js_1.ClassificationObject$outboundSchema).optional() + exports2.ClassificationResponse$outboundSchema = z7.object({ + id: z7.string().optional(), + model: z7.string().optional(), + results: z7.array(classificationobject_js_1.ClassificationObject$outboundSchema).optional() }); var ClassificationResponse$; (function(ClassificationResponse$2) { @@ -37725,7 +38209,7 @@ var require_classificationresponse = __commonJS({ return JSON.stringify(exports2.ClassificationResponse$outboundSchema.parse(classificationResponse)); } function classificationResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ClassificationResponse$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ClassificationResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ClassificationResponse$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ClassificationResponse' from JSON`); } } }); @@ -37734,31 +38218,31 @@ var require_classificationresponse = __commonJS({ var require_deltamessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deltamessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -37767,13 +38251,13 @@ var require_deltamessage = __commonJS({ exports2.contentFromJSON = contentFromJSON; exports2.deltaMessageToJSON = deltaMessageToJSON; exports2.deltaMessageFromJSON = deltaMessageFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); var toolcall_js_1 = require_toolcall(); - exports2.Content$inboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.Content$outboundSchema = z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.Content$inboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.Content$outboundSchema = z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var Content$; (function(Content$2) { Content$2.inboundSchema = exports2.Content$inboundSchema; @@ -37783,23 +38267,23 @@ var require_deltamessage = __commonJS({ return JSON.stringify(exports2.Content$outboundSchema.parse(content)); } function contentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Content$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Content' from JSON`); - } - exports2.DeltaMessage$inboundSchema = z6.object({ - role: z6.nullable(z6.string()).optional(), - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), - tool_calls: z6.nullable(z6.array(toolcall_js_1.ToolCall$inboundSchema)).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Content$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Content' from JSON`); + } + exports2.DeltaMessage$inboundSchema = z7.object({ + role: z7.nullable(z7.string()).optional(), + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), + tool_calls: z7.nullable(z7.array(toolcall_js_1.ToolCall$inboundSchema)).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "tool_calls": "toolCalls" }); }); - exports2.DeltaMessage$outboundSchema = z6.object({ - role: z6.nullable(z6.string()).optional(), - content: z6.nullable(z6.union([z6.string(), z6.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), - toolCalls: z6.nullable(z6.array(toolcall_js_1.ToolCall$outboundSchema)).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.DeltaMessage$outboundSchema = z7.object({ + role: z7.nullable(z7.string()).optional(), + content: z7.nullable(z7.union([z7.string(), z7.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), + toolCalls: z7.nullable(z7.array(toolcall_js_1.ToolCall$outboundSchema)).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { toolCalls: "tool_calls" }); }); @@ -37812,7 +38296,7 @@ var require_deltamessage = __commonJS({ return JSON.stringify(exports2.DeltaMessage$outboundSchema.parse(deltaMessage)); } function deltaMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DeltaMessage$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DeltaMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DeltaMessage$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DeltaMessage' from JSON`); } } }); @@ -37821,38 +38305,38 @@ var require_deltamessage = __commonJS({ var require_completionresponsestreamchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionresponsestreamchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionResponseStreamChoice$ = exports2.CompletionResponseStreamChoice$outboundSchema = exports2.CompletionResponseStreamChoice$inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$ = exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason = void 0; exports2.completionResponseStreamChoiceToJSON = completionResponseStreamChoiceToJSON; exports2.completionResponseStreamChoiceFromJSON = completionResponseStreamChoiceFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var enums_js_1 = require_enums(); @@ -37863,34 +38347,34 @@ var require_completionresponsestreamchoice = __commonJS({ Error: "error", ToolCalls: "tool_calls" }; - exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = z6.union([ - z6.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = z7.union([ + z7.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = z6.union([ - z6.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), - z6.string().and(z6.custom()) + exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = z7.union([ + z7.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), + z7.string().and(z7.custom()) ]); var CompletionResponseStreamChoiceFinishReason$; (function(CompletionResponseStreamChoiceFinishReason$2) { CompletionResponseStreamChoiceFinishReason$2.inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema; CompletionResponseStreamChoiceFinishReason$2.outboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema; })(CompletionResponseStreamChoiceFinishReason$ || (exports2.CompletionResponseStreamChoiceFinishReason$ = CompletionResponseStreamChoiceFinishReason$ = {})); - exports2.CompletionResponseStreamChoice$inboundSchema = z6.object({ - index: z6.number().int(), + exports2.CompletionResponseStreamChoice$inboundSchema = z7.object({ + index: z7.number().int(), delta: deltamessage_js_1.DeltaMessage$inboundSchema, - finish_reason: z6.nullable(exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + finish_reason: z7.nullable(exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "finish_reason": "finishReason" }); }); - exports2.CompletionResponseStreamChoice$outboundSchema = z6.object({ - index: z6.number().int(), + exports2.CompletionResponseStreamChoice$outboundSchema = z7.object({ + index: z7.number().int(), delta: deltamessage_js_1.DeltaMessage$outboundSchema, - finishReason: z6.nullable(exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + finishReason: z7.nullable(exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { finishReason: "finish_reason" }); }); @@ -37903,7 +38387,7 @@ var require_completionresponsestreamchoice = __commonJS({ return JSON.stringify(exports2.CompletionResponseStreamChoice$outboundSchema.parse(completionResponseStreamChoice)); } function completionResponseStreamChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.CompletionResponseStreamChoice$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'CompletionResponseStreamChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.CompletionResponseStreamChoice$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'CompletionResponseStreamChoice' from JSON`); } } }); @@ -37912,56 +38396,56 @@ var require_completionresponsestreamchoice = __commonJS({ var require_completionchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionChunk$ = exports2.CompletionChunk$outboundSchema = exports2.CompletionChunk$inboundSchema = void 0; exports2.completionChunkToJSON = completionChunkToJSON; exports2.completionChunkFromJSON = completionChunkFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var completionresponsestreamchoice_js_1 = require_completionresponsestreamchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.CompletionChunk$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string().optional(), - created: z6.number().int().optional(), - model: z6.string(), + exports2.CompletionChunk$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string().optional(), + created: z7.number().int().optional(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema.optional(), - choices: z6.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$inboundSchema) + choices: z7.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$inboundSchema) }); - exports2.CompletionChunk$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string().optional(), - created: z6.number().int().optional(), - model: z6.string(), + exports2.CompletionChunk$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string().optional(), + created: z7.number().int().optional(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema.optional(), - choices: z6.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$outboundSchema) + choices: z7.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$outboundSchema) }); var CompletionChunk$; (function(CompletionChunk$2) { @@ -37972,7 +38456,7 @@ var require_completionchunk = __commonJS({ return JSON.stringify(exports2.CompletionChunk$outboundSchema.parse(completionChunk)); } function completionChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.CompletionChunk$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'CompletionChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.CompletionChunk$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'CompletionChunk' from JSON`); } } }); @@ -37981,54 +38465,54 @@ var require_completionchunk = __commonJS({ var require_completionevent = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionevent.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionEvent$ = exports2.CompletionEvent$outboundSchema = exports2.CompletionEvent$inboundSchema = void 0; exports2.completionEventToJSON = completionEventToJSON; exports2.completionEventFromJSON = completionEventFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var completionchunk_js_1 = require_completionchunk(); - exports2.CompletionEvent$inboundSchema = z6.object({ - data: z6.string().transform((v5, ctx) => { + exports2.CompletionEvent$inboundSchema = z7.object({ + data: z7.string().transform((v8, ctx) => { try { - return JSON.parse(v5); + return JSON.parse(v8); } catch (err) { ctx.addIssue({ - code: z6.ZodIssueCode.custom, + code: z7.ZodIssueCode.custom, message: `malformed json: ${err}` }); - return z6.NEVER; + return z7.NEVER; } }).pipe(completionchunk_js_1.CompletionChunk$inboundSchema) }); - exports2.CompletionEvent$outboundSchema = z6.object({ + exports2.CompletionEvent$outboundSchema = z7.object({ data: completionchunk_js_1.CompletionChunk$outboundSchema }); var CompletionEvent$; @@ -38040,7 +38524,7 @@ var require_completionevent = __commonJS({ return JSON.stringify(exports2.CompletionEvent$outboundSchema.parse(completionEvent)); } function completionEventFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.CompletionEvent$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'CompletionEvent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.CompletionEvent$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'CompletionEvent' from JSON`); } } }); @@ -38049,48 +38533,48 @@ var require_completionevent = __commonJS({ var require_deletefileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deletefileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteFileOut$ = exports2.DeleteFileOut$outboundSchema = exports2.DeleteFileOut$inboundSchema = void 0; exports2.deleteFileOutToJSON = deleteFileOutToJSON; exports2.deleteFileOutFromJSON = deleteFileOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.DeleteFileOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - deleted: z6.boolean() + exports2.DeleteFileOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + deleted: z7.boolean() }); - exports2.DeleteFileOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - deleted: z6.boolean() + exports2.DeleteFileOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + deleted: z7.boolean() }); var DeleteFileOut$; (function(DeleteFileOut$2) { @@ -38101,7 +38585,7 @@ var require_deletefileout = __commonJS({ return JSON.stringify(exports2.DeleteFileOut$outboundSchema.parse(deleteFileOut)); } function deleteFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DeleteFileOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DeleteFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DeleteFileOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DeleteFileOut' from JSON`); } } }); @@ -38110,48 +38594,48 @@ var require_deletefileout = __commonJS({ var require_deletemodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deletemodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteModelOut$ = exports2.DeleteModelOut$outboundSchema = exports2.DeleteModelOut$inboundSchema = void 0; exports2.deleteModelOutToJSON = deleteModelOutToJSON; exports2.deleteModelOutFromJSON = deleteModelOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.DeleteModelOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - deleted: z6.boolean().default(true) + exports2.DeleteModelOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + deleted: z7.boolean().default(true) }); - exports2.DeleteModelOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - deleted: z6.boolean().default(true) + exports2.DeleteModelOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + deleted: z7.boolean().default(true) }); var DeleteModelOut$; (function(DeleteModelOut$2) { @@ -38162,7 +38646,7 @@ var require_deletemodelout = __commonJS({ return JSON.stringify(exports2.DeleteModelOut$outboundSchema.parse(deleteModelOut)); } function deleteModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DeleteModelOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DeleteModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DeleteModelOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DeleteModelOut' from JSON`); } } }); @@ -38171,55 +38655,55 @@ var require_deletemodelout = __commonJS({ var require_eventout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/eventout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EventOut$ = exports2.EventOut$outboundSchema = exports2.EventOut$inboundSchema = void 0; exports2.eventOutToJSON = eventOutToJSON; exports2.eventOutFromJSON = eventOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.EventOut$inboundSchema = z6.object({ - name: z6.string(), - data: z6.nullable(z6.record(z6.any())).optional(), - created_at: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.EventOut$inboundSchema = z7.object({ + name: z7.string(), + data: z7.nullable(z7.record(z7.any())).optional(), + created_at: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "created_at": "createdAt" }); }); - exports2.EventOut$outboundSchema = z6.object({ - name: z6.string(), - data: z6.nullable(z6.record(z6.any())).optional(), - createdAt: z6.number().int() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.EventOut$outboundSchema = z7.object({ + name: z7.string(), + data: z7.nullable(z7.record(z7.any())).optional(), + createdAt: z7.number().int() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { createdAt: "created_at" }); }); @@ -38232,7 +38716,7 @@ var require_eventout = __commonJS({ return JSON.stringify(exports2.EventOut$outboundSchema.parse(eventOut)); } function eventOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.EventOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'EventOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.EventOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'EventOut' from JSON`); } } }); @@ -38241,71 +38725,71 @@ var require_eventout = __commonJS({ var require_githubrepositoryout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/githubrepositoryout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GithubRepositoryOut$ = exports2.GithubRepositoryOut$outboundSchema = exports2.GithubRepositoryOut$inboundSchema = exports2.GithubRepositoryOutType$ = exports2.GithubRepositoryOutType$outboundSchema = exports2.GithubRepositoryOutType$inboundSchema = exports2.GithubRepositoryOutType = void 0; exports2.githubRepositoryOutToJSON = githubRepositoryOutToJSON; exports2.githubRepositoryOutFromJSON = githubRepositoryOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.GithubRepositoryOutType = { Github: "github" }; - exports2.GithubRepositoryOutType$inboundSchema = z6.nativeEnum(exports2.GithubRepositoryOutType); + exports2.GithubRepositoryOutType$inboundSchema = z7.nativeEnum(exports2.GithubRepositoryOutType); exports2.GithubRepositoryOutType$outboundSchema = exports2.GithubRepositoryOutType$inboundSchema; var GithubRepositoryOutType$; (function(GithubRepositoryOutType$2) { GithubRepositoryOutType$2.inboundSchema = exports2.GithubRepositoryOutType$inboundSchema; GithubRepositoryOutType$2.outboundSchema = exports2.GithubRepositoryOutType$outboundSchema; })(GithubRepositoryOutType$ || (exports2.GithubRepositoryOutType$ = GithubRepositoryOutType$ = {})); - exports2.GithubRepositoryOut$inboundSchema = z6.object({ - type: z6.literal("github").default("github"), - name: z6.string(), - owner: z6.string(), - ref: z6.nullable(z6.string()).optional(), - weight: z6.number().default(1), - commit_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.GithubRepositoryOut$inboundSchema = z7.object({ + type: z7.literal("github").default("github"), + name: z7.string(), + owner: z7.string(), + ref: z7.nullable(z7.string()).optional(), + weight: z7.number().default(1), + commit_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "commit_id": "commitId" }); }); - exports2.GithubRepositoryOut$outboundSchema = z6.object({ - type: z6.literal("github").default("github"), - name: z6.string(), - owner: z6.string(), - ref: z6.nullable(z6.string()).optional(), - weight: z6.number().default(1), - commitId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.GithubRepositoryOut$outboundSchema = z7.object({ + type: z7.literal("github").default("github"), + name: z7.string(), + owner: z7.string(), + ref: z7.nullable(z7.string()).optional(), + weight: z7.number().default(1), + commitId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { commitId: "commit_id" }); }); @@ -38318,7 +38802,7 @@ var require_githubrepositoryout = __commonJS({ return JSON.stringify(exports2.GithubRepositoryOut$outboundSchema.parse(githubRepositoryOut)); } function githubRepositoryOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.GithubRepositoryOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'GithubRepositoryOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.GithubRepositoryOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'GithubRepositoryOut' from JSON`); } } }); @@ -38327,50 +38811,50 @@ var require_githubrepositoryout = __commonJS({ var require_jobmetadataout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobmetadataout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobMetadataOut$ = exports2.JobMetadataOut$outboundSchema = exports2.JobMetadataOut$inboundSchema = void 0; exports2.jobMetadataOutToJSON = jobMetadataOutToJSON; exports2.jobMetadataOutFromJSON = jobMetadataOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobMetadataOut$inboundSchema = z6.object({ - expected_duration_seconds: z6.nullable(z6.number().int()).optional(), - cost: z6.nullable(z6.number()).optional(), - cost_currency: z6.nullable(z6.string()).optional(), - train_tokens_per_step: z6.nullable(z6.number().int()).optional(), - train_tokens: z6.nullable(z6.number().int()).optional(), - data_tokens: z6.nullable(z6.number().int()).optional(), - estimated_start_time: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobMetadataOut$inboundSchema = z7.object({ + expected_duration_seconds: z7.nullable(z7.number().int()).optional(), + cost: z7.nullable(z7.number()).optional(), + cost_currency: z7.nullable(z7.string()).optional(), + train_tokens_per_step: z7.nullable(z7.number().int()).optional(), + train_tokens: z7.nullable(z7.number().int()).optional(), + data_tokens: z7.nullable(z7.number().int()).optional(), + estimated_start_time: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "expected_duration_seconds": "expectedDurationSeconds", "cost_currency": "costCurrency", "train_tokens_per_step": "trainTokensPerStep", @@ -38379,16 +38863,16 @@ var require_jobmetadataout = __commonJS({ "estimated_start_time": "estimatedStartTime" }); }); - exports2.JobMetadataOut$outboundSchema = z6.object({ - expectedDurationSeconds: z6.nullable(z6.number().int()).optional(), - cost: z6.nullable(z6.number()).optional(), - costCurrency: z6.nullable(z6.string()).optional(), - trainTokensPerStep: z6.nullable(z6.number().int()).optional(), - trainTokens: z6.nullable(z6.number().int()).optional(), - dataTokens: z6.nullable(z6.number().int()).optional(), - estimatedStartTime: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobMetadataOut$outboundSchema = z7.object({ + expectedDurationSeconds: z7.nullable(z7.number().int()).optional(), + cost: z7.nullable(z7.number()).optional(), + costCurrency: z7.nullable(z7.string()).optional(), + trainTokensPerStep: z7.nullable(z7.number().int()).optional(), + trainTokens: z7.nullable(z7.number().int()).optional(), + dataTokens: z7.nullable(z7.number().int()).optional(), + estimatedStartTime: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { expectedDurationSeconds: "expected_duration_seconds", costCurrency: "cost_currency", trainTokensPerStep: "train_tokens_per_step", @@ -38406,7 +38890,7 @@ var require_jobmetadataout = __commonJS({ return JSON.stringify(exports2.JobMetadataOut$outboundSchema.parse(jobMetadataOut)); } function jobMetadataOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobMetadataOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobMetadataOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobMetadataOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobMetadataOut' from JSON`); } } }); @@ -38415,50 +38899,50 @@ var require_jobmetadataout = __commonJS({ var require_trainingparameters = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingparameters.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingParameters$ = exports2.TrainingParameters$outboundSchema = exports2.TrainingParameters$inboundSchema = void 0; exports2.trainingParametersToJSON = trainingParametersToJSON; exports2.trainingParametersFromJSON = trainingParametersFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingParameters$inboundSchema = z6.object({ - training_steps: z6.nullable(z6.number().int()).optional(), - learning_rate: z6.number().default(1e-4), - weight_decay: z6.nullable(z6.number()).optional(), - warmup_fraction: z6.nullable(z6.number()).optional(), - epochs: z6.nullable(z6.number()).optional(), - fim_ratio: z6.nullable(z6.number()).optional(), - seq_len: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingParameters$inboundSchema = z7.object({ + training_steps: z7.nullable(z7.number().int()).optional(), + learning_rate: z7.number().default(1e-4), + weight_decay: z7.nullable(z7.number()).optional(), + warmup_fraction: z7.nullable(z7.number()).optional(), + epochs: z7.nullable(z7.number()).optional(), + fim_ratio: z7.nullable(z7.number()).optional(), + seq_len: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "training_steps": "trainingSteps", "learning_rate": "learningRate", "weight_decay": "weightDecay", @@ -38467,16 +38951,16 @@ var require_trainingparameters = __commonJS({ "seq_len": "seqLen" }); }); - exports2.TrainingParameters$outboundSchema = z6.object({ - trainingSteps: z6.nullable(z6.number().int()).optional(), - learningRate: z6.number().default(1e-4), - weightDecay: z6.nullable(z6.number()).optional(), - warmupFraction: z6.nullable(z6.number()).optional(), - epochs: z6.nullable(z6.number()).optional(), - fimRatio: z6.nullable(z6.number()).optional(), - seqLen: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingParameters$outboundSchema = z7.object({ + trainingSteps: z7.nullable(z7.number().int()).optional(), + learningRate: z7.number().default(1e-4), + weightDecay: z7.nullable(z7.number()).optional(), + warmupFraction: z7.nullable(z7.number()).optional(), + epochs: z7.nullable(z7.number()).optional(), + fimRatio: z7.nullable(z7.number()).optional(), + seqLen: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { trainingSteps: "training_steps", learningRate: "learning_rate", weightDecay: "weight_decay", @@ -38494,7 +38978,7 @@ var require_trainingparameters = __commonJS({ return JSON.stringify(exports2.TrainingParameters$outboundSchema.parse(trainingParameters)); } function trainingParametersFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.TrainingParameters$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'TrainingParameters' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.TrainingParameters$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'TrainingParameters' from JSON`); } } }); @@ -38503,67 +38987,67 @@ var require_trainingparameters = __commonJS({ var require_wandbintegrationout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/wandbintegrationout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WandbIntegrationOut$ = exports2.WandbIntegrationOut$outboundSchema = exports2.WandbIntegrationOut$inboundSchema = exports2.WandbIntegrationOutType$ = exports2.WandbIntegrationOutType$outboundSchema = exports2.WandbIntegrationOutType$inboundSchema = exports2.WandbIntegrationOutType = void 0; exports2.wandbIntegrationOutToJSON = wandbIntegrationOutToJSON; exports2.wandbIntegrationOutFromJSON = wandbIntegrationOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.WandbIntegrationOutType = { Wandb: "wandb" }; - exports2.WandbIntegrationOutType$inboundSchema = z6.nativeEnum(exports2.WandbIntegrationOutType); + exports2.WandbIntegrationOutType$inboundSchema = z7.nativeEnum(exports2.WandbIntegrationOutType); exports2.WandbIntegrationOutType$outboundSchema = exports2.WandbIntegrationOutType$inboundSchema; var WandbIntegrationOutType$; (function(WandbIntegrationOutType$2) { WandbIntegrationOutType$2.inboundSchema = exports2.WandbIntegrationOutType$inboundSchema; WandbIntegrationOutType$2.outboundSchema = exports2.WandbIntegrationOutType$outboundSchema; })(WandbIntegrationOutType$ || (exports2.WandbIntegrationOutType$ = WandbIntegrationOutType$ = {})); - exports2.WandbIntegrationOut$inboundSchema = z6.object({ - type: z6.literal("wandb").default("wandb"), - project: z6.string(), - name: z6.nullable(z6.string()).optional(), - run_name: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.WandbIntegrationOut$inboundSchema = z7.object({ + type: z7.literal("wandb").default("wandb"), + project: z7.string(), + name: z7.nullable(z7.string()).optional(), + run_name: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "run_name": "runName" }); }); - exports2.WandbIntegrationOut$outboundSchema = z6.object({ - type: z6.literal("wandb").default("wandb"), - project: z6.string(), - name: z6.nullable(z6.string()).optional(), - runName: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.WandbIntegrationOut$outboundSchema = z7.object({ + type: z7.literal("wandb").default("wandb"), + project: z7.string(), + name: z7.nullable(z7.string()).optional(), + runName: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { runName: "run_name" }); }); @@ -38576,7 +39060,7 @@ var require_wandbintegrationout = __commonJS({ return JSON.stringify(exports2.WandbIntegrationOut$outboundSchema.parse(wandbIntegrationOut)); } function wandbIntegrationOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.WandbIntegrationOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'WandbIntegrationOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.WandbIntegrationOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'WandbIntegrationOut' from JSON`); } } }); @@ -38585,31 +39069,31 @@ var require_wandbintegrationout = __commonJS({ var require_detailedjobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/detailedjobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38620,7 +39104,7 @@ var require_detailedjobout = __commonJS({ exports2.detailedJobOutRepositoriesFromJSON = detailedJobOutRepositoriesFromJSON; exports2.detailedJobOutToJSON = detailedJobOutToJSON; exports2.detailedJobOutFromJSON = detailedJobOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var checkpointout_js_1 = require_checkpointout(); @@ -38644,14 +39128,14 @@ var require_detailedjobout = __commonJS({ exports2.DetailedJobOutObject = { Job: "job" }; - exports2.DetailedJobOutStatus$inboundSchema = z6.nativeEnum(exports2.DetailedJobOutStatus); + exports2.DetailedJobOutStatus$inboundSchema = z7.nativeEnum(exports2.DetailedJobOutStatus); exports2.DetailedJobOutStatus$outboundSchema = exports2.DetailedJobOutStatus$inboundSchema; var DetailedJobOutStatus$; (function(DetailedJobOutStatus$2) { DetailedJobOutStatus$2.inboundSchema = exports2.DetailedJobOutStatus$inboundSchema; DetailedJobOutStatus$2.outboundSchema = exports2.DetailedJobOutStatus$outboundSchema; })(DetailedJobOutStatus$ || (exports2.DetailedJobOutStatus$ = DetailedJobOutStatus$ = {})); - exports2.DetailedJobOutObject$inboundSchema = z6.nativeEnum(exports2.DetailedJobOutObject); + exports2.DetailedJobOutObject$inboundSchema = z7.nativeEnum(exports2.DetailedJobOutObject); exports2.DetailedJobOutObject$outboundSchema = exports2.DetailedJobOutObject$inboundSchema; var DetailedJobOutObject$; (function(DetailedJobOutObject$2) { @@ -38669,7 +39153,7 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOutIntegrations$outboundSchema.parse(detailedJobOutIntegrations)); } function detailedJobOutIntegrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DetailedJobOutIntegrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DetailedJobOutIntegrations' from JSON`); } exports2.DetailedJobOutRepositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema; exports2.DetailedJobOutRepositories$outboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema; @@ -38682,30 +39166,30 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOutRepositories$outboundSchema.parse(detailedJobOutRepositories)); } function detailedJobOutRepositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DetailedJobOutRepositories$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DetailedJobOutRepositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DetailedJobOutRepositories$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DetailedJobOutRepositories' from JSON`); } - exports2.DetailedJobOut$inboundSchema = z6.object({ - id: z6.string(), - auto_start: z6.boolean(), + exports2.DetailedJobOut$inboundSchema = z7.object({ + id: z7.string(), + auto_start: z7.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$inboundSchema, - model: z6.string(), + model: z7.string(), status: exports2.DetailedJobOutStatus$inboundSchema, - job_type: z6.string(), - created_at: z6.number().int(), - modified_at: z6.number().int(), - training_files: z6.array(z6.string()), - validation_files: z6.nullable(z6.array(z6.string())).optional(), - object: z6.literal("job").default("job"), - fine_tuned_model: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), - trained_tokens: z6.nullable(z6.number().int()).optional(), - repositories: z6.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), - metadata: z6.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional(), - events: z6.array(eventout_js_1.EventOut$inboundSchema).optional(), - checkpoints: z6.array(checkpointout_js_1.CheckpointOut$inboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + job_type: z7.string(), + created_at: z7.number().int(), + modified_at: z7.number().int(), + training_files: z7.array(z7.string()), + validation_files: z7.nullable(z7.array(z7.string())).optional(), + object: z7.literal("job").default("job"), + fine_tuned_model: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), + trained_tokens: z7.nullable(z7.number().int()).optional(), + repositories: z7.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), + metadata: z7.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional(), + events: z7.array(eventout_js_1.EventOut$inboundSchema).optional(), + checkpoints: z7.array(checkpointout_js_1.CheckpointOut$inboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "auto_start": "autoStart", "job_type": "jobType", "created_at": "createdAt", @@ -38716,28 +39200,28 @@ var require_detailedjobout = __commonJS({ "trained_tokens": "trainedTokens" }); }); - exports2.DetailedJobOut$outboundSchema = z6.object({ - id: z6.string(), - autoStart: z6.boolean(), + exports2.DetailedJobOut$outboundSchema = z7.object({ + id: z7.string(), + autoStart: z7.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$outboundSchema, - model: z6.string(), + model: z7.string(), status: exports2.DetailedJobOutStatus$outboundSchema, - jobType: z6.string(), - createdAt: z6.number().int(), - modifiedAt: z6.number().int(), - trainingFiles: z6.array(z6.string()), - validationFiles: z6.nullable(z6.array(z6.string())).optional(), - object: z6.literal("job").default("job"), - fineTunedModel: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), - trainedTokens: z6.nullable(z6.number().int()).optional(), - repositories: z6.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), - metadata: z6.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional(), - events: z6.array(eventout_js_1.EventOut$outboundSchema).optional(), - checkpoints: z6.array(checkpointout_js_1.CheckpointOut$outboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + jobType: z7.string(), + createdAt: z7.number().int(), + modifiedAt: z7.number().int(), + trainingFiles: z7.array(z7.string()), + validationFiles: z7.nullable(z7.array(z7.string())).optional(), + object: z7.literal("job").default("job"), + fineTunedModel: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), + trainedTokens: z7.nullable(z7.number().int()).optional(), + repositories: z7.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), + metadata: z7.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional(), + events: z7.array(eventout_js_1.EventOut$outboundSchema).optional(), + checkpoints: z7.array(checkpointout_js_1.CheckpointOut$outboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { autoStart: "auto_start", jobType: "job_type", createdAt: "created_at", @@ -38757,7 +39241,7 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOut$outboundSchema.parse(detailedJobOut)); } function detailedJobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DetailedJobOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DetailedJobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DetailedJobOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DetailedJobOut' from JSON`); } } }); @@ -38766,31 +39250,31 @@ var require_detailedjobout = __commonJS({ var require_embeddingrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38799,11 +39283,11 @@ var require_embeddingrequest = __commonJS({ exports2.inputsFromJSON = inputsFromJSON; exports2.embeddingRequestToJSON = embeddingRequestToJSON; exports2.embeddingRequestFromJSON = embeddingRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.Inputs$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.Inputs$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.Inputs$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.Inputs$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var Inputs$; (function(Inputs$2) { Inputs$2.inboundSchema = exports2.Inputs$inboundSchema; @@ -38813,24 +39297,24 @@ var require_embeddingrequest = __commonJS({ return JSON.stringify(exports2.Inputs$outboundSchema.parse(inputs)); } function inputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Inputs$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Inputs' from JSON`); - } - exports2.EmbeddingRequest$inboundSchema = z6.object({ - input: z6.union([z6.string(), z6.array(z6.string())]), - model: z6.string().default("mistral-embed"), - encoding_format: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Inputs$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Inputs' from JSON`); + } + exports2.EmbeddingRequest$inboundSchema = z7.object({ + input: z7.union([z7.string(), z7.array(z7.string())]), + model: z7.string().default("mistral-embed"), + encoding_format: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "input": "inputs", "encoding_format": "encodingFormat" }); }); - exports2.EmbeddingRequest$outboundSchema = z6.object({ - inputs: z6.union([z6.string(), z6.array(z6.string())]), - model: z6.string().default("mistral-embed"), - encodingFormat: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.EmbeddingRequest$outboundSchema = z7.object({ + inputs: z7.union([z7.string(), z7.array(z7.string())]), + model: z7.string().default("mistral-embed"), + encodingFormat: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { inputs: "input", encodingFormat: "encoding_format" }); @@ -38844,7 +39328,7 @@ var require_embeddingrequest = __commonJS({ return JSON.stringify(exports2.EmbeddingRequest$outboundSchema.parse(embeddingRequest)); } function embeddingRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.EmbeddingRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'EmbeddingRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.EmbeddingRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'EmbeddingRequest' from JSON`); } } }); @@ -38853,48 +39337,48 @@ var require_embeddingrequest = __commonJS({ var require_embeddingresponsedata = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingresponsedata.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EmbeddingResponseData$ = exports2.EmbeddingResponseData$outboundSchema = exports2.EmbeddingResponseData$inboundSchema = void 0; exports2.embeddingResponseDataToJSON = embeddingResponseDataToJSON; exports2.embeddingResponseDataFromJSON = embeddingResponseDataFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.EmbeddingResponseData$inboundSchema = z6.object({ - object: z6.string().optional(), - embedding: z6.array(z6.number()).optional(), - index: z6.number().int().optional() + exports2.EmbeddingResponseData$inboundSchema = z7.object({ + object: z7.string().optional(), + embedding: z7.array(z7.number()).optional(), + index: z7.number().int().optional() }); - exports2.EmbeddingResponseData$outboundSchema = z6.object({ - object: z6.string().optional(), - embedding: z6.array(z6.number()).optional(), - index: z6.number().int().optional() + exports2.EmbeddingResponseData$outboundSchema = z7.object({ + object: z7.string().optional(), + embedding: z7.array(z7.number()).optional(), + index: z7.number().int().optional() }); var EmbeddingResponseData$; (function(EmbeddingResponseData$2) { @@ -38905,7 +39389,7 @@ var require_embeddingresponsedata = __commonJS({ return JSON.stringify(exports2.EmbeddingResponseData$outboundSchema.parse(embeddingResponseData)); } function embeddingResponseDataFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.EmbeddingResponseData$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'EmbeddingResponseData' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.EmbeddingResponseData$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'EmbeddingResponseData' from JSON`); } } }); @@ -38914,54 +39398,54 @@ var require_embeddingresponsedata = __commonJS({ var require_embeddingresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EmbeddingResponse$ = exports2.EmbeddingResponse$outboundSchema = exports2.EmbeddingResponse$inboundSchema = void 0; exports2.embeddingResponseToJSON = embeddingResponseToJSON; exports2.embeddingResponseFromJSON = embeddingResponseFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var embeddingresponsedata_js_1 = require_embeddingresponsedata(); var usageinfo_js_1 = require_usageinfo(); - exports2.EmbeddingResponse$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.EmbeddingResponse$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - data: z6.array(embeddingresponsedata_js_1.EmbeddingResponseData$inboundSchema) + data: z7.array(embeddingresponsedata_js_1.EmbeddingResponseData$inboundSchema) }); - exports2.EmbeddingResponse$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.EmbeddingResponse$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - data: z6.array(embeddingresponsedata_js_1.EmbeddingResponseData$outboundSchema) + data: z7.array(embeddingresponsedata_js_1.EmbeddingResponseData$outboundSchema) }); var EmbeddingResponse$; (function(EmbeddingResponse$2) { @@ -38972,7 +39456,7 @@ var require_embeddingresponse = __commonJS({ return JSON.stringify(exports2.EmbeddingResponse$outboundSchema.parse(embeddingResponse)); } function embeddingResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.EmbeddingResponse$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'EmbeddingResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.EmbeddingResponse$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'EmbeddingResponse' from JSON`); } } }); @@ -38981,48 +39465,48 @@ var require_embeddingresponse = __commonJS({ var require_filepurpose = __commonJS({ "node_modules/@mistralai/mistralai/models/components/filepurpose.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilePurpose$ = exports2.FilePurpose$outboundSchema = exports2.FilePurpose$inboundSchema = exports2.FilePurpose = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var enums_js_1 = require_enums(); exports2.FilePurpose = { FineTune: "fine-tune", Batch: "batch" }; - exports2.FilePurpose$inboundSchema = z6.union([ - z6.nativeEnum(exports2.FilePurpose), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.FilePurpose$inboundSchema = z7.union([ + z7.nativeEnum(exports2.FilePurpose), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.FilePurpose$outboundSchema = z6.union([ - z6.nativeEnum(exports2.FilePurpose), - z6.string().and(z6.custom()) + exports2.FilePurpose$outboundSchema = z7.union([ + z7.nativeEnum(exports2.FilePurpose), + z7.string().and(z7.custom()) ]); var FilePurpose$; (function(FilePurpose$2) { @@ -39036,36 +39520,36 @@ var require_filepurpose = __commonJS({ var require_sampletype = __commonJS({ "node_modules/@mistralai/mistralai/models/components/sampletype.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SampleType$ = exports2.SampleType$outboundSchema = exports2.SampleType$inboundSchema = exports2.SampleType = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var enums_js_1 = require_enums(); exports2.SampleType = { Pretrain: "pretrain", @@ -39074,13 +39558,13 @@ var require_sampletype = __commonJS({ BatchResult: "batch_result", BatchError: "batch_error" }; - exports2.SampleType$inboundSchema = z6.union([ - z6.nativeEnum(exports2.SampleType), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.SampleType$inboundSchema = z7.union([ + z7.nativeEnum(exports2.SampleType), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.SampleType$outboundSchema = z6.union([ - z6.nativeEnum(exports2.SampleType), - z6.string().and(z6.custom()) + exports2.SampleType$outboundSchema = z7.union([ + z7.nativeEnum(exports2.SampleType), + z7.string().and(z7.custom()) ]); var SampleType$; (function(SampleType$2) { @@ -39094,49 +39578,49 @@ var require_sampletype = __commonJS({ var require_source = __commonJS({ "node_modules/@mistralai/mistralai/models/components/source.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Source$ = exports2.Source$outboundSchema = exports2.Source$inboundSchema = exports2.Source = void 0; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var enums_js_1 = require_enums(); exports2.Source = { Upload: "upload", Repository: "repository", Mistral: "mistral" }; - exports2.Source$inboundSchema = z6.union([ - z6.nativeEnum(exports2.Source), - z6.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.Source$inboundSchema = z7.union([ + z7.nativeEnum(exports2.Source), + z7.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.Source$outboundSchema = z6.union([ - z6.nativeEnum(exports2.Source), - z6.string().and(z6.custom()) + exports2.Source$outboundSchema = z7.union([ + z7.nativeEnum(exports2.Source), + z7.string().and(z7.custom()) ]); var Source$; (function(Source$2) { @@ -39150,72 +39634,72 @@ var require_source = __commonJS({ var require_fileschema = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fileschema.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FileSchema$ = exports2.FileSchema$outboundSchema = exports2.FileSchema$inboundSchema = void 0; exports2.fileSchemaToJSON = fileSchemaToJSON; exports2.fileSchemaFromJSON = fileSchemaFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.FileSchema$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - created_at: z6.number().int(), - filename: z6.string(), + exports2.FileSchema$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + created_at: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z6.nullable(z6.number().int()).optional(), + num_lines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$inboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.FileSchema$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - createdAt: z6.number().int(), - filename: z6.string(), + exports2.FileSchema$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + createdAt: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z6.nullable(z6.number().int()).optional(), + numLines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$outboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -39230,7 +39714,7 @@ var require_fileschema = __commonJS({ return JSON.stringify(exports2.FileSchema$outboundSchema.parse(fileSchema)); } function fileSchemaFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FileSchema$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FileSchema' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FileSchema$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FileSchema' from JSON`); } } }); @@ -39239,44 +39723,44 @@ var require_fileschema = __commonJS({ var require_filesignedurl = __commonJS({ "node_modules/@mistralai/mistralai/models/components/filesignedurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FileSignedURL$ = exports2.FileSignedURL$outboundSchema = exports2.FileSignedURL$inboundSchema = void 0; exports2.fileSignedURLToJSON = fileSignedURLToJSON; exports2.fileSignedURLFromJSON = fileSignedURLFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.FileSignedURL$inboundSchema = z6.object({ - url: z6.string() + exports2.FileSignedURL$inboundSchema = z7.object({ + url: z7.string() }); - exports2.FileSignedURL$outboundSchema = z6.object({ - url: z6.string() + exports2.FileSignedURL$outboundSchema = z7.object({ + url: z7.string() }); var FileSignedURL$; (function(FileSignedURL$2) { @@ -39287,7 +39771,7 @@ var require_filesignedurl = __commonJS({ return JSON.stringify(exports2.FileSignedURL$outboundSchema.parse(fileSignedURL)); } function fileSignedURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FileSignedURL$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FileSignedURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FileSignedURL$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FileSignedURL' from JSON`); } } }); @@ -39296,31 +39780,31 @@ var require_filesignedurl = __commonJS({ var require_fimcompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -39329,11 +39813,11 @@ var require_fimcompletionrequest = __commonJS({ exports2.fimCompletionRequestStopFromJSON = fimCompletionRequestStopFromJSON; exports2.fimCompletionRequestToJSON = fimCompletionRequestToJSON; exports2.fimCompletionRequestFromJSON = fimCompletionRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FIMCompletionRequestStop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.FIMCompletionRequestStop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.FIMCompletionRequestStop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.FIMCompletionRequestStop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var FIMCompletionRequestStop$; (function(FIMCompletionRequestStop$2) { FIMCompletionRequestStop$2.inboundSchema = exports2.FIMCompletionRequestStop$inboundSchema; @@ -39343,40 +39827,40 @@ var require_fimcompletionrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionRequestStop$outboundSchema.parse(fimCompletionRequestStop)); } function fimCompletionRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FIMCompletionRequestStop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FIMCompletionRequestStop' from JSON`); - } - exports2.FIMCompletionRequest$inboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - top_p: z6.number().default(1), - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - prompt: z6.string(), - suffix: z6.nullable(z6.string()).optional(), - min_tokens: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FIMCompletionRequestStop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FIMCompletionRequestStop' from JSON`); + } + exports2.FIMCompletionRequest$inboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + top_p: z7.number().default(1), + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + prompt: z7.string(), + suffix: z7.nullable(z7.string()).optional(), + min_tokens: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", "min_tokens": "minTokens" }); }); - exports2.FIMCompletionRequest$outboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - topP: z6.number().default(1), - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(false), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - prompt: z6.string(), - suffix: z6.nullable(z6.string()).optional(), - minTokens: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FIMCompletionRequest$outboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + topP: z7.number().default(1), + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(false), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + prompt: z7.string(), + suffix: z7.nullable(z7.string()).optional(), + minTokens: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -39392,7 +39876,7 @@ var require_fimcompletionrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionRequest$outboundSchema.parse(fimCompletionRequest)); } function fimCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FIMCompletionRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FIMCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FIMCompletionRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FIMCompletionRequest' from JSON`); } } }); @@ -39401,56 +39885,56 @@ var require_fimcompletionrequest = __commonJS({ var require_fimcompletionresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FIMCompletionResponse$ = exports2.FIMCompletionResponse$outboundSchema = exports2.FIMCompletionResponse$inboundSchema = void 0; exports2.fimCompletionResponseToJSON = fimCompletionResponseToJSON; exports2.fimCompletionResponseFromJSON = fimCompletionResponseFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var chatcompletionchoice_js_1 = require_chatcompletionchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.FIMCompletionResponse$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.FIMCompletionResponse$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - created: z6.number().int().optional(), - choices: z6.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() + created: z7.number().int().optional(), + choices: z7.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() }); - exports2.FIMCompletionResponse$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - model: z6.string(), + exports2.FIMCompletionResponse$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + model: z7.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - created: z6.number().int().optional(), - choices: z6.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() + created: z7.number().int().optional(), + choices: z7.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() }); var FIMCompletionResponse$; (function(FIMCompletionResponse$2) { @@ -39461,7 +39945,7 @@ var require_fimcompletionresponse = __commonJS({ return JSON.stringify(exports2.FIMCompletionResponse$outboundSchema.parse(fimCompletionResponse)); } function fimCompletionResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FIMCompletionResponse$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FIMCompletionResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FIMCompletionResponse$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FIMCompletionResponse' from JSON`); } } }); @@ -39470,31 +39954,31 @@ var require_fimcompletionresponse = __commonJS({ var require_fimcompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -39503,11 +39987,11 @@ var require_fimcompletionstreamrequest = __commonJS({ exports2.fimCompletionStreamRequestStopFromJSON = fimCompletionStreamRequestStopFromJSON; exports2.fimCompletionStreamRequestToJSON = fimCompletionStreamRequestToJSON; exports2.fimCompletionStreamRequestFromJSON = fimCompletionStreamRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FIMCompletionStreamRequestStop$inboundSchema = z6.union([z6.string(), z6.array(z6.string())]); - exports2.FIMCompletionStreamRequestStop$outboundSchema = z6.union([z6.string(), z6.array(z6.string())]); + exports2.FIMCompletionStreamRequestStop$inboundSchema = z7.union([z7.string(), z7.array(z7.string())]); + exports2.FIMCompletionStreamRequestStop$outboundSchema = z7.union([z7.string(), z7.array(z7.string())]); var FIMCompletionStreamRequestStop$; (function(FIMCompletionStreamRequestStop$2) { FIMCompletionStreamRequestStop$2.inboundSchema = exports2.FIMCompletionStreamRequestStop$inboundSchema; @@ -39517,40 +40001,40 @@ var require_fimcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionStreamRequestStop$outboundSchema.parse(fimCompletionStreamRequestStop)); } function fimCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FIMCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FIMCompletionStreamRequestStop' from JSON`); - } - exports2.FIMCompletionStreamRequest$inboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - top_p: z6.number().default(1), - max_tokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - random_seed: z6.nullable(z6.number().int()).optional(), - prompt: z6.string(), - suffix: z6.nullable(z6.string()).optional(), - min_tokens: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FIMCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FIMCompletionStreamRequestStop' from JSON`); + } + exports2.FIMCompletionStreamRequest$inboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + top_p: z7.number().default(1), + max_tokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + random_seed: z7.nullable(z7.number().int()).optional(), + prompt: z7.string(), + suffix: z7.nullable(z7.string()).optional(), + min_tokens: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", "min_tokens": "minTokens" }); }); - exports2.FIMCompletionStreamRequest$outboundSchema = z6.object({ - model: z6.nullable(z6.string()), - temperature: z6.nullable(z6.number()).optional(), - topP: z6.number().default(1), - maxTokens: z6.nullable(z6.number().int()).optional(), - stream: z6.boolean().default(true), - stop: z6.union([z6.string(), z6.array(z6.string())]).optional(), - randomSeed: z6.nullable(z6.number().int()).optional(), - prompt: z6.string(), - suffix: z6.nullable(z6.string()).optional(), - minTokens: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FIMCompletionStreamRequest$outboundSchema = z7.object({ + model: z7.nullable(z7.string()), + temperature: z7.nullable(z7.number()).optional(), + topP: z7.number().default(1), + maxTokens: z7.nullable(z7.number().int()).optional(), + stream: z7.boolean().default(true), + stop: z7.union([z7.string(), z7.array(z7.string())]).optional(), + randomSeed: z7.nullable(z7.number().int()).optional(), + prompt: z7.string(), + suffix: z7.nullable(z7.string()).optional(), + minTokens: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -39566,7 +40050,7 @@ var require_fimcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionStreamRequest$outboundSchema.parse(fimCompletionStreamRequest)); } function fimCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FIMCompletionStreamRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FIMCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FIMCompletionStreamRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FIMCompletionStreamRequest' from JSON`); } } }); @@ -39575,60 +40059,60 @@ var require_fimcompletionstreamrequest = __commonJS({ var require_ftmodelcapabilitiesout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelcapabilitiesout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelCapabilitiesOut$ = exports2.FTModelCapabilitiesOut$outboundSchema = exports2.FTModelCapabilitiesOut$inboundSchema = void 0; exports2.ftModelCapabilitiesOutToJSON = ftModelCapabilitiesOutToJSON; exports2.ftModelCapabilitiesOutFromJSON = ftModelCapabilitiesOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FTModelCapabilitiesOut$inboundSchema = z6.object({ - completion_chat: z6.boolean().default(true), - completion_fim: z6.boolean().default(false), - function_calling: z6.boolean().default(false), - fine_tuning: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FTModelCapabilitiesOut$inboundSchema = z7.object({ + completion_chat: z7.boolean().default(true), + completion_fim: z7.boolean().default(false), + function_calling: z7.boolean().default(false), + fine_tuning: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "completion_chat": "completionChat", "completion_fim": "completionFim", "function_calling": "functionCalling", "fine_tuning": "fineTuning" }); }); - exports2.FTModelCapabilitiesOut$outboundSchema = z6.object({ - completionChat: z6.boolean().default(true), - completionFim: z6.boolean().default(false), - functionCalling: z6.boolean().default(false), - fineTuning: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FTModelCapabilitiesOut$outboundSchema = z7.object({ + completionChat: z7.boolean().default(true), + completionFim: z7.boolean().default(false), + functionCalling: z7.boolean().default(false), + fineTuning: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { completionChat: "completion_chat", completionFim: "completion_fim", functionCalling: "function_calling", @@ -39644,7 +40128,7 @@ var require_ftmodelcapabilitiesout = __commonJS({ return JSON.stringify(exports2.FTModelCapabilitiesOut$outboundSchema.parse(ftModelCapabilitiesOut)); } function ftModelCapabilitiesOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FTModelCapabilitiesOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FTModelCapabilitiesOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FTModelCapabilitiesOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FTModelCapabilitiesOut' from JSON`); } } }); @@ -39653,92 +40137,92 @@ var require_ftmodelcapabilitiesout = __commonJS({ var require_ftmodelcard = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelcard.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelCard$ = exports2.FTModelCard$outboundSchema = exports2.FTModelCard$inboundSchema = exports2.FTModelCardType$ = exports2.FTModelCardType$outboundSchema = exports2.FTModelCardType$inboundSchema = exports2.FTModelCardType = void 0; exports2.ftModelCardToJSON = ftModelCardToJSON; exports2.ftModelCardFromJSON = ftModelCardFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var modelcapabilities_js_1 = require_modelcapabilities(); exports2.FTModelCardType = { FineTuned: "fine-tuned" }; - exports2.FTModelCardType$inboundSchema = z6.nativeEnum(exports2.FTModelCardType); + exports2.FTModelCardType$inboundSchema = z7.nativeEnum(exports2.FTModelCardType); exports2.FTModelCardType$outboundSchema = exports2.FTModelCardType$inboundSchema; var FTModelCardType$; (function(FTModelCardType$2) { FTModelCardType$2.inboundSchema = exports2.FTModelCardType$inboundSchema; FTModelCardType$2.outboundSchema = exports2.FTModelCardType$outboundSchema; })(FTModelCardType$ || (exports2.FTModelCardType$ = FTModelCardType$ = {})); - exports2.FTModelCard$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - created: z6.number().int().optional(), - owned_by: z6.string().default("mistralai"), + exports2.FTModelCard$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + created: z7.number().int().optional(), + owned_by: z7.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$inboundSchema, - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), - max_context_length: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - deprecation: z6.nullable(z6.string().datetime({ offset: true }).transform((v5) => new Date(v5))).optional(), - default_model_temperature: z6.nullable(z6.number()).optional(), - type: z6.literal("fine-tuned").default("fine-tuned"), - job: z6.string(), - root: z6.string(), - archived: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), + max_context_length: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + deprecation: z7.nullable(z7.string().datetime({ offset: true }).transform((v8) => new Date(v8))).optional(), + default_model_temperature: z7.nullable(z7.number()).optional(), + type: z7.literal("fine-tuned").default("fine-tuned"), + job: z7.string(), + root: z7.string(), + archived: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", "default_model_temperature": "defaultModelTemperature" }); }); - exports2.FTModelCard$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string().default("model"), - created: z6.number().int().optional(), - ownedBy: z6.string().default("mistralai"), + exports2.FTModelCard$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string().default("model"), + created: z7.number().int().optional(), + ownedBy: z7.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$outboundSchema, - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), - maxContextLength: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - deprecation: z6.nullable(z6.date().transform((v5) => v5.toISOString())).optional(), - defaultModelTemperature: z6.nullable(z6.number()).optional(), - type: z6.literal("fine-tuned").default("fine-tuned"), - job: z6.string(), - root: z6.string(), - archived: z6.boolean().default(false) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), + maxContextLength: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + deprecation: z7.nullable(z7.date().transform((v8) => v8.toISOString())).optional(), + defaultModelTemperature: z7.nullable(z7.number()).optional(), + type: z7.literal("fine-tuned").default("fine-tuned"), + job: z7.string(), + root: z7.string(), + archived: z7.boolean().default(false) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { ownedBy: "owned_by", maxContextLength: "max_context_length", defaultModelTemperature: "default_model_temperature" @@ -39753,7 +40237,7 @@ var require_ftmodelcard = __commonJS({ return JSON.stringify(exports2.FTModelCard$outboundSchema.parse(ftModelCard)); } function ftModelCardFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FTModelCard$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FTModelCard' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FTModelCard$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FTModelCard' from JSON`); } } }); @@ -39762,85 +40246,85 @@ var require_ftmodelcard = __commonJS({ var require_ftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelOut$ = exports2.FTModelOut$outboundSchema = exports2.FTModelOut$inboundSchema = exports2.FTModelOutObject$ = exports2.FTModelOutObject$outboundSchema = exports2.FTModelOutObject$inboundSchema = exports2.FTModelOutObject = void 0; exports2.ftModelOutToJSON = ftModelOutToJSON; exports2.ftModelOutFromJSON = ftModelOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var ftmodelcapabilitiesout_js_1 = require_ftmodelcapabilitiesout(); exports2.FTModelOutObject = { Model: "model" }; - exports2.FTModelOutObject$inboundSchema = z6.nativeEnum(exports2.FTModelOutObject); + exports2.FTModelOutObject$inboundSchema = z7.nativeEnum(exports2.FTModelOutObject); exports2.FTModelOutObject$outboundSchema = exports2.FTModelOutObject$inboundSchema; var FTModelOutObject$; (function(FTModelOutObject$2) { FTModelOutObject$2.inboundSchema = exports2.FTModelOutObject$inboundSchema; FTModelOutObject$2.outboundSchema = exports2.FTModelOutObject$outboundSchema; })(FTModelOutObject$ || (exports2.FTModelOutObject$ = FTModelOutObject$ = {})); - exports2.FTModelOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - created: z6.number().int(), - owned_by: z6.string(), - root: z6.string(), - archived: z6.boolean(), - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), + exports2.FTModelOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + created: z7.number().int(), + owned_by: z7.string(), + root: z7.string(), + archived: z7.boolean(), + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), capabilities: ftmodelcapabilitiesout_js_1.FTModelCapabilitiesOut$inboundSchema, - max_context_length: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - job: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + max_context_length: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + job: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "owned_by": "ownedBy", "max_context_length": "maxContextLength" }); }); - exports2.FTModelOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - created: z6.number().int(), - ownedBy: z6.string(), - root: z6.string(), - archived: z6.boolean(), - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional(), + exports2.FTModelOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + created: z7.number().int(), + ownedBy: z7.string(), + root: z7.string(), + archived: z7.boolean(), + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional(), capabilities: ftmodelcapabilitiesout_js_1.FTModelCapabilitiesOut$outboundSchema, - maxContextLength: z6.number().int().default(32768), - aliases: z6.array(z6.string()).optional(), - job: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + maxContextLength: z7.number().int().default(32768), + aliases: z7.array(z7.string()).optional(), + job: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { ownedBy: "owned_by", maxContextLength: "max_context_length" }); @@ -39854,7 +40338,7 @@ var require_ftmodelout = __commonJS({ return JSON.stringify(exports2.FTModelOut$outboundSchema.parse(ftModelOut)); } function ftModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FTModelOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FTModelOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FTModelOut' from JSON`); } } }); @@ -39863,64 +40347,64 @@ var require_ftmodelout = __commonJS({ var require_githubrepositoryin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/githubrepositoryin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GithubRepositoryIn$ = exports2.GithubRepositoryIn$outboundSchema = exports2.GithubRepositoryIn$inboundSchema = exports2.GithubRepositoryInType$ = exports2.GithubRepositoryInType$outboundSchema = exports2.GithubRepositoryInType$inboundSchema = exports2.GithubRepositoryInType = void 0; exports2.githubRepositoryInToJSON = githubRepositoryInToJSON; exports2.githubRepositoryInFromJSON = githubRepositoryInFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); exports2.GithubRepositoryInType = { Github: "github" }; - exports2.GithubRepositoryInType$inboundSchema = z6.nativeEnum(exports2.GithubRepositoryInType); + exports2.GithubRepositoryInType$inboundSchema = z7.nativeEnum(exports2.GithubRepositoryInType); exports2.GithubRepositoryInType$outboundSchema = exports2.GithubRepositoryInType$inboundSchema; var GithubRepositoryInType$; (function(GithubRepositoryInType$2) { GithubRepositoryInType$2.inboundSchema = exports2.GithubRepositoryInType$inboundSchema; GithubRepositoryInType$2.outboundSchema = exports2.GithubRepositoryInType$outboundSchema; })(GithubRepositoryInType$ || (exports2.GithubRepositoryInType$ = GithubRepositoryInType$ = {})); - exports2.GithubRepositoryIn$inboundSchema = z6.object({ - type: z6.literal("github").default("github"), - name: z6.string(), - owner: z6.string(), - ref: z6.nullable(z6.string()).optional(), - weight: z6.number().default(1), - token: z6.string() - }); - exports2.GithubRepositoryIn$outboundSchema = z6.object({ - type: z6.literal("github").default("github"), - name: z6.string(), - owner: z6.string(), - ref: z6.nullable(z6.string()).optional(), - weight: z6.number().default(1), - token: z6.string() + exports2.GithubRepositoryIn$inboundSchema = z7.object({ + type: z7.literal("github").default("github"), + name: z7.string(), + owner: z7.string(), + ref: z7.nullable(z7.string()).optional(), + weight: z7.number().default(1), + token: z7.string() + }); + exports2.GithubRepositoryIn$outboundSchema = z7.object({ + type: z7.literal("github").default("github"), + name: z7.string(), + owner: z7.string(), + ref: z7.nullable(z7.string()).optional(), + weight: z7.number().default(1), + token: z7.string() }); var GithubRepositoryIn$; (function(GithubRepositoryIn$2) { @@ -39931,7 +40415,7 @@ var require_githubrepositoryin = __commonJS({ return JSON.stringify(exports2.GithubRepositoryIn$outboundSchema.parse(githubRepositoryIn)); } function githubRepositoryInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.GithubRepositoryIn$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'GithubRepositoryIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.GithubRepositoryIn$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'GithubRepositoryIn' from JSON`); } } }); @@ -39940,53 +40424,53 @@ var require_githubrepositoryin = __commonJS({ var require_trainingfile = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingFile$ = exports2.TrainingFile$outboundSchema = exports2.TrainingFile$inboundSchema = void 0; exports2.trainingFileToJSON = trainingFileToJSON; exports2.trainingFileFromJSON = trainingFileFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingFile$inboundSchema = z6.object({ - file_id: z6.string(), - weight: z6.number().default(1) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingFile$inboundSchema = z7.object({ + file_id: z7.string(), + weight: z7.number().default(1) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "file_id": "fileId" }); }); - exports2.TrainingFile$outboundSchema = z6.object({ - fileId: z6.string(), - weight: z6.number().default(1) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingFile$outboundSchema = z7.object({ + fileId: z7.string(), + weight: z7.number().default(1) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { fileId: "file_id" }); }); @@ -39999,7 +40483,7 @@ var require_trainingfile = __commonJS({ return JSON.stringify(exports2.TrainingFile$outboundSchema.parse(trainingFile)); } function trainingFileFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.TrainingFile$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'TrainingFile' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.TrainingFile$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'TrainingFile' from JSON`); } } }); @@ -40008,50 +40492,50 @@ var require_trainingfile = __commonJS({ var require_trainingparametersin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingparametersin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingParametersIn$ = exports2.TrainingParametersIn$outboundSchema = exports2.TrainingParametersIn$inboundSchema = void 0; exports2.trainingParametersInToJSON = trainingParametersInToJSON; exports2.trainingParametersInFromJSON = trainingParametersInFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingParametersIn$inboundSchema = z6.object({ - training_steps: z6.nullable(z6.number().int()).optional(), - learning_rate: z6.number().default(1e-4), - weight_decay: z6.nullable(z6.number()).optional(), - warmup_fraction: z6.nullable(z6.number()).optional(), - epochs: z6.nullable(z6.number()).optional(), - fim_ratio: z6.nullable(z6.number()).optional(), - seq_len: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingParametersIn$inboundSchema = z7.object({ + training_steps: z7.nullable(z7.number().int()).optional(), + learning_rate: z7.number().default(1e-4), + weight_decay: z7.nullable(z7.number()).optional(), + warmup_fraction: z7.nullable(z7.number()).optional(), + epochs: z7.nullable(z7.number()).optional(), + fim_ratio: z7.nullable(z7.number()).optional(), + seq_len: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "training_steps": "trainingSteps", "learning_rate": "learningRate", "weight_decay": "weightDecay", @@ -40060,16 +40544,16 @@ var require_trainingparametersin = __commonJS({ "seq_len": "seqLen" }); }); - exports2.TrainingParametersIn$outboundSchema = z6.object({ - trainingSteps: z6.nullable(z6.number().int()).optional(), - learningRate: z6.number().default(1e-4), - weightDecay: z6.nullable(z6.number()).optional(), - warmupFraction: z6.nullable(z6.number()).optional(), - epochs: z6.nullable(z6.number()).optional(), - fimRatio: z6.nullable(z6.number()).optional(), - seqLen: z6.nullable(z6.number().int()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.TrainingParametersIn$outboundSchema = z7.object({ + trainingSteps: z7.nullable(z7.number().int()).optional(), + learningRate: z7.number().default(1e-4), + weightDecay: z7.nullable(z7.number()).optional(), + warmupFraction: z7.nullable(z7.number()).optional(), + epochs: z7.nullable(z7.number()).optional(), + fimRatio: z7.nullable(z7.number()).optional(), + seqLen: z7.nullable(z7.number().int()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { trainingSteps: "training_steps", learningRate: "learning_rate", weightDecay: "weight_decay", @@ -40087,7 +40571,7 @@ var require_trainingparametersin = __commonJS({ return JSON.stringify(exports2.TrainingParametersIn$outboundSchema.parse(trainingParametersIn)); } function trainingParametersInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.TrainingParametersIn$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'TrainingParametersIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.TrainingParametersIn$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'TrainingParametersIn' from JSON`); } } }); @@ -40096,70 +40580,70 @@ var require_trainingparametersin = __commonJS({ var require_wandbintegration = __commonJS({ "node_modules/@mistralai/mistralai/models/components/wandbintegration.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WandbIntegration$ = exports2.WandbIntegration$outboundSchema = exports2.WandbIntegration$inboundSchema = exports2.WandbIntegrationType$ = exports2.WandbIntegrationType$outboundSchema = exports2.WandbIntegrationType$inboundSchema = exports2.WandbIntegrationType = void 0; exports2.wandbIntegrationToJSON = wandbIntegrationToJSON; exports2.wandbIntegrationFromJSON = wandbIntegrationFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.WandbIntegrationType = { Wandb: "wandb" }; - exports2.WandbIntegrationType$inboundSchema = z6.nativeEnum(exports2.WandbIntegrationType); + exports2.WandbIntegrationType$inboundSchema = z7.nativeEnum(exports2.WandbIntegrationType); exports2.WandbIntegrationType$outboundSchema = exports2.WandbIntegrationType$inboundSchema; var WandbIntegrationType$; (function(WandbIntegrationType$2) { WandbIntegrationType$2.inboundSchema = exports2.WandbIntegrationType$inboundSchema; WandbIntegrationType$2.outboundSchema = exports2.WandbIntegrationType$outboundSchema; })(WandbIntegrationType$ || (exports2.WandbIntegrationType$ = WandbIntegrationType$ = {})); - exports2.WandbIntegration$inboundSchema = z6.object({ - type: z6.literal("wandb").default("wandb"), - project: z6.string(), - name: z6.nullable(z6.string()).optional(), - api_key: z6.string(), - run_name: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.WandbIntegration$inboundSchema = z7.object({ + type: z7.literal("wandb").default("wandb"), + project: z7.string(), + name: z7.nullable(z7.string()).optional(), + api_key: z7.string(), + run_name: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "api_key": "apiKey", "run_name": "runName" }); }); - exports2.WandbIntegration$outboundSchema = z6.object({ - type: z6.literal("wandb").default("wandb"), - project: z6.string(), - name: z6.nullable(z6.string()).optional(), - apiKey: z6.string(), - runName: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.WandbIntegration$outboundSchema = z7.object({ + type: z7.literal("wandb").default("wandb"), + project: z7.string(), + name: z7.nullable(z7.string()).optional(), + apiKey: z7.string(), + runName: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { apiKey: "api_key", runName: "run_name" }); @@ -40173,7 +40657,7 @@ var require_wandbintegration = __commonJS({ return JSON.stringify(exports2.WandbIntegration$outboundSchema.parse(wandbIntegration)); } function wandbIntegrationFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.WandbIntegration$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'WandbIntegration' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.WandbIntegration$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'WandbIntegration' from JSON`); } } }); @@ -40182,31 +40666,31 @@ var require_wandbintegration = __commonJS({ var require_jobin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40217,7 +40701,7 @@ var require_jobin = __commonJS({ exports2.jobInRepositoriesFromJSON = jobInRepositoriesFromJSON; exports2.jobInToJSON = jobInToJSON; exports2.jobInFromJSON = jobInFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var githubrepositoryin_js_1 = require_githubrepositoryin(); @@ -40235,7 +40719,7 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobInIntegrations$outboundSchema.parse(jobInIntegrations)); } function jobInIntegrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobInIntegrations$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobInIntegrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobInIntegrations$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobInIntegrations' from JSON`); } exports2.JobInRepositories$inboundSchema = githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema; exports2.JobInRepositories$outboundSchema = githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema; @@ -40248,35 +40732,35 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobInRepositories$outboundSchema.parse(jobInRepositories)); } function jobInRepositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobInRepositories$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobInRepositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobInRepositories$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobInRepositories' from JSON`); } - exports2.JobIn$inboundSchema = z6.object({ - model: z6.string(), - training_files: z6.array(trainingfile_js_1.TrainingFile$inboundSchema).optional(), - validation_files: z6.nullable(z6.array(z6.string())).optional(), + exports2.JobIn$inboundSchema = z7.object({ + model: z7.string(), + training_files: z7.array(trainingfile_js_1.TrainingFile$inboundSchema).optional(), + validation_files: z7.nullable(z7.array(z7.string())).optional(), hyperparameters: trainingparametersin_js_1.TrainingParametersIn$inboundSchema, - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegration_js_1.WandbIntegration$inboundSchema)).optional(), - repositories: z6.array(githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema).optional(), - auto_start: z6.boolean().optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegration_js_1.WandbIntegration$inboundSchema)).optional(), + repositories: z7.array(githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema).optional(), + auto_start: z7.boolean().optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "training_files": "trainingFiles", "validation_files": "validationFiles", "auto_start": "autoStart" }); }); - exports2.JobIn$outboundSchema = z6.object({ - model: z6.string(), - trainingFiles: z6.array(trainingfile_js_1.TrainingFile$outboundSchema).optional(), - validationFiles: z6.nullable(z6.array(z6.string())).optional(), + exports2.JobIn$outboundSchema = z7.object({ + model: z7.string(), + trainingFiles: z7.array(trainingfile_js_1.TrainingFile$outboundSchema).optional(), + validationFiles: z7.nullable(z7.array(z7.string())).optional(), hyperparameters: trainingparametersin_js_1.TrainingParametersIn$outboundSchema, - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegration_js_1.WandbIntegration$outboundSchema)).optional(), - repositories: z6.array(githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema).optional(), - autoStart: z6.boolean().optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegration_js_1.WandbIntegration$outboundSchema)).optional(), + repositories: z7.array(githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema).optional(), + autoStart: z7.boolean().optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { trainingFiles: "training_files", validationFiles: "validation_files", autoStart: "auto_start" @@ -40291,7 +40775,7 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobIn$outboundSchema.parse(jobIn)); } function jobInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobIn$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobIn$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobIn' from JSON`); } } }); @@ -40300,31 +40784,31 @@ var require_jobin = __commonJS({ var require_jobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40335,7 +40819,7 @@ var require_jobout = __commonJS({ exports2.repositoriesFromJSON = repositoriesFromJSON; exports2.jobOutToJSON = jobOutToJSON; exports2.jobOutFromJSON = jobOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var githubrepositoryout_js_1 = require_githubrepositoryout(); @@ -40357,14 +40841,14 @@ var require_jobout = __commonJS({ exports2.ObjectT = { Job: "job" }; - exports2.Status$inboundSchema = z6.nativeEnum(exports2.Status); + exports2.Status$inboundSchema = z7.nativeEnum(exports2.Status); exports2.Status$outboundSchema = exports2.Status$inboundSchema; var Status$; (function(Status$2) { Status$2.inboundSchema = exports2.Status$inboundSchema; Status$2.outboundSchema = exports2.Status$outboundSchema; })(Status$ || (exports2.Status$ = Status$ = {})); - exports2.ObjectT$inboundSchema = z6.nativeEnum(exports2.ObjectT); + exports2.ObjectT$inboundSchema = z7.nativeEnum(exports2.ObjectT); exports2.ObjectT$outboundSchema = exports2.ObjectT$inboundSchema; var ObjectT$; (function(ObjectT$2) { @@ -40382,7 +40866,7 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.Integrations$outboundSchema.parse(integrations)); } function integrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Integrations$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Integrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Integrations$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Integrations' from JSON`); } exports2.Repositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema; exports2.Repositories$outboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema; @@ -40395,28 +40879,28 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.Repositories$outboundSchema.parse(repositories)); } function repositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Repositories$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Repositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Repositories$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Repositories' from JSON`); } - exports2.JobOut$inboundSchema = z6.object({ - id: z6.string(), - auto_start: z6.boolean(), + exports2.JobOut$inboundSchema = z7.object({ + id: z7.string(), + auto_start: z7.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$inboundSchema, - model: z6.string(), + model: z7.string(), status: exports2.Status$inboundSchema, - job_type: z6.string(), - created_at: z6.number().int(), - modified_at: z6.number().int(), - training_files: z6.array(z6.string()), - validation_files: z6.nullable(z6.array(z6.string())).optional(), - object: z6.literal("job").default("job"), - fine_tuned_model: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), - trained_tokens: z6.nullable(z6.number().int()).optional(), - repositories: z6.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), - metadata: z6.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + job_type: z7.string(), + created_at: z7.number().int(), + modified_at: z7.number().int(), + training_files: z7.array(z7.string()), + validation_files: z7.nullable(z7.array(z7.string())).optional(), + object: z7.literal("job").default("job"), + fine_tuned_model: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), + trained_tokens: z7.nullable(z7.number().int()).optional(), + repositories: z7.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), + metadata: z7.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "auto_start": "autoStart", "job_type": "jobType", "created_at": "createdAt", @@ -40427,26 +40911,26 @@ var require_jobout = __commonJS({ "trained_tokens": "trainedTokens" }); }); - exports2.JobOut$outboundSchema = z6.object({ - id: z6.string(), - autoStart: z6.boolean(), + exports2.JobOut$outboundSchema = z7.object({ + id: z7.string(), + autoStart: z7.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$outboundSchema, - model: z6.string(), + model: z7.string(), status: exports2.Status$outboundSchema, - jobType: z6.string(), - createdAt: z6.number().int(), - modifiedAt: z6.number().int(), - trainingFiles: z6.array(z6.string()), - validationFiles: z6.nullable(z6.array(z6.string())).optional(), - object: z6.literal("job").default("job"), - fineTunedModel: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional(), - integrations: z6.nullable(z6.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), - trainedTokens: z6.nullable(z6.number().int()).optional(), - repositories: z6.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), - metadata: z6.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + jobType: z7.string(), + createdAt: z7.number().int(), + modifiedAt: z7.number().int(), + trainingFiles: z7.array(z7.string()), + validationFiles: z7.nullable(z7.array(z7.string())).optional(), + object: z7.literal("job").default("job"), + fineTunedModel: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional(), + integrations: z7.nullable(z7.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), + trainedTokens: z7.nullable(z7.number().int()).optional(), + repositories: z7.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), + metadata: z7.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { autoStart: "auto_start", jobType: "job_type", createdAt: "created_at", @@ -40466,7 +40950,7 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.JobOut$outboundSchema.parse(jobOut)); } function jobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobOut' from JSON`); } } }); @@ -40475,59 +40959,59 @@ var require_jobout = __commonJS({ var require_jobsout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobsout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsOut$ = exports2.JobsOut$outboundSchema = exports2.JobsOut$inboundSchema = exports2.JobsOutObject$ = exports2.JobsOutObject$outboundSchema = exports2.JobsOutObject$inboundSchema = exports2.JobsOutObject = void 0; exports2.jobsOutToJSON = jobsOutToJSON; exports2.jobsOutFromJSON = jobsOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var jobout_js_1 = require_jobout(); exports2.JobsOutObject = { List: "list" }; - exports2.JobsOutObject$inboundSchema = z6.nativeEnum(exports2.JobsOutObject); + exports2.JobsOutObject$inboundSchema = z7.nativeEnum(exports2.JobsOutObject); exports2.JobsOutObject$outboundSchema = exports2.JobsOutObject$inboundSchema; var JobsOutObject$; (function(JobsOutObject$2) { JobsOutObject$2.inboundSchema = exports2.JobsOutObject$inboundSchema; JobsOutObject$2.outboundSchema = exports2.JobsOutObject$outboundSchema; })(JobsOutObject$ || (exports2.JobsOutObject$ = JobsOutObject$ = {})); - exports2.JobsOut$inboundSchema = z6.object({ - data: z6.array(jobout_js_1.JobOut$inboundSchema).optional(), - object: z6.literal("list").default("list"), - total: z6.number().int() + exports2.JobsOut$inboundSchema = z7.object({ + data: z7.array(jobout_js_1.JobOut$inboundSchema).optional(), + object: z7.literal("list").default("list"), + total: z7.number().int() }); - exports2.JobsOut$outboundSchema = z6.object({ - data: z6.array(jobout_js_1.JobOut$outboundSchema).optional(), - object: z6.literal("list").default("list"), - total: z6.number().int() + exports2.JobsOut$outboundSchema = z7.object({ + data: z7.array(jobout_js_1.JobOut$outboundSchema).optional(), + object: z7.literal("list").default("list"), + total: z7.number().int() }); var JobsOut$; (function(JobsOut$2) { @@ -40538,7 +41022,7 @@ var require_jobsout = __commonJS({ return JSON.stringify(exports2.JobsOut$outboundSchema.parse(jobsOut)); } function jobsOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsOut' from JSON`); } } }); @@ -40547,65 +41031,65 @@ var require_jobsout = __commonJS({ var require_legacyjobmetadataout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/legacyjobmetadataout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LegacyJobMetadataOut$ = exports2.LegacyJobMetadataOut$outboundSchema = exports2.LegacyJobMetadataOut$inboundSchema = exports2.LegacyJobMetadataOutObject$ = exports2.LegacyJobMetadataOutObject$outboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema = exports2.LegacyJobMetadataOutObject = void 0; exports2.legacyJobMetadataOutToJSON = legacyJobMetadataOutToJSON; exports2.legacyJobMetadataOutFromJSON = legacyJobMetadataOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.LegacyJobMetadataOutObject = { JobMetadata: "job.metadata" }; - exports2.LegacyJobMetadataOutObject$inboundSchema = z6.nativeEnum(exports2.LegacyJobMetadataOutObject); + exports2.LegacyJobMetadataOutObject$inboundSchema = z7.nativeEnum(exports2.LegacyJobMetadataOutObject); exports2.LegacyJobMetadataOutObject$outboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema; var LegacyJobMetadataOutObject$; (function(LegacyJobMetadataOutObject$2) { LegacyJobMetadataOutObject$2.inboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema; LegacyJobMetadataOutObject$2.outboundSchema = exports2.LegacyJobMetadataOutObject$outboundSchema; })(LegacyJobMetadataOutObject$ || (exports2.LegacyJobMetadataOutObject$ = LegacyJobMetadataOutObject$ = {})); - exports2.LegacyJobMetadataOut$inboundSchema = z6.object({ - expected_duration_seconds: z6.nullable(z6.number().int()).optional(), - cost: z6.nullable(z6.number()).optional(), - cost_currency: z6.nullable(z6.string()).optional(), - train_tokens_per_step: z6.nullable(z6.number().int()).optional(), - train_tokens: z6.nullable(z6.number().int()).optional(), - data_tokens: z6.nullable(z6.number().int()).optional(), - estimated_start_time: z6.nullable(z6.number().int()).optional(), - deprecated: z6.boolean().default(true), - details: z6.string(), - epochs: z6.nullable(z6.number()).optional(), - training_steps: z6.nullable(z6.number().int()).optional(), - object: z6.literal("job.metadata").default("job.metadata") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.LegacyJobMetadataOut$inboundSchema = z7.object({ + expected_duration_seconds: z7.nullable(z7.number().int()).optional(), + cost: z7.nullable(z7.number()).optional(), + cost_currency: z7.nullable(z7.string()).optional(), + train_tokens_per_step: z7.nullable(z7.number().int()).optional(), + train_tokens: z7.nullable(z7.number().int()).optional(), + data_tokens: z7.nullable(z7.number().int()).optional(), + estimated_start_time: z7.nullable(z7.number().int()).optional(), + deprecated: z7.boolean().default(true), + details: z7.string(), + epochs: z7.nullable(z7.number()).optional(), + training_steps: z7.nullable(z7.number().int()).optional(), + object: z7.literal("job.metadata").default("job.metadata") + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "expected_duration_seconds": "expectedDurationSeconds", "cost_currency": "costCurrency", "train_tokens_per_step": "trainTokensPerStep", @@ -40615,21 +41099,21 @@ var require_legacyjobmetadataout = __commonJS({ "training_steps": "trainingSteps" }); }); - exports2.LegacyJobMetadataOut$outboundSchema = z6.object({ - expectedDurationSeconds: z6.nullable(z6.number().int()).optional(), - cost: z6.nullable(z6.number()).optional(), - costCurrency: z6.nullable(z6.string()).optional(), - trainTokensPerStep: z6.nullable(z6.number().int()).optional(), - trainTokens: z6.nullable(z6.number().int()).optional(), - dataTokens: z6.nullable(z6.number().int()).optional(), - estimatedStartTime: z6.nullable(z6.number().int()).optional(), - deprecated: z6.boolean().default(true), - details: z6.string(), - epochs: z6.nullable(z6.number()).optional(), - trainingSteps: z6.nullable(z6.number().int()).optional(), - object: z6.literal("job.metadata").default("job.metadata") - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.LegacyJobMetadataOut$outboundSchema = z7.object({ + expectedDurationSeconds: z7.nullable(z7.number().int()).optional(), + cost: z7.nullable(z7.number()).optional(), + costCurrency: z7.nullable(z7.string()).optional(), + trainTokensPerStep: z7.nullable(z7.number().int()).optional(), + trainTokens: z7.nullable(z7.number().int()).optional(), + dataTokens: z7.nullable(z7.number().int()).optional(), + estimatedStartTime: z7.nullable(z7.number().int()).optional(), + deprecated: z7.boolean().default(true), + details: z7.string(), + epochs: z7.nullable(z7.number()).optional(), + trainingSteps: z7.nullable(z7.number().int()).optional(), + object: z7.literal("job.metadata").default("job.metadata") + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { expectedDurationSeconds: "expected_duration_seconds", costCurrency: "cost_currency", trainTokensPerStep: "train_tokens_per_step", @@ -40648,7 +41132,7 @@ var require_legacyjobmetadataout = __commonJS({ return JSON.stringify(exports2.LegacyJobMetadataOut$outboundSchema.parse(legacyJobMetadataOut)); } function legacyJobMetadataOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.LegacyJobMetadataOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'LegacyJobMetadataOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.LegacyJobMetadataOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'LegacyJobMetadataOut' from JSON`); } } }); @@ -40657,49 +41141,49 @@ var require_legacyjobmetadataout = __commonJS({ var require_listfilesout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/listfilesout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ListFilesOut$ = exports2.ListFilesOut$outboundSchema = exports2.ListFilesOut$inboundSchema = void 0; exports2.listFilesOutToJSON = listFilesOutToJSON; exports2.listFilesOutFromJSON = listFilesOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var fileschema_js_1 = require_fileschema(); - exports2.ListFilesOut$inboundSchema = z6.object({ - data: z6.array(fileschema_js_1.FileSchema$inboundSchema), - object: z6.string(), - total: z6.number().int() + exports2.ListFilesOut$inboundSchema = z7.object({ + data: z7.array(fileschema_js_1.FileSchema$inboundSchema), + object: z7.string(), + total: z7.number().int() }); - exports2.ListFilesOut$outboundSchema = z6.object({ - data: z6.array(fileschema_js_1.FileSchema$outboundSchema), - object: z6.string(), - total: z6.number().int() + exports2.ListFilesOut$outboundSchema = z7.object({ + data: z7.array(fileschema_js_1.FileSchema$outboundSchema), + object: z7.string(), + total: z7.number().int() }); var ListFilesOut$; (function(ListFilesOut$2) { @@ -40710,7 +41194,7 @@ var require_listfilesout = __commonJS({ return JSON.stringify(exports2.ListFilesOut$outboundSchema.parse(listFilesOut)); } function listFilesOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ListFilesOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ListFilesOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ListFilesOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ListFilesOut' from JSON`); } } }); @@ -40719,31 +41203,31 @@ var require_listfilesout = __commonJS({ var require_modellist = __commonJS({ "node_modules/@mistralai/mistralai/models/components/modellist.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40752,24 +41236,24 @@ var require_modellist = __commonJS({ exports2.dataFromJSON = dataFromJSON; exports2.modelListToJSON = modelListToJSON; exports2.modelListFromJSON = modelListFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var basemodelcard_js_1 = require_basemodelcard(); var ftmodelcard_js_1 = require_ftmodelcard(); - exports2.Data$inboundSchema = z6.union([ - basemodelcard_js_1.BaseModelCard$inboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.Data$inboundSchema = z7.union([ + basemodelcard_js_1.BaseModelCard$inboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - ftmodelcard_js_1.FTModelCard$inboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + ftmodelcard_js_1.FTModelCard$inboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ]); - exports2.Data$outboundSchema = z6.union([ - basemodelcard_js_1.BaseModelCard$outboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.Data$outboundSchema = z7.union([ + basemodelcard_js_1.BaseModelCard$outboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - ftmodelcard_js_1.FTModelCard$outboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + ftmodelcard_js_1.FTModelCard$outboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ]); var Data$; @@ -40781,27 +41265,27 @@ var require_modellist = __commonJS({ return JSON.stringify(exports2.Data$outboundSchema.parse(data)); } function dataFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Data$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Data' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Data$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Data' from JSON`); } - exports2.ModelList$inboundSchema = z6.object({ - object: z6.string().default("list"), - data: z6.array(z6.union([ - basemodelcard_js_1.BaseModelCard$inboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.ModelList$inboundSchema = z7.object({ + object: z7.string().default("list"), + data: z7.array(z7.union([ + basemodelcard_js_1.BaseModelCard$inboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - ftmodelcard_js_1.FTModelCard$inboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + ftmodelcard_js_1.FTModelCard$inboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ])).optional() }); - exports2.ModelList$outboundSchema = z6.object({ - object: z6.string().default("list"), - data: z6.array(z6.union([ - basemodelcard_js_1.BaseModelCard$outboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.ModelList$outboundSchema = z7.object({ + object: z7.string().default("list"), + data: z7.array(z7.union([ + basemodelcard_js_1.BaseModelCard$outboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - ftmodelcard_js_1.FTModelCard$outboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + ftmodelcard_js_1.FTModelCard$outboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ])).optional() }); @@ -40814,7 +41298,7 @@ var require_modellist = __commonJS({ return JSON.stringify(exports2.ModelList$outboundSchema.parse(modelList)); } function modelListFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ModelList$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ModelList' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ModelList$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ModelList' from JSON`); } } }); @@ -40823,74 +41307,74 @@ var require_modellist = __commonJS({ var require_retrievefileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/retrievefileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetrieveFileOut$ = exports2.RetrieveFileOut$outboundSchema = exports2.RetrieveFileOut$inboundSchema = void 0; exports2.retrieveFileOutToJSON = retrieveFileOutToJSON; exports2.retrieveFileOutFromJSON = retrieveFileOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.RetrieveFileOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - created_at: z6.number().int(), - filename: z6.string(), + exports2.RetrieveFileOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + created_at: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z6.nullable(z6.number().int()).optional(), + num_lines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$inboundSchema, - deleted: z6.boolean() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + deleted: z7.boolean() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.RetrieveFileOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - createdAt: z6.number().int(), - filename: z6.string(), + exports2.RetrieveFileOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + createdAt: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z6.nullable(z6.number().int()).optional(), + numLines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$outboundSchema, - deleted: z6.boolean() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + deleted: z7.boolean() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -40905,7 +41389,7 @@ var require_retrievefileout = __commonJS({ return JSON.stringify(exports2.RetrieveFileOut$outboundSchema.parse(retrieveFileOut)); } function retrieveFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.RetrieveFileOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'RetrieveFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.RetrieveFileOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'RetrieveFileOut' from JSON`); } } }); @@ -40914,51 +41398,51 @@ var require_retrievefileout = __commonJS({ var require_security2 = __commonJS({ "node_modules/@mistralai/mistralai/models/components/security.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Security$ = exports2.Security$outboundSchema = exports2.Security$inboundSchema = void 0; exports2.securityToJSON = securityToJSON; exports2.securityFromJSON = securityFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.Security$inboundSchema = z6.object({ - ApiKey: z6.string().optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.Security$inboundSchema = z7.object({ + ApiKey: z7.string().optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "ApiKey": "apiKey" }); }); - exports2.Security$outboundSchema = z6.object({ - apiKey: z6.string().optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.Security$outboundSchema = z7.object({ + apiKey: z7.string().optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { apiKey: "ApiKey" }); }); @@ -40971,7 +41455,7 @@ var require_security2 = __commonJS({ return JSON.stringify(exports2.Security$outboundSchema.parse(security)); } function securityFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Security$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Security' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Security$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Security' from JSON`); } } }); @@ -40980,58 +41464,58 @@ var require_security2 = __commonJS({ var require_unarchiveftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/unarchiveftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UnarchiveFTModelOut$ = exports2.UnarchiveFTModelOut$outboundSchema = exports2.UnarchiveFTModelOut$inboundSchema = exports2.UnarchiveFTModelOutObject$ = exports2.UnarchiveFTModelOutObject$outboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema = exports2.UnarchiveFTModelOutObject = void 0; exports2.unarchiveFTModelOutToJSON = unarchiveFTModelOutToJSON; exports2.unarchiveFTModelOutFromJSON = unarchiveFTModelOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); exports2.UnarchiveFTModelOutObject = { Model: "model" }; - exports2.UnarchiveFTModelOutObject$inboundSchema = z6.nativeEnum(exports2.UnarchiveFTModelOutObject); + exports2.UnarchiveFTModelOutObject$inboundSchema = z7.nativeEnum(exports2.UnarchiveFTModelOutObject); exports2.UnarchiveFTModelOutObject$outboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema; var UnarchiveFTModelOutObject$; (function(UnarchiveFTModelOutObject$2) { UnarchiveFTModelOutObject$2.inboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema; UnarchiveFTModelOutObject$2.outboundSchema = exports2.UnarchiveFTModelOutObject$outboundSchema; })(UnarchiveFTModelOutObject$ || (exports2.UnarchiveFTModelOutObject$ = UnarchiveFTModelOutObject$ = {})); - exports2.UnarchiveFTModelOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - archived: z6.boolean().default(false) + exports2.UnarchiveFTModelOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + archived: z7.boolean().default(false) }); - exports2.UnarchiveFTModelOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.literal("model").default("model"), - archived: z6.boolean().default(false) + exports2.UnarchiveFTModelOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.literal("model").default("model"), + archived: z7.boolean().default(false) }); var UnarchiveFTModelOut$; (function(UnarchiveFTModelOut$2) { @@ -41042,7 +41526,7 @@ var require_unarchiveftmodelout = __commonJS({ return JSON.stringify(exports2.UnarchiveFTModelOut$outboundSchema.parse(unarchiveFTModelOut)); } function unarchiveFTModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UnarchiveFTModelOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UnarchiveFTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UnarchiveFTModelOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UnarchiveFTModelOut' from JSON`); } } }); @@ -41051,46 +41535,46 @@ var require_unarchiveftmodelout = __commonJS({ var require_updateftmodelin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/updateftmodelin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UpdateFTModelIn$ = exports2.UpdateFTModelIn$outboundSchema = exports2.UpdateFTModelIn$inboundSchema = void 0; exports2.updateFTModelInToJSON = updateFTModelInToJSON; exports2.updateFTModelInFromJSON = updateFTModelInFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.UpdateFTModelIn$inboundSchema = z6.object({ - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional() + exports2.UpdateFTModelIn$inboundSchema = z7.object({ + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional() }); - exports2.UpdateFTModelIn$outboundSchema = z6.object({ - name: z6.nullable(z6.string()).optional(), - description: z6.nullable(z6.string()).optional() + exports2.UpdateFTModelIn$outboundSchema = z7.object({ + name: z7.nullable(z7.string()).optional(), + description: z7.nullable(z7.string()).optional() }); var UpdateFTModelIn$; (function(UpdateFTModelIn$2) { @@ -41101,7 +41585,7 @@ var require_updateftmodelin = __commonJS({ return JSON.stringify(exports2.UpdateFTModelIn$outboundSchema.parse(updateFTModelIn)); } function updateFTModelInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UpdateFTModelIn$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UpdateFTModelIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UpdateFTModelIn$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UpdateFTModelIn' from JSON`); } } }); @@ -41110,72 +41594,72 @@ var require_updateftmodelin = __commonJS({ var require_uploadfileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/uploadfileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadFileOut$ = exports2.UploadFileOut$outboundSchema = exports2.UploadFileOut$inboundSchema = void 0; exports2.uploadFileOutToJSON = uploadFileOutToJSON; exports2.uploadFileOutFromJSON = uploadFileOutFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.UploadFileOut$inboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - created_at: z6.number().int(), - filename: z6.string(), + exports2.UploadFileOut$inboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + created_at: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z6.nullable(z6.number().int()).optional(), + num_lines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$inboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.UploadFileOut$outboundSchema = z6.object({ - id: z6.string(), - object: z6.string(), - bytes: z6.number().int(), - createdAt: z6.number().int(), - filename: z6.string(), + exports2.UploadFileOut$outboundSchema = z7.object({ + id: z7.string(), + object: z7.string(), + bytes: z7.number().int(), + createdAt: z7.number().int(), + filename: z7.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z6.nullable(z6.number().int()).optional(), + numLines: z7.nullable(z7.number().int()).optional(), source: source_js_1.Source$outboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -41190,7 +41674,7 @@ var require_uploadfileout = __commonJS({ return JSON.stringify(exports2.UploadFileOut$outboundSchema.parse(uploadFileOut)); } function uploadFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.UploadFileOut$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'UploadFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.UploadFileOut$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'UploadFileOut' from JSON`); } } }); @@ -41199,31 +41683,31 @@ var require_uploadfileout = __commonJS({ var require_validationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/components/validationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41232,10 +41716,10 @@ var require_validationerror = __commonJS({ exports2.locFromJSON = locFromJSON; exports2.validationErrorToJSON = validationErrorToJSON; exports2.validationErrorFromJSON = validationErrorFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - exports2.Loc$inboundSchema = z6.union([z6.string(), z6.number().int()]); - exports2.Loc$outboundSchema = z6.union([z6.string(), z6.number().int()]); + exports2.Loc$inboundSchema = z7.union([z7.string(), z7.number().int()]); + exports2.Loc$outboundSchema = z7.union([z7.string(), z7.number().int()]); var Loc$; (function(Loc$2) { Loc$2.inboundSchema = exports2.Loc$inboundSchema; @@ -41245,17 +41729,17 @@ var require_validationerror = __commonJS({ return JSON.stringify(exports2.Loc$outboundSchema.parse(loc)); } function locFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.Loc$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'Loc' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.Loc$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'Loc' from JSON`); } - exports2.ValidationError$inboundSchema = z6.object({ - loc: z6.array(z6.union([z6.string(), z6.number().int()])), - msg: z6.string(), - type: z6.string() + exports2.ValidationError$inboundSchema = z7.object({ + loc: z7.array(z7.union([z7.string(), z7.number().int()])), + msg: z7.string(), + type: z7.string() }); - exports2.ValidationError$outboundSchema = z6.object({ - loc: z6.array(z6.union([z6.string(), z6.number().int()])), - msg: z6.string(), - type: z6.string() + exports2.ValidationError$outboundSchema = z7.object({ + loc: z7.array(z7.union([z7.string(), z7.number().int()])), + msg: z7.string(), + type: z7.string() }); var ValidationError$; (function(ValidationError$2) { @@ -41266,7 +41750,7 @@ var require_validationerror = __commonJS({ return JSON.stringify(exports2.ValidationError$outboundSchema.parse(validationError)); } function validationErrorFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.ValidationError$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'ValidationError' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.ValidationError$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'ValidationError' from JSON`); } } }); @@ -41275,106 +41759,106 @@ var require_validationerror = __commonJS({ var require_components = __commonJS({ "node_modules/@mistralai/mistralai/models/components/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_agentscompletionrequest(), exports2); - __exportStar(require_agentscompletionstreamrequest(), exports2); - __exportStar(require_apiendpoint(), exports2); - __exportStar(require_archiveftmodelout(), exports2); - __exportStar(require_assistantmessage(), exports2); - __exportStar(require_basemodelcard(), exports2); - __exportStar(require_batcherror(), exports2); - __exportStar(require_batchjobin(), exports2); - __exportStar(require_batchjobout(), exports2); - __exportStar(require_batchjobsout(), exports2); - __exportStar(require_batchjobstatus(), exports2); - __exportStar(require_chatclassificationrequest(), exports2); - __exportStar(require_chatcompletionchoice(), exports2); - __exportStar(require_chatcompletionrequest(), exports2); - __exportStar(require_chatcompletionresponse(), exports2); - __exportStar(require_chatcompletionstreamrequest(), exports2); - __exportStar(require_checkpointout(), exports2); - __exportStar(require_classificationobject(), exports2); - __exportStar(require_classificationrequest(), exports2); - __exportStar(require_classificationresponse(), exports2); - __exportStar(require_completionchunk(), exports2); - __exportStar(require_completionevent(), exports2); - __exportStar(require_completionresponsestreamchoice(), exports2); - __exportStar(require_contentchunk(), exports2); - __exportStar(require_deletefileout(), exports2); - __exportStar(require_deletemodelout(), exports2); - __exportStar(require_deltamessage(), exports2); - __exportStar(require_detailedjobout(), exports2); - __exportStar(require_embeddingrequest(), exports2); - __exportStar(require_embeddingresponse(), exports2); - __exportStar(require_embeddingresponsedata(), exports2); - __exportStar(require_eventout(), exports2); - __exportStar(require_filepurpose(), exports2); - __exportStar(require_fileschema(), exports2); - __exportStar(require_filesignedurl(), exports2); - __exportStar(require_fimcompletionrequest(), exports2); - __exportStar(require_fimcompletionresponse(), exports2); - __exportStar(require_fimcompletionstreamrequest(), exports2); - __exportStar(require_ftmodelcapabilitiesout(), exports2); - __exportStar(require_ftmodelcard(), exports2); - __exportStar(require_ftmodelout(), exports2); - __exportStar(require_function(), exports2); - __exportStar(require_functioncall(), exports2); - __exportStar(require_functionname(), exports2); - __exportStar(require_githubrepositoryin(), exports2); - __exportStar(require_githubrepositoryout(), exports2); - __exportStar(require_imageurl(), exports2); - __exportStar(require_imageurlchunk(), exports2); - __exportStar(require_jobin(), exports2); - __exportStar(require_jobmetadataout(), exports2); - __exportStar(require_jobout(), exports2); - __exportStar(require_jobsout(), exports2); - __exportStar(require_legacyjobmetadataout(), exports2); - __exportStar(require_listfilesout(), exports2); - __exportStar(require_metricout(), exports2); - __exportStar(require_modelcapabilities(), exports2); - __exportStar(require_modellist(), exports2); - __exportStar(require_referencechunk(), exports2); - __exportStar(require_responseformat(), exports2); - __exportStar(require_responseformats(), exports2); - __exportStar(require_retrievefileout(), exports2); - __exportStar(require_sampletype(), exports2); - __exportStar(require_security2(), exports2); - __exportStar(require_source(), exports2); - __exportStar(require_systemmessage(), exports2); - __exportStar(require_textchunk(), exports2); - __exportStar(require_tool(), exports2); - __exportStar(require_toolcall(), exports2); - __exportStar(require_toolchoice(), exports2); - __exportStar(require_toolchoiceenum(), exports2); - __exportStar(require_toolmessage(), exports2); - __exportStar(require_tooltypes(), exports2); - __exportStar(require_trainingfile(), exports2); - __exportStar(require_trainingparameters(), exports2); - __exportStar(require_trainingparametersin(), exports2); - __exportStar(require_unarchiveftmodelout(), exports2); - __exportStar(require_updateftmodelin(), exports2); - __exportStar(require_uploadfileout(), exports2); - __exportStar(require_usageinfo(), exports2); - __exportStar(require_usermessage(), exports2); - __exportStar(require_validationerror(), exports2); - __exportStar(require_wandbintegration(), exports2); - __exportStar(require_wandbintegrationout(), exports2); + __exportStar2(require_agentscompletionrequest(), exports2); + __exportStar2(require_agentscompletionstreamrequest(), exports2); + __exportStar2(require_apiendpoint(), exports2); + __exportStar2(require_archiveftmodelout(), exports2); + __exportStar2(require_assistantmessage(), exports2); + __exportStar2(require_basemodelcard(), exports2); + __exportStar2(require_batcherror(), exports2); + __exportStar2(require_batchjobin(), exports2); + __exportStar2(require_batchjobout(), exports2); + __exportStar2(require_batchjobsout(), exports2); + __exportStar2(require_batchjobstatus(), exports2); + __exportStar2(require_chatclassificationrequest(), exports2); + __exportStar2(require_chatcompletionchoice(), exports2); + __exportStar2(require_chatcompletionrequest(), exports2); + __exportStar2(require_chatcompletionresponse(), exports2); + __exportStar2(require_chatcompletionstreamrequest(), exports2); + __exportStar2(require_checkpointout(), exports2); + __exportStar2(require_classificationobject(), exports2); + __exportStar2(require_classificationrequest(), exports2); + __exportStar2(require_classificationresponse(), exports2); + __exportStar2(require_completionchunk(), exports2); + __exportStar2(require_completionevent(), exports2); + __exportStar2(require_completionresponsestreamchoice(), exports2); + __exportStar2(require_contentchunk(), exports2); + __exportStar2(require_deletefileout(), exports2); + __exportStar2(require_deletemodelout(), exports2); + __exportStar2(require_deltamessage(), exports2); + __exportStar2(require_detailedjobout(), exports2); + __exportStar2(require_embeddingrequest(), exports2); + __exportStar2(require_embeddingresponse(), exports2); + __exportStar2(require_embeddingresponsedata(), exports2); + __exportStar2(require_eventout(), exports2); + __exportStar2(require_filepurpose(), exports2); + __exportStar2(require_fileschema(), exports2); + __exportStar2(require_filesignedurl(), exports2); + __exportStar2(require_fimcompletionrequest(), exports2); + __exportStar2(require_fimcompletionresponse(), exports2); + __exportStar2(require_fimcompletionstreamrequest(), exports2); + __exportStar2(require_ftmodelcapabilitiesout(), exports2); + __exportStar2(require_ftmodelcard(), exports2); + __exportStar2(require_ftmodelout(), exports2); + __exportStar2(require_function(), exports2); + __exportStar2(require_functioncall(), exports2); + __exportStar2(require_functionname(), exports2); + __exportStar2(require_githubrepositoryin(), exports2); + __exportStar2(require_githubrepositoryout(), exports2); + __exportStar2(require_imageurl(), exports2); + __exportStar2(require_imageurlchunk(), exports2); + __exportStar2(require_jobin(), exports2); + __exportStar2(require_jobmetadataout(), exports2); + __exportStar2(require_jobout(), exports2); + __exportStar2(require_jobsout(), exports2); + __exportStar2(require_legacyjobmetadataout(), exports2); + __exportStar2(require_listfilesout(), exports2); + __exportStar2(require_metricout(), exports2); + __exportStar2(require_modelcapabilities(), exports2); + __exportStar2(require_modellist(), exports2); + __exportStar2(require_referencechunk(), exports2); + __exportStar2(require_responseformat(), exports2); + __exportStar2(require_responseformats(), exports2); + __exportStar2(require_retrievefileout(), exports2); + __exportStar2(require_sampletype(), exports2); + __exportStar2(require_security2(), exports2); + __exportStar2(require_source(), exports2); + __exportStar2(require_systemmessage(), exports2); + __exportStar2(require_textchunk(), exports2); + __exportStar2(require_tool(), exports2); + __exportStar2(require_toolcall(), exports2); + __exportStar2(require_toolchoice(), exports2); + __exportStar2(require_toolchoiceenum(), exports2); + __exportStar2(require_toolmessage(), exports2); + __exportStar2(require_tooltypes(), exports2); + __exportStar2(require_trainingfile(), exports2); + __exportStar2(require_trainingparameters(), exports2); + __exportStar2(require_trainingparametersin(), exports2); + __exportStar2(require_unarchiveftmodelout(), exports2); + __exportStar2(require_updateftmodelin(), exports2); + __exportStar2(require_uploadfileout(), exports2); + __exportStar2(require_usageinfo(), exports2); + __exportStar2(require_usermessage(), exports2); + __exportStar2(require_validationerror(), exports2); + __exportStar2(require_wandbintegration(), exports2); + __exportStar2(require_wandbintegrationout(), exports2); } }); @@ -41382,37 +41866,37 @@ var require_components = __commonJS({ var require_httpvalidationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/httpvalidationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HTTPValidationError$ = exports2.HTTPValidationError$outboundSchema = exports2.HTTPValidationError$inboundSchema = exports2.HTTPValidationError = void 0; - var z6 = __importStar(require_lib4()); - var components = __importStar(require_components()); + var z7 = __importStar2(require_lib4()); + var components = __importStar2(require_components()); var HTTPValidationError = class extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; @@ -41424,13 +41908,13 @@ var require_httpvalidationerror = __commonJS({ } }; exports2.HTTPValidationError = HTTPValidationError; - exports2.HTTPValidationError$inboundSchema = z6.object({ - detail: z6.array(components.ValidationError$inboundSchema).optional() - }).transform((v5) => { - return new HTTPValidationError(v5); + exports2.HTTPValidationError$inboundSchema = z7.object({ + detail: z7.array(components.ValidationError$inboundSchema).optional() + }).transform((v8) => { + return new HTTPValidationError(v8); }); - exports2.HTTPValidationError$outboundSchema = z6.instanceof(HTTPValidationError).transform((v5) => v5.data$).pipe(z6.object({ - detail: z6.array(components.ValidationError$outboundSchema).optional() + exports2.HTTPValidationError$outboundSchema = z7.instanceof(HTTPValidationError).transform((v8) => v8.data$).pipe(z7.object({ + detail: z7.array(components.ValidationError$outboundSchema).optional() })); var HTTPValidationError$; (function(HTTPValidationError$2) { @@ -41444,27 +41928,27 @@ var require_httpvalidationerror = __commonJS({ var require_errors2 = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_httpclienterrors(), exports2); - __exportStar(require_httpvalidationerror(), exports2); - __exportStar(require_sdkerror(), exports2); - __exportStar(require_sdkvalidationerror(), exports2); + __exportStar2(require_httpclienterrors(), exports2); + __exportStar2(require_httpvalidationerror(), exports2); + __exportStar2(require_sdkerror(), exports2); + __exportStar2(require_sdkvalidationerror(), exports2); } }); @@ -41472,42 +41956,42 @@ var require_errors2 = __commonJS({ var require_agentsComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/agentsComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentsComplete = agentsComplete; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function agentsComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.AgentsCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -41569,44 +42053,44 @@ var require_agentsComplete = __commonJS({ var require_agentsStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/agentsStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentsStream = agentsStream; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function agentsStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.AgentsCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -41655,7 +42139,7 @@ var require_agentsStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M5.match(M5.sse(200, z6.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M5.match(M5.sse(200, z7.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -41707,51 +42191,51 @@ var require_agents = __commonJS({ var require_deletemodelv1modelsmodeliddelete = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/deletemodelv1modelsmodeliddelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteModelV1ModelsModelIdDeleteRequest$ = exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = void 0; exports2.deleteModelV1ModelsModelIdDeleteRequestToJSON = deleteModelV1ModelsModelIdDeleteRequestToJSON; exports2.deleteModelV1ModelsModelIdDeleteRequestFromJSON = deleteModelV1ModelsModelIdDeleteRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = z6.object({ - model_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = z7.object({ + model_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "model_id": "modelId" }); }); - exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = z6.object({ - modelId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = z7.object({ + modelId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { modelId: "model_id" }); }); @@ -41764,7 +42248,7 @@ var require_deletemodelv1modelsmodeliddelete = __commonJS({ return JSON.stringify(exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(deleteModelV1ModelsModelIdDeleteRequest)); } function deleteModelV1ModelsModelIdDeleteRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'DeleteModelV1ModelsModelIdDeleteRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'DeleteModelV1ModelsModelIdDeleteRequest' from JSON`); } } }); @@ -41773,51 +42257,51 @@ var require_deletemodelv1modelsmodeliddelete = __commonJS({ var require_filesapiroutesdeletefile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesdeletefile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesDeleteFileRequest$ = exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = void 0; exports2.filesApiRoutesDeleteFileRequestToJSON = filesApiRoutesDeleteFileRequestToJSON; exports2.filesApiRoutesDeleteFileRequestFromJSON = filesApiRoutesDeleteFileRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = z6.object({ - file_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = z7.object({ + file_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = z6.object({ - fileId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = z7.object({ + fileId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { fileId: "file_id" }); }); @@ -41830,7 +42314,7 @@ var require_filesapiroutesdeletefile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(filesApiRoutesDeleteFileRequest)); } function filesApiRoutesDeleteFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesDeleteFileRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesDeleteFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesDeleteFileRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesDeleteFileRequest' from JSON`); } } }); @@ -41839,51 +42323,51 @@ var require_filesapiroutesdeletefile = __commonJS({ var require_filesapiroutesdownloadfile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesdownloadfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesDownloadFileRequest$ = exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = void 0; exports2.filesApiRoutesDownloadFileRequestToJSON = filesApiRoutesDownloadFileRequestToJSON; exports2.filesApiRoutesDownloadFileRequestFromJSON = filesApiRoutesDownloadFileRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = z6.object({ - file_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = z7.object({ + file_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = z6.object({ - fileId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = z7.object({ + fileId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { fileId: "file_id" }); }); @@ -41896,7 +42380,7 @@ var require_filesapiroutesdownloadfile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(filesApiRoutesDownloadFileRequest)); } function filesApiRoutesDownloadFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesDownloadFileRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesDownloadFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesDownloadFileRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesDownloadFileRequest' from JSON`); } } }); @@ -41905,53 +42389,53 @@ var require_filesapiroutesdownloadfile = __commonJS({ var require_filesapiroutesgetsignedurl = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesgetsignedurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesGetSignedUrlRequest$ = exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = void 0; exports2.filesApiRoutesGetSignedUrlRequestToJSON = filesApiRoutesGetSignedUrlRequestToJSON; exports2.filesApiRoutesGetSignedUrlRequestFromJSON = filesApiRoutesGetSignedUrlRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = z6.object({ - file_id: z6.string(), - expiry: z6.number().int().default(24) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = z7.object({ + file_id: z7.string(), + expiry: z7.number().int().default(24) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = z6.object({ - fileId: z6.string(), - expiry: z6.number().int().default(24) - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = z7.object({ + fileId: z7.string(), + expiry: z7.number().int().default(24) + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { fileId: "file_id" }); }); @@ -41964,7 +42448,7 @@ var require_filesapiroutesgetsignedurl = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(filesApiRoutesGetSignedUrlRequest)); } function filesApiRoutesGetSignedUrlRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesGetSignedUrlRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesGetSignedUrlRequest' from JSON`); } } }); @@ -41973,63 +42457,63 @@ var require_filesapiroutesgetsignedurl = __commonJS({ var require_filesapirouteslistfiles = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapirouteslistfiles.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesListFilesRequest$ = exports2.FilesApiRoutesListFilesRequest$outboundSchema = exports2.FilesApiRoutesListFilesRequest$inboundSchema = void 0; exports2.filesApiRoutesListFilesRequestToJSON = filesApiRoutesListFilesRequestToJSON; exports2.filesApiRoutesListFilesRequestFromJSON = filesApiRoutesListFilesRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.FilesApiRoutesListFilesRequest$inboundSchema = z6.object({ - page: z6.number().int().default(0), - page_size: z6.number().int().default(100), - sample_type: z6.nullable(z6.array(components.SampleType$inboundSchema)).optional(), - source: z6.nullable(z6.array(components.Source$inboundSchema)).optional(), - search: z6.nullable(z6.string()).optional(), - purpose: z6.nullable(components.FilePurpose$inboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + var components = __importStar2(require_components()); + exports2.FilesApiRoutesListFilesRequest$inboundSchema = z7.object({ + page: z7.number().int().default(0), + page_size: z7.number().int().default(100), + sample_type: z7.nullable(z7.array(components.SampleType$inboundSchema)).optional(), + source: z7.nullable(z7.array(components.Source$inboundSchema)).optional(), + search: z7.nullable(z7.string()).optional(), + purpose: z7.nullable(components.FilePurpose$inboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "page_size": "pageSize", "sample_type": "sampleType" }); }); - exports2.FilesApiRoutesListFilesRequest$outboundSchema = z6.object({ - page: z6.number().int().default(0), - pageSize: z6.number().int().default(100), - sampleType: z6.nullable(z6.array(components.SampleType$outboundSchema)).optional(), - source: z6.nullable(z6.array(components.Source$outboundSchema)).optional(), - search: z6.nullable(z6.string()).optional(), - purpose: z6.nullable(components.FilePurpose$outboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesListFilesRequest$outboundSchema = z7.object({ + page: z7.number().int().default(0), + pageSize: z7.number().int().default(100), + sampleType: z7.nullable(z7.array(components.SampleType$outboundSchema)).optional(), + source: z7.nullable(z7.array(components.Source$outboundSchema)).optional(), + search: z7.nullable(z7.string()).optional(), + purpose: z7.nullable(components.FilePurpose$outboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { pageSize: "page_size", sampleType: "sample_type" }); @@ -42043,7 +42527,7 @@ var require_filesapirouteslistfiles = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesListFilesRequest$outboundSchema.parse(filesApiRoutesListFilesRequest)); } function filesApiRoutesListFilesRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesListFilesRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesListFilesRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesListFilesRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesListFilesRequest' from JSON`); } } }); @@ -42052,51 +42536,51 @@ var require_filesapirouteslistfiles = __commonJS({ var require_filesapiroutesretrievefile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesretrievefile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesRetrieveFileRequest$ = exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = void 0; exports2.filesApiRoutesRetrieveFileRequestToJSON = filesApiRoutesRetrieveFileRequestToJSON; exports2.filesApiRoutesRetrieveFileRequestFromJSON = filesApiRoutesRetrieveFileRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = z6.object({ - file_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = z7.object({ + file_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = z6.object({ - fileId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = z7.object({ + fileId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { fileId: "file_id" }); }); @@ -42109,7 +42593,7 @@ var require_filesapiroutesretrievefile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(filesApiRoutesRetrieveFileRequest)); } function filesApiRoutesRetrieveFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesRetrieveFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesRetrieveFileRequest' from JSON`); } } }); @@ -42118,38 +42602,38 @@ var require_filesapiroutesretrievefile = __commonJS({ var require_blobs = __commonJS({ "node_modules/@mistralai/mistralai/types/blobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.blobLikeSchema = void 0; exports2.isBlobLike = isBlobLike3; - var z6 = __importStar(require_lib4()); - exports2.blobLikeSchema = z6.custom(isBlobLike3, { + var z7 = __importStar2(require_lib4()); + exports2.blobLikeSchema = z7.custom(isBlobLike3, { message: "expected a Blob, File or Blob-like object", fatal: true }); @@ -42176,31 +42660,31 @@ var require_blobs = __commonJS({ var require_filesapiroutesuploadfile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesuploadfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -42209,26 +42693,26 @@ var require_filesapiroutesuploadfile = __commonJS({ exports2.fileFromJSON = fileFromJSON; exports2.filesApiRoutesUploadFileMultiPartBodyParamsToJSON = filesApiRoutesUploadFileMultiPartBodyParamsToJSON; exports2.filesApiRoutesUploadFileMultiPartBodyParamsFromJSON = filesApiRoutesUploadFileMultiPartBodyParamsFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); var blobs_js_1 = require_blobs(); - var components = __importStar(require_components()); - exports2.FileT$inboundSchema = z6.object({ - fileName: z6.string(), - content: z6.union([ - z6.instanceof(ReadableStream), - z6.instanceof(Blob), - z6.instanceof(ArrayBuffer), - z6.instanceof(Uint8Array) + var components = __importStar2(require_components()); + exports2.FileT$inboundSchema = z7.object({ + fileName: z7.string(), + content: z7.union([ + z7.instanceof(ReadableStream), + z7.instanceof(Blob), + z7.instanceof(ArrayBuffer), + z7.instanceof(Uint8Array) ]) }); - exports2.FileT$outboundSchema = z6.object({ - fileName: z6.string(), - content: z6.union([ - z6.instanceof(ReadableStream), - z6.instanceof(Blob), - z6.instanceof(ArrayBuffer), - z6.instanceof(Uint8Array) + exports2.FileT$outboundSchema = z7.object({ + fileName: z7.string(), + content: z7.union([ + z7.instanceof(ReadableStream), + z7.instanceof(Blob), + z7.instanceof(ArrayBuffer), + z7.instanceof(Uint8Array) ]) }); var FileT$; @@ -42240,14 +42724,14 @@ var require_filesapiroutesuploadfile = __commonJS({ return JSON.stringify(exports2.FileT$outboundSchema.parse(fileT)); } function fileFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FileT$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FileT' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FileT$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FileT' from JSON`); } - exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema = z6.object({ - file: z6.lazy(() => exports2.FileT$inboundSchema), + exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema = z7.object({ + file: z7.lazy(() => exports2.FileT$inboundSchema), purpose: components.FilePurpose$inboundSchema.optional() }); - exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema = z6.object({ - file: z6.lazy(() => exports2.FileT$outboundSchema).or(blobs_js_1.blobLikeSchema), + exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema = z7.object({ + file: z7.lazy(() => exports2.FileT$outboundSchema).or(blobs_js_1.blobLikeSchema), purpose: components.FilePurpose$outboundSchema.optional() }); var FilesApiRoutesUploadFileMultiPartBodyParams$; @@ -42259,7 +42743,7 @@ var require_filesapiroutesuploadfile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema.parse(filesApiRoutesUploadFileMultiPartBodyParams)); } function filesApiRoutesUploadFileMultiPartBodyParamsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'FilesApiRoutesUploadFileMultiPartBodyParams' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'FilesApiRoutesUploadFileMultiPartBodyParams' from JSON`); } } }); @@ -42268,51 +42752,51 @@ var require_filesapiroutesuploadfile = __commonJS({ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchcancelbatchjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchCancelBatchJobRequest$ = exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchCancelBatchJobRequestToJSON = jobsApiRoutesBatchCancelBatchJobRequestToJSON; exports2.jobsApiRoutesBatchCancelBatchJobRequestFromJSON = jobsApiRoutesBatchCancelBatchJobRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = z6.object({ - job_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = z7.object({ + job_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = z6.object({ - jobId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = z7.object({ + jobId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { jobId: "job_id" }); }); @@ -42325,7 +42809,7 @@ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(jobsApiRoutesBatchCancelBatchJobRequest)); } function jobsApiRoutesBatchCancelBatchJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesBatchCancelBatchJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesBatchCancelBatchJobRequest' from JSON`); } } }); @@ -42334,51 +42818,51 @@ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchgetbatchjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchGetBatchJobRequest$ = exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchGetBatchJobRequestToJSON = jobsApiRoutesBatchGetBatchJobRequestToJSON; exports2.jobsApiRoutesBatchGetBatchJobRequestFromJSON = jobsApiRoutesBatchGetBatchJobRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z6.object({ - job_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z7.object({ + job_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = z6.object({ - jobId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = z7.object({ + jobId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { jobId: "job_id" }); }); @@ -42391,7 +42875,7 @@ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(jobsApiRoutesBatchGetBatchJobRequest)); } function jobsApiRoutesBatchGetBatchJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobRequest' from JSON`); } } }); @@ -42400,66 +42884,66 @@ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchgetbatchjobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchGetBatchJobsRequest$ = exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchGetBatchJobsRequestToJSON = jobsApiRoutesBatchGetBatchJobsRequestToJSON; exports2.jobsApiRoutesBatchGetBatchJobsRequestFromJSON = jobsApiRoutesBatchGetBatchJobsRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = z6.object({ - page: z6.number().int().default(0), - page_size: z6.number().int().default(100), - model: z6.nullable(z6.string()).optional(), - metadata: z6.nullable(z6.record(z6.any())).optional(), - created_after: z6.nullable(z6.string().datetime({ offset: true }).transform((v5) => new Date(v5))).optional(), - created_by_me: z6.boolean().default(false), - status: z6.nullable(components.BatchJobStatus$inboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + var components = __importStar2(require_components()); + exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = z7.object({ + page: z7.number().int().default(0), + page_size: z7.number().int().default(100), + model: z7.nullable(z7.string()).optional(), + metadata: z7.nullable(z7.record(z7.any())).optional(), + created_after: z7.nullable(z7.string().datetime({ offset: true }).transform((v8) => new Date(v8))).optional(), + created_by_me: z7.boolean().default(false), + status: z7.nullable(components.BatchJobStatus$inboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "page_size": "pageSize", "created_after": "createdAfter", "created_by_me": "createdByMe" }); }); - exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = z6.object({ - page: z6.number().int().default(0), - pageSize: z6.number().int().default(100), - model: z6.nullable(z6.string()).optional(), - metadata: z6.nullable(z6.record(z6.any())).optional(), - createdAfter: z6.nullable(z6.date().transform((v5) => v5.toISOString())).optional(), - createdByMe: z6.boolean().default(false), - status: z6.nullable(components.BatchJobStatus$outboundSchema).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = z7.object({ + page: z7.number().int().default(0), + pageSize: z7.number().int().default(100), + model: z7.nullable(z7.string()).optional(), + metadata: z7.nullable(z7.record(z7.any())).optional(), + createdAfter: z7.nullable(z7.date().transform((v8) => v8.toISOString())).optional(), + createdByMe: z7.boolean().default(false), + status: z7.nullable(components.BatchJobStatus$outboundSchema).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { pageSize: "page_size", createdAfter: "created_after", createdByMe: "created_by_me" @@ -42474,7 +42958,7 @@ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.parse(jobsApiRoutesBatchGetBatchJobsRequest)); } function jobsApiRoutesBatchGetBatchJobsRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobsRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobsRequest' from JSON`); } } }); @@ -42483,51 +42967,51 @@ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningarchivefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningArchiveFineTunedModelRequestToJSON = jobsApiRoutesFineTuningArchiveFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = z6.object({ - model_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = z7.object({ + model_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "model_id": "modelId" }); }); - exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = z6.object({ - modelId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = z7.object({ + modelId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { modelId: "model_id" }); }); @@ -42540,7 +43024,7 @@ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningArchiveFineTunedModelRequest)); } function jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningArchiveFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningArchiveFineTunedModelRequest' from JSON`); } } }); @@ -42549,51 +43033,51 @@ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningcancelfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningCancelFineTuningJobRequestToJSON = jobsApiRoutesFineTuningCancelFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = z6.object({ - job_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = z7.object({ + job_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = z6.object({ - jobId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = z7.object({ + jobId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { jobId: "job_id" }); }); @@ -42606,7 +43090,7 @@ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningCancelFineTuningJobRequest)); } function jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningCancelFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningCancelFineTuningJobRequest' from JSON`); } } }); @@ -42615,45 +43099,45 @@ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningcreatefinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$ = exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningCreateFineTuningJobResponseToJSON = jobsApiRoutesFineTuningCreateFineTuningJobResponseToJSON; exports2.jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON = jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = z6.union([ + var components = __importStar2(require_components()); + exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = z7.union([ components.LegacyJobMetadataOut$inboundSchema, components.JobOut$inboundSchema ]); - exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = z6.union([ + exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = z7.union([ components.LegacyJobMetadataOut$outboundSchema, components.JobOut$outboundSchema ]); @@ -42666,7 +43150,7 @@ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema.parse(jobsApiRoutesFineTuningCreateFineTuningJobResponse)); } function jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON`); } } }); @@ -42675,51 +43159,51 @@ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuninggetfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningGetFineTuningJobRequestToJSON = jobsApiRoutesFineTuningGetFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = z6.object({ - job_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = z7.object({ + job_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = z6.object({ - jobId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = z7.object({ + jobId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { jobId: "job_id" }); }); @@ -42732,7 +43216,7 @@ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningGetFineTuningJobRequest)); } function jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobRequest' from JSON`); } } }); @@ -42741,38 +43225,38 @@ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$ = exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = exports2.Status$ = exports2.Status$outboundSchema = exports2.Status$inboundSchema = exports2.Status = void 0; exports2.jobsApiRoutesFineTuningGetFineTuningJobsRequestToJSON = jobsApiRoutesFineTuningGetFineTuningJobsRequestToJSON; exports2.jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON = jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.Status = { @@ -42787,25 +43271,25 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ Cancelled: "CANCELLED", CancellationRequested: "CANCELLATION_REQUESTED" }; - exports2.Status$inboundSchema = z6.nativeEnum(exports2.Status); + exports2.Status$inboundSchema = z7.nativeEnum(exports2.Status); exports2.Status$outboundSchema = exports2.Status$inboundSchema; var Status$; (function(Status$2) { Status$2.inboundSchema = exports2.Status$inboundSchema; Status$2.outboundSchema = exports2.Status$outboundSchema; })(Status$ || (exports2.Status$ = Status$ = {})); - exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = z6.object({ - page: z6.number().int().default(0), - page_size: z6.number().int().default(100), - model: z6.nullable(z6.string()).optional(), - created_after: z6.nullable(z6.string().datetime({ offset: true }).transform((v5) => new Date(v5))).optional(), - created_by_me: z6.boolean().default(false), - status: z6.nullable(exports2.Status$inboundSchema).optional(), - wandb_project: z6.nullable(z6.string()).optional(), - wandb_name: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = z7.object({ + page: z7.number().int().default(0), + page_size: z7.number().int().default(100), + model: z7.nullable(z7.string()).optional(), + created_after: z7.nullable(z7.string().datetime({ offset: true }).transform((v8) => new Date(v8))).optional(), + created_by_me: z7.boolean().default(false), + status: z7.nullable(exports2.Status$inboundSchema).optional(), + wandb_project: z7.nullable(z7.string()).optional(), + wandb_name: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "page_size": "pageSize", "created_after": "createdAfter", "created_by_me": "createdByMe", @@ -42813,18 +43297,18 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ "wandb_name": "wandbName" }); }); - exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = z6.object({ - page: z6.number().int().default(0), - pageSize: z6.number().int().default(100), - model: z6.nullable(z6.string()).optional(), - createdAfter: z6.nullable(z6.date().transform((v5) => v5.toISOString())).optional(), - createdByMe: z6.boolean().default(false), - status: z6.nullable(exports2.Status$outboundSchema).optional(), - wandbProject: z6.nullable(z6.string()).optional(), - wandbName: z6.nullable(z6.string()).optional(), - suffix: z6.nullable(z6.string()).optional() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = z7.object({ + page: z7.number().int().default(0), + pageSize: z7.number().int().default(100), + model: z7.nullable(z7.string()).optional(), + createdAfter: z7.nullable(z7.date().transform((v8) => v8.toISOString())).optional(), + createdByMe: z7.boolean().default(false), + status: z7.nullable(exports2.Status$outboundSchema).optional(), + wandbProject: z7.nullable(z7.string()).optional(), + wandbName: z7.nullable(z7.string()).optional(), + suffix: z7.nullable(z7.string()).optional() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { pageSize: "page_size", createdAfter: "created_after", createdByMe: "created_by_me", @@ -42841,7 +43325,7 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.parse(jobsApiRoutesFineTuningGetFineTuningJobsRequest)); } function jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobsRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobsRequest' from JSON`); } } }); @@ -42850,51 +43334,51 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningstartfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningStartFineTuningJobRequestToJSON = jobsApiRoutesFineTuningStartFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = z6.object({ - job_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = z7.object({ + job_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = z6.object({ - jobId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = z7.object({ + jobId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { jobId: "job_id" }); }); @@ -42907,7 +43391,7 @@ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningStartFineTuningJobRequest)); } function jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningStartFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningStartFineTuningJobRequest' from JSON`); } } }); @@ -42916,51 +43400,51 @@ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningunarchivefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestToJSON = jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = z6.object({ - model_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = z7.object({ + model_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "model_id": "modelId" }); }); - exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = z6.object({ - modelId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = z7.object({ + modelId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { modelId: "model_id" }); }); @@ -42973,7 +43457,7 @@ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUnarchiveFineTunedModelRequest)); } function jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest' from JSON`); } } }); @@ -42982,55 +43466,55 @@ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningupdatefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = z6.object({ - model_id: z6.string(), + var components = __importStar2(require_components()); + exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = z7.object({ + model_id: z7.string(), UpdateFTModelIn: components.UpdateFTModelIn$inboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "model_id": "modelId", "UpdateFTModelIn": "updateFTModelIn" }); }); - exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z6.object({ - modelId: z6.string(), + exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z7.object({ + modelId: z7.string(), updateFTModelIn: components.UpdateFTModelIn$outboundSchema - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { modelId: "model_id", updateFTModelIn: "UpdateFTModelIn" }); @@ -43044,7 +43528,7 @@ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUpdateFineTunedModelRequest)); } function jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelRequest' from JSON`); } } }); @@ -43053,31 +43537,31 @@ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ var require_retrievemodelv1modelsmodelidget = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/retrievemodelv1modelsmodelidget.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43086,21 +43570,21 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ exports2.retrieveModelV1ModelsModelIdGetRequestFromJSON = retrieveModelV1ModelsModelIdGetRequestFromJSON; exports2.retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetToJSON = retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetToJSON; exports2.retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON = retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema = z6.object({ - model_id: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + var components = __importStar2(require_components()); + exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema = z7.object({ + model_id: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { "model_id": "modelId" }); }); - exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema = z6.object({ - modelId: z6.string() - }).transform((v5) => { - return (0, primitives_js_1.remap)(v5, { + exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema = z7.object({ + modelId: z7.string() + }).transform((v8) => { + return (0, primitives_js_1.remap)(v8, { modelId: "model_id" }); }); @@ -43113,22 +43597,22 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ return JSON.stringify(exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(retrieveModelV1ModelsModelIdGetRequest)); } function retrieveModelV1ModelsModelIdGetRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetRequest' from JSON`); } - exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema = z6.union([ - components.BaseModelCard$inboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema = z7.union([ + components.BaseModelCard$inboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - components.FTModelCard$inboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + components.FTModelCard$inboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ]); - exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema = z6.union([ - components.BaseModelCard$outboundSchema.and(z6.object({ type: z6.literal("base") }).transform((v5) => ({ - type: v5.type + exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema = z7.union([ + components.BaseModelCard$outboundSchema.and(z7.object({ type: z7.literal("base") }).transform((v8) => ({ + type: v8.type }))), - components.FTModelCard$outboundSchema.and(z6.object({ type: z6.literal("fine-tuned") }).transform((v5) => ({ - type: v5.type + components.FTModelCard$outboundSchema.and(z7.object({ type: z7.literal("fine-tuned") }).transform((v8) => ({ + type: v8.type }))) ]); var RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$; @@ -43140,7 +43624,7 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ return JSON.stringify(exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema.parse(retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet)); } function retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x5) => exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema.parse(JSON.parse(x5)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x7) => exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema.parse(JSON.parse(x7)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet' from JSON`); } } }); @@ -43149,42 +43633,42 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ var require_operations = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_deletemodelv1modelsmodeliddelete(), exports2); - __exportStar(require_filesapiroutesdeletefile(), exports2); - __exportStar(require_filesapiroutesdownloadfile(), exports2); - __exportStar(require_filesapiroutesgetsignedurl(), exports2); - __exportStar(require_filesapirouteslistfiles(), exports2); - __exportStar(require_filesapiroutesretrievefile(), exports2); - __exportStar(require_filesapiroutesuploadfile(), exports2); - __exportStar(require_jobsapiroutesbatchcancelbatchjob(), exports2); - __exportStar(require_jobsapiroutesbatchgetbatchjob(), exports2); - __exportStar(require_jobsapiroutesbatchgetbatchjobs(), exports2); - __exportStar(require_jobsapiroutesfinetuningarchivefinetunedmodel(), exports2); - __exportStar(require_jobsapiroutesfinetuningcancelfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuningcreatefinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuninggetfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuninggetfinetuningjobs(), exports2); - __exportStar(require_jobsapiroutesfinetuningstartfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuningunarchivefinetunedmodel(), exports2); - __exportStar(require_jobsapiroutesfinetuningupdatefinetunedmodel(), exports2); - __exportStar(require_retrievemodelv1modelsmodelidget(), exports2); + __exportStar2(require_deletemodelv1modelsmodeliddelete(), exports2); + __exportStar2(require_filesapiroutesdeletefile(), exports2); + __exportStar2(require_filesapiroutesdownloadfile(), exports2); + __exportStar2(require_filesapiroutesgetsignedurl(), exports2); + __exportStar2(require_filesapirouteslistfiles(), exports2); + __exportStar2(require_filesapiroutesretrievefile(), exports2); + __exportStar2(require_filesapiroutesuploadfile(), exports2); + __exportStar2(require_jobsapiroutesbatchcancelbatchjob(), exports2); + __exportStar2(require_jobsapiroutesbatchgetbatchjob(), exports2); + __exportStar2(require_jobsapiroutesbatchgetbatchjobs(), exports2); + __exportStar2(require_jobsapiroutesfinetuningarchivefinetunedmodel(), exports2); + __exportStar2(require_jobsapiroutesfinetuningcancelfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuningcreatefinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuninggetfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuninggetfinetuningjobs(), exports2); + __exportStar2(require_jobsapiroutesfinetuningstartfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuningunarchivefinetunedmodel(), exports2); + __exportStar2(require_jobsapiroutesfinetuningupdatefinetunedmodel(), exports2); + __exportStar2(require_retrievemodelv1modelsmodelidget(), exports2); } }); @@ -43192,42 +43676,42 @@ var require_operations = __commonJS({ var require_batchJobsCancel = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsCancel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsCancel = batchJobsCancel; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsCancel(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43291,41 +43775,41 @@ var require_batchJobsCancel = __commonJS({ var require_batchJobsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsCreate = batchJobsCreate; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); + var components = __importStar2(require_components()); async function batchJobsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.BatchJobIn$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43384,42 +43868,42 @@ var require_batchJobsCreate = __commonJS({ var require_batchJobsGet = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsGet.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsGet = batchJobsGet; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsGet(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43483,42 +43967,42 @@ var require_batchJobsGet = __commonJS({ var require_batchJobsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsList = batchJobsList; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43646,8 +44130,8 @@ var require_batch = __commonJS({ var mistraljobs_js_1 = require_mistraljobs(); var Batch = class extends sdks_js_1.ClientSDK { get jobs() { - var _a5; - return (_a5 = this._jobs) !== null && _a5 !== void 0 ? _a5 : this._jobs = new mistraljobs_js_1.MistralJobs(this._options); + var _a6; + return (_a6 = this._jobs) !== null && _a6 !== void 0 ? _a6 : this._jobs = new mistraljobs_js_1.MistralJobs(this._options); } }; exports2.Batch = Batch; @@ -43658,42 +44142,42 @@ var require_batch = __commonJS({ var require_chatComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/chatComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.chatComplete = chatComplete; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function chatComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43755,44 +44239,44 @@ var require_chatComplete = __commonJS({ var require_chatStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/chatStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.chatStream = chatStream; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function chatStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43841,7 +44325,7 @@ var require_chatStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M5.match(M5.sse(200, z6.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M5.match(M5.sse(200, z7.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -43893,42 +44377,42 @@ var require_chat = __commonJS({ var require_classifiersModerate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/classifiersModerate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.classifiersModerate = classifiersModerate; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function classifiersModerate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ClassificationRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -43990,42 +44474,42 @@ var require_classifiersModerate = __commonJS({ var require_classifiersModerateChat = __commonJS({ "node_modules/@mistralai/mistralai/funcs/classifiersModerateChat.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.classifiersModerateChat = classifiersModerateChat; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function classifiersModerateChat(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatClassificationRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44115,42 +44599,42 @@ var require_classifiers = __commonJS({ var require_embeddingsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/embeddingsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.embeddingsCreate = embeddingsCreate; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function embeddingsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.EmbeddingRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44236,42 +44720,42 @@ var require_embeddings = __commonJS({ var require_filesDelete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesDelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesDelete = filesDelete; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesDelete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44335,42 +44819,42 @@ var require_filesDelete = __commonJS({ var require_filesDownload = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesDownload.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesDownload = filesDownload; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var operations = __importStar(require_operations()); + var operations = __importStar2(require_operations()); async function filesDownload(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44421,7 +44905,7 @@ var require_filesDownload = __commonJS({ return doResult; } const response = doResult.value; - const [result] = await M5.match(M5.stream(200, z6.instanceof(ReadableStream)), M5.fail(["4XX", "5XX"]))(response); + const [result] = await M5.match(M5.stream(200, z7.instanceof(ReadableStream)), M5.fail(["4XX", "5XX"]))(response); if (!result.ok) { return result; } @@ -44434,42 +44918,42 @@ var require_filesDownload = __commonJS({ var require_filesGetSignedUrl = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesGetSignedUrl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesGetSignedUrl = filesGetSignedUrl; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesGetSignedUrl(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44537,42 +45021,42 @@ var require_filesGetSignedUrl = __commonJS({ var require_filesList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesList = filesList; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesListFilesRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44639,42 +45123,42 @@ var require_filesList = __commonJS({ var require_filesRetrieve = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesRetrieve.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesRetrieve = filesRetrieve; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesRetrieve(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -44739,8 +45223,8 @@ var require_streams = __commonJS({ "node_modules/@mistralai/mistralai/types/streams.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReadableStream = isReadableStream5; - function isReadableStream5(val) { + exports2.isReadableStream = isReadableStream6; + function isReadableStream6(val) { if (typeof val !== "object" || val === null) { return false; } @@ -44754,42 +45238,42 @@ var require_streams = __commonJS({ var require_filesUpload = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesUpload.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesUpload = filesUpload; var files_js_1 = require_files(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); var blobs_js_1 = require_blobs(); var streams_js_1 = require_streams(); async function filesUpload(client, request3, options) { @@ -44936,42 +45420,42 @@ var require_files2 = __commonJS({ var require_fimComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fimComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fimComplete = fimComplete; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function fimComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.FIMCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45033,44 +45517,44 @@ var require_fimComplete = __commonJS({ var require_fimStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fimStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fimStream = fimStream; - var z6 = __importStar(require_lib4()); + var z7 = __importStar2(require_lib4()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function fimStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.FIMCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45119,7 +45603,7 @@ var require_fimStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M5.match(M5.sse(200, z6.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M5.match(M5.sse(200, z7.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -45174,42 +45658,42 @@ var require_fim = __commonJS({ var require_fineTuningJobsCancel = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsCancel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsCancel = fineTuningJobsCancel; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsCancel(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45273,42 +45757,42 @@ var require_fineTuningJobsCancel = __commonJS({ var require_fineTuningJobsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsCreate = fineTuningJobsCreate; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.JobIn$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45367,42 +45851,42 @@ var require_fineTuningJobsCreate = __commonJS({ var require_fineTuningJobsGet = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsGet.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsGet = fineTuningJobsGet; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsGet(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45466,42 +45950,42 @@ var require_fineTuningJobsGet = __commonJS({ var require_fineTuningJobsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsList = fineTuningJobsList; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45571,42 +46055,42 @@ var require_fineTuningJobsList = __commonJS({ var require_fineTuningJobsStart = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsStart.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsStart = fineTuningJobsStart; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsStart(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45740,8 +46224,8 @@ var require_finetuning = __commonJS({ var jobs_js_1 = require_jobs(); var FineTuning2 = class extends sdks_js_1.ClientSDK { get jobs() { - var _a5; - return (_a5 = this._jobs) !== null && _a5 !== void 0 ? _a5 : this._jobs = new jobs_js_1.Jobs(this._options); + var _a6; + return (_a6 = this._jobs) !== null && _a6 !== void 0 ? _a6 : this._jobs = new jobs_js_1.Jobs(this._options); } }; exports2.FineTuning = FineTuning2; @@ -45752,42 +46236,42 @@ var require_finetuning = __commonJS({ var require_modelsArchive = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsArchive.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsArchive = modelsArchive; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsArchive(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45851,43 +46335,43 @@ var require_modelsArchive = __commonJS({ var require_modelsDelete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsDelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsDelete = modelsDelete; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); + var operations = __importStar2(require_operations()); async function modelsDelete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -45954,40 +46438,40 @@ var require_modelsDelete = __commonJS({ var require_modelsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsList = modelsList; - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors2()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors2()); async function modelsList(client, options) { const path5 = (0, url_js_1.pathToFunc)("/v1/models")(); const headers = new Headers({ @@ -46041,42 +46525,42 @@ var require_modelsList = __commonJS({ var require_modelsRetrieve = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsRetrieve.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsRetrieve = modelsRetrieve; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var errors = __importStar(require_errors2()); - var operations = __importStar(require_operations()); + var errors = __importStar2(require_errors2()); + var operations = __importStar2(require_operations()); async function modelsRetrieve(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -46143,42 +46627,42 @@ var require_modelsRetrieve = __commonJS({ var require_modelsUnarchive = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsUnarchive.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsUnarchive = modelsUnarchive; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsUnarchive(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -46242,42 +46726,42 @@ var require_modelsUnarchive = __commonJS({ var require_modelsUpdate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsUpdate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsUpdate = modelsUpdate; var encodings_js_1 = require_encodings(); - var M5 = __importStar(require_matchers()); + var M5 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsUpdate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -46430,40 +46914,40 @@ var require_sdk = __commonJS({ var models_js_1 = require_models(); var Mistral2 = class extends sdks_js_1.ClientSDK { get models() { - var _a5; - return (_a5 = this._models) !== null && _a5 !== void 0 ? _a5 : this._models = new models_js_1.Models(this._options); + var _a6; + return (_a6 = this._models) !== null && _a6 !== void 0 ? _a6 : this._models = new models_js_1.Models(this._options); } get files() { - var _a5; - return (_a5 = this._files) !== null && _a5 !== void 0 ? _a5 : this._files = new files_js_1.Files(this._options); + var _a6; + return (_a6 = this._files) !== null && _a6 !== void 0 ? _a6 : this._files = new files_js_1.Files(this._options); } get fineTuning() { - var _a5; - return (_a5 = this._fineTuning) !== null && _a5 !== void 0 ? _a5 : this._fineTuning = new finetuning_js_1.FineTuning(this._options); + var _a6; + return (_a6 = this._fineTuning) !== null && _a6 !== void 0 ? _a6 : this._fineTuning = new finetuning_js_1.FineTuning(this._options); } get batch() { - var _a5; - return (_a5 = this._batch) !== null && _a5 !== void 0 ? _a5 : this._batch = new batch_js_1.Batch(this._options); + var _a6; + return (_a6 = this._batch) !== null && _a6 !== void 0 ? _a6 : this._batch = new batch_js_1.Batch(this._options); } get chat() { - var _a5; - return (_a5 = this._chat) !== null && _a5 !== void 0 ? _a5 : this._chat = new chat_js_1.Chat(this._options); + var _a6; + return (_a6 = this._chat) !== null && _a6 !== void 0 ? _a6 : this._chat = new chat_js_1.Chat(this._options); } get fim() { - var _a5; - return (_a5 = this._fim) !== null && _a5 !== void 0 ? _a5 : this._fim = new fim_js_1.Fim(this._options); + var _a6; + return (_a6 = this._fim) !== null && _a6 !== void 0 ? _a6 : this._fim = new fim_js_1.Fim(this._options); } get agents() { - var _a5; - return (_a5 = this._agents) !== null && _a5 !== void 0 ? _a5 : this._agents = new agents_js_1.Agents(this._options); + var _a6; + return (_a6 = this._agents) !== null && _a6 !== void 0 ? _a6 : this._agents = new agents_js_1.Agents(this._options); } get embeddings() { - var _a5; - return (_a5 = this._embeddings) !== null && _a5 !== void 0 ? _a5 : this._embeddings = new embeddings_js_1.Embeddings(this._options); + var _a6; + return (_a6 = this._embeddings) !== null && _a6 !== void 0 ? _a6 : this._embeddings = new embeddings_js_1.Embeddings(this._options); } get classifiers() { - var _a5; - return (_a5 = this._classifiers) !== null && _a5 !== void 0 ? _a5 : this._classifiers = new classifiers_js_1.Classifiers(this._options); + var _a6; + return (_a6 = this._classifiers) !== null && _a6 !== void 0 ? _a6 : this._classifiers = new classifiers_js_1.Classifiers(this._options); } }; exports2.Mistral = Mistral2; @@ -46474,173 +46958,25371 @@ var require_sdk = __commonJS({ var require_mistralai = __commonJS({ "node_modules/@mistralai/mistralai/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m5[k7]; + return m7[k9]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v5) { - Object.defineProperty(o3, "default", { enumerable: true, value: v5 }); - } : function(o3, v5) { - o3["default"] = v5; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); }; - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k7 in mod) if (k7 !== "default" && Object.prototype.hasOwnProperty.call(mod, k7)) __createBinding(result, mod, k7); + for (var k9 in mod) if (k9 !== "default" && Object.prototype.hasOwnProperty.call(mod, k9)) __createBinding2(result, mod, k9); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.files = void 0; - __exportStar(require_config(), exports2); - exports2.files = __importStar(require_files()); - __exportStar(require_sdk(), exports2); + __exportStar2(require_config(), exports2); + exports2.files = __importStar2(require_files()); + __exportStar2(require_sdk(), exports2); } }); -// node_modules/@commitlint/types/lib/ensure.js -var require_ensure = __commonJS({ - "node_modules/@commitlint/types/lib/ensure.js"(exports2) { +// node_modules/@smithy/types/dist-cjs/index.js +var require_dist_cjs = __commonJS({ + "node_modules/@smithy/types/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AlgorithmId: () => AlgorithmId, + EndpointURLScheme: () => EndpointURLScheme, + FieldPosition: () => FieldPosition, + HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation2, + HttpAuthLocation: () => HttpAuthLocation, + IniSectionType: () => IniSectionType, + RequestHandlerProtocol: () => RequestHandlerProtocol, + SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY4, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + return HttpAuthLocation2; + })(HttpAuthLocation || {}); + var HttpApiKeyAuthLocation2 = /* @__PURE__ */ ((HttpApiKeyAuthLocation22) => { + HttpApiKeyAuthLocation22["HEADER"] = "header"; + HttpApiKeyAuthLocation22["QUERY"] = "query"; + return HttpApiKeyAuthLocation22; + })(HttpApiKeyAuthLocation2 || {}); + var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + return EndpointURLScheme2; + })(EndpointURLScheme || {}); + var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + return AlgorithmId2; + })(AlgorithmId || {}); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => "sha256", + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => "md5", + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return getChecksumConfiguration(runtimeConfig); + }, "getDefaultClientConfiguration"); + var resolveDefaultRuntimeConfig3 = /* @__PURE__ */ __name((config7) => { + return resolveChecksumRuntimeConfig(config7); + }, "resolveDefaultRuntimeConfig"); + var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + return FieldPosition2; + })(FieldPosition || {}); + var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + return IniSectionType2; + })(IniSectionType || {}); + var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + return RequestHandlerProtocol2; + })(RequestHandlerProtocol || {}); + } +}); + +// node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs2 = __commonJS({ + "node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest10, + HttpResponse: () => HttpResponse4, + IHttpRequest: () => import_types6.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration3, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var getHttpHandlerExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig3 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + var import_types6 = require_dist_cjs(); + var Field = class { + static { + __name(this, "Field"); + } + constructor({ name, kind: kind3 = import_types6.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind3; + this.values = values; + } + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); + } + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; + } + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v8) => v8 !== value); + } + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v8) => v8.includes(",") || v8.includes(" ") ? `"${v8}"` : v8).join(", "); + } + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; + } + }; + var Fields = class { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + static { + __name(this, "Fields"); + } + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; + } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind3) { + return Object.values(this.entries).filter((field) => field.kind === kind3); + } + }; + var HttpRequest10 = class _HttpRequest { + static { + __name(this, "HttpRequest"); + } + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + /** + * Note: this does not deep-clone the body. + */ + static clone(request3) { + const cloned = new _HttpRequest({ + ...request3, + headers: { ...request3.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request3) { + if (!request3) { + return false; + } + const req = request3; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest.clone(this); + } + }; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + __name(cloneQuery, "cloneQuery"); + var HttpResponse4 = class { + static { + __name(this, "HttpResponse"); + } + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); + } +}); + +// node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +var require_dist_cjs3 = __commonJS({ + "node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + eventStreamHandlingMiddleware: () => eventStreamHandlingMiddleware, + eventStreamHandlingMiddlewareOptions: () => eventStreamHandlingMiddlewareOptions, + eventStreamHeaderMiddleware: () => eventStreamHeaderMiddleware, + eventStreamHeaderMiddlewareOptions: () => eventStreamHeaderMiddlewareOptions, + getEventStreamPlugin: () => getEventStreamPlugin, + resolveEventStreamConfig: () => resolveEventStreamConfig + }); + module2.exports = __toCommonJS2(index_exports); + function resolveEventStreamConfig(input) { + const eventSigner = input.signer; + const messageSigner = input.signer; + const newInput = Object.assign(input, { + eventSigner, + messageSigner + }); + const eventStreamPayloadHandler = newInput.eventStreamPayloadHandlerProvider(newInput); + return Object.assign(newInput, { + eventStreamPayloadHandler + }); + } + __name(resolveEventStreamConfig, "resolveEventStreamConfig"); + var import_protocol_http15 = require_dist_cjs2(); + var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) return next(args); + return options.eventStreamPayloadHandler.handle(next, args, context); + }, "eventStreamHandlingMiddleware"); + var eventStreamHandlingMiddlewareOptions = { + tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"], + name: "eventStreamHandlingMiddleware", + relation: "after", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var eventStreamHeaderMiddleware = /* @__PURE__ */ __name((next) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) return next(args); + request3.headers = { + ...request3.headers, + "content-type": "application/vnd.amazon.eventstream", + "x-amz-content-sha256": "STREAMING-AWS4-HMAC-SHA256-EVENTS" + }; + return next({ + ...args, + request: request3 + }); + }, "eventStreamHeaderMiddleware"); + var eventStreamHeaderMiddlewareOptions = { + step: "build", + tags: ["EVENT_STREAM", "HEADER", "CONTENT_TYPE", "CONTENT_SHA256"], + name: "eventStreamHeaderMiddleware", + override: true + }; + var getEventStreamPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(eventStreamHandlingMiddleware(options), eventStreamHandlingMiddlewareOptions); + clientStack.add(eventStreamHeaderMiddleware, eventStreamHeaderMiddlewareOptions); + }, "applyToStack") + }), "getEventStreamPlugin"); } }); -// node_modules/@commitlint/types/lib/format.js -var require_format = __commonJS({ - "node_modules/@commitlint/types/lib/format.js"(exports2) { +// node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +var require_dist_cjs4 = __commonJS({ + "node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + getHostHeaderPlugin: () => getHostHeaderPlugin3, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig3 + }); + module2.exports = __toCommonJS2(index_exports); + var import_protocol_http15 = require_dist_cjs2(); + function resolveHostHeaderConfig3(input) { + return input; + } + __name(resolveHostHeaderConfig3, "resolveHostHeaderConfig"); + var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http15.HttpRequest.isInstance(args.request)) return next(args); + const { request: request3 } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request3.headers[":authority"]) { + delete request3.headers["host"]; + request3.headers[":authority"] = request3.hostname + (request3.port ? ":" + request3.port : ""); + } else if (!request3.headers["host"]) { + let host = request3.hostname; + if (request3.port != null) host += `:${request3.port}`; + request3.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + var getHostHeaderPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, "applyToStack") + }), "getHostHeaderPlugin"); + } +}); + +// node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +var require_dist_cjs5 = __commonJS({ + "node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + getLoggerPlugin: () => getLoggerPlugin3, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions + }); + module2.exports = __toCommonJS2(index_exports); + var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger5, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger5?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger: logger5, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + logger5?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; + } + }, "loggerMiddleware"); + var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + var getLoggerPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, "applyToStack") + }), "getLoggerPlugin"); + } +}); + +// node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +var require_dist_cjs6 = __commonJS({ + "node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin3, + recursionDetectionMiddleware: () => recursionDetectionMiddleware + }); + module2.exports = __toCommonJS2(index_exports); + var import_protocol_http15 = require_dist_cjs2(); + var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; + var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; + var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; + var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3) || options.runtime !== "node") { + return next(args); + } + const traceIdHeader = Object.keys(request3.headers ?? {}).find((h6) => h6.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME; + if (request3.headers.hasOwnProperty(traceIdHeader)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = /* @__PURE__ */ __name((str2) => typeof str2 === "string" && str2.length > 0, "nonEmptyString"); + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request3.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request: request3 + }); + }, "recursionDetectionMiddleware"); + var addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + var getRecursionDetectionPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); + }, "applyToStack") + }), "getRecursionDetectionPlugin"); + } +}); + +// node_modules/@smithy/core/dist-es/getSmithyContext.js +var import_types, getSmithyContext; +var init_getSmithyContext = __esm({ + "node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + import_types = __toESM(require_dist_cjs()); + getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}); + } +}); + +// node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs7 = __commonJS({ + "node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext8, + normalizeProvider: () => normalizeProvider4 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types6 = require_dist_cjs(); + var getSmithyContext8 = /* @__PURE__ */ __name((context) => context[import_types6.SMITHY_CONTEXT_KEY] || (context[import_types6.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider4 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; + } + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var import_types2, import_util_middleware, httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + import_types2 = __toESM(require_dist_cjs()); + import_util_middleware = __toESM(require_dist_cjs7()); + init_resolveAuthOptions(); + httpAuthSchemeMiddleware = (config7, mwOptions) => (next, context) => async (args) => { + const options = config7.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config7, context, args.input)); + const authSchemePreference = config7.authSchemePreference ? await config7.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config7.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config7)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config7, context) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = (config7, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config7, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs8 = __commonJS({ + "node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin4, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += "\n " + hint; + } catch (e5) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (import_protocol_http15.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e5) { + } + } + throw error; + } + }, "deserializerMiddleware"); + var findHeader = /* @__PURE__ */ __name((pattern, headers) => { + return (headers.find(([k9]) => { + return k9.match(pattern); + }) || [void 0, void 0])[1]; + }, "findHeader"); + var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => { + const endpointConfig = options; + const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request3 = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request: request3 + }); + }, "serializerMiddleware"); + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + var serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSerdePlugin4(config7, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config7, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config7, serializer), serializerMiddlewareOption2); + } + }; + } + __name(getSerdePlugin4, "getSerdePlugin"); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; +var init_getHttpAuthSchemePlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + import_middleware_serde = __toESM(require_dist_cjs8()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name + }; + getHttpAuthSchemePlugin = (config7, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config7, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var import_protocol_http, import_types3, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + import_protocol_http = __toESM(require_dist_cjs2()); + import_types3 = __toESM(require_dist_cjs()); + import_util_middleware2 = __toESM(require_dist_cjs7()); + defaultErrorHandler = (signingProperties) => (error) => { + throw error; + }; + defaultSuccessHandler = (httpResponse, signingProperties) => { + }; + httpSigningMiddleware = (config7) => (next, context) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = (0, import_util_middleware2.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = (config7) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config7), httpSigningMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + } +}); + +// node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config7, input, ...additionalArguments) { + const _input = input; + let token = config7.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config7.pageSize; + } + if (config7.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config7.client, input, config7.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config7.stopOnSameToken || token !== prevToken)); + } + return void 0; + }; +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_8) => _8, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }; + get = (fromObject, path5) => { + let cursor = fromObject; + const pathComponents = path5.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; + }; + } +}); + +// node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs9 = __commonJS({ + "node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isArrayBuffer: () => isArrayBuffer3 + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer3 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs10 = __commonJS({ + "node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs9(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); + }, "fromArrayBuffer"); + var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); + }, "fromString"); + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +var require_fromBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs10(); + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase647 = (input) => { + if (input.length * 3 % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + }; + exports2.fromBase64 = fromBase647; } }); -// node_modules/@commitlint/types/lib/is-ignored.js -var require_is_ignored = __commonJS({ - "node_modules/@commitlint/types/lib/is-ignored.js"(exports2) { +// node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs11 = __commonJS({ + "node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromUtf8: () => fromUtf84, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf86 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs10(); + var fromUtf84 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }, "fromUtf8"); + var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf86 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }, "toUtf8"); + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/toBase64.js +var require_toBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs10(); + var util_utf8_1 = require_dist_cjs11(); + var toBase647 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); + }; + exports2.toBase64 = toBase647; } }); -// node_modules/@commitlint/types/lib/lint.js -var require_lint = __commonJS({ - "node_modules/@commitlint/types/lib/lint.js"(exports2) { +// node_modules/@smithy/util-base64/dist-cjs/index.js +var require_dist_cjs12 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_fromBase64(), module2.exports); + __reExport(src_exports, require_toBase64(), module2.exports); + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +var require_ChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var util_base64_1 = require_dist_cjs12(); + var stream_1 = require("stream"); + var ChecksumStream2 = class extends stream_1.Duplex { + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { + var _a6, _b2; + super(); + if (typeof source.pipe === "function") { + this.source = source; + } else { + throw new Error(`@smithy/util-stream: unsupported source type ${(_b2 = (_a6 = source === null || source === void 0 ? void 0 : source.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) !== null && _b2 !== void 0 ? _b2 : source} in ChecksumStream.`); + } + this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.pipe(this); + } + _read(size) { + } + _write(chunk, encoding, callback) { + try { + this.checksum.update(chunk); + this.push(chunk); + } catch (e5) { + return callback(e5); + } + return callback(); + } + async _final(callback) { + try { + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`)); + } + } catch (e5) { + return callback(e5); + } + this.push(null); + return callback(); + } + }; + exports2.ChecksumStream = ChecksumStream2; } }); -// node_modules/@commitlint/types/lib/load.js -var require_load = __commonJS({ - "node_modules/@commitlint/types/lib/load.js"(exports2) { +// node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +var require_stream_type_check = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBlob = exports2.isReadableStream = void 0; + var isReadableStream6 = (stream4) => { + var _a6; + return typeof ReadableStream === "function" && (((_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) === ReadableStream.name || stream4 instanceof ReadableStream); + }; + exports2.isReadableStream = isReadableStream6; + var isBlob5 = (blob) => { + var _a6; + return typeof Blob === "function" && (((_a6 = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) === Blob.name || blob instanceof Blob); + }; + exports2.isBlob = isBlob5; } }); -// node_modules/@commitlint/types/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/@commitlint/types/lib/parse.js"(exports2) { +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +var require_ChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + var ChecksumStream2 = class extends ReadableStreamRef { + }; + exports2.ChecksumStream = ChecksumStream2; } }); -// node_modules/@commitlint/types/lib/prompt.js -var require_prompt = __commonJS({ - "node_modules/@commitlint/types/lib/prompt.js"(exports2) { +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +var require_createChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createChecksumStream = void 0; + var util_base64_1 = require_dist_cjs12(); + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_browser_1 = require_ChecksumStream_browser(); + var createChecksumStream2 = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + var _a6, _b2; + if (!(0, stream_type_check_1.isReadableStream)(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${(_b2 = (_a6 = source === null || source === void 0 ? void 0 : source.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) !== null && _b2 !== void 0 ? _b2 : source} in ChecksumStream.`); + } + const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder(digest); + if (expectedChecksum !== received) { + const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform); + const readable = transform.readable; + Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); + return readable; + }; + exports2.createChecksumStream = createChecksumStream2; } }); -// node_modules/@commitlint/types/lib/rules.js -var require_rules = __commonJS({ - "node_modules/@commitlint/types/lib/rules.js"(exports2) { +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +var require_createChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RuleConfigQuality = exports2.RuleConfigSeverity = void 0; - var RuleConfigSeverity2; - (function(RuleConfigSeverity3) { - RuleConfigSeverity3[RuleConfigSeverity3["Disabled"] = 0] = "Disabled"; - RuleConfigSeverity3[RuleConfigSeverity3["Warning"] = 1] = "Warning"; - RuleConfigSeverity3[RuleConfigSeverity3["Error"] = 2] = "Error"; - })(RuleConfigSeverity2 || (exports2.RuleConfigSeverity = RuleConfigSeverity2 = {})); - var RuleConfigQuality; - (function(RuleConfigQuality2) { - RuleConfigQuality2[RuleConfigQuality2["User"] = 0] = "User"; - RuleConfigQuality2[RuleConfigQuality2["Qualified"] = 1] = "Qualified"; - })(RuleConfigQuality || (exports2.RuleConfigQuality = RuleConfigQuality = {})); + exports2.createChecksumStream = createChecksumStream2; + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_1 = require_ChecksumStream(); + var createChecksumStream_browser_1 = require_createChecksumStream_browser(); + function createChecksumStream2(init) { + if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { + return (0, createChecksumStream_browser_1.createChecksumStream)(init); + } + return new ChecksumStream_1.ChecksumStream(init); + } } }); -// node_modules/@commitlint/types/lib/index.js -var require_lib5 = __commonJS({ - "node_modules/@commitlint/types/lib/index.js"(exports2) { +// node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +var require_ByteArrayCollector = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - var desc = Object.getOwnPropertyDescriptor(m5, k7); - if (!desc || ("get" in desc ? !m5.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m5[k7]; - } }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ByteArrayCollector = void 0; + var ByteArrayCollector = class { + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + this.byteLength = 0; + this.byteArrays = []; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i5 = 0; i5 < this.byteArrays.length; ++i5) { + const bytes = this.byteArrays[i5]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m5, k7, k22) { - if (k22 === void 0) k22 = k7; - o3[k22] = m5[k7]; - }); - var __exportStar = exports2 && exports2.__exportStar || function(m5, exports3) { - for (var p4 in m5) if (p4 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p4)) __createBinding(exports3, m5, p4); }; - Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_ensure(), exports2); - __exportStar(require_format(), exports2); - __exportStar(require_is_ignored(), exports2); - __exportStar(require_lint(), exports2); - __exportStar(require_load(), exports2); - __exportStar(require_parse3(), exports2); - __exportStar(require_prompt(), exports2); - __exportStar(require_rules(), exports2); + exports2.ByteArrayCollector = ByteArrayCollector; } }); -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +var require_createBufferedReadableStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = void 0; + exports2.createBufferedReadableStream = createBufferedReadableStream; + exports2.merge = merge2; + exports2.flush = flush; + exports2.sizeOf = sizeOf; + exports2.modeOf = modeOf; + var ByteArrayCollector_1 = require_ByteArrayCollector(); + function createBufferedReadableStream(upstream, size, logger5) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge2(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger5 === null || logger5 === void 0 ? void 0 : logger5.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }; + return new ReadableStream({ + pull + }); } - var KEY_IGNORE = TMP_KEY_IGNORE; + exports2.createBufferedReadable = createBufferedReadableStream; + function merge2(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } + } + function flush(buffers, mode) { + switch (mode) { + case 0: + const s4 = buffers[0]; + buffers[0] = ""; + return s4; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); + } + function sizeOf(chunk) { + var _a6, _b2; + return (_b2 = (_a6 = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a6 !== void 0 ? _a6 : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b2 !== void 0 ? _b2 : 0; + } + function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +var require_createBufferedReadable = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = createBufferedReadable2; + var node_stream_1 = require("node:stream"); + var ByteArrayCollector_1 = require_ByteArrayCollector(); + var createBufferedReadableStream_1 = require_createBufferedReadableStream(); + var stream_type_check_1 = require_stream_type_check(); + function createBufferedReadable2(upstream, size, logger5) { + if ((0, stream_type_check_1.isReadableStream)(upstream)) { + return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger5); + } + const downstream = new node_stream_1.Readable({ read() { + } }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)), + new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2))) + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); + bytesSeen += chunkSize; + const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } else { + const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger5 === null || logger5 === void 0 ? void 0 : logger5.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + } + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); + if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { + downstream.push(remainder); + } + } + downstream.push(null); + }); + return downstream; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +var require_getAwsChunkedEncodingStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAwsChunkedEncodingStream = void 0; + var stream_1 = require("stream"); + var getAwsChunkedEncodingStream2 = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { + } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; + }; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +var require_headStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = headStream2; + async function headStream2(stream4, bytes) { + var _a6; + let byteLengthCounter = 0; + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += (_a6 = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a6 !== void 0 ? _a6 : 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.js +var require_headStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = void 0; + var stream_1 = require("stream"); + var headStream_browser_1 = require_headStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + var headStream2 = (stream4, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream4)) { + return (0, headStream_browser_1.headStream)(stream4, bytes); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream4.pipe(collector); + stream4.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes2); + }); + }); + }; + exports2.headStream = headStream2; + var Collector = class extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; + } + _write(chunk, encoding, callback) { + var _a6; + this.buffers.push(chunk); + this.bytesBuffered += (_a6 = chunk.byteLength) !== null && _a6 !== void 0 ? _a6 : 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); + } + }; + } +}); + +// node_modules/@smithy/util-uri-escape/dist-cjs/index.js +var require_dist_cjs13 = __commonJS({ + "node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath + }); + module2.exports = __toCommonJS2(src_exports); + var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) + ), "escapeUri"); + var hexEncode = /* @__PURE__ */ __name((c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); + } +}); + +// node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs14 = __commonJS({ + "node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs13(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i5 = 0, iLen = value.length; i5 < iLen; i5++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i5])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); + } +}); + +// node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs15 = __commonJS({ + "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs14(); + var import_http3 = require("http"); + var import_https2 = require("https"); + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }, "getTransformedHeaders"); + var timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId) + }; + var DEFER_EVENT_LISTENER_TIME = 1e3; + var setConnectionTimeout = /* @__PURE__ */ __name((request3, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeoutId = timing.setTimeout(() => { + request3.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs - offset); + const doWithSocket = /* @__PURE__ */ __name((socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } else { + timing.clearTimeout(timeoutId); + } + }, "doWithSocket"); + if (request3.socket) { + doWithSocket(request3.socket); + } else { + request3.on("socket", doWithSocket); + } + }, "registerTimeout"); + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }, "setConnectionTimeout"); + var DEFER_EVENT_LISTENER_TIME2 = 3e3; + var setSocketKeepAlive = /* @__PURE__ */ __name((request3, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = /* @__PURE__ */ __name(() => { + if (request3.socket) { + request3.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request3.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }, "registerListener"); + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); + }, "setSocketKeepAlive"); + var DEFER_EVENT_LISTENER_TIME3 = 3e3; + var setSocketTimeout = /* @__PURE__ */ __name((request3, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = /* @__PURE__ */ __name(() => { + request3.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }, "onTimeout"); + if (request3.socket) { + request3.socket.setTimeout(timeout, onTimeout); + request3.on("close", () => request3.socket?.removeListener("timeout", onTimeout)); + } else { + request3.setTimeout(timeout, onTimeout); + } + }, "registerTimeout"); + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout( + registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), + DEFER_EVENT_LISTENER_TIME3 + ); + }, "setSocketTimeout"); + var import_stream6 = require("stream"); + var MIN_WAIT_TIME = 6e3; + async function writeRequestBody(httpRequest, request3, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request3.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let sendBody = true; + if (expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }) + ]); + } + if (sendBody) { + writeBody(httpRequest, request3.body); + } + } + __name(writeRequestBody, "writeRequestBody"); + function writeBody(httpRequest, body) { + if (body instanceof import_stream6.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); + } + __name(writeBody, "writeBody"); + var DEFAULT_REQUEST_TIMEOUT = 0; + var NodeHttpHandler = class _NodeHttpHandler { + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + static { + __name(this, "NodeHttpHandler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler(instanceOrOptions); + } + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger5 = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin2 in sockets) { + const socketsInUse = sockets[origin2]?.length ?? 0; + const requestsEnqueued = requests[origin2]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger5?.warn?.( + `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.` + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + socketAcquisitionWarningTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http3.Agent || typeof httpAgent?.destroy === "function") { + return httpAgent; + } + return new import_http3.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https2.Agent || typeof httpsAgent?.destroy === "function") { + return httpsAgent; + } + return new import_https2.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request3, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request3.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + timeouts.push( + timing.setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request3.query || {}); + let auth = void 0; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}`; + } + let path5 = request3.path; + if (queryString) { + path5 += `?${queryString}`; + } + if (request3.fragment) { + path5 += `#${request3.fragment}`; + } + let hostname = request3.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request3.hostname.slice(1, -1); + } else { + hostname = request3.hostname; + } + const nodeHttpsOptions = { + headers: request3.headers, + host: hostname, + method: request3.method, + path: path5, + port: request3.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https2.request : import_http3.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http15.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); + timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push( + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }) + ); + } + writeRequestBodyPromise = writeRequestBody(req, request3, effectiveRequestTimeout).catch((e5) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e5); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config7) => { + return { + ...config7, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + var import_http22 = require("http2"); + var import_http23 = __toESM2(require("http2")); + var NodeHttp2ConnectionPool = class { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; + } + static { + __name(this, "NodeHttp2ConnectionPool"); + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s4) => s4 !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } + }; + var NodeHttp2ConnectionManager = class { + constructor(config7) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config7; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + static { + __name(this, "NodeHttp2ConnectionManager"); + } + lease(requestContext, connectionConfiguration) { + const url2 = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url2); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = import_http23.default.connect(url2); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error( + "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url2, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url2, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url2) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url2, connectionPool); + return session; + } + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request3) { + return request3.destination.toString(); + } + }; + var NodeHttp2Handler = class _NodeHttp2Handler { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + static { + __name(this, "NodeHttp2Handler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttp2Handler(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request3, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request3; + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path5 = request3.path; + if (queryString) { + path5 += `?${queryString}`; + } + if (request3.fragment) { + path5 += `#${request3.fragment}`; + } + const req = session.request({ + ...request3.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path5, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http15.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type2, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type2} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request3, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config7) => { + return { + ...config7, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session - the session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } + }; + var Collector = class extends import_stream6.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + static { + __name(this, "Collector"); + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } + }; + var streamCollector3 = /* @__PURE__ */ __name((stream4) => { + if (isReadableStreamInstance(stream4)) { + return collectReadableStream(stream4); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream4.pipe(collector); + stream4.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); + }, "streamCollector"); + var isReadableStreamInstance = /* @__PURE__ */ __name((stream4) => typeof ReadableStream === "function" && stream4 instanceof ReadableStream, "isReadableStreamInstance"); + async function collectReadableStream(stream4) { + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectReadableStream, "collectReadableStream"); + } +}); + +// node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs16 = __commonJS({ + "node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs14(); + function createRequest(url2, requestOptions) { + return new Request(url2, requestOptions); + } + __name(createRequest, "createRequest"); + function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); + } + __name(requestTimeout, "requestTimeout"); + var keepAliveSupport = { + supported: void 0 + }; + var FetchHttpHandler = class _FetchHttpHandler { + static { + __name(this, "FetchHttpHandler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") + ); + } + } + destroy() { + } + async handle(request3, { abortSignal, requestTimeout: requestTimeout2 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path5 = request3.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request3.query || {}); + if (queryString) { + path5 += `?${queryString}`; + } + if (request3.fragment) { + path5 += `#${request3.fragment}`; + } + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request3; + const url2 = `${request3.protocol}//${auth}${request3.hostname}${port ? `:${port}` : ""}${path5}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request3.body; + const requestOptions = { + body, + headers: new Headers(request3.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request3)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http15.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http15.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config7) => { + config7[key] = value; + return config7; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + var import_util_base648 = require_dist_cjs12(); + var streamCollector3 = /* @__PURE__ */ __name(async (stream4) => { + if (typeof Blob === "function" && stream4 instanceof Blob || stream4.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream4.arrayBuffer()); + } + return collectBlob(stream4); + } + return collectStream(stream4); + }, "streamCollector"); + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base648.fromBase64)(base64); + return new Uint8Array(arrayBuffer); + } + __name(collectBlob, "collectBlob"); + async function collectStream(stream4) { + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectStream, "collectStream"); + function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); + } + __name(readToBase64, "readToBase64"); + } +}); + +// node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +var require_dist_cjs17 = __commonJS({ + "node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromHex: () => fromHex, + toHex: () => toHex + }); + module2.exports = __toCommonJS2(src_exports); + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i5 = 0; i5 < 256; i5++) { + let encodedByte = i5.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i5] = encodedByte; + HEX_TO_SHORT[encodedByte] = i5; + } + function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i5 = 0; i5 < encoded.length; i5 += 2) { + const encodedByte = encoded.slice(i5, i5 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i5 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; + } + __name(fromHex, "fromHex"); + function toHex(bytes) { + let out = ""; + for (let i5 = 0; i5 < bytes.byteLength; i5++) { + out += SHORT_TO_HEX[bytes[i5]]; + } + return out; + } + __name(toHex, "toHex"); + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +var require_sdk_stream_mixin_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var fetch_http_handler_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs12(); + var util_hex_encoding_1 = require_dist_cjs17(); + var util_utf8_1 = require_dist_cjs11(); + var stream_type_check_1 = require_stream_type_check(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin3 = (stream4) => { + var _a6, _b2; + if (!isBlobInstance(stream4) && !(0, stream_type_check_1.isReadableStream)(stream4)) { + const name = ((_b2 = (_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.__proto__) === null || _a6 === void 0 ? void 0 : _a6.constructor) === null || _b2 === void 0 ? void 0 : _b2.name) || stream4; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream4); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream4, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream4)) { + return blobToWebStream(stream4); + } else if ((0, stream_type_check_1.isReadableStream)(stream4)) { + return stream4; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream4}`); + } + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin3; + var isBlobInstance = (stream4) => typeof Blob === "function" && stream4 instanceof Blob; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +var require_sdk_stream_mixin = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var node_http_handler_1 = require_dist_cjs15(); + var util_buffer_from_1 = require_dist_cjs10(); + var stream_1 = require("stream"); + var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin3 = (stream4) => { + var _a6, _b2; + if (!(stream4 instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream4); + } catch (e5) { + const name = ((_b2 = (_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.__proto__) === null || _a6 === void 0 ? void 0 : _a6.constructor) === null || _b2 === void 0 ? void 0 : _b2.name) || stream4; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream4); + }; + return Object.assign(stream4, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === void 0 || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder = new TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream4.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream4); + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin3; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +var require_splitStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream2; + async function splitStream2(stream4) { + if (typeof stream4.stream === "function") { + stream4 = stream4.stream(); + } + const readableStream = stream4; + return readableStream.tee(); + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.js +var require_splitStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream2; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + async function splitStream2(stream4) { + if ((0, stream_type_check_1.isReadableStream)(stream4) || (0, stream_type_check_1.isBlob)(stream4)) { + return (0, splitStream_browser_1.splitStream)(stream4); + } + const stream1 = new stream_1.PassThrough(); + const stream22 = new stream_1.PassThrough(); + stream4.pipe(stream1); + stream4.pipe(stream22); + return [stream1, stream22]; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs18 = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_base648 = require_dist_cjs12(); + var import_util_utf86 = require_dist_cjs11(); + function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base648.toBase64)(payload); + } + return (0, import_util_utf86.toUtf8)(payload); + } + __name(transformToString, "transformToString"); + function transformFromString(str2, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter2.mutate((0, import_util_base648.fromBase64)(str2)); + } + return Uint8ArrayBlobAdapter2.mutate((0, import_util_utf86.fromUtf8)(str2)); + } + __name(transformFromString, "transformFromString"); + var Uint8ArrayBlobAdapter2 = class _Uint8ArrayBlobAdapter extends Uint8Array { + static { + __name(this, "Uint8ArrayBlobAdapter"); + } + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + } + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); + return source; + } + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); + } + }; + __reExport(src_exports, require_ChecksumStream(), module2.exports); + __reExport(src_exports, require_createChecksumStream(), module2.exports); + __reExport(src_exports, require_createBufferedReadable(), module2.exports); + __reExport(src_exports, require_getAwsChunkedEncodingStream(), module2.exports); + __reExport(src_exports, require_headStream(), module2.exports); + __reExport(src_exports, require_sdk_stream_mixin(), module2.exports); + __reExport(src_exports, require_splitStream(), module2.exports); + __reExport(src_exports, require_stream_type_check(), module2.exports); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var import_util_stream, collectBody2; +var init_collect_stream_body = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + import_util_stream = __toESM(require_dist_cjs18()); + collectBody2 = async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent2(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c5) { + return "%" + c5.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/deref.js +var deref; +var init_deref = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { + deref = (schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var import_protocol_http2, import_util_middleware3; +var init_schemaDeserializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + import_protocol_http2 = __toESM(require_dist_cjs2()); + import_util_middleware3 = __toESM(require_dist_cjs7()); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var import_util_middleware4; +var init_schemaSerializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + import_util_middleware4 = __toESM(require_dist_cjs7()); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +var init_getSchemaSerdePlugin = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var TypeRegistry; +var init_TypeRegistry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + TypeRegistry = class _TypeRegistry { + constructor(namespace, schemas = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + const registry = _TypeRegistry.for(this.getNamespace(shapeId)); + registry.schemas.set(qualifiedName, schema); + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + getBaseException() { + for (const [id, schema] of this.schemas.entries()) { + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return schema; + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + destroy() { + _TypeRegistry.registries.delete(this.namespace); + this.schemas.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + getNamespace(shapeId) { + return this.normalizeShapeId(shapeId).split("#")[0]; + } + }; + TypeRegistry.registries = /* @__PURE__ */ new Map(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema; +var init_Schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + Schema = class { + constructor(name, traits) { + this.name = name; + this.traits = traits; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var ListSchema; +var init_ListSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_TypeRegistry(); + init_Schema(); + ListSchema = class _ListSchema extends Schema { + constructor(name, traits, valueSchema) { + super(name, traits); + this.name = name; + this.traits = traits; + this.valueSchema = valueSchema; + this.symbol = _ListSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _ListSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === _ListSchema.symbol; + } + return isPrototype; + } + }; + ListSchema.symbol = Symbol.for("@smithy/core/schema::ListSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var MapSchema; +var init_MapSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_TypeRegistry(); + init_Schema(); + MapSchema = class _MapSchema extends Schema { + constructor(name, traits, keySchema, valueSchema) { + super(name, traits); + this.name = name; + this.traits = traits; + this.keySchema = keySchema; + this.valueSchema = valueSchema; + this.symbol = _MapSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _MapSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const map2 = lhs; + return map2.symbol === _MapSchema.symbol; + } + return isPrototype; + } + }; + MapSchema.symbol = Symbol.for("@smithy/core/schema::MapSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var init_OperationSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_TypeRegistry(); + init_Schema(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var StructureSchema; +var init_StructureSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_TypeRegistry(); + init_Schema(); + StructureSchema = class _StructureSchema extends Schema { + constructor(name, traits, memberNames, memberList) { + super(name, traits); + this.name = name; + this.traits = traits; + this.memberNames = memberNames; + this.memberList = memberList; + this.symbol = _StructureSchema.symbol; + this.members = {}; + for (let i5 = 0; i5 < memberNames.length; ++i5) { + this.members[memberNames[i5]] = Array.isArray(memberList[i5]) ? memberList[i5] : [memberList[i5], 0]; + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _StructureSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const struct = lhs; + return struct.symbol === _StructureSchema.symbol; + } + return isPrototype; + } + }; + StructureSchema.symbol = Symbol.for("@smithy/core/schema::StructureSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var ErrorSchema; +var init_ErrorSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_TypeRegistry(); + init_StructureSchema(); + ErrorSchema = class _ErrorSchema extends StructureSchema { + constructor(name, traits, memberNames, memberList, ctor) { + super(name, traits, memberNames, memberList); + this.name = name; + this.traits = traits; + this.memberNames = memberNames; + this.memberList = memberList; + this.ctor = ctor; + this.symbol = _ErrorSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _ErrorSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const err = lhs; + return err.symbol === _ErrorSchema.symbol; + } + return isPrototype; + } + }; + ErrorSchema.symbol = Symbol.for("@smithy/core/schema::ErrorSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var SCHEMA; +var init_sentinels = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + SCHEMA = { + BLOB: 21, + STREAMING_BLOB: 42, + BOOLEAN: 2, + STRING: 0, + NUMERIC: 1, + BIG_INTEGER: 17, + BIG_DECIMAL: 19, + DOCUMENT: 15, + TIMESTAMP_DEFAULT: 4, + TIMESTAMP_DATE_TIME: 5, + TIMESTAMP_HTTP_DATE: 6, + TIMESTAMP_EPOCH_SECONDS: 7, + LIST_MODIFIER: 64, + MAP_MODIFIER: 128 + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var SimpleSchema; +var init_SimpleSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_TypeRegistry(); + init_Schema(); + SimpleSchema = class _SimpleSchema extends Schema { + constructor(name, schemaRef, traits) { + super(name, traits); + this.name = name; + this.schemaRef = schemaRef; + this.traits = traits; + this.symbol = _SimpleSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _SimpleSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const sim = lhs; + return sim.symbol === _SimpleSchema.symbol; + } + return isPrototype; + } + }; + SimpleSchema.symbol = Symbol.for("@smithy/core/schema::SimpleSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +var NormalizedSchema; +var init_NormalizedSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_deref(); + init_ListSchema(); + init_MapSchema(); + init_sentinels(); + init_SimpleSchema(); + init_StructureSchema(); + NormalizedSchema = class _NormalizedSchema { + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + this.symbol = _NormalizedSchema.symbol; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (Array.isArray(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { + const traitSet = traitStack[i5]; + Object.assign(this.memberTraits, _NormalizedSchema.translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + this.name = schema.name; + this.traits = schema.traits; + this._isMemberSchema = schema._isMemberSchema; + this.schema = schema.schema; + this.memberTraits = Object.assign({}, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.ref = schema.ref; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (this.schema && typeof this.schema === "object") { + this.traits = this.schema?.traits ?? {}; + } else { + this.traits = 0; + } + this.name = (typeof this.schema === "object" ? this.schema?.name : void 0) ?? this.memberName ?? this.getSchemaName(); + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _NormalizedSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === _NormalizedSchema.symbol; + } + return isPrototype; + } + static of(ref, memberName) { + if (ref instanceof _NormalizedSchema) { + return ref; + } + return new _NormalizedSchema(ref, memberName); + } + static translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + const traits = {}; + if ((indicator & 1) === 1) { + traits.httpLabel = 1; + } + if ((indicator >> 1 & 1) === 1) { + traits.idempotent = 1; + } + if ((indicator >> 2 & 1) === 1) { + traits.idempotencyToken = 1; + } + if ((indicator >> 3 & 1) === 1) { + traits.sensitive = 1; + } + if ((indicator >> 4 & 1) === 1) { + traits.httpPayload = 1; + } + if ((indicator >> 5 & 1) === 1) { + traits.httpResponseCode = 1; + } + if ((indicator >> 6 & 1) === 1) { + traits.httpQueryParams = 1; + } + return traits; + } + static memberFrom(memberSchema, memberName) { + if (memberSchema instanceof _NormalizedSchema) { + memberSchema.memberName = memberName; + memberSchema._isMemberSchema = true; + return memberSchema; + } + return new _NormalizedSchema(memberSchema, memberName); + } + getSchema() { + if (this.schema instanceof _NormalizedSchema) { + return this.schema = this.schema.getSchema(); + } + if (this.schema instanceof SimpleSchema) { + return deref(this.schema.schemaRef); + } + return deref(this.schema); + } + getName(withNamespace = false) { + if (!withNamespace) { + if (this.name && this.name.includes("#")) { + return this.name.split("#")[1]; + } + } + return this.name || void 0; + } + getMemberName() { + if (!this.isMemberSchema()) { + throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(true)}`); + } + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isListSchema() { + const inner = this.getSchema(); + if (typeof inner === "number") { + return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER; + } + return inner instanceof ListSchema; + } + isMapSchema() { + const inner = this.getSchema(); + if (typeof inner === "number") { + return inner >= SCHEMA.MAP_MODIFIER && inner <= 255; + } + return inner instanceof MapSchema; + } + isDocumentSchema() { + return this.getSchema() === SCHEMA.DOCUMENT; + } + isStructSchema() { + const inner = this.getSchema(); + return inner !== null && typeof inner === "object" && "members" in inner || inner instanceof StructureSchema; + } + isBlobSchema() { + return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB; + } + isTimestampSchema() { + const schema = this.getSchema(); + return typeof schema === "number" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS; + } + isStringSchema() { + return this.getSchema() === SCHEMA.STRING; + } + isBooleanSchema() { + return this.getSchema() === SCHEMA.BOOLEAN; + } + isNumericSchema() { + return this.getSchema() === SCHEMA.NUMERIC; + } + isBigIntegerSchema() { + return this.getSchema() === SCHEMA.BIG_INTEGER; + } + isBigDecimalSchema() { + return this.getSchema() === SCHEMA.BIG_DECIMAL; + } + isStreaming() { + const streaming = !!this.getMergedTraits().streaming; + if (streaming) { + return true; + } + return this.getSchema() === SCHEMA.STREAMING_BLOB; + } + getMergedTraits() { + if (this.normalizedTraits) { + return this.normalizedTraits; + } + this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }; + return this.normalizedTraits; + } + getMemberTraits() { + return _NormalizedSchema.translateTraits(this.memberTraits); + } + getOwnTraits() { + return _NormalizedSchema.translateTraits(this.traits); + } + getKeySchema() { + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], "key"); + } + if (!this.isMapSchema()) { + throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(true)}`); + } + const schema = this.getSchema(); + if (typeof schema === "number") { + return _NormalizedSchema.memberFrom([63 & schema, 0], "key"); + } + return _NormalizedSchema.memberFrom([schema.keySchema, 0], "key"); + } + getValueSchema() { + const schema = this.getSchema(); + if (typeof schema === "number") { + if (this.isMapSchema()) { + return _NormalizedSchema.memberFrom([63 & schema, 0], "value"); + } else if (this.isListSchema()) { + return _NormalizedSchema.memberFrom([63 & schema, 0], "member"); + } + } + if (schema && typeof schema === "object") { + if (this.isStructSchema()) { + throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(true)}`); + } + const collection = schema; + if ("valueSchema" in collection) { + if (this.isMapSchema()) { + return _NormalizedSchema.memberFrom([collection.valueSchema, 0], "value"); + } else if (this.isListSchema()) { + return _NormalizedSchema.memberFrom([collection.valueSchema, 0], "member"); + } + } + } + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], "value"); + } + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a value member.`); + } + getMemberSchema(member) { + if (this.isStructSchema()) { + const struct = this.getSchema(); + if (!(member in struct.members)) { + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a member with name=${member}.`); + } + return _NormalizedSchema.memberFrom(struct.members[member], member); + } + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], member); + } + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have members.`); + } + getMemberSchemas() { + const { schema } = this; + const struct = schema; + if (!struct || typeof struct !== "object") { + return {}; + } + if ("members" in struct) { + const buffer = {}; + for (const member of struct.memberNames) { + buffer[member] = this.getMemberSchema(member); + } + return buffer; + } + return {}; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema."); + } + const struct = this.getSchema(); + for (let i5 = 0; i5 < struct.memberNames.length; ++i5) { + yield [struct.memberNames[i5], _NormalizedSchema.memberFrom([struct.memberList[i5], 0], struct.memberNames[i5])]; + } + } + getSchemaName() { + const schema = this.getSchema(); + if (typeof schema === "number") { + const _schema = 63 & schema; + const container = 192 & schema; + const type2 = Object.entries(SCHEMA).find(([, value]) => { + return value === _schema; + })?.[0] ?? "Unknown"; + switch (container) { + case SCHEMA.MAP_MODIFIER: + return `${type2}Map`; + case SCHEMA.LIST_MODIFIER: + return `${type2}List`; + case 0: + return type2; + } + } + return "Unknown"; + } + }; + NormalizedSchema.symbol = Symbol.for("@smithy/core/schema::NormalizedSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/index.js +var init_schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels(); + init_TypeRegistry(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +var copyDocumentWithTransform2; +var init_copyDocumentWithTransform = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { + init_schema(); + copyDocumentWithTransform2 = (source, schemaRef, transform = (_8) => _8) => { + const ns = NormalizedSchema.of(schemaRef); + switch (typeof source) { + case "undefined": + case "boolean": + case "number": + case "string": + case "bigint": + case "symbol": + return transform(source, ns); + case "function": + case "object": + if (source === null) { + return transform(null, ns); + } + if (Array.isArray(source)) { + const newArray = new Array(source.length); + let i5 = 0; + for (const item of source) { + newArray[i5++] = copyDocumentWithTransform2(item, ns.getValueSchema(), transform); + } + return transform(newArray, ns); + } + if ("byteLength" in source) { + const newBytes = new Uint8Array(source.byteLength); + newBytes.set(source, 0); + return transform(newBytes, ns); + } + if (source instanceof Date) { + return transform(source, ns); + } + const newObject = {}; + if (ns.isMapSchema()) { + for (const key of Object.keys(source)) { + newObject[key] = copyDocumentWithTransform2(source[key], ns.getValueSchema(), transform); + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + newObject[key] = copyDocumentWithTransform2(source[key], memberSchema, transform); + } + } else if (ns.isDocumentSchema()) { + for (const key of Object.keys(source)) { + newObject[key] = copyDocumentWithTransform2(source[key], ns.getValueSchema(), transform); + } + } + return transform(newObject, ns); + default: + return transform(source, ns); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +var parseBoolean2, expectBoolean2, expectNumber2, MAX_FLOAT, expectFloat322, expectLong2, expectInt2, expectInt322, expectShort2, expectByte2, expectSizedInt, castInt, expectNonNull2, expectObject2, expectString2, expectUnion2, strictParseDouble2, strictParseFloat2, strictParseFloat322, NUMBER_REGEX, parseNumber, limitedParseDouble2, handleFloat2, limitedParseFloat2, limitedParseFloat322, parseFloatString, strictParseLong2, strictParseInt2, strictParseInt322, strictParseShort2, strictParseByte2, stackTraceWarning, logger4; +var init_parse_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { + parseBoolean2 = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } + }; + expectBoolean2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; + } + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + }; + expectNumber2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger4.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }; + MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + expectFloat322 = (value) => { + const expected = expectNumber2(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }; + expectLong2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }; + expectInt2 = expectLong2; + expectInt322 = (value) => expectSizedInt(value, 32); + expectShort2 = (value) => expectSizedInt(value, 16); + expectByte2 = (value) => expectSizedInt(value, 8); + expectSizedInt = (value, size) => { + const expected = expectLong2(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }; + castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }; + expectNonNull2 = (value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; + }; + expectObject2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + }; + expectString2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger4.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + }; + expectUnion2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + const asObject = expectObject2(value); + const setKeys = Object.entries(asObject).filter(([, v8]) => v8 != null).map(([k9]) => k9); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; + }; + strictParseDouble2 = (value) => { + if (typeof value == "string") { + return expectNumber2(parseNumber(value)); + } + return expectNumber2(value); + }; + strictParseFloat2 = strictParseDouble2; + strictParseFloat322 = (value) => { + if (typeof value == "string") { + return expectFloat322(parseNumber(value)); + } + return expectFloat322(value); + }; + NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }; + limitedParseDouble2 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber2(value); + }; + handleFloat2 = limitedParseDouble2; + limitedParseFloat2 = limitedParseDouble2; + limitedParseFloat322 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat322(value); + }; + parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } + }; + strictParseLong2 = (value) => { + if (typeof value === "string") { + return expectLong2(parseNumber(value)); + } + return expectLong2(value); + }; + strictParseInt2 = strictParseLong2; + strictParseInt322 = (value) => { + if (typeof value === "string") { + return expectInt322(parseNumber(value)); + } + return expectInt322(value); + }; + strictParseShort2 = (value) => { + if (typeof value === "string") { + return expectShort2(parseNumber(value)); + } + return expectShort2(value); + }; + strictParseByte2 = (value) => { + if (typeof value === "string") { + return expectByte2(parseNumber(value)); + } + return expectByte2(value); + }; + stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s4) => !s4.includes("stackTraceWarning")).join("\n"); + }; + logger4 = { + warn: console.warn + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +function dateToUtcString2(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +var DAYS, MONTHS, RFC3339, parseRfc3339DateTime2, RFC3339_WITH_OFFSET, parseRfc3339DateTimeWithOffset2, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime2, parseEpochTimestamp2, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, parseOffsetToMilliseconds, stripLeadingZeroes; +var init_date_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { + init_parse_utils(); + DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + parseRfc3339DateTime2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_8, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort2(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + }; + RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); + parseRfc3339DateTimeWithOffset2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_8, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort2(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; + }; + IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + parseRfc7231DateTime2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_8, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate(strictParseShort2(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_8, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match = ASC_TIME.exec(value); + if (match) { + const [_8, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate(strictParseShort2(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }; + parseEpochTimestamp2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble2(value); + } else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1e3)); + }; + buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); + }; + parseTwoDigitYear = (value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort2(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }; + FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + adjustRfc850Year = (input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }; + parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }; + DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } + }; + isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + }; + parseDateValue = (value, type2, lower, upper) => { + const dateVal = strictParseByte2(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type2} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }; + parseMilliseconds = (value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat322("0." + value) * 1e3; + }; + parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1e3; + }; + stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js +var LazyJsonString2; +var init_lazy_json = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { + LazyJsonString2 = function LazyJsonString3(val) { + const str2 = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str2; + }; + LazyJsonString2.from = (object) => { + if (object && typeof object === "object" && (object instanceof LazyJsonString2 || "deserializeJSON" in object)) { + return object; + } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) { + return LazyJsonString2(String(object)); + } + return LazyJsonString2(JSON.stringify(object)); + }; + LazyJsonString2.fromObject = LazyJsonString2.from; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +function quoteHeader2(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} +var init_quote_header = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/split-every.js +function splitEvery2(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i5 = 0; i5 < segments.length; i5++) { + if (currentSegment === "") { + currentSegment = segments[i5]; + } else { + currentSegment += delimiter + segments[i5]; + } + if ((i5 + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +var init_split_every = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +var splitHeader2; +var init_split_header = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { + splitHeader2 = (value) => { + const z7 = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i5 = 0; i5 < z7; ++i5) { + const char = value[i5]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i5)); + anchor = i5 + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v8) => { + v8 = v8.trim(); + const z8 = v8.length; + if (z8 < 2) { + return v8; + } + if (v8[0] === `"` && v8[z8 - 1] === `"`) { + v8 = v8.slice(1, z8 - 1); + } + return v8.replace(/\\"/g, '"'); + }); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +function nv2(input) { + return new NumericValue2(String(input), "bigDecimal"); +} +var NumericValue2; +var init_NumericValue = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { + NumericValue2 = class { + constructor(string, type2) { + this.string = string; + this.type = type2; + let dot = 0; + for (let i5 = 0; i5 < string.length; ++i5) { + const char = string.charCodeAt(i5); + if (i5 === 0 && char === 45) { + continue; + } + if (char === 46) { + if (dot) { + throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point."); + } + dot = 1; + continue; + } + if (char < 48 || char > 57) { + throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } + } + } + toString() { + return this.string; + } + [Symbol.hasInstance](object) { + if (!object || typeof object !== "object") { + return false; + } + const _nv = object; + if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") { + return true; + } + return false; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/index.js +var serde_exports = {}; +__export(serde_exports, { + LazyJsonString: () => LazyJsonString2, + NumericValue: () => NumericValue2, + copyDocumentWithTransform: () => copyDocumentWithTransform2, + dateToUtcString: () => dateToUtcString2, + expectBoolean: () => expectBoolean2, + expectByte: () => expectByte2, + expectFloat32: () => expectFloat322, + expectInt: () => expectInt2, + expectInt32: () => expectInt322, + expectLong: () => expectLong2, + expectNonNull: () => expectNonNull2, + expectNumber: () => expectNumber2, + expectObject: () => expectObject2, + expectShort: () => expectShort2, + expectString: () => expectString2, + expectUnion: () => expectUnion2, + handleFloat: () => handleFloat2, + limitedParseDouble: () => limitedParseDouble2, + limitedParseFloat: () => limitedParseFloat2, + limitedParseFloat32: () => limitedParseFloat322, + logger: () => logger4, + nv: () => nv2, + parseBoolean: () => parseBoolean2, + parseEpochTimestamp: () => parseEpochTimestamp2, + parseRfc3339DateTime: () => parseRfc3339DateTime2, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset2, + parseRfc7231DateTime: () => parseRfc7231DateTime2, + quoteHeader: () => quoteHeader2, + splitEvery: () => splitEvery2, + splitHeader: () => splitHeader2, + strictParseByte: () => strictParseByte2, + strictParseDouble: () => strictParseDouble2, + strictParseFloat: () => strictParseFloat2, + strictParseFloat32: () => strictParseFloat322, + strictParseInt: () => strictParseInt2, + strictParseInt32: () => strictParseInt322, + strictParseLong: () => strictParseLong2, + strictParseShort: () => strictParseShort2 +}); +var init_serde = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { + init_copyDocumentWithTransform(); + init_date_utils(); + init_lazy_json(); + init_parse_utils(); + init_quote_header(); + init_split_every(); + init_split_header(); + init_NumericValue(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +var import_protocol_http3, import_util_stream2, HttpProtocol; +var init_HttpProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { + init_schema(); + init_serde(); + import_protocol_http3 = __toESM(require_dist_cjs2()); + import_util_stream2 = __toESM(require_dist_cjs18()); + init_collect_stream_body(); + HttpProtocol = class { + constructor(options) { + this.options = options; + } + getRequestType() { + return import_protocol_http3.HttpRequest; + } + getResponseType() { + return import_protocol_http3.HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request3, endpoint) { + if ("url" in endpoint) { + request3.protocol = endpoint.url.protocol; + request3.hostname = endpoint.url.hostname; + request3.port = endpoint.url.port ? Number(endpoint.url.port) : void 0; + request3.path = endpoint.url.pathname; + request3.fragment = endpoint.url.hash || void 0; + request3.username = endpoint.url.username || void 0; + request3.password = endpoint.url.password || void 0; + for (const [k9, v8] of endpoint.url.searchParams.entries()) { + if (!request3.query) { + request3.query = {}; + } + request3.query[k9] = v8; + } + return request3; + } else { + request3.protocol = endpoint.protocol; + request3.hostname = endpoint.hostname; + request3.port = endpoint.port ? Number(endpoint.port) : void 0; + request3.path = endpoint.path; + request3.query = { + ...endpoint.query + }; + return request3; + } + } + setHostPrefix(request3, operationSchema, input) { + const operationNs = NormalizedSchema.of(operationSchema); + const inputNs = NormalizedSchema.of(operationSchema.input); + if (operationNs.getMergedTraits().endpoint) { + let hostPrefix = operationNs.getMergedTraits().endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request3.hostname = hostPrefix + request3.hostname; + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async deserializeHttpMessage(schema, context, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + const isStreaming = memberSchema.isStreaming(); + if (isStreaming) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + const context2 = this.serdeContext; + if (!context2.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + const memberSchemas = memberSchema.getMemberSchemas(); + dataObject[memberName] = context2.eventStreamMarshaller.deserialize(response.body, async (event) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + return { + [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body) + }; + } else { + return { + $unknown: event + }; + } + }); + } else { + dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body); + } + } else if (response.body) { + const bytes = await collectBody2(response.body, context); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === SCHEMA.TIMESTAMP_DEFAULT) { + sections = splitEvery2(value, ",", 2); + } else { + sections = splitHeader2(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== void 0) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read([memberSchema.getValueSchema(), { httpHeader: header }], value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + return nonHttpBindingMembers; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +var import_protocol_http4, HttpBindingProtocol; +var init_HttpBindingProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { + init_schema(); + import_protocol_http4 = __toESM(require_dist_cjs2()); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpProtocol(); + HttpBindingProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, _input, context) { + const input = { + ..._input ?? {} + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const schema = ns.getSchema(); + let hasNonHttpBindingMember = false; + let payload; + const request3 = new import_protocol_http4.HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request3, endpoint); + this.setHostPrefix(request3, operationSchema, input); + const opTraits = NormalizedSchema.translateTraits(operationSchema.traits); + if (opTraits.http) { + request3.method = opTraits.http[0]; + const [path5, search] = opTraits.http[1].split("?"); + if (request3.path == "/") { + request3.path = path5; + } else { + request3.path += path5; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null) { + continue; + } + if (memberTraits.httpPayload) { + const isStreaming = memberNs.isStreaming(); + if (isStreaming) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + throw new Error("serialization of event streams is not yet implemented"); + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request3.path.includes(`{${memberName}+}`)) { + request3.path = request3.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent2).join("/")); + } else if (request3.path.includes(`{${memberName}}`)) { + request3.path = request3.path.replace(`{${memberName}}`, extendedEncodeURIComponent2(replacement)); + } + delete input[memberName]; + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } else { + hasNonHttpBindingMember = true; + } + } + if (hasNonHttpBindingMember && input) { + serializer.write(schema, input); + payload = serializer.flush(); + } + request3.headers = headers; + request3.query = query; + request3.body = payload; + return request3; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + this.serializeQuery(NormalizedSchema.of([ + ns.getValueSchema(), + { + ...traits, + httpQuery: key, + httpQueryParams: void 0 + } + ]), val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== void 0) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody2(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody2(response.body, context); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member of nonHttpBindingMembers) { + dataObject[member] = dataFromBody[member]; + } + } + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +var import_protocol_http5, RpcProtocol; +var init_RpcProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { + init_schema(); + import_protocol_http5 = __toESM(require_dist_cjs2()); + init_collect_stream_body(); + init_HttpProtocol(); + RpcProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, input, context) { + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const schema = ns.getSchema(); + let payload; + const request3 = new import_protocol_http5.HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "/", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request3, endpoint); + this.setHostPrefix(request3, operationSchema, input); + } + const _input = { + ...input + }; + if (input) { + serializer.write(schema, _input); + payload = serializer.flush(); + } + request3.headers = headers; + request3.query = query; + request3.body = payload; + request3.method = "POST"; + return request3; + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes2 = await collectBody2(response.body, context); + if (bytes2.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes2)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const bytes = await collectBody2(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes)); + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +var resolvedPath2; +var init_resolve_path = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() { + init_extended_encode_uri_component(); + resolvedPath2 = (resolvedPath3, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath3 = resolvedPath3.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent2(segment)).join("/") : extendedEncodeURIComponent2(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath3; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +var import_protocol_http6, RequestBuilder; +var init_requestBuilder = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { + import_protocol_http6 = __toESM(require_dist_cjs2()); + init_resolve_path(); + RequestBuilder = class { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new import_protocol_http6.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); + } + hn(hostname) { + this.hostname = hostname; + return this; + } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path5) => { + this.path = resolvedPath2(path5, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + h(headers) { + this.headers = headers; + return this; + } + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === SCHEMA.TIMESTAMP_EPOCH_SECONDS)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? SCHEMA.TIMESTAMP_DATE_TIME : void 0 : void 0; + return bindingFormat ?? settings.timestampFormat.default; +} +var init_determineTimestampFormat = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() { + init_schema(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +var import_util_base64, import_util_utf8, FromStringShapeDeserializer; +var init_FromStringShapeDeserializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { + init_schema(); + init_serde(); + import_util_base64 = __toESM(require_dist_cjs12()); + import_util_utf8 = __toESM(require_dist_cjs11()); + init_determineTimestampFormat(); + FromStringShapeDeserializer = class { + constructor(settings) { + this.settings = settings; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader2(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return parseRfc3339DateTimeWithOffset2(data); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return parseRfc7231DateTime2(data); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return parseEpochTimestamp2(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString2.from(intermediateValue); + } + return intermediateValue; + } + } + switch (true) { + case ns.isNumericSchema(): + return Number(data); + case ns.isBigIntegerSchema(): + return BigInt(data); + case ns.isBigDecimalSchema(): + return new NumericValue2(data, "bigDecimal"); + case ns.isBooleanSchema(): + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String)); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +var import_util_utf82, HttpInterceptingShapeDeserializer; +var init_HttpInterceptingShapeDeserializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { + init_schema(); + import_util_utf82 = __toESM(require_dist_cjs11()); + init_FromStringShapeDeserializer(); + HttpInterceptingShapeDeserializer = class { + constructor(codecDeserializer, codecSettings) { + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString3 = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString3(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString3(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +var import_util_base642, ToStringShapeSerializer; +var init_ToStringShapeSerializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { + init_schema(); + init_serde(); + import_util_base642 = __toESM(require_dist_cjs12()); + init_determineTimestampFormat(); + ToStringShapeSerializer = class { + constructor(settings) { + this.settings = settings; + this.stringBuffer = ""; + this.serdeContext = void 0; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + this.stringBuffer = dateToUtcString2(value); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + this.stringBuffer = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1e3); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader2(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString2.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + this.stringBuffer = String(value); + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +var HttpInterceptingShapeSerializer; +var init_HttpInterceptingShapeSerializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() { + init_schema(); + init_ToStringShapeSerializer(); + HttpInterceptingShapeSerializer = class { + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== void 0) { + const buffer = this.buffer; + this.buffer = void 0; + return buffer; + } + return this.codecSerializer.flush(); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/index.js +var protocols_exports = {}; +__export(protocols_exports, { + FromStringShapeDeserializer: () => FromStringShapeDeserializer, + HttpBindingProtocol: () => HttpBindingProtocol, + HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, + HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer, + RequestBuilder: () => RequestBuilder, + RpcProtocol: () => RpcProtocol, + ToStringShapeSerializer: () => ToStringShapeSerializer, + collectBody: () => collectBody2, + determineTimestampFormat: () => determineTimestampFormat, + extendedEncodeURIComponent: () => extendedEncodeURIComponent2, + requestBuilder: () => requestBuilder, + resolvedPath: () => resolvedPath2 +}); +var init_protocols = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() { + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpBindingProtocol(); + init_RpcProtocol(); + init_requestBuilder(); + init_resolve_path(); + init_FromStringShapeDeserializer(); + init_HttpInterceptingShapeDeserializer(); + init_HttpInterceptingShapeSerializer(); + init_ToStringShapeSerializer(); + init_determineTimestampFormat(); + } +}); + +// node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +var init_requestBuilder2 = __esm({ + "node_modules/@smithy/core/dist-es/protocols/requestBuilder.js"() { + init_protocols(); + } +}); + +// node_modules/@smithy/core/dist-es/setFeature.js +function setFeature(context, feature, value) { + if (!context.__smithy_context) { + context.__smithy_context = { + features: {} + }; + } else if (!context.__smithy_context.features) { + context.__smithy_context.features = {}; + } + context.__smithy_context.features[feature] = value; +} +var init_setFeature = __esm({ + "node_modules/@smithy/core/dist-es/setFeature.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + DefaultIdentityProviderConfig = class { + constructor(config7) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config7)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_protocol_http7, import_types4, HttpApiKeyAuthSigner; +var init_httpApiKeyAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + import_protocol_http7 = __toESM(require_dist_cjs2()); + import_types4 = __toESM(require_dist_cjs()); + HttpApiKeyAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = import_protocol_http7.HttpRequest.clone(httpRequest); + if (signingProperties.in === import_types4.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types4.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; + } else { + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`"); + } + return clonedRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var import_protocol_http8, HttpBearerAuthSigner; +var init_httpBearerAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + import_protocol_http8 = __toESM(require_dist_cjs2()); + HttpBearerAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = import_protocol_http8.HttpRequest.clone(httpRequest); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var NoAuthSigner; +var init_noAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + NoAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + createIsIdentityExpiredFunction = (expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0; + memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }; + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// node_modules/@smithy/core/dist-es/index.js +var dist_es_exports = {}; +__export(dist_es_exports, { + DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, + EXPIRATION_MS: () => EXPIRATION_MS, + HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, + HttpBearerAuthSigner: () => HttpBearerAuthSigner, + NoAuthSigner: () => NoAuthSigner, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder, + setFeature: () => setFeature +}); +var init_dist_es = __esm({ + "node_modules/@smithy/core/dist-es/index.js"() { + init_getSmithyContext(); + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_normalizeProvider(); + init_createPaginator(); + init_requestBuilder2(); + init_setFeature(); + init_util_identity_and_auth(); + } +}); + +// node_modules/@smithy/util-endpoints/dist-cjs/index.js +var require_dist_cjs19 = __commonJS({ + "node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EndpointCache: () => EndpointCache3, + EndpointError: () => EndpointError2, + customEndpointFunctions: () => customEndpointFunctions3, + isIpAddress: () => isIpAddress2, + isValidHostLabel: () => isValidHostLabel, + resolveEndpoint: () => resolveEndpoint4 + }); + module2.exports = __toCommonJS2(src_exports); + var EndpointCache3 = class { + /** + * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed + * before keys are dropped. + * @param [params] - list of params to consider as part of the cache key. + * + * If the params list is not populated, no caching will happen. + * This may be out of order depending on how the object is created and arrives to this class. + */ + constructor({ size, params }) { + this.data = /* @__PURE__ */ new Map(); + this.parameters = []; + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + static { + __name(this, "EndpointCache"); + } + /** + * @param endpointParams - query for endpoint. + * @param resolver - provider of the value if not present. + * @returns endpoint corresponding to the query. + */ + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i5 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i5 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + /** + * @returns cache key or false if not cachable. + */ + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + var IP_V4_REGEX = new RegExp( + `^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$` + ); + var isIpAddress2 = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }, "isValidHostLabel"); + var customEndpointFunctions3 = {}; + var debugId = "endpoints"; + function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); + } + __name(toDebugString, "toDebugString"); + var EndpointError2 = class extends Error { + static { + __name(this, "EndpointError"); + } + constructor(message) { + super(message); + this.name = "EndpointError"; + } + }; + var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + var getAttrPathList = /* @__PURE__ */ __name((path5) => { + const parts = path5.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError2(`Path: '${path5}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path5}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + var getAttr = /* @__PURE__ */ __name((value, path5) => getAttrPathList(path5).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError2(`Index '${index}' in '${path5}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + var not = /* @__PURE__ */ __name((value) => !value, "not"); + var import_types32 = require_dist_cjs(); + var DEFAULT_PORTS = { + [import_types32.EndpointURLScheme.HTTP]: 80, + [import_types32.EndpointURLScheme.HTTPS]: 443 + }; + var parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path: path5 = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path5}`); + url2.search = Object.entries(query).map(([k9, v8]) => `${k9}=${v8}`).join("&"); + return url2; + } + return new URL(value); + } catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(import_types32.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress2(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c5) => `%${c5.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + var endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { + const evaluatedArgs = argv.map( + (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) + ); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions3 && fnSegments[1] != null) { + return customEndpointFunctions3[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError2(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + var getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce( + (acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), + {} + ), "getEndpointHeaders"); + var getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError2(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( + (acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options) + }), + {} + ), "getEndpointProperties"); + var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError2( + evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }) + ); + }, "evaluateErrorRule"); + var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + var evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError2(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError2(`Rules evaluation failed`); + }, "evaluateRules"); + var resolveEndpoint4 = /* @__PURE__ */ __name((ruleSetObject, options) => { + const { endpointParams, logger: logger5 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v8]) => v8.default != null).map(([k9, v8]) => [k9, v8.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v8]) => v8.required).map(([k9]) => k9); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError2(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger5, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); + } +}); + +// node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs20 = __commonJS({ + "node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; + } + __name(parseQueryString, "parseQueryString"); + } +}); + +// node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs21 = __commonJS({ + "node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseUrl: () => parseUrl3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs20(); + var parseUrl3 = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl3(new URL(url2)); + } + const { hostname, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +var require_dist_cjs22 = __commonJS({ + "node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + ConditionObject: () => import_util_endpoints5.ConditionObject, + DeprecatedObject: () => import_util_endpoints5.DeprecatedObject, + EndpointError: () => import_util_endpoints5.EndpointError, + EndpointObject: () => import_util_endpoints5.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints5.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints5.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints5.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints5.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints5.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints5.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints5.EvaluateOptions, + Expression: () => import_util_endpoints5.Expression, + FunctionArgv: () => import_util_endpoints5.FunctionArgv, + FunctionObject: () => import_util_endpoints5.FunctionObject, + FunctionReturn: () => import_util_endpoints5.FunctionReturn, + ParameterObject: () => import_util_endpoints5.ParameterObject, + ReferenceObject: () => import_util_endpoints5.ReferenceObject, + ReferenceRecord: () => import_util_endpoints5.ReferenceRecord, + RuleSetObject: () => import_util_endpoints5.RuleSetObject, + RuleSetRules: () => import_util_endpoints5.RuleSetRules, + TreeRuleObject: () => import_util_endpoints5.TreeRuleObject, + awsEndpointFunctions: () => awsEndpointFunctions3, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints5.isIpAddress, + partition: () => partition3, + resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, + resolveEndpoint: () => import_util_endpoints5.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + toEndpointV1: () => toEndpointV1, + useDefaultPartitionInfo: () => useDefaultPartitionInfo + }); + module2.exports = __toCommonJS2(index_exports); + var import_util_endpoints5 = require_dist_cjs19(); + var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!(0, import_util_endpoints5.isValidHostLabel)(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, import_util_endpoints5.isIpAddress)(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) return null; + const [arn, partition22, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition22 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition22, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + var partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "AWS Standard global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "AWS China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "AWS ISOE (Europe) global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "AWS ISOF global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "amazonaws.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "EU (Germany)" + } + } + }], + version: "1.1" + }; + var selectedPartitionsInfo = partitions_default; + var selectedUserAgentPrefix = ""; + var partition3 = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition22 of partitions) { + const { regions, outputs } = partition22; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition22 of partitions) { + const { regionRegex, outputs } = partition22; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition22) => partition22.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error( + "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." + ); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; + }, "setPartitionInfo"); + var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); + }, "useDefaultPartitionInfo"); + var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + var awsEndpointFunctions3 = { + isVirtualHostableS3Bucket, + parseArn, + partition: partition3 + }; + import_util_endpoints5.customEndpointFunctions.aws = awsEndpointFunctions3; + var import_url_parser3 = require_dist_cjs21(); + var resolveDefaultAwsRegionalEndpointsConfig = /* @__PURE__ */ __name((input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === void 0) { + input.endpoint = async () => { + return toEndpointV1( + input.endpointProvider( + { + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: void 0 + }, + { logger: input.logger } + ) + ); + }; + } + return input; + }, "resolveDefaultAwsRegionalEndpointsConfig"); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => (0, import_url_parser3.parseUrl)(endpoint.url), "toEndpointV1"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var state2, emitWarningIfUnsupportedVersion; +var init_emitWarningIfUnsupportedVersion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + state2 = { + warningEmitted: false + }; + emitWarningIfUnsupportedVersion = (version3) => { + if (version3 && !state2.warningEmitted && parseInt(version3.substring(1, version3.indexOf("."))) < 18) { + state2.warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature2(context, feature, value) { + if (!context.__aws_sdk_context) { + context.__aws_sdk_context = { + features: {} + }; + } else if (!context.__aws_sdk_context.features) { + context.__aws_sdk_context.features = {}; + } + context.__aws_sdk_context.features[feature] = value; +} +var init_setFeature2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; + } + token.$source[feature] = value; + return token; +} +var init_setTokenFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var client_exports = {}; +__export(client_exports, { + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + setCredentialFeature: () => setCredentialFeature, + setFeature: () => setFeature2, + setTokenFeature: () => setTokenFeature, + state: () => state2 +}); +var init_client = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_emitWarningIfUnsupportedVersion(); + init_setCredentialFeature(); + init_setFeature2(); + init_setTokenFeature(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var import_protocol_http9, getDateHeader; +var init_getDateHeader = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + import_protocol_http9 = __toESM(require_dist_cjs2()); + getDateHeader = (response) => import_protocol_http9.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_getSkewCorrectedDate(); + isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_isClockSkewed(); + getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var import_protocol_http10, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + import_protocol_http10 = __toESM(require_dist_cjs2()); + init_utils(); + throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }; + validateSigningProperties = async (signingProperties) => { + const context = throwSigningPropertyError("context", signingProperties.context); + const config7 = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config7.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config: config7, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }; + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http10.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config: config7, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config7.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config7 = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config7.systemClockOffset; + config7.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config7.systemClockOffset); + const clockSkewCorrected = config7.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config7 = throwSigningPropertyError("config", signingProperties.config); + config7.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config7.systemClockOffset); + } + } + }; + AWSSDKSigV4Signer = AwsSdkSigV4Signer; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var import_protocol_http11, AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + import_protocol_http11 = __toESM(require_dist_cjs2()); + init_utils(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http11.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config: config7, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config7.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config7.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js +var getArrayForCommaSeparatedString; +var init_getArrayForCommaSeparatedString = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js"() { + getArrayForCommaSeparatedString = (str2) => typeof str2 === "string" && str2.length > 0 ? str2.split(",").map((item) => item.trim()) : []; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js +var getBearerTokenEnvKey; +var init_getBearerTokenEnvKey = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() { + getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY, NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; +var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() { + init_getArrayForCommaSeparatedString(); + init_getBearerTokenEnvKey(); + NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; + NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { + environmentVariableSelector: (env2, options) => { + if (options?.signingName) { + const bearerTokenKey = getBearerTokenEnvKey(options.signingName); + if (bearerTokenKey in env2) + return ["httpBearerAuth"]; + } + if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2)) + return void 0; + return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + }, + configFileSelector: (profile) => { + if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) + return void 0; + return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); + }, + default: [] + }; + } +}); + +// node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs23 = __commonJS({ + "node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var ProviderError2 = class _ProviderError extends Error { + constructor(message, options = true) { + let logger5; + let tryNextLink = true; + if (typeof options === "boolean") { + logger5 = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger5 = options.logger; + tryNextLink = options.tryNextLink ?? true; + } + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError.prototype); + logger5?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); + } + static { + __name(this, "ProviderError"); + } + /** + * @deprecated use new operator. + */ + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); + } + }; + var CredentialsProviderError = class _CredentialsProviderError extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError.prototype); + } + static { + __name(this, "CredentialsProviderError"); + } + }; + var TokenProviderError = class _TokenProviderError extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError.prototype); + } + static { + __name(this, "TokenProviderError"); + } + }; + var chain = /* @__PURE__ */ __name((...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_dist_es(); + import_property_provider = __toESM(require_dist_cjs23()); + resolveAwsSdkSigV4AConfig = (config7) => { + config7.sigv4aSigningRegionSet = normalizeProvider(config7.sigv4aSigningRegionSet); + return config7; + }; + NODE_SIGV4A_CONFIG_OPTIONS = { + environmentVariableSelector(env2) { + if (env2.AWS_SIGV4A_SIGNING_REGION_SET) { + return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_8) => _8.trim()); + } + throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + tryNextLink: true + }); + }, + configFileSelector(profile) { + if (profile.sigv4a_signing_region_set) { + return (profile.sigv4a_signing_region_set ?? "").split(",").map((_8) => _8.trim()); + } + throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true + }); + }, + default: void 0 + }; + } +}); + +// node_modules/@smithy/signature-v4/dist-cjs/index.js +var require_dist_cjs24 = __commonJS({ + "node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + ALGORITHM_IDENTIFIER: () => ALGORITHM_IDENTIFIER, + ALGORITHM_IDENTIFIER_V4A: () => ALGORITHM_IDENTIFIER_V4A, + ALGORITHM_QUERY_PARAM: () => ALGORITHM_QUERY_PARAM, + ALWAYS_UNSIGNABLE_HEADERS: () => ALWAYS_UNSIGNABLE_HEADERS, + AMZ_DATE_HEADER: () => AMZ_DATE_HEADER, + AMZ_DATE_QUERY_PARAM: () => AMZ_DATE_QUERY_PARAM, + AUTH_HEADER: () => AUTH_HEADER, + CREDENTIAL_QUERY_PARAM: () => CREDENTIAL_QUERY_PARAM, + DATE_HEADER: () => DATE_HEADER, + EVENT_ALGORITHM_IDENTIFIER: () => EVENT_ALGORITHM_IDENTIFIER, + EXPIRES_QUERY_PARAM: () => EXPIRES_QUERY_PARAM, + GENERATED_HEADERS: () => GENERATED_HEADERS, + HOST_HEADER: () => HOST_HEADER, + KEY_TYPE_IDENTIFIER: () => KEY_TYPE_IDENTIFIER, + MAX_CACHE_SIZE: () => MAX_CACHE_SIZE, + MAX_PRESIGNED_TTL: () => MAX_PRESIGNED_TTL, + PROXY_HEADER_PATTERN: () => PROXY_HEADER_PATTERN, + REGION_SET_PARAM: () => REGION_SET_PARAM, + SEC_HEADER_PATTERN: () => SEC_HEADER_PATTERN, + SHA256_HEADER: () => SHA256_HEADER, + SIGNATURE_HEADER: () => SIGNATURE_HEADER, + SIGNATURE_QUERY_PARAM: () => SIGNATURE_QUERY_PARAM, + SIGNED_HEADERS_QUERY_PARAM: () => SIGNED_HEADERS_QUERY_PARAM, + SignatureV4: () => SignatureV42, + SignatureV4Base: () => SignatureV4Base, + TOKEN_HEADER: () => TOKEN_HEADER, + TOKEN_QUERY_PARAM: () => TOKEN_QUERY_PARAM, + UNSIGNABLE_PATTERNS: () => UNSIGNABLE_PATTERNS, + UNSIGNED_PAYLOAD: () => UNSIGNED_PAYLOAD, + clearCredentialCache: () => clearCredentialCache, + createScope: () => createScope, + getCanonicalHeaders: () => getCanonicalHeaders, + getCanonicalQuery: () => getCanonicalQuery, + getPayloadHash: () => getPayloadHash, + getSigningKey: () => getSigningKey, + hasHeader: () => hasHeader, + moveHeadersToQuery: () => moveHeadersToQuery, + prepareRequest: () => prepareRequest, + signatureV4aContainer: () => signatureV4aContainer + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_utf852 = require_dist_cjs11(); + var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + var REGION_SET_PARAM = "X-Amz-Region-Set"; + var AUTH_HEADER = "authorization"; + var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + var DATE_HEADER = "date"; + var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + var SHA256_HEADER = "x-amz-content-sha256"; + var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + var HOST_HEADER = "host"; + var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + var PROXY_HEADER_PATTERN = /^proxy-/; + var SEC_HEADER_PATTERN = /^sec-/; + var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; + var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; + var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + var MAX_CACHE_SIZE = 50; + var KEY_TYPE_IDENTIFIER = "aws4_request"; + var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var import_util_hex_encoding = require_dist_cjs17(); + var import_util_utf86 = require_dist_cjs11(); + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + var clearCredentialCache = /* @__PURE__ */ __name(() => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }, "clearCredentialCache"); + var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, import_util_utf86.toUint8Array)(data)); + return hash.digest(); + }, "hmac"); + var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + var import_is_array_buffer = require_dist_cjs9(); + var import_util_utf822 = require_dist_cjs11(); + var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, import_util_utf822.toUint8Array)(body)); + return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + var import_util_utf832 = require_dist_cjs11(); + var HeaderFormatter = class { + static { + __name(this, "HeaderFormatter"); + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = (0, import_util_utf832.fromUtf8)(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8( + 0, + 6 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = (0, import_util_utf832.fromUtf8)(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static { + __name(this, "Int64"); + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { + bytes[i5] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + function negate(bytes) { + for (let i5 = 0; i5 < 8; i5++) { + bytes[i5] ^= 255; + } + for (let i5 = 7; i5 > -1; i5--) { + bytes[i5]++; + if (bytes[i5] !== 0) + break; + } + } + __name(negate, "negate"); + var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + var import_protocol_http15 = require_dist_cjs2(); + var moveHeadersToQuery = /* @__PURE__ */ __name((request3, options = {}) => { + const { headers, query = {} } = import_protocol_http15.HttpRequest.clone(request3); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request3, + headers, + query + }; + }, "moveHeadersToQuery"); + var prepareRequest = /* @__PURE__ */ __name((request3) => { + request3 = import_protocol_http15.HttpRequest.clone(request3); + for (const headerName of Object.keys(request3.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request3.headers[headerName]; + } + } + return request3; + }, "prepareRequest"); + var import_util_middleware7 = require_dist_cjs7(); + var import_util_utf842 = require_dist_cjs11(); + var import_util_uri_escape = require_dist_cjs13(); + var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = (0, import_util_uri_escape.escapeUri)(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + var toDate = /* @__PURE__ */ __name((time) => { + if (typeof time === "number") { + return new Date(time * 1e3); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1e3); + } + return new Date(time); + } + return time; + }, "toDate"); + var SignatureV4Base = class { + static { + __name(this, "SignatureV4Base"); + } + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, import_util_middleware7.normalizeProvider)(region); + this.credentialProvider = (0, import_util_middleware7.normalizeProvider)(credentials); + } + createCanonicalRequest(request3, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request3.method} +${this.getCanonicalPath(request3)} +${getCanonicalQuery(request3)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash = new this.sha256(); + hash.update((0, import_util_utf842.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path: path5 }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path5.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path5?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path5?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path5; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) + typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + }; + var SignatureV42 = class extends SignatureV4Base { + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + this.headerFormatter = new HeaderFormatter(); + } + static { + __name(this, "SignatureV4"); + } + async presign(originalRequest, options = {}) { + const { + signingDate = /* @__PURE__ */ new Date(), + expiresIn = 3600, + unsignableHeaders, + unhoistableHeaders, + signableHeaders, + hoistableHeaders, + signingRegion, + signingService + } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject( + "Signature version 4 presigned URLs must have an expiration date less than one week in the future" + ); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request3 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request3.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request3.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request3.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request3.query[AMZ_DATE_QUERY_PARAM] = longDate; + request3.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request3, unsignableHeaders, signableHeaders); + request3.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request3.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request3, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) + ); + return request3; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise = this.signEvent( + { + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, + { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + } + ); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, import_util_utf852.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + async signRequest(requestToSign, { + signingDate = /* @__PURE__ */ new Date(), + signableHeaders, + unsignableHeaders, + signingRegion, + signingService + } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request3 = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request3.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request3.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request3, this.sha256); + if (!hasHeader(SHA256_HEADER, request3.headers) && this.applyChecksum) { + request3.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request3, unsignableHeaders, signableHeaders); + const signature = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request3, canonicalHeaders, payloadHash) + ); + request3.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request3; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign( + longDate, + credentialScope, + canonicalRequest, + ALGORITHM_IDENTIFIER + ); + const hash = new this.sha256(await keyPromise); + hash.update((0, import_util_utf852.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + }; + var signatureV4aContainer = { + SignatureV4a: null + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +function normalizeCredentialProvider(config7, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config7, { + parentClientConfig: config7 + }))); + } else { + credentialsProvider = async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }; + } + } + credentialsProvider.memoized = true; + return credentialsProvider; +} +function bindCallerConfig(config7, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config7 }); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; +} +var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_client(); + init_dist_es(); + import_signature_v4 = __toESM(require_dist_cjs24()); + resolveAwsSdkSigV4Config = (config7) => { + let inputCredentials = config7.credentials; + let isUserSupplied = !!config7.credentials; + let resolvedCredentials = void 0; + Object.defineProperty(config7, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config7, { + credentials: inputCredentials, + credentialDefaultProvider: config7.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config7, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + resolvedCredentials = async (options) => boundProvider(options).then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config7.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config7.systemClockOffset || 0, sha256 } = config7; + let signer; + if (config7.signer) { + signer = normalizeProvider(config7.signer); + } else if (config7.regionInfoProvider) { + signer = () => normalizeProvider(config7.region)().then(async (region) => [ + await config7.regionInfoProvider(region, { + useFipsEndpoint: await config7.useFipsEndpoint(), + useDualstackEndpoint: await config7.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config7.signingRegion = config7.signingRegion || signingRegion || region; + config7.signingName = config7.signingName || signingService || config7.serviceId; + const params = { + ...config7, + credentials: config7.credentials, + region: config7.signingRegion, + service: config7.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config7.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }); + } else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config7.signingName || config7.defaultSigningName, + signingRegion: await normalizeProvider(config7.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config7.signingRegion = config7.signingRegion || signingRegion; + config7.signingName = config7.signingName || signingService || config7.serviceId; + const params = { + ...config7, + credentials: config7.credentials, + region: config7.signingRegion, + service: config7.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config7.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }; + } + const resolvedConfig = Object.assign(config7, { + systemClockOffset, + signingEscapePath, + signer + }); + return resolvedConfig; + }; + resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var httpAuthSchemes_exports = {}; +__export(httpAuthSchemes_exports, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + getBearerTokenEnvKey: () => getBearerTokenEnvKey, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + validateSigningProperties: () => validateSigningProperties +}); +var init_httpAuthSchemes2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_aws_sdk(); + init_getBearerTokenEnvKey(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var _toStr, _toBool, _toNum; +var init_coercing_serializers = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + _toStr = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; + }; + _toBool = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number") { + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; + }; + _toNum = (val) => { + if (val == null) { + return val; + } + if (typeof val === "boolean") { + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; + }; + } +}); + +// node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +var require_dist_cjs25 = __commonJS({ + "node_modules/@smithy/util-body-length-browser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + calculateBodyLength: () => calculateBodyLength7 + }); + module2.exports = __toCommonJS2(src_exports); + var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; + var calculateBodyLength7 = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i5 = len - 1; i5 >= 0; i5--) { + const code = body.charCodeAt(i5); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i5--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +var SerdeContextConfig; +var init_ConfigurableSerdeContext = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() { + SerdeContextConfig = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +function jsonReviver(key, value, context) { + if (context?.source) { + const numericString = context.source; + if (typeof value === "number") { + if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) { + const isFractional = numericString.includes("."); + if (isFractional) { + return new NumericValue2(numericString, "bigDecimal"); + } else { + return BigInt(numericString); + } + } + } + } + return value; +} +var init_jsonReviver = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js"() { + init_serde(); + } +}); + +// node_modules/@smithy/middleware-stack/dist-cjs/index.js +var require_dist_cjs26 = __commonJS({ + "node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + constructStack: () => constructStack + }); + module2.exports = __toCommonJS2(src_exports); + var getAllAliases = /* @__PURE__ */ __name((name, aliases2) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases2) { + for (const alias of aliases2) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases2) => { + return `${name || "anonymous"}${aliases2 && aliases2.length > 0 ? ` (a.k.a. ${aliases2.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a6, b9) => stepWeights[b9.step] - stepWeights[a6.step] || priorityWeights[b9.priority || "normal"] - priorityWeights[a6.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases2 = getAllAliases(entry.name, entry.aliases); + if (aliases2.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases2) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error( + `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` + ); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce( + (wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, + [] + ); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases2 = getAllAliases(name, _aliases); + if (aliases2.length > 0) { + if (aliases2.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases2) { + const toOverrideIndex = absoluteEntries.findIndex( + (entry2) => entry2.name === alias || entry2.aliases?.some((a6) => a6 === alias) + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` + ); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases2) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases2 = getAllAliases(name, _aliases); + if (aliases2.length > 0) { + if (aliases2.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases2) { + const toOverrideIndex = relativeEntries.findIndex( + (entry2) => entry2.name === alias || entry2.aliases?.some((a6) => a6 === alias) + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` + ); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases2) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases2 = getAllAliases(name, _aliases); + for (const alias of aliases2) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) + ); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }, "constructStack"); + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// node_modules/@smithy/smithy-client/dist-cjs/index.js +var require_dist_cjs27 = __commonJS({ + "node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Client: () => Client, + Command: () => Command, + NoOpLogger: () => NoOpLogger3, + SENSITIVE_STRING: () => SENSITIVE_STRING3, + ServiceException: () => ServiceException, + _json: () => _json2, + collectBody: () => import_protocols8.collectBody, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient3, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion4, + extendedEncodeURIComponent: () => import_protocols8.extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration3, + getValueFromTextNode: () => getValueFromTextNode3, + isSerializableHeaderValue: () => isSerializableHeaderValue, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode3, + map: () => map2, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig3, + resolvedPath: () => import_protocols8.resolvedPath, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + take: () => take2, + throwDefaultError: () => throwDefaultError3, + withBaseException: () => withBaseException3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_stack = require_dist_cjs26(); + var Client = class { + constructor(config7) { + this.config = config7; + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + static { + __name(this, "Client"); + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler = handlers.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then( + (result) => callback(null, result.output), + (err) => callback(err) + ).catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { + } + ); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + var import_protocols8 = (init_protocols(), __toCommonJS(protocols_exports)); + var import_types6 = require_dist_cjs(); + var Command = class { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + static { + __name(this, "Command"); + } + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder() { + return new ClassBuilder(); + } + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack, configuration, options, { + middlewareFn, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + smithyContext, + additionalContext, + CommandCtor + }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger5 } = configuration; + const handlerExecutionContext = { + logger: logger5, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types6.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve( + (request3) => requestHandler.handle(request3.request, options || {}), + handlerExecutionContext + ); + } + }; + var ClassBuilder = class { + constructor() { + this._init = () => { + }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_8) => _8; + this._outputFilterSensitiveLog = (_8) => _8; + this._serializer = null; + this._deserializer = null; + } + static { + __name(this, "ClassBuilder"); + } + /** + * Optional init callback. + */ + init(cb) { + this._init = cb; + } + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + /** + * Add any number of middleware. + */ + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + /** + * Set the initial handler execution context Smithy field. + */ + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + /** + * Set the initial handler execution context. + */ + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + /** + * Set constant string identifiers for the operation. + */ + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_8) => _8, outputFilter = (_8) => _8) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; + } + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; + } + /** + * Sets input/output schema for the operation. + */ + sc(operation) { + this._operationSchema = operation; + this._smithyContext.operationSchema = operation; + return this; + } + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + static { + __name(this, "CommandRef"); + } + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; + } + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + }; + } + }; + var SENSITIVE_STRING3 = "***SensitiveInformation***"; + var createAggregatedClient3 = /* @__PURE__ */ __name((commands3, Client2) => { + for (const command of Object.keys(commands3)) { + const CommandCtor = commands3[command]; + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + }, "createAggregatedClient"); + var ServiceException = class _ServiceException extends Error { + static { + __name(this, "ServiceException"); + } + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + /** + * Checks if a value is an instance of ServiceException (duck typed) + */ + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + /** + * Custom instanceof check to support the operator for ServiceException base class + */ + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === _ServiceException) { + return _ServiceException.isInstance(instance); + } + if (_ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v8]) => v8 !== void 0).forEach(([k9, v8]) => { + if (exception[k9] == void 0 || exception[k9] === "") { + exception[k9] = v8; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }, "decorateServiceException"); + var throwDefaultError3 = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata3(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }, "throwDefaultError"); + var withBaseException3 = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError3({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }, "withBaseException"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var loadConfigsForDefaultMode3 = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }, "loadConfigsForDefaultMode"); + var warningEmitted = false; + var emitWarningIfUnsupportedVersion4 = /* @__PURE__ */ __name((version3) => { + if (version3 && !warningEmitted && parseInt(version3.substring(1, version3.indexOf("."))) < 16) { + warningEmitted = true; + } + }, "emitWarningIfUnsupportedVersion"); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types6.AlgorithmId) { + const algorithmId = import_types6.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }, "getRetryConfiguration"); + var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + var getDefaultExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }, "getDefaultExtensionConfiguration"); + var getDefaultClientConfiguration = getDefaultExtensionConfiguration3; + var resolveDefaultRuntimeConfig3 = /* @__PURE__ */ __name((config7) => { + return Object.assign(resolveChecksumRuntimeConfig(config7), resolveRetryRuntimeConfig(config7)); + }, "resolveDefaultRuntimeConfig"); + var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); + var getValueFromTextNode3 = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode3(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { + return value != null; + }, "isSerializableHeaderValue"); + var NoOpLogger3 = class { + static { + __name(this, "NoOpLogger"); + } + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + function map2(arg0, arg1, arg2) { + let target; + let filter2; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter2 = arg1; + instructions = arg2; + return mapWithFilter(target, filter2, instructions); + } else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; + } + __name(map2, "map"); + var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k9, v8] of Object.entries(target || {})) { + output[k9] = [, v8]; + } + return output; + }, "convertMap"); + var take2 = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }, "take"); + var mapWithFilter = /* @__PURE__ */ __name((target, filter2, instructions) => { + return map2( + target, + Object.entries(instructions).reduce( + (_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter2, value()]; + } else { + _instructions[key] = [filter2, value]; + } + } + return _instructions; + }, + {} + ) + ); + }, "mapWithFilter"); + var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter22 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter22 === "function" && filter22(source[sourceKey]) || typeof filter22 !== "function" && !!filter22) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter2, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter2 === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter2 === "function" && !!filter2(void 0) || typeof filter2 !== "function" && !!filter2; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter2 === void 0 && value != null; + const customFilterPassed = typeof filter2 === "function" && !!filter2(value) || typeof filter2 !== "function" && !!filter2; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } + }, "applyInstruction"); + var nonNullish = /* @__PURE__ */ __name((_8) => _8 != null, "nonNullish"); + var pass = /* @__PURE__ */ __name((_8) => _8, "pass"); + var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }, "serializeFloat"); + var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); + var _json2 = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_8) => _8 != null).map(_json2); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json2(obj[key]); + } + return target; + } + return obj; + }, "_json"); + __reExport(src_exports, (init_serde(), __toCommonJS(serde_exports)), module2.exports); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js +var import_smithy_client, collectBodyString; +var init_common = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() { + import_smithy_client = __toESM(require_dist_cjs27()); + collectBodyString = (streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode; +var init_parseJsonBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_common(); + parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e5) { + if (e5?.name === "SyntaxError") { + Object.defineProperty(e5, "$responseBodyText", { + value: encoded + }); + } + throw e5; + } + } + return {}; + }); + parseJsonErrorBody = async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; + }; + loadRestJsonErrorCode = (output, data) => { + const findKey2 = (object, key) => Object.keys(object).find((k9) => k9.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey2(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data && typeof data === "object") { + const codeKey = findKey2(data, "code"); + if (codeKey && data[codeKey] !== void 0) { + return sanitizeErrorCode(data[codeKey]); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); + } + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +var import_util_base643, JsonShapeDeserializer; +var init_JsonShapeDeserializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { + init_schema(); + init_serde(); + import_util_base643 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + init_jsonReviver(); + init_parseJsonBody(); + JsonShapeDeserializer = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + async read(schema, data) { + return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext)); + } + readObject(schema, data) { + return this._read(schema, data); + } + _read(schema, value) { + const isObject3 = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject3) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject3) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const deserializedValue = this._read(memberSchema, value[fromKey]); + if (deserializedValue != null) { + out[memberName] = deserializedValue; + } + } + return out; + } + if (ns.isBlobSchema() && typeof value === "string") { + return (0, import_util_base643.fromBase64)(value); + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString2.from(value); + } + } + if (ns.isTimestampSchema()) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return parseRfc3339DateTimeWithOffset2(value); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return parseRfc7231DateTime2(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return parseEpochTimestamp2(value); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value); + } + } + if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) { + return BigInt(value); + } + if (ns.isBigDecimalSchema() && value != void 0) { + if (value instanceof NumericValue2) { + return value; + } + return new NumericValue2(String(value), "bigDecimal"); + } + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } + } + return value; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +var NUMERIC_CONTROL_CHAR, JsonReplacer; +var init_jsonReplacer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js"() { + init_serde(); + NUMERIC_CONTROL_CHAR = String.fromCharCode(925); + JsonReplacer = class { + values = /* @__PURE__ */ new Map(); + counter = 0; + stage = 0; + createReplacer() { + if (this.stage === 1) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer already created."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 1; + return (key, value) => { + if (value instanceof NumericValue2) { + const v8 = `${NUMERIC_CONTROL_CHAR + +"nv" + this.counter++}_` + value.string; + this.values.set(`"${v8}"`, value.string); + return v8; + } + if (typeof value === "bigint") { + const s4 = value.toString(); + const v8 = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s4; + this.values.set(`"${v8}"`, s4); + return v8; + } + return value; + }; + } + replaceInJson(json) { + if (this.stage === 0) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 2; + if (this.counter === 0) { + return json; + } + for (const [key, value] of this.values) { + json = json.replace(key, value); + } + return json; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +var JsonShapeSerializer; +var init_JsonShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { + init_schema(); + init_serde(); + init_serde(); + init_ConfigurableSerdeContext(); + init_jsonReplacer(); + JsonShapeSerializer = class extends SerdeContextConfig { + settings; + buffer; + rootSchema; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + this.rootSchema = NormalizedSchema.of(schema); + this.buffer = this._write(this.rootSchema, value); + } + flush() { + if (this.rootSchema?.isStructSchema() || this.rootSchema?.isDocumentSchema()) { + const replacer = new JsonReplacer(); + return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); + } + return this.buffer; + } + _write(schema, value, container) { + const isObject3 = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject3) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject3) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const serializableValue = this._write(memberSchema, value[memberName], ns); + if (serializableValue !== void 0) { + out[targetKey] = serializableValue; + } + } + return out; + } + if (value === null && container?.isStructSchema()) { + return void 0; + } + if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) { + if (ns === this.rootSchema) { + return value; + } + if (!this.serdeContext?.base64Encoder) { + throw new Error("Missing base64Encoder in serdeContext"); + } + return this.serdeContext?.base64Encoder(value); + } + if (ns.isTimestampSchema() && value instanceof Date) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return value.toISOString().replace(".000Z", "Z"); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return dateToUtcString2(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return value.getTime() / 1e3; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1e3; + } + } + if (ns.isNumericSchema() && typeof value === "number") { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString2.from(value); + } + } + return value; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +var JsonCodec; +var init_JsonCodec = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() { + init_ConfigurableSerdeContext(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + JsonCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new JsonShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new JsonShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +var import_util_body_length_browser, AwsJsonRpcProtocol; +var init_AwsJsonRpcProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser = __toESM(require_dist_cjs25()); + init_JsonCodec(); + init_parseJsonBody(); + AwsJsonRpcProtocol = class extends RpcProtocol { + serializer; + deserializer; + codec; + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + this.codec = new JsonCodec({ + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS + }, + jsonName: false + }); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + } + async serializeRequest(operationSchema, input, context) { + const request3 = await super.serializeRequest(operationSchema, input, context); + if (!request3.path.endsWith("/")) { + request3.path += "/"; + } + Object.assign(request3.headers, { + "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, + "x-amz-target": (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) + NormalizedSchema.of(operationSchema).getName() + }); + if (deref(operationSchema.input) === "unit" || !request3.body) { + request3.body = "{}"; + } + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(request3.body)); + } catch (e5) { + } + return request3; + } + getPayloadCodec() { + return this.codec; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +var AwsJson1_0Protocol; +var init_AwsJson1_0Protocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() { + init_AwsJsonRpcProtocol(); + AwsJson1_0Protocol = class extends AwsJsonRpcProtocol { + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + } + getShapeId() { + return "aws.protocols#awsJson1_0"; + } + getJsonRpcVersion() { + return "1.0"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +var AwsJson1_1Protocol; +var init_AwsJson1_1Protocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() { + init_AwsJsonRpcProtocol(); + AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + } + getShapeId() { + return "aws.protocols#awsJson1_1"; + } + getJsonRpcVersion() { + return "1.1"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +var import_util_body_length_browser2, AwsRestJsonProtocol; +var init_AwsRestJsonProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser2 = __toESM(require_dist_cjs25()); + init_JsonCodec(); + init_parseJsonBody(); + AwsRestJsonProtocol = class extends HttpBindingProtocol { + serializer; + deserializer; + codec; + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS + }, + httpBindings: true, + jsonName: true + }; + this.codec = new JsonCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getShapeId() { + return "aws.protocols#restJson1"; + } + getPayloadCodec() { + return this.codec; + } + setSerdeContext(serdeContext) { + this.codec.setSerdeContext(serdeContext); + super.setSerdeContext(serdeContext); + } + async serializeRequest(operationSchema, input, context) { + const request3 = await super.serializeRequest(operationSchema, input, context); + const inputSchema = NormalizedSchema.of(operationSchema.input); + const members = inputSchema.getMemberSchemas(); + if (!request3.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m7) => { + return !!m7.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + request3.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request3.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request3.headers["content-type"] = "application/octet-stream"; + } else { + request3.headers["content-type"] = "application/json"; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m7) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m7.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request3.headers["content-type"] = "application/json"; + } + } + } + if (request3.headers["content-type"] && !request3.body) { + request3.body = "{}"; + } + if (request3.body) { + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser2.calculateBodyLength)(request3.body)); + } catch (e5) { + } + } + return request3; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var import_smithy_client2, awsExpectUnion; +var init_awsExpectUnion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + import_smithy_client2 = __toESM(require_dist_cjs27()); + awsExpectUnion = (value) => { + if (value == null) { + return void 0; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, import_smithy_client2.expectUnion)(value); + }; + } +}); + +// node_modules/fast-xml-parser/src/util.js +function getAllMatches(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + allmatches.startIndex = regex.lastIndex - match[0].length; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; +} +function isExist(v8) { + return typeof v8 !== "undefined"; +} +var nameStartChar, nameChar, nameRegexp, regexName, isName; +var init_util = __esm({ + "node_modules/fast-xml-parser/src/util.js"() { + "use strict"; + nameStartChar = ":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"; + nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; + regexName = new RegExp("^" + nameRegexp + "$"); + isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === "undefined"); + }; + } +}); + +// node_modules/fast-xml-parser/src/validator.js +function validate(xmlData, options) { + options = Object.assign({}, defaultOptions2, options); + const tags = []; + let tagFound = false; + let reachedRoot = false; + if (xmlData[0] === "\uFEFF") { + xmlData = xmlData.substr(1); + } + for (let i5 = 0; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<" && xmlData[i5 + 1] === "?") { + i5 += 2; + i5 = readPI(xmlData, i5); + if (i5.err) return i5; + } else if (xmlData[i5] === "<") { + let tagStartPos = i5; + i5++; + if (xmlData[i5] === "!") { + i5 = readCommentAndCDATA(xmlData, i5); + continue; + } else { + let closingTag = false; + if (xmlData[i5] === "/") { + closingTag = true; + i5++; + } + let tagName = ""; + for (; i5 < xmlData.length && xmlData[i5] !== ">" && xmlData[i5] !== " " && xmlData[i5] !== " " && xmlData[i5] !== "\n" && xmlData[i5] !== "\r"; i5++) { + tagName += xmlData[i5]; + } + tagName = tagName.trim(); + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substring(0, tagName.length - 1); + i5--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "Invalid space after '<'."; + } else { + msg = "Tag '" + tagName + "' is an invalid name."; + } + return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i5)); + } + const result = readAttributeStr(xmlData, i5); + if (result === false) { + return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i5)); + } + let attrStr = result.value; + i5 = result.index; + if (attrStr[attrStr.length - 1] === "/") { + const attrStrStart = i5 - attrStr.length; + attrStr = attrStr.substring(0, attrStr.length - 1); + const isValid = validateAttributeString(attrStr, options); + if (isValid === true) { + tagFound = true; + } else { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); + } + } else if (closingTag) { + if (!result.tagClosed) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i5)); + } else if (attrStr.trim().length > 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); + } else if (tags.length === 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); + } else { + const otg = tags.pop(); + if (tagName !== otg.tagName) { + let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); + return getErrorObject( + "InvalidTag", + "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", + getLineNumberForPosition(xmlData, tagStartPos) + ); + } + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i5 - attrStr.length + isValid.err.line)); + } + if (reachedRoot === true) { + return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i5)); + } else if (options.unpairedTags.indexOf(tagName) !== -1) { + } else { + tags.push({ tagName, tagStartPos }); + } + tagFound = true; + } + for (i5++; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + if (xmlData[i5 + 1] === "!") { + i5++; + i5 = readCommentAndCDATA(xmlData, i5); + continue; + } else if (xmlData[i5 + 1] === "?") { + i5 = readPI(xmlData, ++i5); + if (i5.err) return i5; + } else { + break; + } + } else if (xmlData[i5] === "&") { + const afterAmp = validateAmpersand(xmlData, i5); + if (afterAmp == -1) + return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i5)); + i5 = afterAmp; + } else { + if (reachedRoot === true && !isWhiteSpace(xmlData[i5])) { + return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i5)); + } + } + } + if (xmlData[i5] === "<") { + i5--; + } + } + } else { + if (isWhiteSpace(xmlData[i5])) { + continue; + } + return getErrorObject("InvalidChar", "char '" + xmlData[i5] + "' is not expected.", getLineNumberForPosition(xmlData, i5)); + } + } + if (!tagFound) { + return getErrorObject("InvalidXml", "Start tag expected.", 1); + } else if (tags.length == 1) { + return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); + } else if (tags.length > 0) { + return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t4) => t4.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); + } + return true; +} +function isWhiteSpace(char) { + return char === " " || char === " " || char === "\n" || char === "\r"; +} +function readPI(xmlData, i5) { + const start = i5; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] == "?" || xmlData[i5] == " ") { + const tagname = xmlData.substr(start, i5 - start); + if (i5 > 5 && tagname === "xml") { + return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i5)); + } else if (xmlData[i5] == "?" && xmlData[i5 + 1] == ">") { + i5++; + break; + } else { + continue; + } + } + } + return i5; +} +function readCommentAndCDATA(xmlData, i5) { + if (xmlData.length > i5 + 5 && xmlData[i5 + 1] === "-" && xmlData[i5 + 2] === "-") { + for (i5 += 3; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "-" && xmlData[i5 + 1] === "-" && xmlData[i5 + 2] === ">") { + i5 += 2; + break; + } + } + } else if (xmlData.length > i5 + 8 && xmlData[i5 + 1] === "D" && xmlData[i5 + 2] === "O" && xmlData[i5 + 3] === "C" && xmlData[i5 + 4] === "T" && xmlData[i5 + 5] === "Y" && xmlData[i5 + 6] === "P" && xmlData[i5 + 7] === "E") { + let angleBracketsCount = 1; + for (i5 += 8; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + angleBracketsCount++; + } else if (xmlData[i5] === ">") { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } + } + } else if (xmlData.length > i5 + 9 && xmlData[i5 + 1] === "[" && xmlData[i5 + 2] === "C" && xmlData[i5 + 3] === "D" && xmlData[i5 + 4] === "A" && xmlData[i5 + 5] === "T" && xmlData[i5 + 6] === "A" && xmlData[i5 + 7] === "[") { + for (i5 += 8; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "]" && xmlData[i5 + 1] === "]" && xmlData[i5 + 2] === ">") { + i5 += 2; + break; + } + } + } + return i5; +} +function readAttributeStr(xmlData, i5) { + let attrStr = ""; + let startChar = ""; + let tagClosed = false; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === doubleQuote || xmlData[i5] === singleQuote) { + if (startChar === "") { + startChar = xmlData[i5]; + } else if (startChar !== xmlData[i5]) { + } else { + startChar = ""; + } + } else if (xmlData[i5] === ">") { + if (startChar === "") { + tagClosed = true; + break; + } + } + attrStr += xmlData[i5]; + } + if (startChar !== "") { + return false; + } + return { + value: attrStr, + index: i5, + tagClosed + }; +} +function validateAttributeString(attrStr, options) { + const matches = getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + for (let i5 = 0; i5 < matches.length; i5++) { + if (matches[i5][1].length === 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i5][2] + "' has no space in starting.", getPositionFromMatch(matches[i5])); + } else if (matches[i5][3] !== void 0 && matches[i5][4] === void 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i5][2] + "' is without value.", getPositionFromMatch(matches[i5])); + } else if (matches[i5][3] === void 0 && !options.allowBooleanAttributes) { + return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i5][2] + "' is not allowed.", getPositionFromMatch(matches[i5])); + } + const attrName = matches[i5][2]; + if (!validateAttrName(attrName)) { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i5])); + } + if (!attrNames.hasOwnProperty(attrName)) { + attrNames[attrName] = 1; + } else { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i5])); + } + } + return true; +} +function validateNumberAmpersand(xmlData, i5) { + let re3 = /\d/; + if (xmlData[i5] === "x") { + i5++; + re3 = /[\da-fA-F]/; + } + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === ";") + return i5; + if (!xmlData[i5].match(re3)) + break; + } + return -1; +} +function validateAmpersand(xmlData, i5) { + i5++; + if (xmlData[i5] === ";") + return -1; + if (xmlData[i5] === "#") { + i5++; + return validateNumberAmpersand(xmlData, i5); + } + let count = 0; + for (; i5 < xmlData.length; i5++, count++) { + if (xmlData[i5].match(/\w/) && count < 20) + continue; + if (xmlData[i5] === ";") + break; + return -1; + } + return i5; +} +function getErrorObject(code, message, lineNumber) { + return { + err: { + code, + msg: message, + line: lineNumber.line || lineNumber, + col: lineNumber.col + } + }; +} +function validateAttrName(attrName) { + return isName(attrName); +} +function validateTagName(tagname) { + return isName(tagname); +} +function getLineNumberForPosition(xmlData, index) { + const lines = xmlData.substring(0, index).split(/\r?\n/); + return { + line: lines.length, + // column number is last line's length + 1, because column numbering starts at 1: + col: lines[lines.length - 1].length + 1 + }; +} +function getPositionFromMatch(match) { + return match.startIndex + match[1].length; +} +var defaultOptions2, doubleQuote, singleQuote, validAttrStrRegxp; +var init_validator = __esm({ + "node_modules/fast-xml-parser/src/validator.js"() { + "use strict"; + init_util(); + defaultOptions2 = { + allowBooleanAttributes: false, + //A tag can have attributes without any value + unpairedTags: [] + }; + doubleQuote = '"'; + singleQuote = "'"; + validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +var defaultOptions3, buildOptions; +var init_OptionsBuilder = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"() { + defaultOptions3 = { + preserveOrder: false, + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + removeNSPrefix: false, + // remove NS from tag name or attribute name if true + allowBooleanAttributes: false, + //a tag can have attributes without any value + //ignoreRootElement : false, + parseTagValue: true, + parseAttributeValue: false, + trimValues: true, + //Trim string values of tag and attributes + cdataPropName: false, + numberParseOptions: { + hex: true, + leadingZeros: true, + eNotation: true + }, + tagValueProcessor: function(tagName, val) { + return val; + }, + attributeValueProcessor: function(attrName, val) { + return val; + }, + stopNodes: [], + //nested tags will not be parsed even for errors + alwaysCreateTextNode: false, + isArray: () => false, + commentPropName: false, + unpairedTags: [], + processEntities: true, + htmlEntities: false, + ignoreDeclaration: false, + ignorePiTags: false, + transformTagName: false, + transformAttributeName: false, + updateTag: function(tagName, jPath, attrs) { + return tagName; + }, + // skipEmptyListItem: false + captureMetaData: false + }; + buildOptions = function(options) { + return Object.assign({}, defaultOptions3, options); + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +var METADATA_SYMBOL, XmlNode; +var init_xmlNode = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"() { + "use strict"; + if (typeof Symbol !== "function") { + METADATA_SYMBOL = "@@xmlMetadata"; + } else { + METADATA_SYMBOL = Symbol("XML Node Metadata"); + } + XmlNode = class { + constructor(tagname) { + this.tagname = tagname; + this.child = []; + this[":@"] = {}; + } + add(key, val) { + if (key === "__proto__") key = "#__proto__"; + this.child.push({ [key]: val }); + } + addChild(node, startIndex) { + if (node.tagname === "__proto__") node.tagname = "#__proto__"; + if (node[":@"] && Object.keys(node[":@"]).length > 0) { + this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); + } else { + this.child.push({ [node.tagname]: node.child }); + } + if (startIndex !== void 0) { + this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex }; + } + } + /** symbol used for metadata */ + static getMetaDataSymbol() { + return METADATA_SYMBOL; + } + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +function readDocType(xmlData, i5) { + const entities = {}; + if (xmlData[i5 + 3] === "O" && xmlData[i5 + 4] === "C" && xmlData[i5 + 5] === "T" && xmlData[i5 + 6] === "Y" && xmlData[i5 + 7] === "P" && xmlData[i5 + 8] === "E") { + i5 = i5 + 9; + let angleBracketsCount = 1; + let hasBody = false, comment = false; + let exp = ""; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<" && !comment) { + if (hasBody && hasSeq(xmlData, "!ENTITY", i5)) { + i5 += 7; + let entityName, val; + [entityName, val, i5] = readEntityExp(xmlData, i5 + 1); + if (val.indexOf("&") === -1) + entities[entityName] = { + regx: RegExp(`&${entityName};`, "g"), + val + }; + } else if (hasBody && hasSeq(xmlData, "!ELEMENT", i5)) { + i5 += 8; + const { index } = readElementExp(xmlData, i5 + 1); + i5 = index; + } else if (hasBody && hasSeq(xmlData, "!ATTLIST", i5)) { + i5 += 8; + } else if (hasBody && hasSeq(xmlData, "!NOTATION", i5)) { + i5 += 9; + const { index } = readNotationExp(xmlData, i5 + 1); + i5 = index; + } else if (hasSeq(xmlData, "!--", i5)) comment = true; + else throw new Error(`Invalid DOCTYPE`); + angleBracketsCount++; + exp = ""; + } else if (xmlData[i5] === ">") { + if (comment) { + if (xmlData[i5 - 1] === "-" && xmlData[i5 - 2] === "-") { + comment = false; + angleBracketsCount--; + } + } else { + angleBracketsCount--; + } + if (angleBracketsCount === 0) { + break; + } + } else if (xmlData[i5] === "[") { + hasBody = true; + } else { + exp += xmlData[i5]; + } + } + if (angleBracketsCount !== 0) { + throw new Error(`Unclosed DOCTYPE`); + } + } else { + throw new Error(`Invalid Tag instead of DOCTYPE`); + } + return { entities, i: i5 }; +} +function readEntityExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let entityName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5]) && xmlData[i5] !== '"' && xmlData[i5] !== "'") { + entityName += xmlData[i5]; + i5++; + } + validateEntityName(entityName); + i5 = skipWhitespace(xmlData, i5); + if (xmlData.substring(i5, i5 + 6).toUpperCase() === "SYSTEM") { + throw new Error("External entities are not supported"); + } else if (xmlData[i5] === "%") { + throw new Error("Parameter entities are not supported"); + } + let entityValue = ""; + [i5, entityValue] = readIdentifierVal(xmlData, i5, "entity"); + i5--; + return [entityName, entityValue, i5]; +} +function readNotationExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let notationName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5])) { + notationName += xmlData[i5]; + i5++; + } + validateEntityName(notationName); + i5 = skipWhitespace(xmlData, i5); + const identifierType = xmlData.substring(i5, i5 + 6).toUpperCase(); + if (identifierType !== "SYSTEM" && identifierType !== "PUBLIC") { + throw new Error(`Expected SYSTEM or PUBLIC, found "${identifierType}"`); + } + i5 += identifierType.length; + i5 = skipWhitespace(xmlData, i5); + let publicIdentifier = null; + let systemIdentifier = null; + if (identifierType === "PUBLIC") { + [i5, publicIdentifier] = readIdentifierVal(xmlData, i5, "publicIdentifier"); + i5 = skipWhitespace(xmlData, i5); + if (xmlData[i5] === '"' || xmlData[i5] === "'") { + [i5, systemIdentifier] = readIdentifierVal(xmlData, i5, "systemIdentifier"); + } + } else if (identifierType === "SYSTEM") { + [i5, systemIdentifier] = readIdentifierVal(xmlData, i5, "systemIdentifier"); + if (!systemIdentifier) { + throw new Error("Missing mandatory system identifier for SYSTEM notation"); + } + } + return { notationName, publicIdentifier, systemIdentifier, index: --i5 }; +} +function readIdentifierVal(xmlData, i5, type2) { + let identifierVal = ""; + const startChar = xmlData[i5]; + if (startChar !== '"' && startChar !== "'") { + throw new Error(`Expected quoted string, found "${startChar}"`); + } + i5++; + while (i5 < xmlData.length && xmlData[i5] !== startChar) { + identifierVal += xmlData[i5]; + i5++; + } + if (xmlData[i5] !== startChar) { + throw new Error(`Unterminated ${type2} value`); + } + i5++; + return [i5, identifierVal]; +} +function readElementExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let elementName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5])) { + elementName += xmlData[i5]; + i5++; + } + if (!validateEntityName(elementName)) { + throw new Error(`Invalid element name: "${elementName}"`); + } + i5 = skipWhitespace(xmlData, i5); + let contentModel = ""; + if (xmlData[i5] === "E" && hasSeq(xmlData, "MPTY", i5)) i5 += 4; + else if (xmlData[i5] === "A" && hasSeq(xmlData, "NY", i5)) i5 += 2; + else if (xmlData[i5] === "(") { + i5++; + while (i5 < xmlData.length && xmlData[i5] !== ")") { + contentModel += xmlData[i5]; + i5++; + } + if (xmlData[i5] !== ")") { + throw new Error("Unterminated content model"); + } + } else { + throw new Error(`Invalid Element Expression, found "${xmlData[i5]}"`); + } + return { + elementName, + contentModel: contentModel.trim(), + index: i5 + }; +} +function hasSeq(data, seq, i5) { + for (let j6 = 0; j6 < seq.length; j6++) { + if (seq[j6] !== data[i5 + j6 + 1]) return false; + } + return true; +} +function validateEntityName(name) { + if (isName(name)) + return name; + else + throw new Error(`Invalid entity name ${name}`); +} +var skipWhitespace; +var init_DocTypeReader = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"() { + init_util(); + skipWhitespace = (data, index) => { + while (index < data.length && /\s/.test(data[index])) { + index++; + } + return index; + }; + } +}); + +// node_modules/strnum/strnum.js +function toNumber(str2, options = {}) { + options = Object.assign({}, consider, options); + if (!str2 || typeof str2 !== "string") return str2; + let trimmedStr = str2.trim(); + if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; + else if (str2 === "0") return 0; + else if (options.hex && hexRegex.test(trimmedStr)) { + return parse_int(trimmedStr, 16); + } else if (trimmedStr.search(/.+[eE].+/) !== -1) { + return resolveEnotation(str2, trimmedStr, options); + } else { + const match = numRegex.exec(trimmedStr); + if (match) { + const sign = match[1] || ""; + const leadingZeros = match[2]; + let numTrimmedByZeros = trimZeros(match[3]); + const decimalAdjacentToLeadingZeros = sign ? ( + // 0., -00., 000. + str2[leadingZeros.length + 1] === "." + ) : str2[leadingZeros.length] === "."; + if (!options.leadingZeros && (leadingZeros.length > 1 || leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros)) { + return str2; + } else { + const num = Number(trimmedStr); + const parsedStr = String(num); + if (num === 0) return num; + if (parsedStr.search(/[eE]/) !== -1) { + if (options.eNotation) return num; + else return str2; + } else if (trimmedStr.indexOf(".") !== -1) { + if (parsedStr === "0") return num; + else if (parsedStr === numTrimmedByZeros) return num; + else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num; + else return str2; + } + let n4 = leadingZeros ? numTrimmedByZeros : trimmedStr; + if (leadingZeros) { + return n4 === parsedStr || sign + n4 === parsedStr ? num : str2; + } else { + return n4 === parsedStr || n4 === sign + parsedStr ? num : str2; + } + } + } else { + return str2; + } + } +} +function resolveEnotation(str2, trimmedStr, options) { + if (!options.eNotation) return str2; + const notation = trimmedStr.match(eNotationRegx); + if (notation) { + let sign = notation[1] || ""; + const eChar = notation[3].indexOf("e") === -1 ? "E" : "e"; + const leadingZeros = notation[2]; + const eAdjacentToLeadingZeros = sign ? ( + // 0E. + str2[leadingZeros.length + 1] === eChar + ) : str2[leadingZeros.length] === eChar; + if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str2; + else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) { + return Number(trimmedStr); + } else if (options.leadingZeros && !eAdjacentToLeadingZeros) { + trimmedStr = (notation[1] || "") + notation[3]; + return Number(trimmedStr); + } else return str2; + } else { + return str2; + } +} +function trimZeros(numStr) { + if (numStr && numStr.indexOf(".") !== -1) { + numStr = numStr.replace(/0+$/, ""); + if (numStr === ".") numStr = "0"; + else if (numStr[0] === ".") numStr = "0" + numStr; + else if (numStr[numStr.length - 1] === ".") numStr = numStr.substring(0, numStr.length - 1); + return numStr; + } + return numStr; +} +function parse_int(numStr, base) { + if (parseInt) return parseInt(numStr, base); + else if (Number.parseInt) return Number.parseInt(numStr, base); + else if (window && window.parseInt) return window.parseInt(numStr, base); + else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); +} +var hexRegex, numRegex, consider, eNotationRegx; +var init_strnum = __esm({ + "node_modules/strnum/strnum.js"() { + hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; + numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/; + consider = { + hex: true, + // oct: false, + leadingZeros: true, + decimalPoint: ".", + eNotation: true + //skipLike: /regex/ + }; + eNotationRegx = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + } +}); + +// node_modules/fast-xml-parser/src/ignoreAttributes.js +function getIgnoreAttributesFn(ignoreAttributes) { + if (typeof ignoreAttributes === "function") { + return ignoreAttributes; + } + if (Array.isArray(ignoreAttributes)) { + return (attrName) => { + for (const pattern of ignoreAttributes) { + if (typeof pattern === "string" && attrName === pattern) { + return true; + } + if (pattern instanceof RegExp && pattern.test(attrName)) { + return true; + } + } + }; + } + return () => false; +} +var init_ignoreAttributes = __esm({ + "node_modules/fast-xml-parser/src/ignoreAttributes.js"() { + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +function addExternalEntities(externalEntities) { + const entKeys = Object.keys(externalEntities); + for (let i5 = 0; i5 < entKeys.length; i5++) { + const ent = entKeys[i5]; + this.lastEntities[ent] = { + regex: new RegExp("&" + ent + ";", "g"), + val: externalEntities[ent] + }; + } +} +function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + if (val !== void 0) { + if (this.options.trimValues && !dontTrim) { + val = val.trim(); + } + if (val.length > 0) { + if (!escapeEntities) val = this.replaceEntitiesValue(val); + const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); + if (newval === null || newval === void 0) { + return val; + } else if (typeof newval !== typeof val || newval !== val) { + return newval; + } else if (this.options.trimValues) { + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + } else { + const trimmedVal = val.trim(); + if (trimmedVal === val) { + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + } else { + return val; + } + } + } + } +} +function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(":"); + const prefix = tagname.charAt(0) === "/" ? "/" : ""; + if (tags[0] === "xmlns") { + return ""; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; +} +function buildAttributesMap(attrStr, jPath, tagName) { + if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { + const matches = getAllMatches(attrStr, attrsRegx); + const len = matches.length; + const attrs = {}; + for (let i5 = 0; i5 < len; i5++) { + const attrName = this.resolveNameSpace(matches[i5][1]); + if (this.ignoreAttributesFn(attrName, jPath)) { + continue; + } + let oldVal = matches[i5][4]; + let aName = this.options.attributeNamePrefix + attrName; + if (attrName.length) { + if (this.options.transformAttributeName) { + aName = this.options.transformAttributeName(aName); + } + if (aName === "__proto__") aName = "#__proto__"; + if (oldVal !== void 0) { + if (this.options.trimValues) { + oldVal = oldVal.trim(); + } + oldVal = this.replaceEntitiesValue(oldVal); + const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); + if (newVal === null || newVal === void 0) { + attrs[aName] = oldVal; + } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { + attrs[aName] = newVal; + } else { + attrs[aName] = parseValue( + oldVal, + this.options.parseAttributeValue, + this.options.numberParseOptions + ); + } + } else if (this.options.allowBooleanAttributes) { + attrs[aName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (this.options.attributesGroupName) { + const attrCollection = {}; + attrCollection[this.options.attributesGroupName] = attrs; + return attrCollection; + } + return attrs; + } +} +function addChild(currentNode, childNode, jPath, startIndex) { + if (!this.options.captureMetaData) startIndex = void 0; + const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); + if (result === false) { + } else if (typeof result === "string") { + childNode.tagname = result; + currentNode.addChild(childNode, startIndex); + } else { + currentNode.addChild(childNode, startIndex); + } +} +function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { + if (textData) { + if (isLeafNode === void 0) isLeafNode = currentNode.child.length === 0; + textData = this.parseTextData( + textData, + currentNode.tagname, + jPath, + false, + currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, + isLeafNode + ); + if (textData !== void 0 && textData !== "") + currentNode.add(this.options.textNodeName, textData); + textData = ""; + } + return textData; +} +function isItStopNode(stopNodes, jPath, currentTagName) { + const allNodesExp = "*." + currentTagName; + for (const stopNodePath in stopNodes) { + const stopNodeExp = stopNodes[stopNodePath]; + if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; + } + return false; +} +function tagExpWithClosingIndex(xmlData, i5, closingChar = ">") { + let attrBoundary; + let tagExp = ""; + for (let index = i5; index < xmlData.length; index++) { + let ch = xmlData[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = ""; + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === closingChar[0]) { + if (closingChar[1]) { + if (xmlData[index + 1] === closingChar[1]) { + return { + data: tagExp, + index + }; + } + } else { + return { + data: tagExp, + index + }; + } + } else if (ch === " ") { + ch = " "; + } + tagExp += ch; + } +} +function findClosingIndex(xmlData, str2, i5, errMsg) { + const closingIndex = xmlData.indexOf(str2, i5); + if (closingIndex === -1) { + throw new Error(errMsg); + } else { + return closingIndex + str2.length - 1; + } +} +function readTagExp(xmlData, i5, removeNSPrefix, closingChar = ">") { + const result = tagExpWithClosingIndex(xmlData, i5 + 1, closingChar); + if (!result) return; + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.search(/\s/); + let tagName = tagExp; + let attrExpPresent = true; + if (separatorIndex !== -1) { + tagName = tagExp.substring(0, separatorIndex); + tagExp = tagExp.substring(separatorIndex + 1).trimStart(); + } + const rawTagName = tagName; + if (removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + attrExpPresent = tagName !== result.data.substr(colonIndex + 1); + } + } + return { + tagName, + tagExp, + closeIndex, + attrExpPresent, + rawTagName + }; +} +function readStopNodeData(xmlData, tagName, i5) { + const startIndex = i5; + let openTagCount = 1; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + if (xmlData[i5 + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i5, `${tagName} is not closed`); + let closeTagName = xmlData.substring(i5 + 2, closeIndex).trim(); + if (closeTagName === tagName) { + openTagCount--; + if (openTagCount === 0) { + return { + tagContent: xmlData.substring(startIndex, i5), + i: closeIndex + }; + } + } + i5 = closeIndex; + } else if (xmlData[i5 + 1] === "?") { + const closeIndex = findClosingIndex(xmlData, "?>", i5 + 1, "StopNode is not closed."); + i5 = closeIndex; + } else if (xmlData.substr(i5 + 1, 3) === "!--") { + const closeIndex = findClosingIndex(xmlData, "-->", i5 + 3, "StopNode is not closed."); + i5 = closeIndex; + } else if (xmlData.substr(i5 + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i5, "StopNode is not closed.") - 2; + i5 = closeIndex; + } else { + const tagData = readTagExp(xmlData, i5, ">"); + if (tagData) { + const openTagName = tagData && tagData.tagName; + if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { + openTagCount++; + } + i5 = tagData.closeIndex; + } + } + } + } +} +function parseValue(val, shouldParse, options) { + if (shouldParse && typeof val === "string") { + const newval = val.trim(); + if (newval === "true") return true; + else if (newval === "false") return false; + else return toNumber(val, options); + } else { + if (isExist(val)) { + return val; + } else { + return ""; + } + } +} +var OrderedObjParser, attrsRegx, parseXml, replaceEntitiesValue; +var init_OrderedObjParser = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"() { + "use strict"; + init_util(); + init_xmlNode(); + init_DocTypeReader(); + init_strnum(); + init_ignoreAttributes(); + OrderedObjParser = class { + constructor(options) { + this.options = options; + 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: " " }, + // "lt" : { regex: /&(lt|#60);/g, val: "<" }, + // "gt" : { regex: /&(gt|#62);/g, val: ">" }, + // "amp" : { regex: /&(amp|#38);/g, val: "&" }, + // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, + // "apos" : { regex: /&(apos|#39);/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: (_8, str2) => String.fromCodePoint(Number.parseInt(str2, 10)) }, + "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_8, str2) => String.fromCodePoint(Number.parseInt(str2, 16)) } + }; + this.addExternalEntities = addExternalEntities; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; + this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); + } + }; + attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + parseXml = function(xmlData) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + const xmlObj = new XmlNode("!xml"); + let currentNode = xmlObj; + let textData = ""; + let jPath = ""; + for (let i5 = 0; i5 < xmlData.length; i5++) { + const ch = xmlData[i5]; + if (ch === "<") { + if (xmlData[i5 + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i5, "Closing Tag is not closed."); + let tagName = xmlData.substring(i5 + 2, closeIndex).trim(); + if (this.options.removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + } + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode) { + textData = this.saveTextToParentTag(textData, currentNode, jPath); + } + const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); + if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { + throw new Error(`Unpaired tag can not be used as closing tag: `); + } + let propIndex = 0; + if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { + propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); + this.tagsNodeStack.pop(); + } else { + propIndex = jPath.lastIndexOf("."); + } + jPath = jPath.substring(0, propIndex); + currentNode = this.tagsNodeStack.pop(); + textData = ""; + i5 = closeIndex; + } else if (xmlData[i5 + 1] === "?") { + let tagData = readTagExp(xmlData, i5, false, "?>"); + if (!tagData) throw new Error("Pi Tag is not closed."); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { + } else { + const childNode = new XmlNode(tagData.tagName); + childNode.add(this.options.textNodeName, ""); + if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); + } + this.addChild(currentNode, childNode, jPath, i5); + } + i5 = tagData.closeIndex + 1; + } else if (xmlData.substr(i5 + 1, 3) === "!--") { + const endIndex = findClosingIndex(xmlData, "-->", i5 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const comment = xmlData.substring(i5 + 4, endIndex - 2); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); + } + i5 = endIndex; + } else if (xmlData.substr(i5 + 1, 2) === "!D") { + const result = readDocType(xmlData, i5); + this.docTypeEntities = result.entities; + i5 = result.i; + } else if (xmlData.substr(i5 + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i5, "CDATA is not closed.") - 2; + const tagExp = xmlData.substring(i5 + 9, closeIndex); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); + if (val == void 0) val = ""; + if (this.options.cdataPropName) { + currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + } else { + currentNode.add(this.options.textNodeName, val); + } + i5 = closeIndex + 2; + } else { + let result = readTagExp(xmlData, i5, this.options.removeNSPrefix); + let tagName = result.tagName; + const rawTagName = result.rawTagName; + let tagExp = result.tagExp; + let attrExpPresent = result.attrExpPresent; + let closeIndex = result.closeIndex; + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode && textData) { + if (currentNode.tagname !== "!xml") { + textData = this.saveTextToParentTag(textData, currentNode, jPath, false); + } + } + const lastTag = currentNode; + if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { + currentNode = this.tagsNodeStack.pop(); + jPath = jPath.substring(0, jPath.lastIndexOf(".")); + } + if (tagName !== xmlObj.tagname) { + jPath += jPath ? "." + tagName : tagName; + } + const startIndex = i5; + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { + let tagContent = ""; + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + i5 = result.closeIndex; + } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { + i5 = result.closeIndex; + } else { + const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); + if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); + i5 = result2.i; + tagContent = result2.tagContent; + } + const childNode = new XmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + if (tagContent) { + tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); + } + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + childNode.add(this.options.textNodeName, tagContent); + this.addChild(currentNode, childNode, jPath, startIndex); + } else { + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + const childNode = new XmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath, startIndex); + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + } else { + const childNode = new XmlNode(tagName); + this.tagsNodeStack.push(currentNode); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath, startIndex); + currentNode = childNode; + } + textData = ""; + i5 = closeIndex; + } + } + } else { + textData += xmlData[i5]; + } + } + return xmlObj.child; + }; + replaceEntitiesValue = function(val) { + if (this.options.processEntities) { + for (let entityName in this.docTypeEntities) { + const entity = this.docTypeEntities[entityName]; + val = val.replace(entity.regx, entity.val); + } + for (let entityName in this.lastEntities) { + const entity = this.lastEntities[entityName]; + val = val.replace(entity.regex, entity.val); + } + if (this.options.htmlEntities) { + for (let entityName in this.htmlEntities) { + const entity = this.htmlEntities[entityName]; + val = val.replace(entity.regex, entity.val); + } + } + val = val.replace(this.ampEntity.regex, this.ampEntity.val); + } + return val; + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/node2json.js +function prettify(node, options) { + return compress(node, options); +} +function compress(arr, options, jPath) { + let text; + const compressedObj = {}; + for (let i5 = 0; i5 < arr.length; i5++) { + const tagObj = arr[i5]; + const property = propName(tagObj); + let newJpath = ""; + if (jPath === void 0) newJpath = property; + else newJpath = jPath + "." + property; + if (property === options.textNodeName) { + if (text === void 0) text = tagObj[property]; + else text += "" + tagObj[property]; + } else if (property === void 0) { + continue; + } else if (tagObj[property]) { + let val = compress(tagObj[property], options, newJpath); + const isLeaf = isLeafTag(val, options); + if (tagObj[METADATA_SYMBOL2] !== void 0) { + val[METADATA_SYMBOL2] = tagObj[METADATA_SYMBOL2]; + } + if (tagObj[":@"]) { + assignAttributes(val, tagObj[":@"], newJpath, options); + } else if (Object.keys(val).length === 1 && val[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { + val = val[options.textNodeName]; + } else if (Object.keys(val).length === 0) { + if (options.alwaysCreateTextNode) val[options.textNodeName] = ""; + else val = ""; + } + if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { + if (!Array.isArray(compressedObj[property])) { + compressedObj[property] = [compressedObj[property]]; + } + compressedObj[property].push(val); + } else { + if (options.isArray(property, newJpath, isLeaf)) { + compressedObj[property] = [val]; + } else { + compressedObj[property] = val; + } + } + } + } + if (typeof text === "string") { + if (text.length > 0) compressedObj[options.textNodeName] = text; + } else if (text !== void 0) compressedObj[options.textNodeName] = text; + return compressedObj; +} +function propName(obj) { + const keys = Object.keys(obj); + for (let i5 = 0; i5 < keys.length; i5++) { + const key = keys[i5]; + if (key !== ":@") return key; + } +} +function assignAttributes(obj, attrMap, jpath, options) { + if (attrMap) { + const keys = Object.keys(attrMap); + const len = keys.length; + for (let i5 = 0; i5 < len; i5++) { + const atrrName = keys[i5]; + if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { + obj[atrrName] = [attrMap[atrrName]]; + } else { + obj[atrrName] = attrMap[atrrName]; + } + } + } +} +function isLeafTag(obj, options) { + const { textNodeName } = options; + const propCount = Object.keys(obj).length; + if (propCount === 0) { + return true; + } + if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { + return true; + } + return false; +} +var METADATA_SYMBOL2; +var init_node2json = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/node2json.js"() { + "use strict"; + init_xmlNode(); + METADATA_SYMBOL2 = XmlNode.getMetaDataSymbol(); + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +var XMLParser; +var init_XMLParser = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"() { + init_OptionsBuilder(); + init_OrderedObjParser(); + init_node2json(); + init_validator(); + init_xmlNode(); + XMLParser = class { + constructor(options) { + this.externalEntities = {}; + this.options = buildOptions(options); + } + /** + * Parse XML dats to JS object + * @param {string|Buffer} xmlData + * @param {boolean|Object} validationOption + */ + parse(xmlData, validationOption) { + if (typeof xmlData === "string") { + } else if (xmlData.toString) { + xmlData = xmlData.toString(); + } else { + throw new Error("XML data is accepted in String or Bytes[] form."); + } + if (validationOption) { + if (validationOption === true) validationOption = {}; + const result = validate(xmlData, validationOption); + if (result !== true) { + throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); + } + } + const orderedObjParser = new OrderedObjParser(this.options); + orderedObjParser.addExternalEntities(this.externalEntities); + const orderedResult = orderedObjParser.parseXml(xmlData); + if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; + else return prettify(orderedResult, this.options); + } + /** + * Add Entity which is not by default supported by this library + * @param {string} key + * @param {string} value + */ + addEntity(key, value) { + if (value.indexOf("&") !== -1) { + throw new Error("Entity value can't have '&'"); + } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { + throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + } else if (value === "&") { + throw new Error("An entity with value '&' is not permitted"); + } else { + this.externalEntities[key] = value; + } + } + /** + * Returns a Symbol that can be used to access the metadata + * property on a node. + * + * If Symbol is not available in the environment, an ordinary property is used + * and the name of the property is here returned. + * + * The XMLMetaData property is only present when `captureMetaData` + * is true in the options. + */ + static getMetaDataSymbol() { + return XmlNode.getMetaDataSymbol(); + } + }; + } +}); + +// node_modules/fast-xml-parser/src/fxp.js +var init_fxp = __esm({ + "node_modules/fast-xml-parser/src/fxp.js"() { + "use strict"; + init_XMLParser(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +var import_smithy_client3, import_util_utf83, XmlShapeDeserializer; +var init_XmlShapeDeserializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { + init_protocols(); + init_schema(); + import_smithy_client3 = __toESM(require_dist_cjs27()); + import_util_utf83 = __toESM(require_dist_cjs11()); + init_fxp(); + init_ConfigurableSerdeContext(); + XmlShapeDeserializer = class extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf83.toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + const traits = ns.getMergedTraits(); + const schema = ns.getSchema(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(schema, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const sparse = !!traits.sparse; + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer2 = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v8 of sourceArray) { + if (v8 != null || sparse) { + buffer2.push(this.readSchema(listValue, v8)); + } + } + return buffer2; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value2 = entry[valueProperty]; + if (value2 != null || sparse) { + buffer[key] = this.readSchema(memberNs, value2); + } + } + return buffer; + } + if (ns.isStructSchema()) { + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } else { + if (ns.isListSchema()) { + return []; + } else if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + } + parseXml(xml) { + if (xml.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_8, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(xml, true); + } catch (e5) { + if (e5 && typeof e5 === "object") { + Object.defineProperty(e5, "$responseBodyText", { + value: xml + }); + } + throw e5; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn); + } + return {}; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +var import_smithy_client4, import_util_base644, QueryShapeSerializer; +var init_QueryShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { + init_protocols(); + init_schema(); + init_serde(); + import_smithy_client4 = __toESM(require_dist_cjs27()); + import_util_base644 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + QueryShapeSerializer = class extends SerdeContextConfig { + settings; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value, prefix = "") { + if (this.buffer === void 0) { + this.buffer = ""; + } + const ns = NormalizedSchema.of(schema); + if (prefix && !prefix.endsWith(".")) { + prefix += "."; + } + if (ns.isBlobSchema()) { + if (typeof value === "string" || value instanceof Uint8Array) { + this.writeKey(prefix); + this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base644.toBase64)(value)); + } + } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigIntegerSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigDecimalSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(value instanceof NumericValue2 ? value.string : String(value)); + } + } else if (ns.isTimestampSchema()) { + if (value instanceof Date) { + this.writeKey(prefix); + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + this.writeValue(value.toISOString().replace(".000Z", "Z")); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + this.writeValue((0, import_smithy_client4.dateToUtcString)(value)); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + this.writeValue(String(value.getTime() / 1e3)); + break; + } + } + } else if (ns.isDocumentSchema()) { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + } else if (ns.isListSchema()) { + if (Array.isArray(value)) { + if (value.length === 0) { + if (this.settings.serializeEmptyLists) { + this.writeKey(prefix); + this.writeValue(""); + } + } else { + const member = ns.getValueSchema(); + const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened; + let i5 = 1; + for (const item of value) { + if (item == null) { + continue; + } + const suffix = this.getKey("member", member.getMergedTraits().xmlName); + const key = flat ? `${prefix}${i5}` : `${prefix}${suffix}.${i5}`; + this.write(member, item, key); + ++i5; + } + } + } + } else if (ns.isMapSchema()) { + if (value && typeof value === "object") { + const keySchema = ns.getKeySchema(); + const memberSchema = ns.getValueSchema(); + const flat = ns.getMergedTraits().xmlFlattened; + let i5 = 1; + for (const [k9, v8] of Object.entries(value)) { + if (v8 == null) { + continue; + } + const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); + const key = flat ? `${prefix}${i5}.${keySuffix}` : `${prefix}entry.${i5}.${keySuffix}`; + const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); + const valueKey = flat ? `${prefix}${i5}.${valueSuffix}` : `${prefix}entry.${i5}.${valueSuffix}`; + this.write(keySchema, k9, key); + this.write(memberSchema, v8, valueKey); + ++i5; + } + } + } else if (ns.isStructSchema()) { + if (value && typeof value === "object") { + for (const [memberName, member] of ns.structIterator()) { + if (value[memberName] == null) { + continue; + } + const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); + const key = `${prefix}${suffix}`; + this.write(member, value[memberName], key); + } + } + } else if (ns.isUnitSchema()) { + } else { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); + } + } + flush() { + if (this.buffer === void 0) { + throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer."); + } + const str2 = this.buffer; + delete this.buffer; + return str2; + } + getKey(memberName, xmlName) { + const key = xmlName ?? memberName; + if (this.settings.capitalizeKeys) { + return key[0].toUpperCase() + key.slice(1); + } + return key; + } + writeKey(key) { + if (key.endsWith(".")) { + key = key.slice(0, key.length - 1); + } + this.buffer += `&${extendedEncodeURIComponent2(key)}=`; + } + writeValue(value) { + this.buffer += extendedEncodeURIComponent2(value); + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +var import_util_body_length_browser3, AwsQueryProtocol; +var init_AwsQueryProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser3 = __toESM(require_dist_cjs25()); + init_XmlShapeDeserializer(); + init_QueryShapeSerializer(); + AwsQueryProtocol = class extends RpcProtocol { + options; + serializer; + deserializer; + constructor(options) { + super({ + defaultNamespace: options.defaultNamespace + }); + this.options = options; + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME + }, + httpBindings: false, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace, + serializeEmptyLists: true + }; + this.serializer = new QueryShapeSerializer(settings); + this.deserializer = new XmlShapeDeserializer(settings); + } + getShapeId() { + return "aws.protocols#awsQuery"; + } + setSerdeContext(serdeContext) { + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + } + getPayloadCodec() { + throw new Error("AWSQuery protocol has no payload codec."); + } + async serializeRequest(operationSchema, input, context) { + const request3 = await super.serializeRequest(operationSchema, input, context); + if (!request3.path.endsWith("/")) { + request3.path += "/"; + } + Object.assign(request3.headers, { + "content-type": `application/x-www-form-urlencoded` + }); + if (deref(operationSchema.input) === "unit" || !request3.body) { + request3.body = ""; + } + request3.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request3.body; + if (request3.body.endsWith("&")) { + request3.body = request3.body.slice(-1); + } + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser3.calculateBodyLength)(request3.body)); + } catch (e5) { + } + return request3; + } + async deserializeResponse(operationSchema, context, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes2 = await collectBody2(response.body, context); + if (bytes2.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes2)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : void 0; + const bytes = await collectBody2(response.body, context); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + useNestedResult() { + return true; + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorDataSource = this.loadQueryError(dataObject); + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + if (!errorSchema) { + errorSchema = registry.getSchema(errorIdentifier); + } + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), errorDataSource); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = this.loadQueryErrorMessage(dataObject); + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = errorDataSource[target] ?? dataObject[target]; + output[name] = this.deserializer.readSchema(member, value); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + loadQueryErrorCode(output, data) { + const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code; + if (code !== void 0) { + return code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + } + loadQueryError(data) { + return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error; + } + loadQueryErrorMessage(data) { + const errorData = this.loadQueryError(data); + return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +var AwsEc2QueryProtocol; +var init_AwsEc2QueryProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() { + init_AwsQueryProtocol(); + AwsEc2QueryProtocol = class extends AwsQueryProtocol { + options; + constructor(options) { + super(options); + this.options = options; + const ec2Settings = { + capitalizeKeys: true, + flattenLists: true, + serializeEmptyLists: false + }; + Object.assign(this.serializer.settings, ec2Settings); + } + useNestedResult() { + return false; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var import_smithy_client5, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + import_smithy_client5 = __toESM(require_dist_cjs27()); + init_fxp(); + init_common(); + parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_8, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded, true); + } catch (e5) { + if (e5 && typeof e5 === "object") { + Object.defineProperty(e5, "$responseBodyText", { + value: encoded + }); + } + throw e5; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client5.getValueFromTextNode)(parsedObjToReturn); + } + return {}; + }); + parseXmlErrorBody = async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; + }; + loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +var require_dist_cjs28 = __commonJS({ + "node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + XmlNode: () => XmlNode3, + XmlText: () => XmlText2 + }); + module2.exports = __toCommonJS2(index_exports); + function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); + } + __name(escapeAttribute, "escapeAttribute"); + function escapeElement(value) { + return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); + } + __name(escapeElement, "escapeElement"); + var XmlText2 = class { + constructor(value) { + this.value = value; + } + static { + __name(this, "XmlText"); + } + toString() { + return escapeElement("" + this.value); + } + }; + var XmlNode3 = class _XmlNode { + constructor(name, children = []) { + this.name = name; + this.children = children; + } + static { + __name(this, "XmlNode"); + } + attributes = {}; + static of(name, childText, withName) { + const node = new _XmlNode(name); + if (childText !== void 0) { + node.addChildNode(new XmlText2(childText)); + } + if (withName !== void 0) { + node.withName(withName); + } + return node; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + /** + * @internal + * Alias of {@link XmlNode#withName(string)} for codegen brevity. + */ + n(name) { + this.name = name; + return this; + } + /** + * @internal + * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. + */ + c(child) { + this.children.push(child); + return this; + } + /** + * @internal + * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. + */ + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + /** + * Create a child node. + * Used in serialization of string fields. + * @internal + */ + cc(input, field, withName = field) { + if (input[field] != null) { + const node = _XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + /** + * Creates list child nodes. + * @internal + */ + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + /** + * Creates list child nodes with container. + * @internal + */ + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new _XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren ? "/>" : `>${this.children.map((c5) => c5.toString()).join("")}`; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +var import_xml_builder, import_smithy_client6, import_util_base645, XmlShapeSerializer; +var init_XmlShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { + import_xml_builder = __toESM(require_dist_cjs28()); + init_schema(); + init_serde(); + import_smithy_client6 = __toESM(require_dist_cjs27()); + import_util_base645 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + XmlShapeSerializer = class extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base645.fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, void 0); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== void 0) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== void 0) { + const str2 = this.stringBuffer; + delete this.stringBuffer; + return str2; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = import_xml_builder.XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = import_xml_builder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + return structXmlNode; + } + writeList(listMember, array, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = (container2, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container2, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = import_xml_builder.XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container2.addChildNode(listItemNode); + } + }; + if (flat) { + for (const value of array) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = import_xml_builder.XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = (entry, key, val) => { + const keyNode = import_xml_builder.XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = import_xml_builder.XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }; + if (flat) { + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = import_xml_builder.XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + nodeContents = (0, import_smithy_client6.dateToUtcString)(value); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + nodeContents = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = (0, import_smithy_client6.dateToUtcString)(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue2) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isStringSchema() || ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new import_xml_builder.XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +var XmlCodec; +var init_XmlCodec = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() { + init_ConfigurableSerdeContext(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + XmlCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +var import_util_body_length_browser4, AwsRestXmlProtocol; +var init_AwsRestXmlProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser4 = __toESM(require_dist_cjs25()); + init_parseXmlBody(); + init_XmlCodec(); + AwsRestXmlProtocol = class extends HttpBindingProtocol { + codec; + serializer; + deserializer; + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context) { + const request3 = await super.serializeRequest(operationSchema, input, context); + const ns = NormalizedSchema.of(operationSchema.input); + const members = ns.getMemberSchemas(); + request3.path = String(request3.path).split("/").filter((segment) => { + return segment !== "{Bucket}"; + }).join("/") || "/"; + if (!request3.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m7) => { + return !!m7.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + request3.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request3.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request3.headers["content-type"] = "application/octet-stream"; + } else { + request3.headers["content-type"] = "application/xml"; + } + } else if (!ns.isUnitSchema()) { + const hasBody = Object.values(members).find((m7) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m7.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request3.headers["content-type"] = "application/xml"; + } + } + } + if (request3.headers["content-type"] === "application/xml") { + if (typeof request3.body === "string") { + request3.body = '' + request3.body; + } + } + if (request3.body) { + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser4.calculateBodyLength)(request3.body)); + } catch (e5) { + } + } + return request3; + } + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); + } + async handleError(operationSchema, context, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member, value); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_coercing_serializers(); + init_AwsJson1_0Protocol(); + init_AwsJson1_1Protocol(); + init_AwsJsonRpcProtocol(); + init_AwsRestJsonProtocol(); + init_JsonCodec(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_AwsEc2QueryProtocol(); + init_AwsQueryProtocol(); + init_AwsRestXmlProtocol(); + init_XmlCodec(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + init_parseXmlBody(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/index.js +var dist_es_exports2 = {}; +__export(dist_es_exports2, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsEc2QueryProtocol: () => AwsEc2QueryProtocol, + AwsJson1_0Protocol: () => AwsJson1_0Protocol, + AwsJson1_1Protocol: () => AwsJson1_1Protocol, + AwsJsonRpcProtocol: () => AwsJsonRpcProtocol, + AwsQueryProtocol: () => AwsQueryProtocol, + AwsRestJsonProtocol: () => AwsRestJsonProtocol, + AwsRestXmlProtocol: () => AwsRestXmlProtocol, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + JsonCodec: () => JsonCodec, + JsonShapeDeserializer: () => JsonShapeDeserializer, + JsonShapeSerializer: () => JsonShapeSerializer, + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + XmlCodec: () => XmlCodec, + XmlShapeDeserializer: () => XmlShapeDeserializer, + XmlShapeSerializer: () => XmlShapeSerializer, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + getBearerTokenEnvKey: () => getBearerTokenEnvKey, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + setCredentialFeature: () => setCredentialFeature, + setFeature: () => setFeature2, + setTokenFeature: () => setTokenFeature, + state: () => state2, + validateSigningProperties: () => validateSigningProperties +}); +var init_dist_es2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/index.js"() { + init_client(); + init_httpAuthSchemes2(); + init_protocols2(); + } +}); + +// node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +var require_dist_cjs29 = __commonJS({ + "node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID, + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin3, + resolveUserAgentConfig: () => resolveUserAgentConfig3, + userAgentMiddleware: () => userAgentMiddleware + }); + module2.exports = __toCommonJS2(index_exports); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var DEFAULT_UA_APP_ID = void 0; + function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; + } + __name(isValidUserAgentAppId, "isValidUserAgentAppId"); + function resolveUserAgentConfig3(input) { + const normalizedAppIdProvider = (0, import_core39.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: /* @__PURE__ */ __name(async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger5 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger5?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger5?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + }, "userAgentAppId") + }); + } + __name(resolveUserAgentConfig3, "resolveUserAgentConfig"); + var import_util_endpoints5 = require_dist_cjs22(); + var import_protocol_http15 = require_dist_cjs2(); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + async function checkFeatures(context, config7, args) { + const request3 = args.request; + if (request3?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + (0, import_core210.setFeature)(context, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config7.retryStrategy === "function") { + const retryStrategy = await config7.retryStrategy(); + if (typeof retryStrategy.acquireInitialRetryToken === "function") { + if (retryStrategy.constructor?.name?.includes("Adaptive")) { + (0, import_core210.setFeature)(context, "RETRY_MODE_ADAPTIVE", "F"); + } else { + (0, import_core210.setFeature)(context, "RETRY_MODE_STANDARD", "E"); + } + } else { + (0, import_core210.setFeature)(context, "RETRY_MODE_LEGACY", "D"); + } + } + if (typeof config7.accountIdEndpointMode === "function") { + const endpointV2 = context.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + (0, import_core210.setFeature)(context, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config7.accountIdEndpointMode?.()) { + case "disabled": + (0, import_core210.setFeature)(context, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + (0, import_core210.setFeature)(context, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + (0, import_core210.setFeature)(context, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity?.$source) { + const credentials = identity; + if (credentials.accountId) { + (0, import_core210.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + (0, import_core210.setFeature)(context, key, value); + } + } + } + __name(checkFeatures, "checkFeatures"); + var USER_AGENT = "user-agent"; + var X_AMZ_USER_AGENT = "x-amz-user-agent"; + var SPACE = " "; + var UA_NAME_SEPARATOR = "/"; + var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; + var UA_ESCAPE_CHAR = "-"; + var BYTE_LIMIT = 1024; + function encodeFeatures(features) { + let buffer = ""; + for (const key in features) { + const val = features[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; + } + __name(encodeFeatures, "encodeFeatures"); + var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) { + return next(args); + } + const { headers } = request3; + const userAgent = context?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context, options, args); + const awsContext = context; + defaultUserAgent.push( + `m/${encodeFeatures( + Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features) + )}` + ); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app/${appId}`])); + } + const prefix = (0, import_util_endpoints5.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request: request3 + }); + }, "userAgentMiddleware"); + var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version3 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version3].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }, "escapeUserAgent"); + var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + var getUserAgentPlugin3 = /* @__PURE__ */ __name((config7) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(userAgentMiddleware(config7), getUserAgentMiddlewareOptions); + }, "applyToStack") + }), "getUserAgentPlugin"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs30 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isArrayBuffer: () => isArrayBuffer3 + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer3 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs31 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs30(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); + }, "fromArrayBuffer"); + var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); + }, "fromString"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs32 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromUtf8: () => fromUtf84, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf86 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs31(); + var fromUtf84 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }, "fromUtf8"); + var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf86 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }, "toUtf8"); + } +}); + +// node_modules/@aws-crypto/util/build/main/convertToBuffer.js +var require_convertToBuffer = __commonJS({ + "node_modules/@aws-crypto/util/build/main/convertToBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertToBuffer = void 0; + var util_utf8_1 = require_dist_cjs32(); + var fromUtf84 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); + } : util_utf8_1.fromUtf8; + function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + } + exports2.convertToBuffer = convertToBuffer; + } +}); + +// node_modules/@aws-crypto/util/build/main/isEmptyData.js +var require_isEmptyData = __commonJS({ + "node_modules/@aws-crypto/util/build/main/isEmptyData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmptyData = void 0; + function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; + } + exports2.isEmptyData = isEmptyData; + } +}); + +// node_modules/@aws-crypto/util/build/main/numToUint8.js +var require_numToUint8 = __commonJS({ + "node_modules/@aws-crypto/util/build/main/numToUint8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.numToUint8 = void 0; + function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); + } + exports2.numToUint8 = numToUint8; + } +}); + +// node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +var require_uint32ArrayFrom = __commonJS({ + "node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint32ArrayFrom = void 0; + function uint32ArrayFrom(a_lookUpTable) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable.length); + var a_index = 0; + while (a_index < a_lookUpTable.length) { + return_array[a_index] = a_lookUpTable[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable); + } + exports2.uint32ArrayFrom = uint32ArrayFrom; + } +}); + +// node_modules/@aws-crypto/util/build/main/index.js +var require_main2 = __commonJS({ + "node_modules/@aws-crypto/util/build/main/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint32ArrayFrom = exports2.numToUint8 = exports2.isEmptyData = exports2.convertToBuffer = void 0; + var convertToBuffer_1 = require_convertToBuffer(); + Object.defineProperty(exports2, "convertToBuffer", { enumerable: true, get: function() { + return convertToBuffer_1.convertToBuffer; + } }); + var isEmptyData_1 = require_isEmptyData(); + Object.defineProperty(exports2, "isEmptyData", { enumerable: true, get: function() { + return isEmptyData_1.isEmptyData; + } }); + var numToUint8_1 = require_numToUint8(); + Object.defineProperty(exports2, "numToUint8", { enumerable: true, get: function() { + return numToUint8_1.numToUint8; + } }); + var uint32ArrayFrom_1 = require_uint32ArrayFrom(); + Object.defineProperty(exports2, "uint32ArrayFrom", { enumerable: true, get: function() { + return uint32ArrayFrom_1.uint32ArrayFrom; + } }); + } +}); + +// node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +var require_aws_crc32 = __commonJS({ + "node_modules/@aws-crypto/crc32/build/main/aws_crc32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AwsCrc32 = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var util_1 = require_main2(); + var index_1 = require_main3(); + var AwsCrc32 = ( + /** @class */ + function() { + function AwsCrc322() { + this.crc32 = new index_1.Crc32(); + } + AwsCrc322.prototype.update = function(toHash) { + if ((0, util_1.isEmptyData)(toHash)) + return; + this.crc32.update((0, util_1.convertToBuffer)(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return tslib_1.__awaiter(this, void 0, void 0, function() { + return tslib_1.__generator(this, function(_a6) { + return [2, (0, util_1.numToUint8)(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new index_1.Crc32(); + }; + return AwsCrc322; + }() + ); + exports2.AwsCrc32 = AwsCrc32; + } +}); + +// node_modules/@aws-crypto/crc32/build/main/index.js +var require_main3 = __commonJS({ + "node_modules/@aws-crypto/crc32/build/main/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AwsCrc32 = exports2.Crc32 = exports2.crc32 = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var util_1 = require_main2(); + function crc32(data) { + return new Crc32().update(data).digest(); + } + exports2.crc32 = crc32; + var Crc32 = ( + /** @class */ + function() { + function Crc322() { + this.checksum = 4294967295; + } + Crc322.prototype.update = function(data) { + var e_1, _a6; + try { + for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a6 = data_1.return)) _a6.call(data_1); + } finally { + if (e_1) throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + }() + ); + exports2.Crc32 = Crc32; + var a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); + var aws_crc32_1 = require_aws_crc32(); + Object.defineProperty(exports2, "AwsCrc32", { enumerable: true, get: function() { + return aws_crc32_1.AwsCrc32; + } }); + } +}); + +// node_modules/@smithy/eventstream-codec/dist-cjs/index.js +var require_dist_cjs33 = __commonJS({ + "node_modules/@smithy/eventstream-codec/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamCodec: () => EventStreamCodec, + HeaderMarshaller: () => HeaderMarshaller, + Int64: () => Int64, + MessageDecoderStream: () => MessageDecoderStream, + MessageEncoderStream: () => MessageEncoderStream, + SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, + SmithyMessageEncoderStream: () => SmithyMessageEncoderStream + }); + module2.exports = __toCommonJS2(src_exports); + var import_crc322 = require_main3(); + var import_util_hex_encoding = require_dist_cjs17(); + var Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static { + __name(this, "Int64"); + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { + bytes[i5] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + function negate(bytes) { + for (let i5 = 0; i5 < 8; i5++) { + bytes[i5] ^= 255; + } + for (let i5 = 7; i5 > -1; i5--) { + bytes[i5]++; + if (bytes[i5] !== 0) + break; + } + } + __name(negate, "negate"); + var HeaderMarshaller = class { + constructor(toUtf86, fromUtf84) { + this.toUtf8 = toUtf86; + this.fromUtf8 = fromUtf84; + } + static { + __name(this, "HeaderMarshaller"); + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8( + 0, + 6 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( + uuidBytes.subarray(6, 8) + )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + }; + var BOOLEAN_TAG = "boolean"; + var BYTE_TAG = "byte"; + var SHORT_TAG = "short"; + var INT_TAG = "integer"; + var LONG_TAG = "long"; + var BINARY_TAG = "binary"; + var STRING_TAG = "string"; + var TIMESTAMP_TAG = "timestamp"; + var UUID_TAG = "uuid"; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var import_crc32 = require_main3(); + var PRELUDE_MEMBER_LENGTH = 4; + var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + var CHECKSUM_LENGTH = 4; + var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error( + `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` + ); + } + checksummer.update( + new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) + ); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error( + `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` + ); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array( + buffer, + byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, + messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) + ) + }; + } + __name(splitMessage, "splitMessage"); + var EventStreamCodec = class { + static { + __name(this, "EventStreamCodec"); + } + constructor(toUtf86, fromUtf84) { + this.headerMarshaller = new HeaderMarshaller(toUtf86, fromUtf84); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. + */ + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new import_crc322.Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + }; + var MessageDecoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "MessageDecoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + }; + var MessageEncoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "MessageEncoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + }; + var SmithyMessageDecoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "SmithyMessageDecoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === void 0) + continue; + yield deserialized; + } + } + }; + var SmithyMessageEncoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "SmithyMessageEncoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + }; + } +}); + +// node_modules/@aws-sdk/util-format-url/dist-cjs/index.js +var require_dist_cjs34 = __commonJS({ + "node_modules/@aws-sdk/util-format-url/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + formatUrl: () => formatUrl + }); + module2.exports = __toCommonJS2(index_exports); + var import_querystring_builder = require_dist_cjs14(); + function formatUrl(request3) { + const { port, query } = request3; + let { protocol, path: path5, hostname } = request3; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname += `:${port}`; + } + if (path5 && path5.charAt(0) !== "/") { + path5 = `/${path5}`; + } + let queryString = query ? (0, import_querystring_builder.buildQueryString)(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request3.fragment) { + fragment = `#${request3.fragment}`; + } + return `${protocol}//${auth}${hostname}${path5}${queryString}${fragment}`; + } + __name(formatUrl, "formatUrl"); + } +}); + +// node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +var require_dist_cjs35 = __commonJS({ + "node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_codec = require_dist_cjs33(); + function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = /* @__PURE__ */ __name((size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }, "allocateMessage"); + const iterator2 = /* @__PURE__ */ __name(async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min( + 4 - currentMessagePendingLength, + // remaining bytes to fill the messageLengthBuffer + bytesRemaining + // bytes left in chunk + ); + messageLengthBuffer.set( + // @ts-ignore error TS2532: Object is possibly 'undefined' for value + value.slice(currentOffset, currentOffset + numBytesForTotal), + currentMessagePendingLength + ); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min( + currentMessageTotalLength - currentMessagePendingLength, + // number of bytes left to complete message + chunkLength - currentOffset + // number of bytes left in the original chunk + ); + currentMessage.set( + // @ts-ignore error TS2532: Object is possibly 'undefined' for value + value.slice(currentOffset, currentOffset + numBytesToWrite), + currentMessagePendingLength + ); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }, "iterator"); + return { + [Symbol.asyncIterator]: iterator2 + }; + } + __name(getChunkedStream, "getChunkedStream"); + function getMessageUnmarshaller(deserializer, toUtf86) { + return async function(message) { + const { value: messageType } = message.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message.headers[":exception-type"].value; + const exception = { [code]: message }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error = new Error(toUtf86(message.body)); + error.name = code; + throw error; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message.headers[":event-type"].value]: message + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); + } + }; + } + __name(getMessageUnmarshaller, "getMessageUnmarshaller"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new import_eventstream_codec.SmithyMessageDecoderStream({ + messageStream: new import_eventstream_codec.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + // @ts-expect-error Type 'T' is not assignable to type 'Record' + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new import_eventstream_codec.MessageEncoderStream({ + messageStream: new import_eventstream_codec.SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js +var require_dist_cjs36 = __commonJS({ + "node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider, + iterableToReadableStream: () => iterableToReadableStream, + readableStreamtoIterable: () => readableStreamtoIterable + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_serde_universal = require_dist_cjs35(); + var readableStreamtoIterable = /* @__PURE__ */ __name((readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }), "readableStreamtoIterable"); + var iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { + const iterator2 = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }, "iterableToReadableStream"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = isReadableStream6(body) ? readableStreamtoIterable(body) : body; + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + /** + * Generate a stream that serialize events into stream of binary chunks; + * + * Caveat is that streaming request payload doesn't work on browser with native + * xhr or fetch handler currently because they don't support upload streaming. + * reference: + * * https://bugs.chromium.org/p/chromium/issues/detail?id=688906 + * * https://bugzilla.mozilla.org/show_bug.cgi?id=1387483 + * + */ + serialize(input, serializer) { + const serialziedIterable = this.universalMarshaller.serialize(input, serializer); + return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable; + } + }; + var isReadableStream6 = /* @__PURE__ */ __name((body) => typeof ReadableStream === "function" && body instanceof ReadableStream, "isReadableStream"); + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +var require_dist_cjs37 = __commonJS({ + "node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + WebSocketFetchHandler: () => WebSocketFetchHandler, + eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider, + getWebSocketPlugin: () => getWebSocketPlugin, + resolveWebSocketConfig: () => resolveWebSocketConfig + }); + module2.exports = __toCommonJS2(index_exports); + var import_eventstream_codec = require_dist_cjs33(); + var import_util_hex_encoding = require_dist_cjs17(); + var getEventSigningTransformStream = /* @__PURE__ */ __name((initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => { + let priorSignature = initialSignature; + const transformer = { + start() { + }, + async transform(chunk, controller) { + try { + const now = new Date(Date.now() + await systemClockOffsetProvider()); + const dateHeader = { + ":date": { type: "timestamp", value: now } + }; + const signedMessage = await messageSigner.sign( + { + message: { + body: chunk, + headers: dateHeader + }, + priorSignature + }, + { + signingDate: now + } + ); + priorSignature = signedMessage.signature; + const serializedSigned = eventStreamCodec.encode({ + headers: { + ...dateHeader, + ":chunk-signature": { + type: "binary", + value: (0, import_util_hex_encoding.fromHex)(signedMessage.signature) + } + }, + body: chunk + }); + controller.enqueue(serializedSigned); + } catch (error) { + controller.error(error); + } + } + }; + return new TransformStream({ ...transformer }); + }, "getEventSigningTransformStream"); + var EventStreamPayloadHandler = class { + static { + __name(this, "EventStreamPayloadHandler"); + } + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + this.messageSigner = options.messageSigner; + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder); + this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0; + } + async handle(next, args, context = {}) { + const request3 = args.request; + const { body: payload, headers, query } = request3; + if (!(payload instanceof ReadableStream)) { + throw new Error("Eventstream payload must be a ReadableStream."); + } + const placeHolderStream = new TransformStream(); + request3.body = placeHolderStream.readable; + let result; + try { + result = await next(args); + } catch (e5) { + request3.body.cancel(); + throw e5; + } + const match = (headers["authorization"] || "").match(/Signature=([\w]+)$/); + const priorSignature = (match || [])[1] || query && query["X-Amz-Signature"] || ""; + const signingStream = getEventSigningTransformStream( + priorSignature, + await this.messageSigner(), + this.eventStreamCodec, + this.systemClockOffsetProvider + ); + const signedPayload = payload.pipeThrough(signingStream); + signedPayload.pipeThrough(placeHolderStream); + return result; + } + }; + var eventStreamPayloadHandlerProvider = /* @__PURE__ */ __name((options) => new EventStreamPayloadHandler(options), "eventStreamPayloadHandlerProvider"); + var injectSessionIdMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const requestParams = { + ...args.input + }; + const response = await next(args); + const output = response.output; + if (requestParams.SessionId && output.SessionId == null) { + output.SessionId = requestParams.SessionId; + } + return response; + }, "injectSessionIdMiddleware"); + var injectSessionIdMiddlewareOptions = { + step: "initialize", + name: "injectSessionIdMiddleware", + tags: ["WEBSOCKET", "EVENT_STREAM"], + override: true + }; + var import_protocol_http15 = require_dist_cjs2(); + var websocketEndpointMiddleware = /* @__PURE__ */ __name((config7, options) => (next) => (args) => { + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3) && config7.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")) { + request3.protocol = "wss:"; + request3.method = "GET"; + request3.path = `${request3.path}-websocket`; + const { headers } = request3; + delete headers["content-type"]; + delete headers["x-amz-content-sha256"]; + for (const name of Object.keys(headers)) { + if (name.indexOf(options.headerPrefix) === 0) { + const chunkedName = name.replace(options.headerPrefix, ""); + request3.query[chunkedName] = headers[name]; + } + } + if (headers["x-amz-user-agent"]) { + request3.query["user-agent"] = headers["x-amz-user-agent"]; + } + request3.headers = { host: headers.host ?? request3.hostname }; + } + return next(args); + }, "websocketEndpointMiddleware"); + var websocketEndpointMiddlewareOptions = { + name: "websocketEndpointMiddleware", + tags: ["WEBSOCKET", "EVENT_STREAM"], + relation: "after", + toMiddleware: "eventStreamHeaderMiddleware", + override: true + }; + var getWebSocketPlugin = /* @__PURE__ */ __name((config7, options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(websocketEndpointMiddleware(config7, options), websocketEndpointMiddlewareOptions); + clientStack.add(injectSessionIdMiddleware(), injectSessionIdMiddlewareOptions); + }, "applyToStack") + }), "getWebSocketPlugin"); + var isWebSocketRequest = /* @__PURE__ */ __name((request3) => request3.protocol === "ws:" || request3.protocol === "wss:", "isWebSocketRequest"); + var WebsocketSignatureV4 = class { + static { + __name(this, "WebsocketSignatureV4"); + } + signer; + constructor(options) { + this.signer = options.signer; + } + presign(originalRequest, options = {}) { + return this.signer.presign(originalRequest, options); + } + async sign(toSign, options) { + if (import_protocol_http15.HttpRequest.isInstance(toSign) && isWebSocketRequest(toSign)) { + const signedRequest = await this.signer.presign( + { ...toSign, body: "" }, + { + ...options, + // presigned url must be expired within 1 min. + expiresIn: 60, + // Not to sign headers. Transcribe-streaming WebSocket + // request omits headers except for required 'host' header. If we sign + // the other headers, the signature could be mismatch. + unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host")) + } + ); + return { + ...signedRequest, + body: toSign.body + }; + } else { + return this.signer.sign(toSign, options); + } + } + }; + var resolveWebSocketConfig = /* @__PURE__ */ __name((input) => { + const { signer } = input; + return Object.assign(input, { + signer: /* @__PURE__ */ __name(async (authScheme) => { + const signerObj = await signer(authScheme); + if (validateSigner(signerObj)) { + return new WebsocketSignatureV4({ signer: signerObj }); + } + throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor."); + }, "signer") + }); + }, "resolveWebSocketConfig"); + var validateSigner = /* @__PURE__ */ __name((signer) => !!signer, "validateSigner"); + var import_util_format_url = require_dist_cjs34(); + var import_eventstream_serde_browser = require_dist_cjs36(); + var import_fetch_http_handler = require_dist_cjs16(); + var DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2e3; + var WebSocketFetchHandler = class _WebSocketFetchHandler { + static { + __name(this, "WebSocketFetchHandler"); + } + metadata = { + handlerProtocol: "websocket/h1.1" + }; + config; + configPromise; + httpHandler; + sockets = {}; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _WebSocketFetchHandler( + instanceOrOptions, + httpHandler + ); + } + constructor(options, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) { + this.httpHandler = httpHandler; + if (typeof options === "function") { + this.config = {}; + this.configPromise = options().then((opts) => this.config = opts ?? {}); + } else { + this.config = options ?? {}; + this.configPromise = Promise.resolve(this.config); + } + } + /** + * Destroys the WebSocketHandler. + * Closes all sockets from the socket pool. + */ + destroy() { + for (const [key, sockets] of Object.entries(this.sockets)) { + for (const socket of sockets) { + socket.close(1e3, `Socket closed through destroy() call`); + } + delete this.sockets[key]; + } + } + async handle(request3) { + if (!isWebSocketRequest(request3)) { + return this.httpHandler.handle(request3); + } + const url2 = (0, import_util_format_url.formatUrl)(request3); + const socket = new WebSocket(url2); + if (!this.sockets[url2]) { + this.sockets[url2] = []; + } + this.sockets[url2].push(socket); + socket.binaryType = "arraybuffer"; + this.config = await this.configPromise; + const { connectionTimeout = DEFAULT_WS_CONNECTION_TIMEOUT_MS } = this.config; + await this.waitForReady(socket, connectionTimeout); + const { body } = request3; + const bodyStream = getIterator(body); + const asyncIterable = this.connect(socket, bodyStream); + const outputPayload = toReadableStream(asyncIterable); + return { + response: new import_protocol_http15.HttpResponse({ + statusCode: 200, + // indicates connection success + body: outputPayload + }) + }; + } + updateHttpClientConfig(key, value) { + this.configPromise = this.configPromise.then((config7) => { + config7[key] = value; + return config7; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Removes all closing/closed sockets from the socket pool for URL. + */ + removeNotUsableSockets(url2) { + this.sockets[url2] = (this.sockets[url2] ?? []).filter( + (socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState) + ); + } + waitForReady(socket, connectionTimeout) { + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + this.removeNotUsableSockets(socket.url); + reject({ + $metadata: { + httpStatusCode: 500 + } + }); + }, connectionTimeout); + socket.onopen = () => { + clearTimeout(timeout); + resolve(); + }; + }); + } + connect(socket, data) { + let streamError = void 0; + let socketErrorOccurred = false; + let reject = /* @__PURE__ */ __name(() => { + }, "reject"); + let resolve = /* @__PURE__ */ __name(() => { + }, "resolve"); + socket.onmessage = (event) => { + resolve({ + done: false, + value: new Uint8Array(event.data) + }); + }; + socket.onerror = (error) => { + socketErrorOccurred = true; + socket.close(); + reject(error); + }; + socket.onclose = () => { + this.removeNotUsableSockets(socket.url); + if (socketErrorOccurred) return; + if (streamError) { + reject(streamError); + } else { + resolve({ + done: true, + value: void 0 + // unchecked because done=true. + }); + } + }; + const outputStream = { + [Symbol.asyncIterator]: () => ({ + next: /* @__PURE__ */ __name(() => { + return new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }, "next") + }) + }; + const send = /* @__PURE__ */ __name(async () => { + try { + for await (const inputChunk of data) { + socket.send(inputChunk); + } + } catch (err) { + streamError = err; + } finally { + socket.close(1e3); + } + }, "send"); + send(); + return outputStream; + } + }; + var getIterator = /* @__PURE__ */ __name((stream4) => { + if (stream4[Symbol.asyncIterator]) { + return stream4; + } + if (isReadableStream6(stream4)) { + return (0, import_eventstream_serde_browser.readableStreamtoIterable)(stream4); + } + return { + [Symbol.asyncIterator]: async function* () { + yield stream4; + } + }; + }, "getIterator"); + var toReadableStream = /* @__PURE__ */ __name((asyncIterable) => typeof ReadableStream === "function" ? (0, import_eventstream_serde_browser.iterableToReadableStream)(asyncIterable) : asyncIterable, "toReadableStream"); + var isReadableStream6 = /* @__PURE__ */ __name((payload) => typeof ReadableStream === "function" && payload instanceof ReadableStream, "isReadableStream"); + } +}); + +// node_modules/@smithy/util-config-provider/dist-cjs/index.js +var require_dist_cjs38 = __commonJS({ + "node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + SelectorType: () => SelectorType, + booleanSelector: () => booleanSelector, + numberSelector: () => numberSelector + }); + module2.exports = __toCommonJS2(src_exports); + var booleanSelector = /* @__PURE__ */ __name((obj, key, type2) => { + if (!(key in obj)) + return void 0; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type2} "${key}". Expected "true" or "false", got ${obj[key]}.`); + }, "booleanSelector"); + var numberSelector = /* @__PURE__ */ __name((obj, key, type2) => { + if (!(key in obj)) + return void 0; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type2} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; + }, "numberSelector"); + var SelectorType = /* @__PURE__ */ ((SelectorType2) => { + SelectorType2["ENV"] = "env"; + SelectorType2["CONFIG"] = "shared config entry"; + return SelectorType2; + })(SelectorType || {}); + } +}); + +// node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs39 = __commonJS({ + "node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS3, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS3, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_config_provider = require_dist_cjs38(); + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var import_util_middleware7 = require_dist_cjs7(); + var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { tls, endpoint, urlParser, useDualstackEndpoint } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: (0, import_util_middleware7.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware7.normalizeProvider)(useDualstackEndpoint ?? false) + }); + }, "resolveCustomEndpointsConfig"); + var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); + }, "getEndpointFromRegion"); + var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware7.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser, tls } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: endpoint ? (0, import_util_middleware7.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }); + }, "resolveEndpointsConfig"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => env2[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS3 = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig3 = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }, "resolveRegionConfig"); + var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )?.hostname, "getHostnameFromVariants"); + var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } + }, "getResolvedSigningRegion"); + var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash + }) => { + const partition3 = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : partitionHash[partition3]?.endpoint ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants(partitionHash[partition3]?.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: regionHash[resolvedRegion]?.signingRegion, + regionRegex: partitionHash[partition3].regionRegex, + useFipsEndpoint + }); + return { + partition: partition3, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...regionHash[resolvedRegion]?.signingService && { + signingService: regionHash[resolvedRegion].signingService + } + }; + }, "getRegionInfo"); + } +}); + +// node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +var require_dist_cjs40 = __commonJS({ + "node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }), "resolveEventStreamSerdeConfig"); + } +}); + +// node_modules/@smithy/middleware-content-length/dist-cjs/index.js +var require_dist_cjs41 = __commonJS({ + "node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request3 = args.request; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + const { body, headers } = request3; + if (body && Object.keys(headers).map((str2) => str2.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request3.headers = { + ...request3.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { + } + } + } + return next({ + ...args, + request: request3 + }); + }; + } + __name(contentLengthMiddleware, "contentLengthMiddleware"); + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + var getContentLengthPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; + }; + var getHomeDir2 = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; + }; + exports2.getHomeDir = getHomeDir2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir(); + var getSSOTokenFilepath2 = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); + }; + exports2.getSSOTokenFilepath = getSSOTokenFilepath2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); + }; + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path5, options) => { + if (!filePromisesHash[path5] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path5] = readFile(path5, "utf8"); + } + return filePromisesHash[path5]; + }; + exports2.slurpFile = slurpFile; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs42 = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile(), module2.exports); + var import_types6 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(import_types6.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types6.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path6 = require("path"); + var import_getHomeDir = require_getHomeDir(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path6.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path6.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map2 = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types6.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map2[currentSection] = map2[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map2[currentSection][key] = value; + } + } + } + } + return map2; + }, "parseIni"); + var import_slurpFile = require_slurpFile(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path6.join)(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path6.join)(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types6.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); + } +}); + +// node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs43 = __commonJS({ + "node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs23(); + function getSelectorName(functionString) { + try { + const constants3 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants3.delete("CONFIG"); + constants3.delete("CONFIG_PREFIX_SEPARATOR"); + constants3.delete("ENV"); + return [...constants3].join(", "); + } catch (e5) { + return functionString; + } + } + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => { + try { + const config7 = envVarSelector(process.env, options); + if (config7 === void 0) { + throw new Error(); + } + return config7; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError( + e5.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger: options?.logger } + ); + } + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs42(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError( + e5.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); + } + }, "fromSharedConfigFiles"); + var isFunction4 = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction4(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger: logger5 } = configuration; + const envOptions = { signingName, logger: logger5 }; + return (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector, envOptions), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ); + }, "loadConfig"); + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +var require_getEndpointUrlConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointUrlConfig = void 0; + var shared_ini_file_loader_1 = require_dist_cjs42(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env2) => { + const serviceSuffixParts = serviceId.split(" ").map((w9) => w9.toUpperCase()); + const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env2[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + configFileSelector: (profile, config7) => { + if (config7 && profile.services) { + const servicesSection = config7[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w9) => w9.toLowerCase()); + const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl2) + return endpointUrl2; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + default: void 0 + }); + exports2.getEndpointUrlConfig = getEndpointUrlConfig; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +var require_getEndpointFromConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointFromConfig = void 0; + var node_config_provider_1 = require_dist_cjs43(); + var getEndpointUrlConfig_1 = require_getEndpointUrlConfig(); + var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); + exports2.getEndpointFromConfig = getEndpointFromConfig; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs44 = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin4, + resolveEndpointConfig: () => resolveEndpointConfig3, + resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 + }); + module2.exports = __toCommonJS2(src_exports); + var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition3, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition3 && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config7) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config7[configKey] ?? config7[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config7.credentials === "function" ? await config7.credentials() : config7.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config7.credentials === "function" ? await config7.credentials() : config7.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config7.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path: path5 } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path5}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + var import_getEndpointFromConfig = require_getEndpointFromConfig(); + var import_url_parser3 = require_dist_cjs21(); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser3.parseUrl)(endpoint.url); + } + return endpoint; + } + return (0, import_url_parser3.parseUrl)(endpoint); + }, "toEndpointV1"); + var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; + }, "getEndpointFromInstructions"); + var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_util_middleware7 = require_dist_cjs7(); + var endpointMiddleware = /* @__PURE__ */ __name(({ + config: config7, + instructions + }) => { + return (next, context) => async (args) => { + if (config7.isCustomEndpoint) { + (0, import_core39.setFeature)(context, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config7 }, + context + ); + context.endpointV2 = endpoint; + context.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context.authSchemes?.[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware7.getSmithyContext)(context); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + var import_middleware_serde5 = require_dist_cjs8(); + var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde5.serializerMiddlewareOption.name + }; + var getEndpointPlugin4 = /* @__PURE__ */ __name((config7, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config: config7, + instructions + }), + endpointMiddlewareOptions + ); + } + }), "getEndpointPlugin"); + var import_getEndpointFromConfig2 = require_getEndpointFromConfig(); + var resolveEndpointConfig3 = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware7.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware7.normalizeProvider)(useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware7.normalizeProvider)(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + var resolveEndpointRequiredConfig = /* @__PURE__ */ __name((input) => { + const { endpoint } = input; + if (endpoint === void 0) { + input.endpoint = async () => { + throw new Error( + "@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint." + ); + }; + } + return input; + }, "resolveEndpointRequiredConfig"); + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto3.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto3, rnds8Pool, poolPtr; +var init_rng = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto3 = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js +function validate2(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify(arr, offset = 0) { + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} +function stringify2(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i5 = 0; i5 < 256; ++i5) { + byteToHex.push((i5 + 256).toString(16).slice(1)); + } + stringify_default = stringify2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i5 = buf && offset || 0; + const b9 = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt2 = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt2 < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt2 < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b9[i5++] = tl >>> 24 & 255; + b9[i5++] = tl >>> 16 & 255; + b9[i5++] = tl >>> 8 & 255; + b9[i5++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b9[i5++] = tmh >>> 8 & 255; + b9[i5++] = tmh & 255; + b9[i5++] = tmh >>> 24 & 15 | 16; + b9[i5++] = tmh >>> 16 & 255; + b9[i5++] = clockseq >>> 8 | 128; + b9[i5++] = clockseq & 255; + for (let n4 = 0; n4 < 6; ++n4) { + b9[i5 + n4] = node[n4]; + } + return buf || unsafeStringify(b9); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v8; + const arr = new Uint8Array(16); + arr[0] = (v8 = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v8 >>> 16 & 255; + arr[2] = v8 >>> 8 & 255; + arr[3] = v8 & 255; + arr[4] = (v8 = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v8 & 255; + arr[6] = (v8 = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v8 & 255; + arr[8] = (v8 = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v8 & 255; + arr[10] = (v8 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v8 / 4294967296 & 255; + arr[12] = v8 >>> 24 & 255; + arr[13] = v8 >>> 16 & 255; + arr[14] = v8 >>> 8 & 255; + arr[15] = v8 & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str2) { + str2 = unescape(encodeURIComponent(str2)); + const bytes = []; + for (let i5 = 0; i5 < str2.length; ++i5) { + bytes.push(str2.charCodeAt(i5)); + } + return bytes; +} +function v35(name, version3, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version3; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = bytes[i5]; + } + return buf; + } + return unsafeStringify(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto4.default.createHash("md5").update(bytes).digest(); +} +var import_crypto4, md5_default; +var init_md5 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto4 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js +var v32, v3_default; +var init_v3 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v32 = v35("v3", 48, md5_default); + v3_default = v32; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js +var import_crypto5, native_default; +var init_native = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js"() { + import_crypto5 = __toESM(require("crypto")); + native_default = { + randomUUID: import_crypto5.default.randomUUID + }; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js +function v42(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) { + return native_default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = rnds[i5]; + } + return buf; + } + return unsafeStringify(rnds); +} +var v4_default; +var init_v4 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js"() { + init_native(); + init_rng(); + init_stringify(); + v4_default = v42; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto6.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto6, sha1_default; +var init_sha1 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto6 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default; +var init_version = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs45 = __commonJS({ + "node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isBrowserNetworkError: () => isBrowserNetworkError, + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError + }); + module2.exports = __toCommonJS2(src_exports); + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); + var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); + var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => error.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); + var isBrowserNetworkError = /* @__PURE__ */ __name((error) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + // Chrome + "NetworkError when attempting to fetch resource", + // Firefox + "The Internet connection appears to be offline", + // Safari 16 + "Load failed", + // Safari 17+ + "Network request failed" + // `cross-fetch` + ]); + const isValid = error && error instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error.message); + }, "isBrowserNetworkError"); + var isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, "isThrottlingError"); + var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), "isTransientError"); + var isServerError = /* @__PURE__ */ __name((error) => { + if (error.$metadata?.httpStatusCode !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; + }, "isServerError"); + } +}); + +// node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs46 = __commonJS({ + "node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE3, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST + }); + module2.exports = __toCommonJS2(src_exports); + var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; + })(RETRY_MODES || {}); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE3 = "standard"; + var import_service_error_classification = require_dist_cjs45(); + var DefaultRateLimiter = class _DefaultRateLimiter { + constructor(options) { + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + static { + __name(this, "DefaultRateLimiter"); + } + static { + this.setTimeoutFn = setTimeout; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay4 = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay4)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate + ); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t4 = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t4 * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1e3; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay4) => { + delayBase = delay4; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost + }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + var StandardRetryStrategy = class { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard"; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + static { + __name(this, "StandardRetryStrategy"); + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + var AdaptiveRetryStrategy = class { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive"; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + static { + __name(this, "AdaptiveRetryStrategy"); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + var ConfiguredRetryStrategy = class extends StandardRetryStrategy { + static { + __name(this, "ConfiguredRetryStrategy"); + } + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } + }; + } +}); + +// node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +var require_isStreamingPayload = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isStreamingPayload = void 0; + var stream_1 = require("stream"); + var isStreamingPayload = (request3) => (request3 === null || request3 === void 0 ? void 0 : request3.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request3 === null || request3 === void 0 ? void 0 : request3.body) instanceof ReadableStream; + exports2.isStreamingPayload = isStreamingPayload; + } +}); + +// node_modules/@smithy/middleware-retry/dist-cjs/index.js +var require_dist_cjs47 = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS3, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS3, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin3, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig3, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); + var import_util_retry3 = require_dist_cjs46(); + var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry3.NO_RETRY_INCREMENT; + const retryCost = options?.retryCost ?? import_util_retry3.RETRY_COST; + const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry3.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }, "getDefaultRetryQuota"); + var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry3.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + var import_service_error_classification = require_dist_cjs45(); + var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); + }, "defaultRetryDecider"); + var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); + }, "asSdkError"); + var StandardRetryStrategy = class { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry3.RETRY_MODES.STANDARD; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(import_util_retry3.INITIAL_RETRY_TOKENS); + } + static { + __name(this, "StandardRetryStrategy"); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry3.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + request3.headers[import_util_retry3.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + request3.headers[import_util_retry3.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e5) { + const err = asSdkError(e5); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry3.THROTTLING_RETRY_DELAY_BASE : import_util_retry3.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay4 = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay4; + await new Promise((resolve) => setTimeout(resolve, delay4)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } + }; + var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http15.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); + }, "getDelayFromRetryAfterHeader"); + var AdaptiveRetryStrategy = class extends StandardRetryStrategy { + static { + __name(this, "AdaptiveRetryStrategy"); + } + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry3.DefaultRateLimiter(); + this.mode = import_util_retry3.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); + } + }; + var import_util_middleware7 = require_dist_cjs7(); + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => { + const value = env2[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: import_util_retry3.DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig3 = /* @__PURE__ */ __name((input) => { + const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; + const maxAttempts = (0, import_util_middleware7.normalizeProvider)(_maxAttempts ?? import_util_retry3.DEFAULT_MAX_ATTEMPTS); + return Object.assign(input, { + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware7.normalizeProvider)(_retryMode)(); + if (retryMode === import_util_retry3.RETRY_MODES.ADAPTIVE) { + return new import_util_retry3.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry3.StandardRetryStrategy(maxAttempts); + } + }); + }, "resolveRetryConfig"); + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry3.DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + delete request3.headers[import_util_retry3.INVOCATION_ID_HEADER]; + delete request3.headers[import_util_retry3.REQUEST_HEADER]; + } + return next(args); + }, "omitRetryHeadersMiddleware"); + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }), "getOmitRetryHeadersPlugin"); + var import_smithy_client28 = require_dist_cjs27(); + var import_isStreamingPayload = require_isStreamingPayload(); + var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request: request3 } = args; + const isRequest2 = import_protocol_http15.HttpRequest.isInstance(request3); + if (isRequest2) { + request3.headers[import_util_retry3.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest2) { + request3.headers[import_util_retry3.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e5) { + const retryErrorInfo = getRetryErrorInfo(e5); + lastError = asSdkError(e5); + if (isRequest2 && (0, import_isStreamingPayload.isStreamingPayload)(request3)) { + (context.logger instanceof import_smithy_client28.NoOpLogger ? console : context.logger)?.warn( + "An error was encountered in a non-retryable streaming request." + ); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay4 = retryToken.getRetryDelay(); + totalRetryDelay += delay4; + await new Promise((resolve) => setTimeout(resolve, delay4)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + var getRetryPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }), "getRetryPlugin"); + var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http15.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultBedrockRuntimeHttpAuthSchemeProvider = exports2.defaultBedrockRuntimeHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var util_middleware_1 = require_dist_cjs7(); + var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config7, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config7.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultBedrockRuntimeHttpAuthSchemeParametersProvider = defaultBedrockRuntimeHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption3(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "bedrock", + region: authParameters.region + }, + propertiesExtractor: (config7, context) => ({ + signingProperties: { + config: config7, + context + } + }) + }; + } + function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#httpBearerAuth", + propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({ + identityProperties: { + profile, + filepath, + configFilepath, + ignoreCache + } + }) + }; + } + var defaultBedrockRuntimeHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption3(authParameters)); + options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters)); + } + } + return options; + }; + exports2.defaultBedrockRuntimeHttpAuthSchemeProvider = defaultBedrockRuntimeHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig3 = (config7) => { + const token = (0, core_2.memoizeIdentityProvider)(config7.token, core_2.isIdentityExpired, core_2.doesIdentityRequireRefresh); + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config7); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config7.authSchemePreference ?? []), + token + }); + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/package.json +var require_package2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-bedrock-runtime", + description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native", + version: "3.844.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/credential-provider-node": "3.844.0", + "@aws-sdk/eventstream-handler-node": "3.840.0", + "@aws-sdk/middleware-eventstream": "3.840.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/middleware-websocket": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/token-providers": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/eventstream-serde-browser": "^4.0.4", + "@smithy/eventstream-serde-config-resolver": "^4.1.2", + "@smithy/eventstream-serde-node": "^4.0.4", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-stream": "^4.2.3", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + tslib: "^2.6.2", + uuid: "^9.0.1" + }, + devDependencies: { + "@tsconfig/node18": "18.2.4", + "@types/node": "^18.19.69", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + engines: { + node: ">=18.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-bedrock-runtime" + } + }; + } +}); + +// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs48 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv + }); + module2.exports = __toCommonJS2(index_exports); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_property_provider2 = require_dist_cjs23(); + var ENV_KEY = "AWS_ACCESS_KEY_ID"; + var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; + var ENV_SESSION = "AWS_SESSION_TOKEN"; + var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; + var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; + var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; + var fromEnv = /* @__PURE__ */ __name((init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new import_property_provider2.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); + }, "fromEnv"); + } +}); + +// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs49 = __commonJS({ + "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit + }); + module2.exports = __toCommonJS2(src_exports); + var import_url2 = require("url"); + var import_property_provider2 = require_dist_cjs23(); + var import_buffer = require("buffer"); + var import_http3 = require("http"); + function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = (0, import_http3.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider2.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider2.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider2.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + __name(httpRequest, "httpRequest"); + var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); + var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }), "fromImdsCredentials"); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT + }) => ({ maxRetries, timeout }), "providerConfigFromInit"); + var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i5 = 0; i5 < maxRetries; i5++) { + promise = promise.catch(toRetry); + } + return promise; + }, "retry"); + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }, "fromContainerMetadata"); + var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); + }, "requestFromEcsImds"); + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true + }; + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true + }; + var getCmdsUri = /* @__PURE__ */ __name(async ({ logger: logger5 }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url2.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger: logger5 + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger: logger5 + }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new import_property_provider2.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + { + tryNextLink: false, + logger: logger5 + } + ); + }, "getCmdsUri"); + var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider2.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); + } + static { + __name(this, "InstanceMetadataV1FallbackError"); + } + }; + var import_node_config_provider3 = require_dist_cjs43(); + var import_url_parser3 = require_dist_cjs21(); + var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; + })(Endpoint || {}); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 + }; + var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; + })(EndpointMode || {}); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" + /* IPv4 */ + }; + var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser3.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); + var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider3.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); + var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider3.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4": + return "http://169.254.169.254"; + case "IPv6": + return "http://[fd00:ec2::254]"; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } + }, "getFromEndpointModeConfig"); + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger5) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger5.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; + }, "getExtendedInstanceMetadataCredentials"); + var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger5 = options?.logger || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger5); + } + } catch (e5) { + if (pastCredentials) { + logger5.warn("Credential renew failed: ", e5); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger5); + } else { + throw e5; + } + } + pastCredentials = credentials; + return credentials; + }; + }, "staticStabilityProvider"); + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); + var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { + let disableFetchToken = false; + const { logger: logger5, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider3.loadConfig)( + { + environmentVariableSelector: (env2) => { + const envValue = env2[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider2.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, + { logger: init.logger } + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile + } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger5?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if (error?.statusCode === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger5?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); + } + }; + }, "getInstanceMetadataProvider"); + var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }), "getMetadataToken"); + var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); + var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { + const credentialsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credentialsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }, "getCredentialsFromProfile"); + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +var require_checkUrl = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkUrl = void 0; + var property_provider_1 = require_dist_cjs23(); + var ECS_CONTAINER_HOST = "169.254.170.2"; + var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; + var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; + var checkUrl = (url2, logger5) => { + if (url2.protocol === "https:") { + return; + } + if (url2.hostname === ECS_CONTAINER_HOST || url2.hostname === EKS_CONTAINER_HOST_IPv4 || url2.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url2.hostname.includes("[")) { + if (url2.hostname === "[::1]" || url2.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } else { + if (url2.hostname === "localhost") { + return; + } + const ipComponents = url2.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { + return; + } + } + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger5 }); + }; + exports2.checkUrl = checkUrl; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +var require_requestHelpers = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createGetRequest = createGetRequest; + exports2.getCredentials = getCredentials; + var property_provider_1 = require_dist_cjs23(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs27(); + var util_stream_1 = require_dist_cjs18(); + function createGetRequest(url2) { + return new protocol_http_1.HttpRequest({ + protocol: url2.protocol, + hostname: url2.hostname, + port: Number(url2.port), + path: url2.pathname, + query: Array.from(url2.searchParams.entries()).reduce((acc, [k9, v8]) => { + acc[k9] = v8; + return acc; + }, {}), + fragment: url2.hash + }); + } + async function getCredentials(response, logger5) { + const stream4 = (0, util_stream_1.sdkStreamMixin)(response.body); + const str2 = await stream4.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str2); + if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger5 }); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration) + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str2); + } catch (e5) { + } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger5 }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger5 }); + } + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +var require_retry_wrapper = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWrapper = void 0; + var retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i5 = 0; i5 < maxRetries; ++i5) { + try { + return await toRetry(); + } catch (e5) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; + }; + exports2.retryWrapper = retryWrapper; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +var require_fromHttp = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var client_1 = (init_client(), __toCommonJS(client_exports)); + var node_http_handler_1 = require_dist_cjs15(); + var property_provider_1 = require_dist_cjs23(); + var promises_1 = tslib_1.__importDefault(require("fs/promises")); + var checkUrl_1 = require_checkUrl(); + var requestHelpers_1 = require_requestHelpers(); + var retry_wrapper_1 = require_retry_wrapper(); + var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; + var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromHttp = (options = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + if (relative && full) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); + } + const url2 = new URL(host); + (0, checkUrl_1.checkUrl)(url2, options.logger); + const requestHandler = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request3 = (0, requestHelpers_1.createGetRequest)(url2); + if (token) { + request3.headers.Authorization = token; + } else if (tokenFile) { + request3.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request3); + return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); + } catch (e5) { + throw new property_provider_1.CredentialsProviderError(String(e5), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1e3); + }; + exports2.fromHttp = fromHttp; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs50 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var fromHttp_1 = require_fromHttp(); + Object.defineProperty(exports2, "fromHttp", { enumerable: true, get: function() { + return fromHttp_1.fromHttp; + } }); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider2 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs7(); + var defaultSSOHttpAuthSchemeParametersProvider = async (config7, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: await (0, util_middleware_1.normalizeProvider)(config7.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption3(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region + }, + propertiesExtractor: (config7, context) => ({ + signingProperties: { + config: config7, + context + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption3(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption3(authParameters)); + } + } + return options; + }; + exports2.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig3 = (config7) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config7); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config7.authSchemePreference ?? []) + }); + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig3; + } +}); + +// node_modules/@aws-sdk/client-sso/package.json +var require_package3 = __commonJS({ + "node_modules/@aws-sdk/client-sso/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sso", + description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", + version: "3.844.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node18": "18.2.4", + "@types/node": "^18.19.69", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + engines: { + node: ">=18.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso" + } + }; + } +}); + +// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +var require_dist_cjs51 = __commonJS({ + "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS3, + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + createDefaultUserAgentProvider: () => createDefaultUserAgentProvider3, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent + }); + module2.exports = __toCommonJS2(index_exports); + var import_os3 = require("os"); + var import_process = require("process"); + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; + }, "isCrtAvailable"); + var createDefaultUserAgentProvider3 = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + return async (config7) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.1"], + // os-metadata + [`os/${(0, import_os3.platform)()}`, (0, import_os3.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); + } + const appId = await config7?.userAgentAppId?.(); + const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + return resolvedUserAgent; + }; + }, "createDefaultUserAgentProvider"); + var defaultUserAgent = createDefaultUserAgentProvider3; + var import_middleware_user_agent3 = require_dist_cjs29(); + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk_ua_app_id"; + var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; + var NODE_APP_ID_CONFIG_OPTIONS3 = { + environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"), + default: import_middleware_user_agent3.DEFAULT_UA_APP_ID + }; + } +}); + +// node_modules/@smithy/hash-node/dist-cjs/index.js +var require_dist_cjs52 = __commonJS({ + "node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Hash: () => Hash3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs10(); + var import_util_utf86 = require_dist_cjs11(); + var import_buffer = require("buffer"); + var import_crypto13 = require("crypto"); + var Hash3 = class { + static { + __name(this, "Hash"); + } + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update((0, import_util_utf86.toUint8Array)(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret ? (0, import_crypto13.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto13.createHash)(this.algorithmIdentifier); + } + }; + function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); + } + __name(castSourceData, "castSourceData"); + } +}); + +// node_modules/@smithy/util-body-length-node/dist-cjs/index.js +var require_dist_cjs53 = __commonJS({ + "node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + calculateBodyLength: () => calculateBodyLength7 + }); + module2.exports = __toCommonJS2(src_exports); + var import_fs6 = require("fs"); + var calculateBodyLength7 = /* @__PURE__ */ __name((body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, import_fs6.lstatSync)(body.path).size; + } else if (typeof body.fd === "number") { + return (0, import_fs6.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js +var require_ruleset = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u5 = "required"; + var v8 = "fn"; + var w9 = "argv"; + var x7 = "ref"; + var a6 = true; + var b9 = "isSet"; + var c5 = "booleanEquals"; + var d9 = "error"; + var e5 = "endpoint"; + var f6 = "tree"; + var g6 = "PartitionResult"; + var h6 = "getAttr"; + var i5 = { [u5]: false, "type": "String" }; + var j6 = { [u5]: true, "default": false, "type": "Boolean" }; + var k9 = { [x7]: "Endpoint" }; + var l5 = { [v8]: c5, [w9]: [{ [x7]: "UseFIPS" }, true] }; + var m7 = { [v8]: c5, [w9]: [{ [x7]: "UseDualStack" }, true] }; + var n4 = {}; + var o5 = { [v8]: h6, [w9]: [{ [x7]: g6 }, "supportsFIPS"] }; + var p6 = { [x7]: g6 }; + var q8 = { [v8]: c5, [w9]: [true, { [v8]: h6, [w9]: [p6, "supportsDualStack"] }] }; + var r5 = [l5]; + var s4 = [m7]; + var t4 = [{ [x7]: "Region" }]; + var _data3 = { version: "1.0", parameters: { Region: i5, UseDualStack: j6, UseFIPS: j6, Endpoint: i5 }, rules: [{ conditions: [{ [v8]: b9, [w9]: [k9] }], rules: [{ conditions: r5, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d9 }, { conditions: s4, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d9 }, { endpoint: { url: k9, properties: n4, headers: n4 }, type: e5 }], type: f6 }, { conditions: [{ [v8]: b9, [w9]: t4 }], rules: [{ conditions: [{ [v8]: "aws.partition", [w9]: t4, assign: g6 }], rules: [{ conditions: [l5, m7], rules: [{ conditions: [{ [v8]: c5, [w9]: [a6, o5] }, q8], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d9 }], type: f6 }, { conditions: r5, rules: [{ conditions: [{ [v8]: c5, [w9]: [o5, a6] }], rules: [{ conditions: [{ [v8]: "stringEquals", [w9]: [{ [v8]: h6, [w9]: [p6, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n4, headers: n4 }, type: e5 }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d9 }], type: f6 }, { conditions: s4, rules: [{ conditions: [q8], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d9 }], type: f6 }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }], type: f6 }, { error: "Invalid Configuration: Missing Region", type: d9 }] }; + exports2.ruleSet = _data3; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs22(); + var util_endpoints_2 = require_dist_cjs19(); + var ruleset_1 = require_ruleset(); + var cache3 = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver3 = (endpointParams, context = {}) => { + return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + })); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver3; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs27(); + var url_parser_1 = require_dist_cjs21(); + var util_base64_1 = require_dist_cjs12(); + var util_utf8_1 = require_dist_cjs11(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2(); + var endpointResolver_1 = require_endpointResolver(); + var getRuntimeConfig5 = (config7) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config7?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config7?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config7?.disableHostPrefix ?? false, + endpointProvider: config7?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config7?.extensions ?? [], + httpAuthSchemeProvider: config7?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config7?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config7?.serviceId ?? "SSO", + urlParser: config7?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config7?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config7?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +var require_dist_cjs54 = __commonJS({ + "node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveDefaultsModeConfig: () => resolveDefaultsModeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_config_resolver5 = require_dist_cjs39(); + var import_node_config_provider3 = require_dist_cjs43(); + var import_property_provider2 = require_dist_cjs23(); + var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; + var AWS_REGION_ENV = "AWS_REGION"; + var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; + var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; + var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => { + return env2[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" + }; + var resolveDefaultsModeConfig3 = /* @__PURE__ */ __name(({ + region = (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_REGION_CONFIG_OPTIONS), + defaultsMode = (0, import_node_config_provider3.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) + } = {}) => (0, import_property_provider2.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error( + `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` + ); + } + }), "resolveDefaultsModeConfig"); + var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } + } + return "standard"; + }, "resolveNodeDefaultsModeAuto"); + var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } catch (e5) { + } + } + }, "inferPhysicalRegion"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js +var require_runtimeConfig = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package3()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_user_agent_node_1 = require_dist_cjs51(); + var config_resolver_1 = require_dist_cjs39(); + var hash_node_1 = require_dist_cjs52(); + var middleware_retry_1 = require_dist_cjs47(); + var node_config_provider_1 = require_dist_cjs43(); + var node_http_handler_1 = require_dist_cjs15(); + var util_body_length_node_1 = require_dist_cjs53(); + var util_retry_1 = require_dist_cjs46(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared(); + var smithy_client_1 = require_dist_cjs27(); + var util_defaults_mode_node_1 = require_dist_cjs54(); + var smithy_client_2 = require_dist_cjs27(); + var getRuntimeConfig5 = (config7) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config7); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config7); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config7?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config7, + runtime: "node", + defaultsMode, + authSchemePreference: config7?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config7?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config7?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config7?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config7), + region: config7?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config7?.requestHandler ?? defaultConfigProvider), + retryMode: config7?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }, config7), + sha256: config7?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config7?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config7?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config7?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config7?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +var require_dist_cjs55 = __commonJS({ + "node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS3, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS3, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration3, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration3, + resolveRegionConfig: () => resolveRegionConfig3 + }); + module2.exports = __toCommonJS2(index_exports); + var getAwsRegionExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }, "getAwsRegionExtensionConfiguration"); + var resolveAwsRegionExtensionConfiguration3 = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS3 = { + environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[REGION_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), + default: /* @__PURE__ */ __name(() => { + throw new Error("Region is missing"); + }, "default") + }; + var NODE_REGION_CONFIG_FILE_OPTIONS3 = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig3 = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: /* @__PURE__ */ __name(async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, "region"), + useFipsEndpoint: /* @__PURE__ */ __name(async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, "useFipsEndpoint") + }); + }, "resolveRegionConfig"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/index.js +var require_dist_cjs56 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, + GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, + InvalidRequestException: () => InvalidRequestException2, + ListAccountRolesCommand: () => ListAccountRolesCommand, + ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, + ListAccountsCommand: () => ListAccountsCommand, + ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, + LogoutCommand: () => LogoutCommand, + LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, + SSO: () => SSO, + SSOClient: () => SSOClient, + SSOServiceException: () => SSOServiceException, + TooManyRequestsException: () => TooManyRequestsException, + UnauthorizedException: () => UnauthorizedException, + __Client: () => import_smithy_client28.Client, + paginateListAccountRoles: () => paginateListAccountRoles, + paginateListAccounts: () => paginateListAccounts + }); + module2.exports = __toCommonJS2(index_exports); + var import_middleware_host_header3 = require_dist_cjs4(); + var import_middleware_logger3 = require_dist_cjs5(); + var import_middleware_recursion_detection3 = require_dist_cjs6(); + var import_middleware_user_agent3 = require_dist_cjs29(); + var import_config_resolver5 = require_dist_cjs39(); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length3 = require_dist_cjs41(); + var import_middleware_endpoint6 = require_dist_cjs44(); + var import_middleware_retry5 = require_dist_cjs47(); + var import_httpAuthSchemeProvider5 = require_httpAuthSchemeProvider2(); + var resolveClientEndpointParameters3 = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" + }); + }, "resolveClientEndpointParameters"); + var commonParams3 = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig5 = require_runtimeConfig(); + var import_region_config_resolver3 = require_dist_cjs55(); + var import_protocol_http15 = require_dist_cjs2(); + var import_smithy_client28 = require_dist_cjs27(); + var getHttpAuthExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig3 = /* @__PURE__ */ __name((config7) => { + return { + httpAuthSchemes: config7.httpAuthSchemes(), + httpAuthSchemeProvider: config7.httpAuthSchemeProvider(), + credentials: config7.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var resolveRuntimeExtensions3 = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign( + (0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), + (0, import_smithy_client28.getDefaultExtensionConfiguration)(runtimeConfig), + (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), + getHttpAuthExtensionConfiguration3(runtimeConfig) + ); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign( + runtimeConfig, + (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + (0, import_smithy_client28.resolveDefaultRuntimeConfig)(extensionConfiguration), + (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + resolveHttpAuthRuntimeConfig3(extensionConfiguration) + ); + }, "resolveRuntimeExtensions"); + var SSOClient = class extends import_smithy_client28.Client { + static { + __name(this, "SSOClient"); + } + /** + * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. + */ + config; + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig5.getRuntimeConfig)(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters3(_config_0); + const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry5.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver5.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint6.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider5.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry5.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core39.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider5.defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: /* @__PURE__ */ __name(async (config7) => new import_core39.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config7.credentials + }), "identityProviderConfigProvider") + }) + ); + this.middlewareStack.use((0, import_core39.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + }; + var import_middleware_serde5 = require_dist_cjs8(); + var SSOServiceException = class _SSOServiceException extends import_smithy_client28.ServiceException { + static { + __name(this, "SSOServiceException"); + } + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOServiceException.prototype); + } + }; + var InvalidRequestException2 = class _InvalidRequestException extends SSOServiceException { + static { + __name(this, "InvalidRequestException"); + } + name = "InvalidRequestException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + } + }; + var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException { + static { + __name(this, "ResourceNotFoundException"); + } + name = "ResourceNotFoundException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + } + }; + var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException { + static { + __name(this, "TooManyRequestsException"); + } + name = "TooManyRequestsException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _TooManyRequestsException.prototype); + } + }; + var UnauthorizedException = class _UnauthorizedException extends SSOServiceException { + static { + __name(this, "UnauthorizedException"); + } + name = "UnauthorizedException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnauthorizedException.prototype); + } + }; + var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "GetRoleCredentialsRequestFilterSensitiveLog"); + var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.secretAccessKey && { secretAccessKey: import_smithy_client28.SENSITIVE_STRING }, + ...obj.sessionToken && { sessionToken: import_smithy_client28.SENSITIVE_STRING } + }), "RoleCredentialsFilterSensitiveLog"); + var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } + }), "GetRoleCredentialsResponseFilterSensitiveLog"); + var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "ListAccountRolesRequestFilterSensitiveLog"); + var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "ListAccountsRequestFilterSensitiveLog"); + var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "LogoutRequestFilterSensitiveLog"); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b9.bp("/federation/credentials"); + const query = (0, import_smithy_client28.map)({ + [_rn]: [, (0, import_smithy_client28.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, import_smithy_client28.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b9.m("GET").h(headers).q(query).b(body); + return b9.build(); + }, "se_GetRoleCredentialsCommand"); + var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b9.bp("/assignment/roles"); + const query = (0, import_smithy_client28.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, import_smithy_client28.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b9.m("GET").h(headers).q(query).b(body); + return b9.build(); + }, "se_ListAccountRolesCommand"); + var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b9.bp("/assignment/accounts"); + const query = (0, import_smithy_client28.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] + }); + let body; + b9.m("GET").h(headers).q(query).b(body); + return b9.build(); + }, "se_ListAccountsCommand"); + var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b9.bp("/logout"); + let body; + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_LogoutCommand"); + var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + roleCredentials: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_GetRoleCredentialsCommand"); + var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + nextToken: import_smithy_client28.expectString, + roleList: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountRolesCommand"); + var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + accountList: import_smithy_client28._json, + nextToken: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountsCommand"); + var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + await (0, import_smithy_client28.collectBody)(output.body, context); + return contents; + }, "de_LogoutCommand"); + var de_CommandError3 = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core210.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes2(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError3({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError3 = (0, import_smithy_client28.withBaseException)(SSOServiceException); + var de_InvalidRequestExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_TooManyRequestsExceptionRes"); + var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedExceptionRes"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var _aI = "accountId"; + var _aT = "accessToken"; + var _ai = "account_id"; + var _mR = "maxResults"; + var _mr = "max_result"; + var _nT = "nextToken"; + var _nt = "next_token"; + var _rN = "roleName"; + var _rn = "role_name"; + var _xasbt = "x-amz-sso_bearer_token"; + var GetRoleCredentialsCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { + static { + __name(this, "GetRoleCredentialsCommand"); + } + }; + var ListAccountRolesCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { + static { + __name(this, "ListAccountRolesCommand"); + } + }; + var ListAccountsCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { + static { + __name(this, "ListAccountsCommand"); + } + }; + var LogoutCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { + static { + __name(this, "LogoutCommand"); + } + }; + var commands3 = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand + }; + var SSO = class extends SSOClient { + static { + __name(this, "SSO"); + } + }; + (0, import_smithy_client28.createAggregatedClient)(commands3, SSO); + var paginateListAccountRoles = (0, import_core39.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + var paginateListAccounts = (0, import_core39.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config7, context) => ({ + signingProperties: { + config: config7, + context + } + }) + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; +} +var import_util_middleware5, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() { + init_dist_es2(); + import_util_middleware5 = __toESM(require_dist_cjs7()); + defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config7, context, input) => { + return { + operation: (0, import_util_middleware5.getSmithyContext)(context).operation, + region: await (0, import_util_middleware5.normalizeProvider)(config7.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + resolveHttpAuthSchemeConfig = (config7) => { + const config_0 = resolveAwsSdkSigV4Config(config7); + return Object.assign(config_0, { + authSchemePreference: (0, import_util_middleware5.normalizeProvider)(config7.authSchemePreference ?? []) + }); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"() { + resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }); + }; + commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/package.json +var package_default2; +var init_package = __esm({ + "node_modules/@aws-sdk/nested-clients/package.json"() { + package_default2 = { + name: "@aws-sdk/nested-clients", + version: "3.844.0", + description: "Nested clients for AWS SDK packages.", + main: "./dist-cjs/index.js", + module: "./dist-es/index.js", + types: "./dist-types/index.d.ts", + scripts: { + build: "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline nested-clients", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients", + test: "yarn g:vitest run", + "test:watch": "yarn g:vitest watch" + }, + engines: { + node: ">=18.0.0" + }, + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "./sso-oidc.d.ts", + "./sso-oidc.js", + "./sts.d.ts", + "./sts.js", + "dist-*/**" + ], + browser: { + "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser", + "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser" + }, + "react-native": {}, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "packages/nested-clients" + }, + exports: { + "./sso-oidc": { + types: "./dist-types/submodules/sso-oidc/index.d.ts", + module: "./dist-es/submodules/sso-oidc/index.js", + node: "./dist-cjs/submodules/sso-oidc/index.js", + import: "./dist-es/submodules/sso-oidc/index.js", + require: "./dist-cjs/submodules/sso-oidc/index.js" + }, + "./sts": { + types: "./dist-types/submodules/sts/index.d.ts", + module: "./dist-es/submodules/sts/index.js", + node: "./dist-cjs/submodules/sts/index.js", + import: "./dist-es/submodules/sts/index.js", + require: "./dist-cjs/submodules/sts/index.js" + } + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js +var u3, v6, w7, x5, a4, b7, c3, d7, e3, f4, g4, h4, i3, j4, k7, l3, m5, n2, o3, p4, q6, r3, s2, t2, _data, ruleSet; +var init_ruleset = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js"() { + u3 = "required"; + v6 = "fn"; + w7 = "argv"; + x5 = "ref"; + a4 = true; + b7 = "isSet"; + c3 = "booleanEquals"; + d7 = "error"; + e3 = "endpoint"; + f4 = "tree"; + g4 = "PartitionResult"; + h4 = "getAttr"; + i3 = { [u3]: false, "type": "String" }; + j4 = { [u3]: true, "default": false, "type": "Boolean" }; + k7 = { [x5]: "Endpoint" }; + l3 = { [v6]: c3, [w7]: [{ [x5]: "UseFIPS" }, true] }; + m5 = { [v6]: c3, [w7]: [{ [x5]: "UseDualStack" }, true] }; + n2 = {}; + o3 = { [v6]: h4, [w7]: [{ [x5]: g4 }, "supportsFIPS"] }; + p4 = { [x5]: g4 }; + q6 = { [v6]: c3, [w7]: [true, { [v6]: h4, [w7]: [p4, "supportsDualStack"] }] }; + r3 = [l3]; + s2 = [m5]; + t2 = [{ [x5]: "Region" }]; + _data = { version: "1.0", parameters: { Region: i3, UseDualStack: j4, UseFIPS: j4, Endpoint: i3 }, rules: [{ conditions: [{ [v6]: b7, [w7]: [k7] }], rules: [{ conditions: r3, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d7 }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d7 }, { endpoint: { url: k7, properties: n2, headers: n2 }, type: e3 }], type: f4 }, { conditions: [{ [v6]: b7, [w7]: t2 }], rules: [{ conditions: [{ [v6]: "aws.partition", [w7]: t2, assign: g4 }], rules: [{ conditions: [l3, m5], rules: [{ conditions: [{ [v6]: c3, [w7]: [a4, o3] }, q6], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d7 }], type: f4 }, { conditions: r3, rules: [{ conditions: [{ [v6]: c3, [w7]: [o3, a4] }], rules: [{ conditions: [{ [v6]: "stringEquals", [w7]: [{ [v6]: h4, [w7]: [p4, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n2, headers: n2 }, type: e3 }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d7 }], type: f4 }, { conditions: s2, rules: [{ conditions: [q6], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d7 }], type: f4 }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }], type: f4 }, { error: "Invalid Configuration: Missing Region", type: d7 }] }; + ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +var import_util_endpoints, import_util_endpoints2, cache, defaultEndpointResolver; +var init_endpointResolver = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() { + import_util_endpoints = __toESM(require_dist_cjs22()); + import_util_endpoints2 = __toESM(require_dist_cjs19()); + init_ruleset(); + cache = new import_util_endpoints2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, { + endpointParams, + logger: context.logger + })); + }; + import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +var import_smithy_client7, import_url_parser, import_util_base646, import_util_utf84, getRuntimeConfig; +var init_runtimeConfig_shared = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client7 = __toESM(require_dist_cjs27()); + import_url_parser = __toESM(require_dist_cjs21()); + import_util_base646 = __toESM(require_dist_cjs12()); + import_util_utf84 = __toESM(require_dist_cjs11()); + init_httpAuthSchemeProvider(); + init_endpointResolver(); + getRuntimeConfig = (config7) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config7?.base64Decoder ?? import_util_base646.fromBase64, + base64Encoder: config7?.base64Encoder ?? import_util_base646.toBase64, + disableHostPrefix: config7?.disableHostPrefix ?? false, + endpointProvider: config7?.endpointProvider ?? defaultEndpointResolver, + extensions: config7?.extensions ?? [], + httpAuthSchemeProvider: config7?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + logger: config7?.logger ?? new import_smithy_client7.NoOpLogger(), + serviceId: config7?.serviceId ?? "SSO OIDC", + urlParser: config7?.urlParser ?? import_url_parser.parseUrl, + utf8Decoder: config7?.utf8Decoder ?? import_util_utf84.fromUtf8, + utf8Encoder: config7?.utf8Encoder ?? import_util_utf84.toUtf8 + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +var import_util_user_agent_node, import_config_resolver, import_hash_node, import_middleware_retry, import_node_config_provider, import_node_http_handler, import_util_body_length_node, import_util_retry, import_smithy_client8, import_util_defaults_mode_node, import_smithy_client9, getRuntimeConfig2; +var init_runtimeConfig = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() { + init_package(); + init_dist_es2(); + import_util_user_agent_node = __toESM(require_dist_cjs51()); + import_config_resolver = __toESM(require_dist_cjs39()); + import_hash_node = __toESM(require_dist_cjs52()); + import_middleware_retry = __toESM(require_dist_cjs47()); + import_node_config_provider = __toESM(require_dist_cjs43()); + import_node_http_handler = __toESM(require_dist_cjs15()); + import_util_body_length_node = __toESM(require_dist_cjs53()); + import_util_retry = __toESM(require_dist_cjs46()); + init_runtimeConfig_shared(); + import_smithy_client8 = __toESM(require_dist_cjs27()); + import_util_defaults_mode_node = __toESM(require_dist_cjs54()); + import_smithy_client9 = __toESM(require_dist_cjs27()); + getRuntimeConfig2 = (config7) => { + (0, import_smithy_client9.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node.resolveDefaultsModeConfig)(config7); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client8.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig(config7); + emitWarningIfUnsupportedVersion(process.version); + const loaderConfig = { + profile: config7?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config7, + runtime: "node", + defaultsMode, + authSchemePreference: config7?.authSchemePreference ?? (0, import_node_config_provider.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config7?.bodyLengthChecker ?? import_util_body_length_node.calculateBodyLength, + defaultUserAgentProvider: config7?.defaultUserAgentProvider ?? (0, import_util_user_agent_node.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default2.version }), + maxAttempts: config7?.maxAttempts ?? (0, import_node_config_provider.loadConfig)(import_middleware_retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config7), + region: config7?.region ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: import_node_http_handler.NodeHttpHandler.create(config7?.requestHandler ?? defaultConfigProvider), + retryMode: config7?.retryMode ?? (0, import_node_config_provider.loadConfig)({ + ...import_middleware_retry.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry.DEFAULT_RETRY_MODE + }, config7), + sha256: config7?.sha256 ?? import_hash_node.Hash.bind(null, "sha256"), + streamCollector: config7?.streamCollector ?? import_node_http_handler.streamCollector, + useDualstackEndpoint: config7?.useDualstackEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config7?.useFipsEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config7?.userAgentAppId ?? (0, import_node_config_provider.loadConfig)(import_util_user_agent_node.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; +var init_httpAuthExtensionConfiguration = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js"() { + getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + resolveHttpAuthRuntimeConfig = (config7) => { + return { + httpAuthSchemes: config7.httpAuthSchemes(), + httpAuthSchemeProvider: config7.httpAuthSchemeProvider(), + credentials: config7.credentials() + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js +var import_region_config_resolver, import_protocol_http12, import_smithy_client10, resolveRuntimeExtensions; +var init_runtimeExtensions = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() { + import_region_config_resolver = __toESM(require_dist_cjs55()); + import_protocol_http12 = __toESM(require_dist_cjs2()); + import_smithy_client10 = __toESM(require_dist_cjs27()); + init_httpAuthExtensionConfiguration(); + resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client10.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http12.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client10.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http12.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js +var import_middleware_host_header, import_middleware_logger, import_middleware_recursion_detection, import_middleware_user_agent, import_config_resolver2, import_middleware_content_length, import_middleware_endpoint, import_middleware_retry2, import_smithy_client11, SSOOIDCClient; +var init_SSOOIDCClient = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js"() { + import_middleware_host_header = __toESM(require_dist_cjs4()); + import_middleware_logger = __toESM(require_dist_cjs5()); + import_middleware_recursion_detection = __toESM(require_dist_cjs6()); + import_middleware_user_agent = __toESM(require_dist_cjs29()); + import_config_resolver2 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_middleware_content_length = __toESM(require_dist_cjs41()); + import_middleware_endpoint = __toESM(require_dist_cjs44()); + import_middleware_retry2 = __toESM(require_dist_cjs47()); + import_smithy_client11 = __toESM(require_dist_cjs27()); + init_httpAuthSchemeProvider(); + init_EndpointParameters(); + init_runtimeConfig(); + init_runtimeExtensions(); + SSOOIDCClient = class extends import_smithy_client11.Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver2.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config7) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config7.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +var import_smithy_client12, SSOOIDCServiceException; +var init_SSOOIDCServiceException = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() { + import_smithy_client12 = __toESM(require_dist_cjs27()); + SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client12.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js +var import_smithy_client13, AccessDeniedException, AuthorizationPendingException, CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException; +var init_models_0 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js"() { + import_smithy_client13 = __toESM(require_dist_cjs27()); + init_SSOOIDCServiceException(); + AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { + name = "AccessDeniedException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { + name = "AuthorizationPendingException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + CreateTokenRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client13.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client13.SENSITIVE_STRING } + }); + CreateTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client13.SENSITIVE_STRING } + }); + ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InternalServerException = class _InternalServerException extends SSOOIDCServiceException { + name = "InternalServerException"; + $fault = "server"; + error; + error_description; + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { + name = "InvalidClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { + name = "InvalidGrantException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { + name = "InvalidRequestException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { + name = "InvalidScopeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + SlowDownException = class _SlowDownException extends SSOOIDCServiceException { + name = "SlowDownException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { + name = "UnauthorizedClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { + name = "UnsupportedGrantTypeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js +var import_smithy_client14, se_CreateTokenCommand, de_CreateTokenCommand, de_CommandError, throwDefaultError, de_AccessDeniedExceptionRes, de_AuthorizationPendingExceptionRes, de_ExpiredTokenExceptionRes, de_InternalServerExceptionRes, de_InvalidClientExceptionRes, de_InvalidGrantExceptionRes, de_InvalidRequestExceptionRes, de_InvalidScopeExceptionRes, de_SlowDownExceptionRes, de_UnauthorizedClientExceptionRes, de_UnsupportedGrantTypeExceptionRes, deserializeMetadata; +var init_Aws_restJson1 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client14 = __toESM(require_dist_cjs27()); + init_models_0(); + init_SSOOIDCServiceException(); + se_CreateTokenCommand = async (input, context) => { + const b9 = requestBuilder(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/token"); + let body; + body = JSON.stringify((0, import_smithy_client14.take)(input, { + clientId: [], + clientSecret: [], + code: [], + codeVerifier: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_8) => (0, import_smithy_client14._json)(_8) + })); + b9.m("POST").h(headers).b(body); + return b9.build(); + }; + de_CreateTokenCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents = (0, import_smithy_client14.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context)), "body"); + const doc = (0, import_smithy_client14.take)(data, { + accessToken: import_smithy_client14.expectString, + expiresIn: import_smithy_client14.expectInt32, + idToken: import_smithy_client14.expectString, + refreshToken: import_smithy_client14.expectString, + tokenType: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + return contents; + }; + de_CommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseJsonErrorBody(output.body, context) + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } + }; + throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException); + de_AccessDeniedExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InternalServerExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidClientExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidGrantExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidScopeExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_SlowDownExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +var import_middleware_endpoint2, import_middleware_serde2, import_smithy_client15, CreateTokenCommand; +var init_CreateTokenCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() { + import_middleware_endpoint2 = __toESM(require_dist_cjs44()); + import_middleware_serde2 = __toESM(require_dist_cjs8()); + import_smithy_client15 = __toESM(require_dist_cjs27()); + init_EndpointParameters(); + init_models_0(); + init_Aws_restJson1(); + CreateTokenCommand = class extends import_smithy_client15.Command.classBuilder().ep(commonParams).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js +var import_smithy_client16, commands, SSOOIDC; +var init_SSOOIDC = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() { + import_smithy_client16 = __toESM(require_dist_cjs27()); + init_CreateTokenCommand(); + init_SSOOIDCClient(); + commands = { + CreateTokenCommand + }; + SSOOIDC = class extends SSOOIDCClient { + }; + (0, import_smithy_client16.createAggregatedClient)(commands, SSOOIDC); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js +var init_commands = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js"() { + init_CreateTokenCommand(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js +var init_models = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js"() { + init_models_0(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js +var sso_oidc_exports = {}; +__export(sso_oidc_exports, { + $Command: () => import_smithy_client15.Command, + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidGrantException: () => InvalidGrantException, + InvalidRequestException: () => InvalidRequestException, + InvalidScopeException: () => InvalidScopeException, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client11.Client +}); +var init_sso_oidc = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js"() { + init_SSOOIDCClient(); + init_SSOOIDC(); + init_commands(); + init_models(); + init_SSOOIDCServiceException(); + } +}); + +// node_modules/@aws-sdk/token-providers/dist-cjs/index.js +var require_dist_cjs57 = __commonJS({ + "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromEnvSigningName: () => fromEnvSigningName, + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); + var import_property_provider2 = require_dist_cjs23(); + var fromEnvSigningName = /* @__PURE__ */ __name(({ logger: logger5, signingName } = {}) => async () => { + logger5?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); + if (!signingName) { + throw new import_property_provider2.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger5 }); + } + const bearerTokenKey = (0, import_httpAuthSchemes.getBearerTokenEnvKey)(signingName); + if (!(bearerTokenKey in process.env)) { + throw new import_property_provider2.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger5 }); + } + const token = { token: process.env[bearerTokenKey] }; + (0, import_client3.setTokenFeature)(token, "BEARER_SERVICE_ENV_VARS", "3"); + return token; + }, "fromEnvSigningName"); + var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => { + const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => __toESM2((init_sso_oidc(), __toCommonJS(sso_oidc_exports)))); + const ssoOidcClient = new SSOOIDCClient2( + Object.assign({}, init.clientConfig ?? {}, { + region: ssoRegion ?? init.clientConfig?.region, + logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger + }) + ); + return ssoOidcClient; + }, "getSsoOidcClient"); + var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => { + const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => __toESM2((init_sso_oidc(), __toCommonJS(sso_oidc_exports)))); + const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); + return ssoOidcClient.send( + new CreateTokenCommand2({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); + }, "getNewSsoOidcToken"); + var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider2.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } + }, "validateTokenExpiry"); + var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider2.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } + }, "validateTokenKey"); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_fs6 = require("fs"); + var { writeFile } = import_fs6.promises; + var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); + }, "writeSSOTokenToFile"); + var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); + var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig + } + }; + init.logger?.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, + false + ); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e5) { + throw new import_property_provider2.TokenProviderError( + `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, + false + ); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } + }, "fromSso"); + var fromStatic = /* @__PURE__ */ __name(({ token, logger: logger5 }) => async () => { + logger5?.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new import_property_provider2.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; + }, "fromStatic"); + var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)(fromSso(init), async () => { + throw new import_property_provider2.TokenProviderError("Could not load token from any providers", false); + }), + (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, + (token) => token.expiration !== void 0 + ), "nodeProvider"); + } +}); + +// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +var require_dist_cjs58 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __esm2 = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res; + }; + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var loadSso_exports = {}; + __export2(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient + }); + var import_client_sso; + var init_loadSso = __esm2({ + "src/loadSso.ts"() { + "use strict"; + import_client_sso = require_dist_cjs56(); + } + }); + var index_exports = {}; + __export2(index_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile + }); + module2.exports = __toCommonJS2(index_exports); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_token_providers = require_dist_cjs57(); + var import_property_provider2 = require_dist_cjs23(); + var import_shared_ini_file_loader = require_dist_cjs42(); + var SHOULD_FAIL_CREDENTIAL_CHAIN = false; + var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + parentClientConfig, + profile, + logger: logger5 + }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(e5.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + logger: clientConfig?.logger ?? parentClientConfig?.logger, + region: clientConfig?.region ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(e5, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const { + roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} + } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider2.CredentialsProviderError("SSO returns an invalid temporary credential.", { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const credentials = { + accessKeyId, + secretAccessKey, + sessionToken, + expiration: new Date(expiration), + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + if (ssoSession) { + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s"); + } else { + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u"); + } + return credentials; + }, "resolveSSOCredentials"); + var validateSsoProfile = /* @__PURE__ */ __name((profile, logger5) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new import_property_provider2.CredentialsProviderError( + `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( + ", " + )} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, + { tryNextLink: false, logger: logger5 } + ); + } + return profile; + }, "validateSsoProfile"); + var fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger + }); + } + if (profile?.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile( + profile, + init.logger + ); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider2.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', + { tryNextLink: false, logger: init.logger } + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName + }); + } + }, "fromSSO"); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption2(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config7, context) => ({ + signingProperties: { + config: config7, + context + } + }) + }; +} +function createSmithyApiNoAuthHttpAuthOption2(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; +} +var import_util_middleware6, defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig2; +var init_httpAuthSchemeProvider2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js"() { + init_dist_es2(); + import_util_middleware6 = __toESM(require_dist_cjs7()); + init_STSClient(); + defaultSTSHttpAuthSchemeParametersProvider = async (config7, context, input) => { + return { + operation: (0, import_util_middleware6.getSmithyContext)(context).operation, + region: await (0, import_util_middleware6.normalizeProvider)(config7.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption2(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption2(authParameters)); + } + } + return options; + }; + resolveStsAuthConfig = (input) => Object.assign(input, { + stsClientCtor: STSClient + }); + resolveHttpAuthSchemeConfig2 = (config7) => { + const config_0 = resolveStsAuthConfig(config7); + const config_1 = resolveAwsSdkSigV4Config(config_0); + return Object.assign(config_1, { + authSchemePreference: (0, import_util_middleware6.normalizeProvider)(config7.authSchemePreference ?? []) + }); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js +var resolveClientEndpointParameters2, commonParams2; +var init_EndpointParameters2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js"() { + resolveClientEndpointParameters2 = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }); + }; + commonParams2 = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js +var F5, G6, H5, I5, J5, a5, b8, c4, d8, e4, f5, g5, h5, i4, j5, k8, l4, m6, n3, o4, p5, q7, r4, s3, t3, u4, v7, w8, x6, y6, z6, A5, B3, C5, D5, E4, _data2, ruleSet2; +var init_ruleset2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js"() { + F5 = "required"; + G6 = "type"; + H5 = "fn"; + I5 = "argv"; + J5 = "ref"; + a5 = false; + b8 = true; + c4 = "booleanEquals"; + d8 = "stringEquals"; + e4 = "sigv4"; + f5 = "sts"; + g5 = "us-east-1"; + h5 = "endpoint"; + i4 = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + j5 = "tree"; + k8 = "error"; + l4 = "getAttr"; + m6 = { [F5]: false, [G6]: "String" }; + n3 = { [F5]: true, "default": false, [G6]: "Boolean" }; + o4 = { [J5]: "Endpoint" }; + p5 = { [H5]: "isSet", [I5]: [{ [J5]: "Region" }] }; + q7 = { [J5]: "Region" }; + r4 = { [H5]: "aws.partition", [I5]: [q7], "assign": "PartitionResult" }; + s3 = { [J5]: "UseFIPS" }; + t3 = { [J5]: "UseDualStack" }; + u4 = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e4, "signingName": f5, "signingRegion": g5 }] }, "headers": {} }; + v7 = {}; + w8 = { "conditions": [{ [H5]: d8, [I5]: [q7, "aws-global"] }], [h5]: u4, [G6]: h5 }; + x6 = { [H5]: c4, [I5]: [s3, true] }; + y6 = { [H5]: c4, [I5]: [t3, true] }; + z6 = { [H5]: l4, [I5]: [{ [J5]: "PartitionResult" }, "supportsFIPS"] }; + A5 = { [J5]: "PartitionResult" }; + B3 = { [H5]: c4, [I5]: [true, { [H5]: l4, [I5]: [A5, "supportsDualStack"] }] }; + C5 = [{ [H5]: "isSet", [I5]: [o4] }]; + D5 = [x6]; + E4 = [y6]; + _data2 = { version: "1.0", parameters: { Region: m6, UseDualStack: n3, UseFIPS: n3, Endpoint: m6, UseGlobalEndpoint: n3 }, rules: [{ conditions: [{ [H5]: c4, [I5]: [{ [J5]: "UseGlobalEndpoint" }, b8] }, { [H5]: "not", [I5]: C5 }, p5, r4, { [H5]: c4, [I5]: [s3, a5] }, { [H5]: c4, [I5]: [t3, a5] }], rules: [{ conditions: [{ [H5]: d8, [I5]: [q7, "ap-northeast-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "ap-south-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "ap-southeast-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "ap-southeast-2"] }], endpoint: u4, [G6]: h5 }, w8, { conditions: [{ [H5]: d8, [I5]: [q7, "ca-central-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "eu-central-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "eu-north-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "eu-west-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "eu-west-2"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "eu-west-3"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "sa-east-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, g5] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "us-east-2"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "us-west-1"] }], endpoint: u4, [G6]: h5 }, { conditions: [{ [H5]: d8, [I5]: [q7, "us-west-2"] }], endpoint: u4, [G6]: h5 }, { endpoint: { url: i4, properties: { authSchemes: [{ name: e4, signingName: f5, signingRegion: "{Region}" }] }, headers: v7 }, [G6]: h5 }], [G6]: j5 }, { conditions: C5, rules: [{ conditions: D5, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G6]: k8 }, { conditions: E4, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G6]: k8 }, { endpoint: { url: o4, properties: v7, headers: v7 }, [G6]: h5 }], [G6]: j5 }, { conditions: [p5], rules: [{ conditions: [r4], rules: [{ conditions: [x6, y6], rules: [{ conditions: [{ [H5]: c4, [I5]: [b8, z6] }, B3], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v7, headers: v7 }, [G6]: h5 }], [G6]: j5 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G6]: k8 }], [G6]: j5 }, { conditions: D5, rules: [{ conditions: [{ [H5]: c4, [I5]: [z6, b8] }], rules: [{ conditions: [{ [H5]: d8, [I5]: [{ [H5]: l4, [I5]: [A5, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v7, headers: v7 }, [G6]: h5 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v7, headers: v7 }, [G6]: h5 }], [G6]: j5 }, { error: "FIPS is enabled but this partition does not support FIPS", [G6]: k8 }], [G6]: j5 }, { conditions: E4, rules: [{ conditions: [B3], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v7, headers: v7 }, [G6]: h5 }], [G6]: j5 }, { error: "DualStack is enabled but this partition does not support DualStack", [G6]: k8 }], [G6]: j5 }, w8, { endpoint: { url: i4, properties: v7, headers: v7 }, [G6]: h5 }], [G6]: j5 }], [G6]: j5 }, { error: "Invalid Configuration: Missing Region", [G6]: k8 }] }; + ruleSet2 = _data2; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js +var import_util_endpoints3, import_util_endpoints4, cache2, defaultEndpointResolver2; +var init_endpointResolver2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() { + import_util_endpoints3 = __toESM(require_dist_cjs22()); + import_util_endpoints4 = __toESM(require_dist_cjs19()); + init_ruleset2(); + cache2 = new import_util_endpoints4.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] + }); + defaultEndpointResolver2 = (endpointParams, context = {}) => { + return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, { + endpointParams, + logger: context.logger + })); + }; + import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +var import_smithy_client17, import_url_parser2, import_util_base647, import_util_utf85, getRuntimeConfig3; +var init_runtimeConfig_shared2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client17 = __toESM(require_dist_cjs27()); + import_url_parser2 = __toESM(require_dist_cjs21()); + import_util_base647 = __toESM(require_dist_cjs12()); + import_util_utf85 = __toESM(require_dist_cjs11()); + init_httpAuthSchemeProvider2(); + init_endpointResolver2(); + getRuntimeConfig3 = (config7) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config7?.base64Decoder ?? import_util_base647.fromBase64, + base64Encoder: config7?.base64Encoder ?? import_util_base647.toBase64, + disableHostPrefix: config7?.disableHostPrefix ?? false, + endpointProvider: config7?.endpointProvider ?? defaultEndpointResolver2, + extensions: config7?.extensions ?? [], + httpAuthSchemeProvider: config7?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + logger: config7?.logger ?? new import_smithy_client17.NoOpLogger(), + serviceId: config7?.serviceId ?? "STS", + urlParser: config7?.urlParser ?? import_url_parser2.parseUrl, + utf8Decoder: config7?.utf8Decoder ?? import_util_utf85.fromUtf8, + utf8Encoder: config7?.utf8Encoder ?? import_util_utf85.toUtf8 + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +var import_util_user_agent_node2, import_config_resolver3, import_hash_node2, import_middleware_retry3, import_node_config_provider2, import_node_http_handler2, import_util_body_length_node2, import_util_retry2, import_smithy_client18, import_util_defaults_mode_node2, import_smithy_client19, getRuntimeConfig4; +var init_runtimeConfig2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() { + init_package(); + init_dist_es2(); + import_util_user_agent_node2 = __toESM(require_dist_cjs51()); + import_config_resolver3 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_hash_node2 = __toESM(require_dist_cjs52()); + import_middleware_retry3 = __toESM(require_dist_cjs47()); + import_node_config_provider2 = __toESM(require_dist_cjs43()); + import_node_http_handler2 = __toESM(require_dist_cjs15()); + import_util_body_length_node2 = __toESM(require_dist_cjs53()); + import_util_retry2 = __toESM(require_dist_cjs46()); + init_runtimeConfig_shared2(); + import_smithy_client18 = __toESM(require_dist_cjs27()); + import_util_defaults_mode_node2 = __toESM(require_dist_cjs54()); + import_smithy_client19 = __toESM(require_dist_cjs27()); + getRuntimeConfig4 = (config7) => { + (0, import_smithy_client19.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node2.resolveDefaultsModeConfig)(config7); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client18.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig3(config7); + emitWarningIfUnsupportedVersion(process.version); + const loaderConfig = { + profile: config7?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config7, + runtime: "node", + defaultsMode, + authSchemePreference: config7?.authSchemePreference ?? (0, import_node_config_provider2.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config7?.bodyLengthChecker ?? import_util_body_length_node2.calculateBodyLength, + defaultUserAgentProvider: config7?.defaultUserAgentProvider ?? (0, import_util_user_agent_node2.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default2.version }), + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config7.credentialDefaultProvider(idProps?.__config || {})()), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + maxAttempts: config7?.maxAttempts ?? (0, import_node_config_provider2.loadConfig)(import_middleware_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config7), + region: config7?.region ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver3.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: import_node_http_handler2.NodeHttpHandler.create(config7?.requestHandler ?? defaultConfigProvider), + retryMode: config7?.retryMode ?? (0, import_node_config_provider2.loadConfig)({ + ...import_middleware_retry3.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry2.DEFAULT_RETRY_MODE + }, config7), + sha256: config7?.sha256 ?? import_hash_node2.Hash.bind(null, "sha256"), + streamCollector: config7?.streamCollector ?? import_node_http_handler2.streamCollector, + useDualstackEndpoint: config7?.useDualstackEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config7?.useFipsEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config7?.userAgentAppId ?? (0, import_node_config_provider2.loadConfig)(import_util_user_agent_node2.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration2, resolveHttpAuthRuntimeConfig2; +var init_httpAuthExtensionConfiguration2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js"() { + getHttpAuthExtensionConfiguration2 = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + resolveHttpAuthRuntimeConfig2 = (config7) => { + return { + httpAuthSchemes: config7.httpAuthSchemes(), + httpAuthSchemeProvider: config7.httpAuthSchemeProvider(), + credentials: config7.credentials() + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js +var import_region_config_resolver2, import_protocol_http13, import_smithy_client20, resolveRuntimeExtensions2; +var init_runtimeExtensions2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() { + import_region_config_resolver2 = __toESM(require_dist_cjs55()); + import_protocol_http13 = __toESM(require_dist_cjs2()); + import_smithy_client20 = __toESM(require_dist_cjs27()); + init_httpAuthExtensionConfiguration2(); + resolveRuntimeExtensions2 = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, import_region_config_resolver2.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client20.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http13.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver2.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client20.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http13.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration)); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +var import_middleware_host_header2, import_middleware_logger2, import_middleware_recursion_detection2, import_middleware_user_agent2, import_config_resolver4, import_middleware_content_length2, import_middleware_endpoint3, import_middleware_retry4, import_smithy_client21, STSClient; +var init_STSClient = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js"() { + import_middleware_host_header2 = __toESM(require_dist_cjs4()); + import_middleware_logger2 = __toESM(require_dist_cjs5()); + import_middleware_recursion_detection2 = __toESM(require_dist_cjs6()); + import_middleware_user_agent2 = __toESM(require_dist_cjs29()); + import_config_resolver4 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_middleware_content_length2 = __toESM(require_dist_cjs41()); + import_middleware_endpoint3 = __toESM(require_dist_cjs44()); + import_middleware_retry4 = __toESM(require_dist_cjs47()); + import_smithy_client21 = __toESM(require_dist_cjs27()); + init_httpAuthSchemeProvider2(); + init_EndpointParameters2(); + init_runtimeConfig2(); + init_runtimeExtensions2(); + STSClient = class extends import_smithy_client21.Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig4(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters2(_config_0); + const _config_2 = (0, import_middleware_user_agent2.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry4.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver4.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header2.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint3.resolveEndpointConfig)(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig2(_config_6); + const _config_8 = resolveRuntimeExtensions2(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent2.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry4.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length2.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header2.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger2.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection2.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config7) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config7.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +var import_smithy_client22, STSServiceException; +var init_STSServiceException = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() { + import_smithy_client22 = __toESM(require_dist_cjs27()); + STSServiceException = class _STSServiceException extends import_smithy_client22.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, _STSServiceException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js +var import_smithy_client23, CredentialsFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, IDPCommunicationErrorException; +var init_models_02 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js"() { + import_smithy_client23 = __toESM(require_dist_cjs27()); + init_STSServiceException(); + CredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client23.SENSITIVE_STRING } + }); + AssumeRoleResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }); + ExpiredTokenException2 = class _ExpiredTokenException extends STSServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + } + }; + MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException { + name = "MalformedPolicyDocumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); + } + }; + PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException { + name = "PackedPolicyTooLargeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); + } + }; + RegionDisabledException = class _RegionDisabledException extends STSServiceException { + name = "RegionDisabledException"; + $fault = "client"; + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _RegionDisabledException.prototype); + } + }; + IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException { + name = "IDPRejectedClaimException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); + } + }; + InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException { + name = "InvalidIdentityTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); + } + }; + AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client23.SENSITIVE_STRING } + }); + AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }); + IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js +var import_protocol_http14, import_smithy_client24, se_AssumeRoleCommand, se_AssumeRoleWithWebIdentityCommand, de_AssumeRoleCommand, de_AssumeRoleWithWebIdentityCommand, de_CommandError2, de_ExpiredTokenExceptionRes2, de_IDPCommunicationErrorExceptionRes, de_IDPRejectedClaimExceptionRes, de_InvalidIdentityTokenExceptionRes, de_MalformedPolicyDocumentExceptionRes, de_PackedPolicyTooLargeExceptionRes, de_RegionDisabledExceptionRes, se_AssumeRoleRequest, se_AssumeRoleWithWebIdentityRequest, se_policyDescriptorListType, se_PolicyDescriptorType, se_ProvidedContext, se_ProvidedContextsListType, se_Tag, se_tagKeyListType, se_tagListType, de_AssumedRoleUser, de_AssumeRoleResponse, de_AssumeRoleWithWebIdentityResponse, de_Credentials, de_ExpiredTokenException, de_IDPCommunicationErrorException, de_IDPRejectedClaimException, de_InvalidIdentityTokenException, de_MalformedPolicyDocumentException, de_PackedPolicyTooLargeException, de_RegionDisabledException, deserializeMetadata2, throwDefaultError2, buildHttpRpcRequest, SHARED_HEADERS, _7, _A, _AKI, _AR, _ARI, _ARU, _ARWWI, _Ar, _Au, _C, _CA, _DS, _E, _EI, _K, _P, _PA, _PAr, _PC, _PI, _PPS, _Pr, _RA, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _V, _Va, _WIT, _a5, _m, buildFormUrlencodedString, loadQueryErrorCode; +var init_Aws_query = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js"() { + init_dist_es2(); + import_protocol_http14 = __toESM(require_dist_cjs2()); + import_smithy_client24 = __toESM(require_dist_cjs27()); + init_models_02(); + init_STSServiceException(); + se_AssumeRoleCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _7 + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }; + se_AssumeRoleWithWebIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _7 + }); + return buildHttpRpcRequest(context, headers, "/", void 0, body); + }; + de_AssumeRoleCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError2(output, context); + } + const data = await parseXmlBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); + const response = { + $metadata: deserializeMetadata2(output), + ...contents + }; + return response; + }; + de_AssumeRoleWithWebIdentityCommand = async (output, context) => { + if (output.statusCode >= 300) { + return de_CommandError2(output, context); + } + const data = await parseXmlBody(output.body, context); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + const response = { + $metadata: deserializeMetadata2(output), + ...contents + }; + return response; + }; + de_CommandError2 = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseXmlErrorBody(output.body, context) + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes2(parsedOutput, context); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError2({ + output, + parsedBody: parsedBody.Error, + errorCode + }); + } + }; + de_ExpiredTokenExceptionRes2 = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context); + const exception = new ExpiredTokenException2({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_RegionDisabledExceptionRes = async (parsedOutput, context) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + se_AssumeRoleRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (input[_T]?.length === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (input[_TTK]?.length === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (input[_PC]?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; + }; + se_AssumeRoleWithWebIdentityRequest = (input, context) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }; + se_policyDescriptorListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + se_PolicyDescriptorType = (input, context) => { + const entries = {}; + if (input[_a5] != null) { + entries[_a5] = input[_a5]; + } + return entries; + }; + se_ProvidedContext = (input, context) => { + const entries = {}; + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; + }; + se_ProvidedContextsListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + se_Tag = (input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; + }; + se_tagKeyListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; + }; + se_tagListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + de_AssumedRoleUser = (output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client24.expectString)(output[_Ar]); + } + return contents; + }; + de_AssumeRoleResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client24.expectString)(output[_SI]); + } + return contents; + }; + de_AssumeRoleWithWebIdentityResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client24.expectString)(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client24.expectString)(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client24.expectString)(output[_SI]); + } + return contents; + }; + de_Credentials = (output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client24.expectString)(output[_SAK]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client24.expectString)(output[_ST]); + } + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client24.expectNonNull)((0, import_smithy_client24.parseRfc3339DateTimeWithOffset)(output[_E])); + } + return contents; + }; + de_ExpiredTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_IDPCommunicationErrorException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_IDPRejectedClaimException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_InvalidIdentityTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_MalformedPolicyDocumentException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_PackedPolicyTooLargeException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_RegionDisabledException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + deserializeMetadata2 = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException); + buildHttpRpcRequest = async (context, headers, path5, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path5 : basePath + path5, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + } + return new import_protocol_http14.HttpRequest(contents); + }; + SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" + }; + _7 = "2011-06-15"; + _A = "Action"; + _AKI = "AccessKeyId"; + _AR = "AssumeRole"; + _ARI = "AssumedRoleId"; + _ARU = "AssumedRoleUser"; + _ARWWI = "AssumeRoleWithWebIdentity"; + _Ar = "Arn"; + _Au = "Audience"; + _C = "Credentials"; + _CA = "ContextAssertion"; + _DS = "DurationSeconds"; + _E = "Expiration"; + _EI = "ExternalId"; + _K = "Key"; + _P = "Policy"; + _PA = "PolicyArns"; + _PAr = "ProviderArn"; + _PC = "ProvidedContexts"; + _PI = "ProviderId"; + _PPS = "PackedPolicySize"; + _Pr = "Provider"; + _RA = "RoleArn"; + _RSN = "RoleSessionName"; + _SAK = "SecretAccessKey"; + _SFWIT = "SubjectFromWebIdentityToken"; + _SI = "SourceIdentity"; + _SN = "SerialNumber"; + _ST = "SessionToken"; + _T = "Tags"; + _TC = "TokenCode"; + _TTK = "TransitiveTagKeys"; + _V = "Version"; + _Va = "Value"; + _WIT = "WebIdentityToken"; + _a5 = "arn"; + _m = "message"; + buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client24.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client24.extendedEncodeURIComponent)(value)).join("&"); + loadQueryErrorCode = (output, data) => { + if (data.Error?.Code !== void 0) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js +var import_middleware_endpoint4, import_middleware_serde3, import_smithy_client25, AssumeRoleCommand; +var init_AssumeRoleCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() { + import_middleware_endpoint4 = __toESM(require_dist_cjs44()); + import_middleware_serde3 = __toESM(require_dist_cjs8()); + import_smithy_client25 = __toESM(require_dist_cjs27()); + init_EndpointParameters2(); + init_models_02(); + init_Aws_query(); + AssumeRoleCommand = class extends import_smithy_client25.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde3.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint4.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +var import_middleware_endpoint5, import_middleware_serde4, import_smithy_client26, AssumeRoleWithWebIdentityCommand; +var init_AssumeRoleWithWebIdentityCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() { + import_middleware_endpoint5 = __toESM(require_dist_cjs44()); + import_middleware_serde4 = __toESM(require_dist_cjs8()); + import_smithy_client26 = __toESM(require_dist_cjs27()); + init_EndpointParameters2(); + init_models_02(); + init_Aws_query(); + AssumeRoleWithWebIdentityCommand = class extends import_smithy_client26.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde4.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint5.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js +var import_smithy_client27, commands2, STS; +var init_STS = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() { + import_smithy_client27 = __toESM(require_dist_cjs27()); + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + init_STSClient(); + commands2 = { + AssumeRoleCommand, + AssumeRoleWithWebIdentityCommand + }; + STS = class extends STSClient { + }; + (0, import_smithy_client27.createAggregatedClient)(commands2, STS); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js +var init_commands2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js"() { + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/index.js +var init_models2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/index.js"() { + init_models_02(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +var ASSUME_ROLE_DEFAULT_REGION, getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2; +var init_defaultStsRoleAssumers = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() { + init_client(); + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; + getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { + if (typeof assumedRoleUser?.Arn === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; + } + } + return void 0; + }; + resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => { + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; + }; + getDefaultRoleAssumer = (stsOptions, STSClient2) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { logger: logger5 = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient2({ + profile: stsOptions?.parentClientConfig?.profile, + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger: logger5 + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); + return credentials; + }; + }; + getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => { + let stsClient; + return async (params) => { + if (!stsClient) { + const { logger: logger5 = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient2({ + profile: stsOptions?.parentClientConfig?.profile, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger: logger5 + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + if (accountId) { + setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); + } + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); + return credentials; + }; + }; + isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js +var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider; +var init_defaultRoleAssumers = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js"() { + init_defaultStsRoleAssumers(); + init_STSClient(); + getCustomizableStsClientCtor = (baseCtor, customizations) => { + if (!customizations) + return baseCtor; + else + return class CustomizableSTSClient extends baseCtor { + constructor(config7) { + super(config7); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }; + }; + getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input + }); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js +var sts_exports = {}; +__export(sts_exports, { + AssumeRoleCommand: () => AssumeRoleCommand, + AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException2, + IDPCommunicationErrorException: () => IDPCommunicationErrorException, + IDPRejectedClaimException: () => IDPRejectedClaimException, + InvalidIdentityTokenException: () => InvalidIdentityTokenException, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, + RegionDisabledException: () => RegionDisabledException, + STS: () => STS, + STSClient: () => STSClient, + STSServiceException: () => STSServiceException, + __Client: () => import_smithy_client21.Client, + decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, + getDefaultRoleAssumer: () => getDefaultRoleAssumer2, + getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 +}); +var init_sts = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js"() { + init_STSClient(); + init_STS(); + init_commands2(); + init_models2(); + init_defaultRoleAssumers(); + init_STSServiceException(); + } +}); + +// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +var require_dist_cjs59 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromProcess: () => fromProcess + }); + module2.exports = __toCommonJS2(index_exports); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_property_provider2 = require_dist_cjs23(); + var import_child_process = require("child_process"); + var import_util12 = require("util"); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + let accountId = data.AccountId; + if (!accountId && profiles?.[profileName]?.aws_account_id) { + accountId = profiles[profileName].aws_account_id; + } + const credentials = { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope }, + ...accountId && { accountId } + }; + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w"); + return credentials; + }, "getValidatedProcessCredentials"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger5) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util12.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data, profiles); + } catch (error) { + throw new import_property_provider2.CredentialsProviderError(error.message, { logger: logger5 }); + } + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger5 }); + } + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger: logger5 + }); + } + }, "resolveProcessCredentials"); + var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials( + (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }), + profiles, + init.logger + ); + }, "fromProcess"); + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +var require_fromWebToken = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m7[k9]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v8) { + Object.defineProperty(o5, "default", { enumerable: true, value: v8 }); + } : function(o5, v8) { + o5["default"] = v8; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = function(o5) { + ownKeys = Object.getOwnPropertyNames || function(o6) { + var ar2 = []; + for (var k9 in o6) if (Object.prototype.hasOwnProperty.call(o6, k9)) ar2[ar2.length] = k9; + return ar2; + }; + return ownKeys(o5); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k9 = ownKeys(mod), i5 = 0; i5 < k9.length; i5++) if (k9[i5] !== "default") __createBinding2(result, mod, k9[i5]); + } + __setModuleDefault2(result, mod); + return result; + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromWebToken = void 0; + var fromWebToken2 = (init) => async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => __importStar2((init_sts(), __toCommonJS(sts_exports)))); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: { + ...awsIdentityProperties?.callerClientConfig, + ...init.parentClientConfig + } + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds + }); + }; + exports2.fromWebToken = fromWebToken2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +var require_fromTokenFile = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromTokenFile = void 0; + var client_1 = (init_client(), __toCommonJS(client_exports)); + var property_provider_1 = require_dist_cjs23(); + var fs_1 = require("fs"); + var fromWebToken_1 = require_fromWebToken(); + var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; + var ENV_ROLE_ARN = "AWS_ROLE_ARN"; + var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; + var fromTokenFile2 = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; + const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", { + logger: init.logger + }); + } + const credentials = await (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName + })(); + if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { + (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); + } + return credentials; + }; + exports2.fromTokenFile = fromTokenFile2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +var require_dist_cjs60 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + module2.exports = __toCommonJS2(index_exports); + __reExport(index_exports, require_fromTokenFile(), module2.exports); + __reExport(index_exports, require_fromWebToken(), module2.exports); + } +}); + +// node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +var require_dist_cjs61 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromIni: () => fromIni + }); + module2.exports = __toCommonJS2(index_exports); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_property_provider2 = require_dist_cjs23(); + var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger5) => { + const sourceProvidersMap = { + EcsContainer: /* @__PURE__ */ __name(async (options) => { + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50())); + const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return async () => (0, import_property_provider2.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); + }, "EcsContainer"), + Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => { + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + return async () => fromInstanceMetadata(options)().then(setNamedProvider); + }, "Ec2InstanceMetadata"), + Environment: /* @__PURE__ */ __name(async (options) => { + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs48())); + return async () => fromEnv(options)().then(setNamedProvider); + }, "Environment") + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider2.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, + { logger: logger5 } + ); + } + }, "resolveCredentialSource"); + var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider"); + var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger: logger5 } = {}) => { + return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger5 }) || isCredentialSourceProfile(arg, { profile, logger: logger5 })); + }, "isAssumeRoleProfile"); + var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger5 }) => { + const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; + if (withSourceProfile) { + logger5?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); + } + return withSourceProfile; + }, "isAssumeRoleWithSourceProfile"); + var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger5 }) => { + const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; + if (withProviderProfile) { + logger5?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); + } + return withProviderProfile; + }, "isCredentialSourceProfile"); + var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const profileData = profiles[profileName]; + const { source_profile, region } = profileData; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer: getDefaultRoleAssumer3 } = await Promise.resolve().then(() => __toESM2((init_sts(), __toCommonJS(sts_exports)))); + options.roleAssumer = getDefaultRoleAssumer3( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: { + ...options?.parentClientConfig, + region: region ?? options?.parentClientConfig?.region + } + }, + options.clientPlugins + ); + } + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider2.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + { logger: options.logger } + ); + } + options.logger?.debug( + `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}` + ); + const sourceCredsProvider = source_profile ? resolveProfileData( + source_profile, + profiles, + options, + { + ...visitedProfiles, + [source_profile]: true + }, + isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}) + ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); + if (isCredentialSourceWithoutRoleArn(profileData)) { + return sourceCredsProvider.then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); + } else { + const params = { + RoleArn: profileData.role_arn, + RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: profileData.external_id, + DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10) + }; + const { mfa_serial } = profileData; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider2.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + { logger: options.logger, tryNextLink: false } + ); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params).then( + (creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o") + ); + } + }, "resolveAssumeRoleCredentials"); + var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => { + return !section.role_arn && !!section.credential_source; + }, "isCredentialSourceWithoutRoleArn"); + var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM2(require_dist_cjs59())).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })().then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v")) + ), "resolveProcessCredentials"); + var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs58())); + return fromSSO({ + profile, + logger: options.logger, + parentClientConfig: options.parentClientConfig, + clientConfig: options.clientConfig + })().then((creds) => { + if (profileData.sso_session) { + return (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r"); + } else { + return (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); + } + }); + }, "resolveSsoCredentials"); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile"); + var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => { + options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); + const credentials = { + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, + ...profile.aws_account_id && { accountId: profile.aws_account_id } + }; + return (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n"); + }, "resolveStaticCredentials"); + var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); + var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM2(require_dist_cjs60())).then( + ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })().then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")) + ), "resolveWebIdentityCredentials"); + var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, data, options); + } + throw new import_property_provider2.CredentialsProviderError( + `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, + { logger: options.logger } + ); + }, "resolveProfileData"); + var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig + } + }; + init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData( + (0, import_shared_ini_file_loader.getProfileName)({ + profile: _init.profile ?? callerClientConfig?.profile + }), + profiles, + init + ); + }, "fromIni"); + } +}); + +// node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +var require_dist_cjs62 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_credential_provider_env = require_dist_cjs48(); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_property_provider2 = require_dist_cjs23(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var remoteProvider = /* @__PURE__ */ __name(async (init) => { + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50())); + return (0, import_property_provider2.chain)(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { + return async () => { + throw new import_property_provider2.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + }; + } + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); + }, "remoteProvider"); + var multipleCredentialSourceWarningEmitted = false; + var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + async () => { + const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; + if (envStaticCredentialsAreSet) { + if (!multipleCredentialSourceWarningEmitted) { + const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn; + warnFn( + `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + Multiple credential sources detected: + Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. + This SDK will proceed with the AWS_PROFILE value. + + However, a future version may change this behavior to prefer the ENV static credentials. + Please ensure that your environment only sets either the AWS_PROFILE or the + AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. +` + ); + multipleCredentialSourceWarningEmitted = true; + } + } + throw new import_property_provider2.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true + }); + } + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return (0, import_credential_provider_env.fromEnv)(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider2.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields).", + { logger: init.logger } + ); + } + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs58())); + return fromSSO(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs61())); + return fromIni(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs59())); + return fromProcess(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs60())); + return fromTokenFile2(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider2.CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger + }); + } + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh + ), "defaultProvider"); + var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, "credentialsWillNeedRefresh"); + var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); + } +}); + +// node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +var require_dist_cjs63 = __commonJS({ + "node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_eventstream_codec = require_dist_cjs33(); + var import_stream6 = require("stream"); + var EventSigningStream = class extends import_stream6.Transform { + static { + __name(this, "EventSigningStream"); + } + priorSignature; + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + super({ + autoDestroy: true, + readableObjectMode: true, + writableObjectMode: true, + ...options + }); + this.priorSignature = options.priorSignature; + this.eventStreamCodec = options.eventStreamCodec; + this.messageSigner = options.messageSigner; + this.systemClockOffsetProvider = options.systemClockOffsetProvider; + } + async _transform(chunk, encoding, callback) { + try { + const now = new Date(Date.now() + await this.systemClockOffsetProvider()); + const dateHeader = { + ":date": { type: "timestamp", value: now } + }; + const signedMessage = await this.messageSigner.sign( + { + message: { + body: chunk, + headers: dateHeader + }, + priorSignature: this.priorSignature + }, + { + signingDate: now + } + ); + this.priorSignature = signedMessage.signature; + const serializedSigned = this.eventStreamCodec.encode({ + headers: { + ...dateHeader, + ":chunk-signature": { + type: "binary", + value: getSignatureBinary(signedMessage.signature) + } + }, + body: chunk + }); + this.push(serializedSigned); + return callback(); + } catch (err) { + callback(err); + } + } + }; + function getSignatureBinary(signature) { + const buf = Buffer.from(signature, "hex"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + __name(getSignatureBinary, "getSignatureBinary"); + var EventStreamPayloadHandler = class { + static { + __name(this, "EventStreamPayloadHandler"); + } + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + this.messageSigner = options.messageSigner; + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder); + this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0; + } + async handle(next, args, context = {}) { + const request3 = args.request; + const { body: payload, query } = request3; + if (!(payload instanceof import_stream6.Readable)) { + throw new Error("Eventstream payload must be a Readable stream."); + } + const payloadStream = payload; + request3.body = new import_stream6.PassThrough({ + objectMode: true + }); + const match = request3.headers?.authorization?.match(/Signature=([\w]+)$/); + const priorSignature = match?.[1] ?? query?.["X-Amz-Signature"] ?? ""; + const signingStream = new EventSigningStream({ + priorSignature, + eventStreamCodec: this.eventStreamCodec, + messageSigner: await this.messageSigner(), + systemClockOffsetProvider: this.systemClockOffsetProvider + }); + (0, import_stream6.pipeline)(payloadStream, signingStream, request3.body, (err) => { + if (err) { + throw err; + } + }); + let result; + try { + result = await next(args); + } catch (e5) { + request3.body.end(); + throw e5; + } + return result; + } + }; + var eventStreamPayloadHandlerProvider = /* @__PURE__ */ __name((options) => new EventStreamPayloadHandler(options), "eventStreamPayloadHandlerProvider"); + } +}); + +// node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +var require_dist_cjs64 = __commonJS({ + "node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_serde_universal = require_dist_cjs35(); + var import_stream6 = require("stream"); + async function* readabletoIterable(readStream2) { + let streamEnded = false; + let generationEnded = false; + const records = new Array(); + readStream2.on("error", (err) => { + if (!streamEnded) { + streamEnded = true; + } + if (err) { + throw err; + } + }); + readStream2.on("data", (data) => { + records.push(data); + }); + readStream2.on("end", () => { + streamEnded = true; + }); + while (!generationEnded) { + const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); + if (value) { + yield value; + } + generationEnded = streamEnded && records.length === 0; + } + } + __name(readabletoIterable, "readabletoIterable"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body); + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + return import_stream6.Readable.from(this.universalMarshaller.serialize(input, serializer)); + } + }; + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/ruleset.js +var require_ruleset2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var s4 = "required"; + var t4 = "fn"; + var u5 = "argv"; + var v8 = "ref"; + var a6 = true; + var b9 = "isSet"; + var c5 = "booleanEquals"; + var d9 = "error"; + var e5 = "endpoint"; + var f6 = "tree"; + var g6 = "PartitionResult"; + var h6 = { [s4]: false, "type": "String" }; + var i5 = { [s4]: true, "default": false, "type": "Boolean" }; + var j6 = { [v8]: "Endpoint" }; + var k9 = { [t4]: c5, [u5]: [{ [v8]: "UseFIPS" }, true] }; + var l5 = { [t4]: c5, [u5]: [{ [v8]: "UseDualStack" }, true] }; + var m7 = {}; + var n4 = { [t4]: "getAttr", [u5]: [{ [v8]: g6 }, "supportsFIPS"] }; + var o5 = { [t4]: c5, [u5]: [true, { [t4]: "getAttr", [u5]: [{ [v8]: g6 }, "supportsDualStack"] }] }; + var p6 = [k9]; + var q8 = [l5]; + var r5 = [{ [v8]: "Region" }]; + var _data3 = { version: "1.0", parameters: { Region: h6, UseDualStack: i5, UseFIPS: i5, Endpoint: h6 }, rules: [{ conditions: [{ [t4]: b9, [u5]: [j6] }], rules: [{ conditions: p6, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d9 }, { rules: [{ conditions: q8, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d9 }, { endpoint: { url: j6, properties: m7, headers: m7 }, type: e5 }], type: f6 }], type: f6 }, { rules: [{ conditions: [{ [t4]: b9, [u5]: r5 }], rules: [{ conditions: [{ [t4]: "aws.partition", [u5]: r5, assign: g6 }], rules: [{ conditions: [k9, l5], rules: [{ conditions: [{ [t4]: c5, [u5]: [a6, n4] }, o5], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m7, headers: m7 }, type: e5 }], type: f6 }], type: f6 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d9 }], type: f6 }, { conditions: p6, rules: [{ conditions: [{ [t4]: c5, [u5]: [n4, a6] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m7, headers: m7 }, type: e5 }], type: f6 }], type: f6 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d9 }], type: f6 }, { conditions: q8, rules: [{ conditions: [o5], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m7, headers: m7 }, type: e5 }], type: f6 }], type: f6 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d9 }], type: f6 }, { rules: [{ endpoint: { url: "https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}", properties: m7, headers: m7 }, type: e5 }], type: f6 }], type: f6 }], type: f6 }, { error: "Invalid Configuration: Missing Region", type: d9 }], type: f6 }] }; + exports2.ruleSet = _data3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs22(); + var util_endpoints_2 = require_dist_cjs19(); + var ruleset_1 = require_ruleset2(); + var cache3 = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver3 = (endpointParams, context = {}) => { + return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context.logger + })); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver3; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs27(); + var url_parser_1 = require_dist_cjs21(); + var util_base64_1 = require_dist_cjs12(); + var util_utf8_1 = require_dist_cjs11(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); + var endpointResolver_1 = require_endpointResolver2(); + var getRuntimeConfig5 = (config7) => { + return { + apiVersion: "2023-09-30", + base64Decoder: config7?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config7?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config7?.disableHostPrefix ?? false, + endpointProvider: config7?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config7?.extensions ?? [], + httpAuthSchemeProvider: config7?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultBedrockRuntimeHttpAuthSchemeProvider, + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#httpBearerAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"), + signer: new core_2.HttpBearerAuthSigner() + } + ], + logger: config7?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config7?.serviceId ?? "Bedrock Runtime", + urlParser: config7?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config7?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config7?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js +var require_runtimeConfig2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package2()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs62(); + var eventstream_handler_node_1 = require_dist_cjs63(); + var token_providers_1 = require_dist_cjs57(); + var util_user_agent_node_1 = require_dist_cjs51(); + var config_resolver_1 = require_dist_cjs39(); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var eventstream_serde_node_1 = require_dist_cjs64(); + var hash_node_1 = require_dist_cjs52(); + var middleware_retry_1 = require_dist_cjs47(); + var node_config_provider_1 = require_dist_cjs43(); + var node_http_handler_1 = require_dist_cjs15(); + var util_body_length_node_1 = require_dist_cjs53(); + var util_retry_1 = require_dist_cjs46(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); + var smithy_client_1 = require_dist_cjs27(); + var util_defaults_mode_node_1 = require_dist_cjs54(); + var smithy_client_2 = require_dist_cjs27(); + var getRuntimeConfig5 = (config7) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config7); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config7); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config7?.profile, + logger: clientSharedValues.logger, + signingName: "bedrock" + }; + return { + ...clientSharedValues, + ...config7, + runtime: "node", + defaultsMode, + authSchemePreference: config7?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config7?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config7?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config7?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + eventStreamPayloadHandlerProvider: config7?.eventStreamPayloadHandlerProvider ?? eventstream_handler_node_1.eventStreamPayloadHandlerProvider, + eventStreamSerdeProvider: config7?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, + httpAuthSchemes: config7?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#httpBearerAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => { + try { + return await (0, token_providers_1.fromEnvSigningName)({ signingName: "bedrock" })(); + } catch (error) { + return await (0, token_providers_1.nodeProvider)(idProps)(idProps); + } + }), + signer: new core_2.HttpBearerAuthSigner() + } + ], + maxAttempts: config7?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config7), + region: config7?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttp2Handler.create(config7?.requestHandler ?? (async () => ({ ...await defaultConfigProvider(), disableConcurrentStreams: true }))), + retryMode: config7?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }, config7), + sha256: config7?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config7?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config7?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config7?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config7?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/rng.js +function rng2() { + if (poolPtr2 > rnds8Pool2.length - 16) { + import_crypto7.default.randomFillSync(rnds8Pool2); + poolPtr2 = 0; + } + return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); +} +var import_crypto7, rnds8Pool2, poolPtr2; +var init_rng2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto7 = __toESM(require("crypto")); + rnds8Pool2 = new Uint8Array(256); + poolPtr2 = rnds8Pool2.length; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/regex.js +var regex_default2; +var init_regex2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/validate.js +function validate3(uuid) { + return typeof uuid === "string" && regex_default2.test(uuid); +} +var validate_default2; +var init_validate2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex2(); + validate_default2 = validate3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify2(arr, offset = 0) { + return byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]; +} +function stringify3(arr, offset = 0) { + const uuid = unsafeStringify2(arr, offset); + if (!validate_default2(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex2, stringify_default2; +var init_stringify2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate2(); + byteToHex2 = []; + for (let i5 = 0; i5 < 256; ++i5) { + byteToHex2.push((i5 + 256).toString(16).slice(1)); + } + stringify_default2 = stringify3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v1.js +function v12(options, buf, offset) { + let i5 = buf && offset || 0; + const b9 = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId2; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng2)(); + if (node == null) { + node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; + const dt2 = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; + if (dt2 < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt2 < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs2 = msecs; + _lastNSecs2 = nsecs; + _clockseq2 = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b9[i5++] = tl >>> 24 & 255; + b9[i5++] = tl >>> 16 & 255; + b9[i5++] = tl >>> 8 & 255; + b9[i5++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b9[i5++] = tmh >>> 8 & 255; + b9[i5++] = tmh & 255; + b9[i5++] = tmh >>> 24 & 15 | 16; + b9[i5++] = tmh >>> 16 & 255; + b9[i5++] = clockseq >>> 8 | 128; + b9[i5++] = clockseq & 255; + for (let n4 = 0; n4 < 6; ++n4) { + b9[i5 + n4] = node[n4]; + } + return buf || unsafeStringify2(b9); +} +var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; +var init_v12 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng2(); + init_stringify2(); + _lastMSecs2 = 0; + _lastNSecs2 = 0; + v1_default2 = v12; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/parse.js +function parse2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + let v8; + const arr = new Uint8Array(16); + arr[0] = (v8 = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v8 >>> 16 & 255; + arr[2] = v8 >>> 8 & 255; + arr[3] = v8 & 255; + arr[4] = (v8 = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v8 & 255; + arr[6] = (v8 = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v8 & 255; + arr[8] = (v8 = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v8 & 255; + arr[10] = (v8 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v8 / 4294967296 & 255; + arr[12] = v8 >>> 24 & 255; + arr[13] = v8 >>> 16 & 255; + arr[14] = v8 >>> 8 & 255; + arr[15] = v8 & 255; + return arr; +} +var parse_default2; +var init_parse2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate2(); + parse_default2 = parse2; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes2(str2) { + str2 = unescape(encodeURIComponent(str2)); + const bytes = []; + for (let i5 = 0; i5 < str2.length; ++i5) { + bytes.push(str2.charCodeAt(i5)); + } + return bytes; +} +function v352(name, version3, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes2(value); + } + if (typeof namespace === "string") { + namespace = parse_default2(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version3; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = bytes[i5]; + } + return buf; + } + return unsafeStringify2(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS2; + generateUUID.URL = URL3; + return generateUUID; +} +var DNS2, URL3; +var init_v352 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify2(); + init_parse2(); + DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/md5.js +function md52(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto8.default.createHash("md5").update(bytes).digest(); +} +var import_crypto8, md5_default2; +var init_md52 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto8 = __toESM(require("crypto")); + md5_default2 = md52; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v3.js +var v33, v3_default2; +var init_v32 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v3.js"() { + init_v352(); + init_md52(); + v33 = v352("v3", 48, md5_default2); + v3_default2 = v33; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/native.js +var import_crypto9, native_default2; +var init_native2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/native.js"() { + import_crypto9 = __toESM(require("crypto")); + native_default2 = { + randomUUID: import_crypto9.default.randomUUID + }; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v4.js +function v43(options, buf, offset) { + if (native_default2.randomUUID && !buf && !options) { + return native_default2.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = rnds[i5]; + } + return buf; + } + return unsafeStringify2(rnds); +} +var v4_default2; +var init_v42 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v4.js"() { + init_native2(); + init_rng2(); + init_stringify2(); + v4_default2 = v43; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/sha1.js +function sha12(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto10.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto10, sha1_default2; +var init_sha12 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto10 = __toESM(require("crypto")); + sha1_default2 = sha12; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v5.js +var v52, v5_default2; +var init_v52 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v5.js"() { + init_v352(); + init_sha12(); + v52 = v352("v5", 80, sha1_default2); + v5_default2 = v52; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/nil.js +var nil_default2; +var init_nil2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default2 = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/version.js +function version2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default2; +var init_version2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/version.js"() { + init_validate2(); + version_default2 = version2; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports2 = {}; +__export(esm_node_exports2, { + NIL: () => nil_default2, + parse: () => parse_default2, + stringify: () => stringify_default2, + v1: () => v1_default2, + v3: () => v3_default2, + v4: () => v4_default2, + v5: () => v5_default2, + validate: () => validate_default2, + version: () => version_default2 +}); +var init_esm_node2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/index.js"() { + init_v12(); + init_v32(); + init_v42(); + init_v52(); + init_nil2(); + init_version2(); + init_validate2(); + init_stringify2(); + init_parse2(); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +var require_dist_cjs65 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + AccessDeniedException: () => AccessDeniedException2, + ApplyGuardrailCommand: () => ApplyGuardrailCommand, + ApplyGuardrailRequestFilterSensitiveLog: () => ApplyGuardrailRequestFilterSensitiveLog, + AsyncInvokeOutputDataConfig: () => AsyncInvokeOutputDataConfig, + AsyncInvokeStatus: () => AsyncInvokeStatus, + AsyncInvokeSummaryFilterSensitiveLog: () => AsyncInvokeSummaryFilterSensitiveLog, + BedrockRuntime: () => BedrockRuntime, + BedrockRuntimeClient: () => BedrockRuntimeClient2, + BedrockRuntimeServiceException: () => BedrockRuntimeServiceException, + BidirectionalInputPayloadPartFilterSensitiveLog: () => BidirectionalInputPayloadPartFilterSensitiveLog, + BidirectionalOutputPayloadPartFilterSensitiveLog: () => BidirectionalOutputPayloadPartFilterSensitiveLog, + CachePointType: () => CachePointType, + CitationGeneratedContent: () => CitationGeneratedContent, + CitationLocation: () => CitationLocation, + CitationSourceContent: () => CitationSourceContent, + ConflictException: () => ConflictException, + ContentBlock: () => ContentBlock, + ContentBlockDelta: () => ContentBlockDelta, + ContentBlockDeltaEventFilterSensitiveLog: () => ContentBlockDeltaEventFilterSensitiveLog, + ContentBlockDeltaFilterSensitiveLog: () => ContentBlockDeltaFilterSensitiveLog, + ContentBlockFilterSensitiveLog: () => ContentBlockFilterSensitiveLog, + ContentBlockStart: () => ContentBlockStart, + ConversationRole: () => ConversationRole, + ConverseCommand: () => ConverseCommand2, + ConverseOutput: () => ConverseOutput, + ConverseOutputFilterSensitiveLog: () => ConverseOutputFilterSensitiveLog, + ConverseRequestFilterSensitiveLog: () => ConverseRequestFilterSensitiveLog, + ConverseResponseFilterSensitiveLog: () => ConverseResponseFilterSensitiveLog, + ConverseStreamCommand: () => ConverseStreamCommand, + ConverseStreamOutput: () => ConverseStreamOutput, + ConverseStreamOutputFilterSensitiveLog: () => ConverseStreamOutputFilterSensitiveLog, + ConverseStreamRequestFilterSensitiveLog: () => ConverseStreamRequestFilterSensitiveLog, + ConverseStreamResponseFilterSensitiveLog: () => ConverseStreamResponseFilterSensitiveLog, + DocumentContentBlock: () => DocumentContentBlock, + DocumentFormat: () => DocumentFormat, + DocumentSource: () => DocumentSource, + GetAsyncInvokeCommand: () => GetAsyncInvokeCommand, + GetAsyncInvokeResponseFilterSensitiveLog: () => GetAsyncInvokeResponseFilterSensitiveLog, + GuardrailAction: () => GuardrailAction, + GuardrailContentBlock: () => GuardrailContentBlock, + GuardrailContentBlockFilterSensitiveLog: () => GuardrailContentBlockFilterSensitiveLog, + GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence, + GuardrailContentFilterStrength: () => GuardrailContentFilterStrength, + GuardrailContentFilterType: () => GuardrailContentFilterType, + GuardrailContentPolicyAction: () => GuardrailContentPolicyAction, + GuardrailContentQualifier: () => GuardrailContentQualifier, + GuardrailContentSource: () => GuardrailContentSource, + GuardrailContextualGroundingFilterType: () => GuardrailContextualGroundingFilterType, + GuardrailContextualGroundingPolicyAction: () => GuardrailContextualGroundingPolicyAction, + GuardrailConverseContentBlock: () => GuardrailConverseContentBlock, + GuardrailConverseContentBlockFilterSensitiveLog: () => GuardrailConverseContentBlockFilterSensitiveLog, + GuardrailConverseContentQualifier: () => GuardrailConverseContentQualifier, + GuardrailConverseImageBlockFilterSensitiveLog: () => GuardrailConverseImageBlockFilterSensitiveLog, + GuardrailConverseImageFormat: () => GuardrailConverseImageFormat, + GuardrailConverseImageSource: () => GuardrailConverseImageSource, + GuardrailConverseImageSourceFilterSensitiveLog: () => GuardrailConverseImageSourceFilterSensitiveLog, + GuardrailImageBlockFilterSensitiveLog: () => GuardrailImageBlockFilterSensitiveLog, + GuardrailImageFormat: () => GuardrailImageFormat, + GuardrailImageSource: () => GuardrailImageSource, + GuardrailImageSourceFilterSensitiveLog: () => GuardrailImageSourceFilterSensitiveLog, + GuardrailManagedWordType: () => GuardrailManagedWordType, + GuardrailOutputScope: () => GuardrailOutputScope, + GuardrailPiiEntityType: () => GuardrailPiiEntityType, + GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction, + GuardrailStreamProcessingMode: () => GuardrailStreamProcessingMode, + GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction, + GuardrailTopicType: () => GuardrailTopicType, + GuardrailTrace: () => GuardrailTrace, + GuardrailWordPolicyAction: () => GuardrailWordPolicyAction, + ImageFormat: () => ImageFormat, + ImageSource: () => ImageSource, + InternalServerException: () => InternalServerException2, + InvokeModelCommand: () => InvokeModelCommand2, + InvokeModelRequestFilterSensitiveLog: () => InvokeModelRequestFilterSensitiveLog, + InvokeModelResponseFilterSensitiveLog: () => InvokeModelResponseFilterSensitiveLog, + InvokeModelWithBidirectionalStreamCommand: () => InvokeModelWithBidirectionalStreamCommand, + InvokeModelWithBidirectionalStreamInput: () => InvokeModelWithBidirectionalStreamInput, + InvokeModelWithBidirectionalStreamInputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamInputFilterSensitiveLog, + InvokeModelWithBidirectionalStreamOutput: () => InvokeModelWithBidirectionalStreamOutput, + InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog, + InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog, + InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog, + InvokeModelWithResponseStreamCommand: () => InvokeModelWithResponseStreamCommand, + InvokeModelWithResponseStreamRequestFilterSensitiveLog: () => InvokeModelWithResponseStreamRequestFilterSensitiveLog, + InvokeModelWithResponseStreamResponseFilterSensitiveLog: () => InvokeModelWithResponseStreamResponseFilterSensitiveLog, + ListAsyncInvokesCommand: () => ListAsyncInvokesCommand, + ListAsyncInvokesResponseFilterSensitiveLog: () => ListAsyncInvokesResponseFilterSensitiveLog, + MessageFilterSensitiveLog: () => MessageFilterSensitiveLog, + ModelErrorException: () => ModelErrorException, + ModelNotReadyException: () => ModelNotReadyException, + ModelStreamErrorException: () => ModelStreamErrorException, + ModelTimeoutException: () => ModelTimeoutException, + PayloadPartFilterSensitiveLog: () => PayloadPartFilterSensitiveLog, + PerformanceConfigLatency: () => PerformanceConfigLatency, + PromptVariableValues: () => PromptVariableValues, + ReasoningContentBlock: () => ReasoningContentBlock, + ReasoningContentBlockDelta: () => ReasoningContentBlockDelta, + ReasoningContentBlockDeltaFilterSensitiveLog: () => ReasoningContentBlockDeltaFilterSensitiveLog, + ReasoningContentBlockFilterSensitiveLog: () => ReasoningContentBlockFilterSensitiveLog, + ReasoningTextBlockFilterSensitiveLog: () => ReasoningTextBlockFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + ResponseStream: () => ResponseStream, + ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog, + ServiceQuotaExceededException: () => ServiceQuotaExceededException, + ServiceUnavailableException: () => ServiceUnavailableException, + SortAsyncInvocationBy: () => SortAsyncInvocationBy, + SortOrder: () => SortOrder, + StartAsyncInvokeCommand: () => StartAsyncInvokeCommand, + StartAsyncInvokeRequestFilterSensitiveLog: () => StartAsyncInvokeRequestFilterSensitiveLog, + StopReason: () => StopReason, + SystemContentBlock: () => SystemContentBlock, + SystemContentBlockFilterSensitiveLog: () => SystemContentBlockFilterSensitiveLog, + ThrottlingException: () => ThrottlingException, + Tool: () => Tool, + ToolChoice: () => ToolChoice, + ToolInputSchema: () => ToolInputSchema, + ToolResultContentBlock: () => ToolResultContentBlock, + ToolResultStatus: () => ToolResultStatus, + Trace: () => Trace, + ValidationException: () => ValidationException, + VideoFormat: () => VideoFormat, + VideoSource: () => VideoSource, + __Client: () => import_smithy_client28.Client, + paginateListAsyncInvokes: () => paginateListAsyncInvokes + }); + module2.exports = __toCommonJS2(index_exports); + var import_middleware_eventstream = require_dist_cjs3(); + var import_middleware_host_header3 = require_dist_cjs4(); + var import_middleware_logger3 = require_dist_cjs5(); + var import_middleware_recursion_detection3 = require_dist_cjs6(); + var import_middleware_user_agent3 = require_dist_cjs29(); + var import_middleware_websocket = require_dist_cjs37(); + var import_config_resolver5 = require_dist_cjs39(); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_eventstream_serde_config_resolver = require_dist_cjs40(); + var import_middleware_content_length3 = require_dist_cjs41(); + var import_middleware_endpoint6 = require_dist_cjs44(); + var import_middleware_retry5 = require_dist_cjs47(); + var import_httpAuthSchemeProvider5 = require_httpAuthSchemeProvider(); + var resolveClientEndpointParameters3 = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "bedrock" + }); + }, "resolveClientEndpointParameters"); + var commonParams3 = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig5 = require_runtimeConfig2(); + var import_region_config_resolver3 = require_dist_cjs55(); + var import_protocol_http15 = require_dist_cjs2(); + var import_smithy_client28 = require_dist_cjs27(); + var getHttpAuthExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + let _token = runtimeConfig.token; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + setToken(token) { + _token = token; + }, + token() { + return _token; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig3 = /* @__PURE__ */ __name((config7) => { + return { + httpAuthSchemes: config7.httpAuthSchemes(), + httpAuthSchemeProvider: config7.httpAuthSchemeProvider(), + credentials: config7.credentials(), + token: config7.token() + }; + }, "resolveHttpAuthRuntimeConfig"); + var resolveRuntimeExtensions3 = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign( + (0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), + (0, import_smithy_client28.getDefaultExtensionConfiguration)(runtimeConfig), + (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), + getHttpAuthExtensionConfiguration3(runtimeConfig) + ); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign( + runtimeConfig, + (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + (0, import_smithy_client28.resolveDefaultRuntimeConfig)(extensionConfiguration), + (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + resolveHttpAuthRuntimeConfig3(extensionConfiguration) + ); + }, "resolveRuntimeExtensions"); + var BedrockRuntimeClient2 = class extends import_smithy_client28.Client { + static { + __name(this, "BedrockRuntimeClient"); + } + /** + * The resolved configuration of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}. + */ + config; + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig5.getRuntimeConfig)(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters3(_config_0); + const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry5.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver5.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint6.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6); + const _config_8 = (0, import_httpAuthSchemeProvider5.resolveHttpAuthSchemeConfig)(_config_7); + const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8); + const _config_10 = (0, import_middleware_websocket.resolveWebSocketConfig)(_config_9); + const _config_11 = resolveRuntimeExtensions3(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry5.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core39.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider5.defaultBedrockRuntimeHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: /* @__PURE__ */ __name(async (config7) => new import_core39.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config7.credentials, + "smithy.api#httpBearerAuth": config7.token + }), "identityProviderConfigProvider") + }) + ); + this.middlewareStack.use((0, import_core39.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + }; + var import_middleware_serde5 = require_dist_cjs8(); + var BedrockRuntimeServiceException = class _BedrockRuntimeServiceException extends import_smithy_client28.ServiceException { + static { + __name(this, "BedrockRuntimeServiceException"); + } + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _BedrockRuntimeServiceException.prototype); + } + }; + var AccessDeniedException2 = class _AccessDeniedException extends BedrockRuntimeServiceException { + static { + __name(this, "AccessDeniedException"); + } + name = "AccessDeniedException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + } + }; + var AsyncInvokeOutputDataConfig; + ((AsyncInvokeOutputDataConfig3) => { + AsyncInvokeOutputDataConfig3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.s3OutputDataConfig !== void 0) return visitor.s3OutputDataConfig(value.s3OutputDataConfig); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(AsyncInvokeOutputDataConfig || (AsyncInvokeOutputDataConfig = {})); + var AsyncInvokeStatus = { + COMPLETED: "Completed", + FAILED: "Failed", + IN_PROGRESS: "InProgress" + }; + var InternalServerException2 = class _InternalServerException extends BedrockRuntimeServiceException { + static { + __name(this, "InternalServerException"); + } + name = "InternalServerException"; + $fault = "server"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _InternalServerException.prototype); + } + }; + var ThrottlingException = class _ThrottlingException extends BedrockRuntimeServiceException { + static { + __name(this, "ThrottlingException"); + } + name = "ThrottlingException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ThrottlingException.prototype); + } + }; + var ValidationException = class _ValidationException extends BedrockRuntimeServiceException { + static { + __name(this, "ValidationException"); + } + name = "ValidationException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ValidationException.prototype); + } + }; + var SortAsyncInvocationBy = { + SUBMISSION_TIME: "SubmissionTime" + }; + var SortOrder = { + ASCENDING: "Ascending", + DESCENDING: "Descending" + }; + var ConflictException = class _ConflictException extends BedrockRuntimeServiceException { + static { + __name(this, "ConflictException"); + } + name = "ConflictException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ConflictException.prototype); + } + }; + var ResourceNotFoundException = class _ResourceNotFoundException extends BedrockRuntimeServiceException { + static { + __name(this, "ResourceNotFoundException"); + } + name = "ResourceNotFoundException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + } + }; + var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockRuntimeServiceException { + static { + __name(this, "ServiceQuotaExceededException"); + } + name = "ServiceQuotaExceededException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype); + } + }; + var ServiceUnavailableException = class _ServiceUnavailableException extends BedrockRuntimeServiceException { + static { + __name(this, "ServiceUnavailableException"); + } + name = "ServiceUnavailableException"; + $fault = "server"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ServiceUnavailableException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _ServiceUnavailableException.prototype); + } + }; + var GuardrailImageFormat = { + JPEG: "jpeg", + PNG: "png" + }; + var GuardrailImageSource; + ((GuardrailImageSource2) => { + GuardrailImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailImageSource || (GuardrailImageSource = {})); + var GuardrailContentQualifier = { + GROUNDING_SOURCE: "grounding_source", + GUARD_CONTENT: "guard_content", + QUERY: "query" + }; + var GuardrailContentBlock; + ((GuardrailContentBlock2) => { + GuardrailContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailContentBlock || (GuardrailContentBlock = {})); + var GuardrailOutputScope = { + FULL: "FULL", + INTERVENTIONS: "INTERVENTIONS" + }; + var GuardrailContentSource = { + INPUT: "INPUT", + OUTPUT: "OUTPUT" + }; + var GuardrailAction = { + GUARDRAIL_INTERVENED: "GUARDRAIL_INTERVENED", + NONE: "NONE" + }; + var GuardrailContentPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailContentFilterConfidence = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", + NONE: "NONE" + }; + var GuardrailContentFilterStrength = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", + NONE: "NONE" + }; + var GuardrailContentFilterType = { + HATE: "HATE", + INSULTS: "INSULTS", + MISCONDUCT: "MISCONDUCT", + PROMPT_ATTACK: "PROMPT_ATTACK", + SEXUAL: "SEXUAL", + VIOLENCE: "VIOLENCE" + }; + var GuardrailContextualGroundingPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailContextualGroundingFilterType = { + GROUNDING: "GROUNDING", + RELEVANCE: "RELEVANCE" + }; + var GuardrailSensitiveInformationPolicyAction = { + ANONYMIZED: "ANONYMIZED", + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailPiiEntityType = { + ADDRESS: "ADDRESS", + AGE: "AGE", + AWS_ACCESS_KEY: "AWS_ACCESS_KEY", + AWS_SECRET_KEY: "AWS_SECRET_KEY", + CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER", + CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER", + CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV", + CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY", + CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER", + DRIVER_ID: "DRIVER_ID", + EMAIL: "EMAIL", + INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER", + IP_ADDRESS: "IP_ADDRESS", + LICENSE_PLATE: "LICENSE_PLATE", + MAC_ADDRESS: "MAC_ADDRESS", + NAME: "NAME", + PASSWORD: "PASSWORD", + PHONE: "PHONE", + PIN: "PIN", + SWIFT_CODE: "SWIFT_CODE", + UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER", + UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER", + UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", + URL: "URL", + USERNAME: "USERNAME", + US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER", + US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER", + US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", + US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER", + US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER", + VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER" + }; + var GuardrailTopicPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailTopicType = { + DENY: "DENY" + }; + var GuardrailWordPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailManagedWordType = { + PROFANITY: "PROFANITY" + }; + var GuardrailTrace = { + DISABLED: "disabled", + ENABLED: "enabled", + ENABLED_FULL: "enabled_full" + }; + var CachePointType = { + DEFAULT: "default" + }; + var CitationLocation; + ((CitationLocation3) => { + CitationLocation3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.documentChar !== void 0) return visitor.documentChar(value.documentChar); + if (value.documentPage !== void 0) return visitor.documentPage(value.documentPage); + if (value.documentChunk !== void 0) return visitor.documentChunk(value.documentChunk); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationLocation || (CitationLocation = {})); + var CitationSourceContent; + ((CitationSourceContent3) => { + CitationSourceContent3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationSourceContent || (CitationSourceContent = {})); + var CitationGeneratedContent; + ((CitationGeneratedContent3) => { + CitationGeneratedContent3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationGeneratedContent || (CitationGeneratedContent = {})); + var DocumentFormat = { + CSV: "csv", + DOC: "doc", + DOCX: "docx", + HTML: "html", + MD: "md", + PDF: "pdf", + TXT: "txt", + XLS: "xls", + XLSX: "xlsx" + }; + var DocumentContentBlock; + ((DocumentContentBlock3) => { + DocumentContentBlock3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(DocumentContentBlock || (DocumentContentBlock = {})); + var DocumentSource; + ((DocumentSource2) => { + DocumentSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + if (value.text !== void 0) return visitor.text(value.text); + if (value.content !== void 0) return visitor.content(value.content); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(DocumentSource || (DocumentSource = {})); + var GuardrailConverseImageFormat = { + JPEG: "jpeg", + PNG: "png" + }; + var GuardrailConverseImageSource; + ((GuardrailConverseImageSource2) => { + GuardrailConverseImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailConverseImageSource || (GuardrailConverseImageSource = {})); + var GuardrailConverseContentQualifier = { + GROUNDING_SOURCE: "grounding_source", + GUARD_CONTENT: "guard_content", + QUERY: "query" + }; + var GuardrailConverseContentBlock; + ((GuardrailConverseContentBlock2) => { + GuardrailConverseContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {})); + var ImageFormat = { + GIF: "gif", + JPEG: "jpeg", + PNG: "png", + WEBP: "webp" + }; + var ImageSource; + ((ImageSource2) => { + ImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ImageSource || (ImageSource = {})); + var ReasoningContentBlock; + ((ReasoningContentBlock2) => { + ReasoningContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.reasoningText !== void 0) return visitor.reasoningText(value.reasoningText); + if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ReasoningContentBlock || (ReasoningContentBlock = {})); + var VideoFormat = { + FLV: "flv", + MKV: "mkv", + MOV: "mov", + MP4: "mp4", + MPEG: "mpeg", + MPG: "mpg", + THREE_GP: "three_gp", + WEBM: "webm", + WMV: "wmv" + }; + var VideoSource; + ((VideoSource2) => { + VideoSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(VideoSource || (VideoSource = {})); + var ToolResultContentBlock; + ((ToolResultContentBlock2) => { + ToolResultContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.json !== void 0) return visitor.json(value.json); + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + if (value.document !== void 0) return visitor.document(value.document); + if (value.video !== void 0) return visitor.video(value.video); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolResultContentBlock || (ToolResultContentBlock = {})); + var ToolResultStatus = { + ERROR: "error", + SUCCESS: "success" + }; + var ContentBlock; + ((ContentBlock2) => { + ContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + if (value.document !== void 0) return visitor.document(value.document); + if (value.video !== void 0) return visitor.video(value.video); + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + if (value.toolResult !== void 0) return visitor.toolResult(value.toolResult); + if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent); + if (value.citationsContent !== void 0) return visitor.citationsContent(value.citationsContent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlock || (ContentBlock = {})); + var ConversationRole = { + ASSISTANT: "assistant", + USER: "user" + }; + var PerformanceConfigLatency = { + OPTIMIZED: "optimized", + STANDARD: "standard" + }; + var PromptVariableValues; + ((PromptVariableValues3) => { + PromptVariableValues3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(PromptVariableValues || (PromptVariableValues = {})); + var SystemContentBlock; + ((SystemContentBlock2) => { + SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(SystemContentBlock || (SystemContentBlock = {})); + var ToolChoice; + ((ToolChoice3) => { + ToolChoice3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.auto !== void 0) return visitor.auto(value.auto); + if (value.any !== void 0) return visitor.any(value.any); + if (value.tool !== void 0) return visitor.tool(value.tool); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolChoice || (ToolChoice = {})); + var ToolInputSchema; + ((ToolInputSchema2) => { + ToolInputSchema2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.json !== void 0) return visitor.json(value.json); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolInputSchema || (ToolInputSchema = {})); + var Tool; + ((Tool2) => { + Tool2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.toolSpec !== void 0) return visitor.toolSpec(value.toolSpec); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(Tool || (Tool = {})); + var ConverseOutput; + ((ConverseOutput3) => { + ConverseOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.message !== void 0) return visitor.message(value.message); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ConverseOutput || (ConverseOutput = {})); + var StopReason = { + CONTENT_FILTERED: "content_filtered", + END_TURN: "end_turn", + GUARDRAIL_INTERVENED: "guardrail_intervened", + MAX_TOKENS: "max_tokens", + STOP_SEQUENCE: "stop_sequence", + TOOL_USE: "tool_use" + }; + var ModelErrorException = class _ModelErrorException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelErrorException"); + } + name = "ModelErrorException"; + $fault = "client"; + /** + *

The original status code.

+ * @public + */ + originalStatusCode; + /** + *

The resource name.

+ * @public + */ + resourceName; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelErrorException.prototype); + this.originalStatusCode = opts.originalStatusCode; + this.resourceName = opts.resourceName; + } + }; + var ModelNotReadyException = class _ModelNotReadyException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelNotReadyException"); + } + name = "ModelNotReadyException"; + $fault = "client"; + $retryable = {}; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelNotReadyException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelNotReadyException.prototype); + } + }; + var ModelTimeoutException = class _ModelTimeoutException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelTimeoutException"); + } + name = "ModelTimeoutException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelTimeoutException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelTimeoutException.prototype); + } + }; + var GuardrailStreamProcessingMode = { + ASYNC: "async", + SYNC: "sync" + }; + var ReasoningContentBlockDelta; + ((ReasoningContentBlockDelta3) => { + ReasoningContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent); + if (value.signature !== void 0) return visitor.signature(value.signature); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {})); + var ContentBlockDelta; + ((ContentBlockDelta3) => { + ContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent); + if (value.citation !== void 0) return visitor.citation(value.citation); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlockDelta || (ContentBlockDelta = {})); + var ContentBlockStart; + ((ContentBlockStart2) => { + ContentBlockStart2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlockStart || (ContentBlockStart = {})); + var ModelStreamErrorException = class _ModelStreamErrorException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelStreamErrorException"); + } + name = "ModelStreamErrorException"; + $fault = "client"; + /** + *

The original status code.

+ * @public + */ + originalStatusCode; + /** + *

The original message.

+ * @public + */ + originalMessage; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelStreamErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelStreamErrorException.prototype); + this.originalStatusCode = opts.originalStatusCode; + this.originalMessage = opts.originalMessage; + } + }; + var ConverseStreamOutput; + ((ConverseStreamOutput3) => { + ConverseStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.messageStart !== void 0) return visitor.messageStart(value.messageStart); + if (value.contentBlockStart !== void 0) return visitor.contentBlockStart(value.contentBlockStart); + if (value.contentBlockDelta !== void 0) return visitor.contentBlockDelta(value.contentBlockDelta); + if (value.contentBlockStop !== void 0) return visitor.contentBlockStop(value.contentBlockStop); + if (value.messageStop !== void 0) return visitor.messageStop(value.messageStop); + if (value.metadata !== void 0) return visitor.metadata(value.metadata); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ConverseStreamOutput || (ConverseStreamOutput = {})); + var Trace = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", + ENABLED_FULL: "ENABLED_FULL" + }; + var InvokeModelWithBidirectionalStreamInput; + ((InvokeModelWithBidirectionalStreamInput2) => { + InvokeModelWithBidirectionalStreamInput2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(InvokeModelWithBidirectionalStreamInput || (InvokeModelWithBidirectionalStreamInput = {})); + var InvokeModelWithBidirectionalStreamOutput; + ((InvokeModelWithBidirectionalStreamOutput3) => { + InvokeModelWithBidirectionalStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(InvokeModelWithBidirectionalStreamOutput || (InvokeModelWithBidirectionalStreamOutput = {})); + var ResponseStream; + ((ResponseStream3) => { + ResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ResponseStream || (ResponseStream = {})); + var GetAsyncInvokeResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.failureMessage && { failureMessage: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "GetAsyncInvokeResponseFilterSensitiveLog"); + var AsyncInvokeSummaryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.failureMessage && { failureMessage: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "AsyncInvokeSummaryFilterSensitiveLog"); + var ListAsyncInvokesResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.asyncInvokeSummaries && { + asyncInvokeSummaries: obj.asyncInvokeSummaries.map((item) => AsyncInvokeSummaryFilterSensitiveLog(item)) + } + }), "ListAsyncInvokesResponseFilterSensitiveLog"); + var StartAsyncInvokeRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.modelInput && { modelInput: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "StartAsyncInvokeRequestFilterSensitiveLog"); + var GuardrailImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.bytes !== void 0) return { bytes: obj.bytes }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailImageSourceFilterSensitiveLog"); + var GuardrailImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.source && { source: import_smithy_client28.SENSITIVE_STRING } + }), "GuardrailImageBlockFilterSensitiveLog"); + var GuardrailContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailContentBlockFilterSensitiveLog"); + var ApplyGuardrailRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.content && { content: obj.content.map((item) => GuardrailContentBlockFilterSensitiveLog(item)) } + }), "ApplyGuardrailRequestFilterSensitiveLog"); + var GuardrailConverseImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.bytes !== void 0) return { bytes: obj.bytes }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailConverseImageSourceFilterSensitiveLog"); + var GuardrailConverseImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.source && { source: import_smithy_client28.SENSITIVE_STRING } + }), "GuardrailConverseImageBlockFilterSensitiveLog"); + var GuardrailConverseContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailConverseContentBlockFilterSensitiveLog"); + var ReasoningTextBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj + }), "ReasoningTextBlockFilterSensitiveLog"); + var ReasoningContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.reasoningText !== void 0) return { reasoningText: import_smithy_client28.SENSITIVE_STRING }; + if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ReasoningContentBlockFilterSensitiveLog"); + var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: obj.image }; + if (obj.document !== void 0) return { document: obj.document }; + if (obj.video !== void 0) return { video: obj.video }; + if (obj.toolUse !== void 0) return { toolUse: obj.toolUse }; + if (obj.toolResult !== void 0) return { toolResult: obj.toolResult }; + if (obj.guardContent !== void 0) + return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) }; + if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint }; + if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client28.SENSITIVE_STRING }; + if (obj.citationsContent !== void 0) return { citationsContent: obj.citationsContent }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ContentBlockFilterSensitiveLog"); + var MessageFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.content && { content: obj.content.map((item) => ContentBlockFilterSensitiveLog(item)) } + }), "MessageFilterSensitiveLog"); + var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.guardContent !== void 0) + return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) }; + if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "SystemContentBlockFilterSensitiveLog"); + var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }, + ...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }, + ...obj.toolConfig && { toolConfig: obj.toolConfig }, + ...obj.promptVariables && { promptVariables: import_smithy_client28.SENSITIVE_STRING }, + ...obj.requestMetadata && { requestMetadata: import_smithy_client28.SENSITIVE_STRING } + }), "ConverseRequestFilterSensitiveLog"); + var ConverseOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.message !== void 0) return { message: MessageFilterSensitiveLog(obj.message) }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ConverseOutputFilterSensitiveLog"); + var ConverseResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: ConverseOutputFilterSensitiveLog(obj.output) } + }), "ConverseResponseFilterSensitiveLog"); + var ConverseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }, + ...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }, + ...obj.toolConfig && { toolConfig: obj.toolConfig }, + ...obj.promptVariables && { promptVariables: import_smithy_client28.SENSITIVE_STRING }, + ...obj.requestMetadata && { requestMetadata: import_smithy_client28.SENSITIVE_STRING } + }), "ConverseStreamRequestFilterSensitiveLog"); + var ReasoningContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent }; + if (obj.signature !== void 0) return { signature: obj.signature }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ReasoningContentBlockDeltaFilterSensitiveLog"); + var ContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.toolUse !== void 0) return { toolUse: obj.toolUse }; + if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client28.SENSITIVE_STRING }; + if (obj.citation !== void 0) return { citation: obj.citation }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ContentBlockDeltaFilterSensitiveLog"); + var ContentBlockDeltaEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.delta && { delta: ContentBlockDeltaFilterSensitiveLog(obj.delta) } + }), "ContentBlockDeltaEventFilterSensitiveLog"); + var ConverseStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.messageStart !== void 0) return { messageStart: obj.messageStart }; + if (obj.contentBlockStart !== void 0) return { contentBlockStart: obj.contentBlockStart }; + if (obj.contentBlockDelta !== void 0) + return { contentBlockDelta: ContentBlockDeltaEventFilterSensitiveLog(obj.contentBlockDelta) }; + if (obj.contentBlockStop !== void 0) return { contentBlockStop: obj.contentBlockStop }; + if (obj.messageStop !== void 0) return { messageStop: obj.messageStop }; + if (obj.metadata !== void 0) return { metadata: obj.metadata }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ConverseStreamOutputFilterSensitiveLog"); + var ConverseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.stream && { stream: "STREAMING_CONTENT" } + }), "ConverseStreamResponseFilterSensitiveLog"); + var InvokeModelRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelRequestFilterSensitiveLog"); + var InvokeModelResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelResponseFilterSensitiveLog"); + var BidirectionalInputPayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "BidirectionalInputPayloadPartFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "InvokeModelWithBidirectionalStreamInputFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog"); + var BidirectionalOutputPayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "BidirectionalOutputPayloadPartFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.modelTimeoutException !== void 0) return { modelTimeoutException: obj.modelTimeoutException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog"); + var InvokeModelWithResponseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelWithResponseStreamRequestFilterSensitiveLog"); + var PayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "PayloadPartFilterSensitiveLog"); + var ResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.modelTimeoutException !== void 0) return { modelTimeoutException: obj.modelTimeoutException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ResponseStreamFilterSensitiveLog"); + var InvokeModelWithResponseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithResponseStreamResponseFilterSensitiveLog"); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var import_uuid = (init_esm_node2(), __toCommonJS(esm_node_exports2)); + var se_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply"); + b9.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false); + b9.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_8) => se_GuardrailContentBlockList(_8, context), "content"), + outputScope: [], + source: [] + }) + ); + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_ApplyGuardrailCommand"); + var se_ConverseCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/model/{modelId}/converse"); + b9.p("modelId", () => input.modelId, "{modelId}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + additionalModelRequestFields: /* @__PURE__ */ __name((_8) => se_Document(_8, context), "additionalModelRequestFields"), + additionalModelResponseFieldPaths: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "additionalModelResponseFieldPaths"), + guardrailConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "guardrailConfig"), + inferenceConfig: /* @__PURE__ */ __name((_8) => se_InferenceConfiguration(_8, context), "inferenceConfig"), + messages: /* @__PURE__ */ __name((_8) => se_Messages(_8, context), "messages"), + performanceConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "performanceConfig"), + promptVariables: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "promptVariables"), + requestMetadata: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "requestMetadata"), + system: /* @__PURE__ */ __name((_8) => se_SystemContentBlocks(_8, context), "system"), + toolConfig: /* @__PURE__ */ __name((_8) => se_ToolConfiguration(_8, context), "toolConfig") + }) + ); + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_ConverseCommand"); + var se_ConverseStreamCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/model/{modelId}/converse-stream"); + b9.p("modelId", () => input.modelId, "{modelId}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + additionalModelRequestFields: /* @__PURE__ */ __name((_8) => se_Document(_8, context), "additionalModelRequestFields"), + additionalModelResponseFieldPaths: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "additionalModelResponseFieldPaths"), + guardrailConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "guardrailConfig"), + inferenceConfig: /* @__PURE__ */ __name((_8) => se_InferenceConfiguration(_8, context), "inferenceConfig"), + messages: /* @__PURE__ */ __name((_8) => se_Messages(_8, context), "messages"), + performanceConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "performanceConfig"), + promptVariables: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "promptVariables"), + requestMetadata: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "requestMetadata"), + system: /* @__PURE__ */ __name((_8) => se_SystemContentBlocks(_8, context), "system"), + toolConfig: /* @__PURE__ */ __name((_8) => se_ToolConfiguration(_8, context), "toolConfig") + }) + ); + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_ConverseStreamCommand"); + var se_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = {}; + b9.bp("/async-invoke/{invocationArn}"); + b9.p("invocationArn", () => input.invocationArn, "{invocationArn}", false); + let body; + b9.m("GET").h(headers).b(body); + return b9.build(); + }, "se_GetAsyncInvokeCommand"); + var se_InvokeModelCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_ct]: input[_cT] || "application/octet-stream", + [_a6]: input[_a6], + [_xabt]: input[_t2], + [_xabg]: input[_gI], + [_xabg_]: input[_gV], + [_xabpl]: input[_pCL] + }); + b9.bp("/model/{modelId}/invoke"); + b9.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = input.body; + } + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_InvokeModelCommand"); + var se_InvokeModelWithBidirectionalStreamCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/model/{modelId}/invoke-with-bidirectional-stream"); + b9.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = se_InvokeModelWithBidirectionalStreamInput(input.body, context); + } + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_InvokeModelWithBidirectionalStreamCommand"); + var se_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_ct]: input[_cT] || "application/octet-stream", + [_xaba]: input[_a6], + [_xabt]: input[_t2], + [_xabg]: input[_gI], + [_xabg_]: input[_gV], + [_xabpl]: input[_pCL] + }); + b9.bp("/model/{modelId}/invoke-with-response-stream"); + b9.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = input.body; + } + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_InvokeModelWithResponseStreamCommand"); + var se_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = {}; + b9.bp("/async-invoke"); + const query = (0, import_smithy_client28.map)({ + [_sTA]: [() => input.submitTimeAfter !== void 0, () => (0, import_smithy_client28.serializeDateTime)(input[_sTA]).toString()], + [_sTB]: [() => input.submitTimeBefore !== void 0, () => (0, import_smithy_client28.serializeDateTime)(input[_sTB]).toString()], + [_sE]: [, input[_sE]], + [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_nT]: [, input[_nT]], + [_sB]: [, input[_sB]], + [_sO]: [, input[_sO]] + }); + let body; + b9.m("GET").h(headers).q(query).b(body); + return b9.build(); + }, "se_ListAsyncInvokesCommand"); + var se_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context) => { + const b9 = (0, import_core39.requestBuilder)(input, context); + const headers = { + "content-type": "application/json" + }; + b9.bp("/async-invoke"); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + clientRequestToken: [true, (_8) => _8 ?? (0, import_uuid.v4)()], + modelId: [], + modelInput: /* @__PURE__ */ __name((_8) => se_ModelInputPayload(_8, context), "modelInput"), + outputDataConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "outputDataConfig"), + tags: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)(_8), "tags") + }) + ); + b9.m("POST").h(headers).b(body); + return b9.build(); + }, "se_StartAsyncInvokeCommand"); + var de_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + action: import_smithy_client28.expectString, + actionReason: import_smithy_client28.expectString, + assessments: /* @__PURE__ */ __name((_8) => de_GuardrailAssessmentList(_8, context), "assessments"), + guardrailCoverage: import_smithy_client28._json, + outputs: import_smithy_client28._json, + usage: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ApplyGuardrailCommand"); + var de_ConverseCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + additionalModelResponseFields: /* @__PURE__ */ __name((_8) => de_Document(_8, context), "additionalModelResponseFields"), + metrics: import_smithy_client28._json, + output: /* @__PURE__ */ __name((_8) => de_ConverseOutput((0, import_core210.awsExpectUnion)(_8), context), "output"), + performanceConfig: import_smithy_client28._json, + stopReason: import_smithy_client28.expectString, + trace: /* @__PURE__ */ __name((_8) => de_ConverseTrace(_8, context), "trace"), + usage: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ConverseCommand"); + var de_ConverseStreamCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = output.body; + contents.stream = de_ConverseStreamOutput(data, context); + return contents; + }, "de_ConverseStreamCommand"); + var de_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + clientRequestToken: import_smithy_client28.expectString, + endTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "endTime"), + failureMessage: import_smithy_client28.expectString, + invocationArn: import_smithy_client28.expectString, + lastModifiedTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "lastModifiedTime"), + modelArn: import_smithy_client28.expectString, + outputDataConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)((0, import_core210.awsExpectUnion)(_8)), "outputDataConfig"), + status: import_smithy_client28.expectString, + submitTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "submitTime") + }); + Object.assign(contents, doc); + return contents; + }, "de_GetAsyncInvokeCommand"); + var de_InvokeModelCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output), + [_cT]: [, output.headers[_ct]], + [_pCL]: [, output.headers[_xabpl]] + }); + const data = await (0, import_smithy_client28.collectBody)(output.body, context); + contents.body = data; + return contents; + }, "de_InvokeModelCommand"); + var de_InvokeModelWithBidirectionalStreamCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = output.body; + contents.body = de_InvokeModelWithBidirectionalStreamOutput(data, context); + return contents; + }, "de_InvokeModelWithBidirectionalStreamCommand"); + var de_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output), + [_cT]: [, output.headers[_xabct]], + [_pCL]: [, output.headers[_xabpl]] + }); + const data = output.body; + contents.body = de_ResponseStream(data, context); + return contents; + }, "de_InvokeModelWithResponseStreamCommand"); + var de_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + asyncInvokeSummaries: /* @__PURE__ */ __name((_8) => de_AsyncInvokeSummaries(_8, context), "asyncInvokeSummaries"), + nextToken: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAsyncInvokesCommand"); + var de_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + invocationArn: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_StartAsyncInvokeCommand"); + var de_CommandError3 = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonErrorBody)(output.body, context) + }; + const errorCode = (0, import_core210.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.bedrockruntime#AccessDeniedException": + throw await de_AccessDeniedExceptionRes2(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.bedrockruntime#InternalServerException": + throw await de_InternalServerExceptionRes2(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.bedrockruntime#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.bedrockruntime#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.bedrockruntime#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.bedrockruntime#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + case "ModelErrorException": + case "com.amazonaws.bedrockruntime#ModelErrorException": + throw await de_ModelErrorExceptionRes(parsedOutput, context); + case "ModelNotReadyException": + case "com.amazonaws.bedrockruntime#ModelNotReadyException": + throw await de_ModelNotReadyExceptionRes(parsedOutput, context); + case "ModelTimeoutException": + case "com.amazonaws.bedrockruntime#ModelTimeoutException": + throw await de_ModelTimeoutExceptionRes(parsedOutput, context); + case "ServiceUnavailableException": + case "com.amazonaws.bedrockruntime#ServiceUnavailableException": + throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); + case "ModelStreamErrorException": + case "com.amazonaws.bedrockruntime#ModelStreamErrorException": + throw await de_ModelStreamErrorExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.bedrockruntime#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError3({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError3 = (0, import_smithy_client28.withBaseException)(BedrockRuntimeServiceException); + var de_AccessDeniedExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_AccessDeniedExceptionRes"); + var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ConflictExceptionRes"); + var de_InternalServerExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_InternalServerExceptionRes"); + var de_ModelErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString, + originalStatusCode: import_smithy_client28.expectInt32, + resourceName: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelErrorException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelErrorExceptionRes"); + var de_ModelNotReadyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelNotReadyException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelNotReadyExceptionRes"); + var de_ModelStreamErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString, + originalMessage: import_smithy_client28.expectString, + originalStatusCode: import_smithy_client28.expectInt32 + }); + Object.assign(contents, doc); + const exception = new ModelStreamErrorException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelStreamErrorExceptionRes"); + var de_ModelTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelTimeoutException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelTimeoutExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ServiceQuotaExceededExceptionRes"); + var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ServiceUnavailableException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ServiceUnavailableExceptionRes"); + var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ThrottlingExceptionRes"); + var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ValidationExceptionRes"); + var se_InvokeModelWithBidirectionalStreamInput = /* @__PURE__ */ __name((input, context) => { + const eventMarshallingVisitor = /* @__PURE__ */ __name((event) => InvokeModelWithBidirectionalStreamInput.visit(event, { + chunk: /* @__PURE__ */ __name((value) => se_BidirectionalInputPayloadPart_event(value, context), "chunk"), + _: /* @__PURE__ */ __name((value) => value, "_") + }), "eventMarshallingVisitor"); + return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor); + }, "se_InvokeModelWithBidirectionalStreamInput"); + var se_BidirectionalInputPayloadPart_event = /* @__PURE__ */ __name((input, context) => { + const headers = { + ":event-type": { type: "string", value: "chunk" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" } + }; + let body = new Uint8Array(); + body = se_BidirectionalInputPayloadPart(input, context); + body = context.utf8Decoder(JSON.stringify(body)); + return { headers, body }; + }, "se_BidirectionalInputPayloadPart_event"); + var de_ConverseStreamOutput = /* @__PURE__ */ __name((output, context) => { + return context.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["messageStart"] != null) { + return { + messageStart: await de_MessageStartEvent_event(event["messageStart"], context) + }; + } + if (event["contentBlockStart"] != null) { + return { + contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context) + }; + } + if (event["contentBlockDelta"] != null) { + return { + contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context) + }; + } + if (event["contentBlockStop"] != null) { + return { + contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context) + }; + } + if (event["messageStop"] != null) { + return { + messageStop: await de_MessageStopEvent_event(event["messageStop"], context) + }; + } + if (event["metadata"] != null) { + return { + metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context + ) + }; + } + return { $unknown: event }; + }); + }, "de_ConverseStreamOutput"); + var de_InvokeModelWithBidirectionalStreamOutput = /* @__PURE__ */ __name((output, context) => { + return context.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["chunk"] != null) { + return { + chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context) + }; + } + if (event["modelTimeoutException"] != null) { + return { + modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context + ) + }; + } + return { $unknown: event }; + }); + }, "de_InvokeModelWithBidirectionalStreamOutput"); + var de_ResponseStream = /* @__PURE__ */ __name((output, context) => { + return context.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["chunk"] != null) { + return { + chunk: await de_PayloadPart_event(event["chunk"], context) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context) + }; + } + if (event["modelTimeoutException"] != null) { + return { + modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context + ) + }; + } + return { $unknown: event }; + }); + }, "de_ResponseStream"); + var de_BidirectionalOutputPayloadPart_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, de_BidirectionalOutputPayloadPart(data, context)); + return contents; + }, "de_BidirectionalOutputPayloadPart_event"); + var de_ContentBlockDeltaEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, de_ContentBlockDeltaEvent(data, context)); + return contents; + }, "de_ContentBlockDeltaEvent_event"); + var de_ContentBlockStartEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_ContentBlockStartEvent_event"); + var de_ContentBlockStopEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_ContentBlockStopEvent_event"); + var de_ConverseStreamMetadataEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, de_ConverseStreamMetadataEvent(data, context)); + return contents; + }, "de_ConverseStreamMetadataEvent_event"); + var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_InternalServerExceptionRes2(parsedOutput, context); + }, "de_InternalServerException_event"); + var de_MessageStartEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_MessageStartEvent_event"); + var de_MessageStopEvent_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, de_MessageStopEvent(data, context)); + return contents; + }, "de_MessageStopEvent_event"); + var de_ModelStreamErrorException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_ModelStreamErrorExceptionRes(parsedOutput, context); + }, "de_ModelStreamErrorException_event"); + var de_ModelTimeoutException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_ModelTimeoutExceptionRes(parsedOutput, context); + }, "de_ModelTimeoutException_event"); + var de_PayloadPart_event = /* @__PURE__ */ __name(async (output, context) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context); + Object.assign(contents, de_PayloadPart(data, context)); + return contents; + }, "de_PayloadPart_event"); + var de_ServiceUnavailableException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_ServiceUnavailableExceptionRes(parsedOutput, context); + }, "de_ServiceUnavailableException_event"); + var de_ThrottlingException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_ThrottlingExceptionRes(parsedOutput, context); + }, "de_ThrottlingException_event"); + var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context) + }; + return de_ValidationExceptionRes(parsedOutput, context); + }, "de_ValidationException_event"); + var se_BidirectionalInputPayloadPart = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + bytes: context.base64Encoder + }); + }, "se_BidirectionalInputPayloadPart"); + var se_ContentBlock = /* @__PURE__ */ __name((input, context) => { + return ContentBlock.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + citationsContent: /* @__PURE__ */ __name((value) => ({ citationsContent: (0, import_smithy_client28._json)(value) }), "citationsContent"), + document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context) }), "document"), + guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"), + image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context) }), "image"), + reasoningContent: /* @__PURE__ */ __name((value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }), "reasoningContent"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + toolResult: /* @__PURE__ */ __name((value) => ({ toolResult: se_ToolResultBlock(value, context) }), "toolResult"), + toolUse: /* @__PURE__ */ __name((value) => ({ toolUse: se_ToolUseBlock(value, context) }), "toolUse"), + video: /* @__PURE__ */ __name((value) => ({ video: se_VideoBlock(value, context) }), "video"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ContentBlock"); + var se_ContentBlocks = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_ContentBlock(entry, context); + }); + }, "se_ContentBlocks"); + var se_DocumentBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + citations: import_smithy_client28._json, + context: [], + format: [], + name: [], + source: /* @__PURE__ */ __name((_8) => se_DocumentSource(_8, context), "source") + }); + }, "se_DocumentBlock"); + var se_DocumentSource = /* @__PURE__ */ __name((input, context) => { + return DocumentSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context.base64Encoder(value) }), "bytes"), + content: /* @__PURE__ */ __name((value) => ({ content: (0, import_smithy_client28._json)(value) }), "content"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_DocumentSource"); + var se_GuardrailContentBlock = /* @__PURE__ */ __name((input, context) => { + return GuardrailContentBlock.visit(input, { + image: /* @__PURE__ */ __name((value) => ({ image: se_GuardrailImageBlock(value, context) }), "image"), + text: /* @__PURE__ */ __name((value) => ({ text: (0, import_smithy_client28._json)(value) }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailContentBlock"); + var se_GuardrailContentBlockList = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_GuardrailContentBlock(entry, context); + }); + }, "se_GuardrailContentBlockList"); + var se_GuardrailConverseContentBlock = /* @__PURE__ */ __name((input, context) => { + return GuardrailConverseContentBlock.visit(input, { + image: /* @__PURE__ */ __name((value) => ({ image: se_GuardrailConverseImageBlock(value, context) }), "image"), + text: /* @__PURE__ */ __name((value) => ({ text: (0, import_smithy_client28._json)(value) }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailConverseContentBlock"); + var se_GuardrailConverseImageBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_8) => se_GuardrailConverseImageSource(_8, context), "source") + }); + }, "se_GuardrailConverseImageBlock"); + var se_GuardrailConverseImageSource = /* @__PURE__ */ __name((input, context) => { + return GuardrailConverseImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context.base64Encoder(value) }), "bytes"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailConverseImageSource"); + var se_GuardrailImageBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_8) => se_GuardrailImageSource(_8, context), "source") + }); + }, "se_GuardrailImageBlock"); + var se_GuardrailImageSource = /* @__PURE__ */ __name((input, context) => { + return GuardrailImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context.base64Encoder(value) }), "bytes"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailImageSource"); + var se_ImageBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_8) => se_ImageSource(_8, context), "source") + }); + }, "se_ImageBlock"); + var se_ImageSource = /* @__PURE__ */ __name((input, context) => { + return ImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context.base64Encoder(value) }), "bytes"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ImageSource"); + var se_InferenceConfiguration = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + maxTokens: [], + stopSequences: import_smithy_client28._json, + temperature: import_smithy_client28.serializeFloat, + topP: import_smithy_client28.serializeFloat + }); + }, "se_InferenceConfiguration"); + var se_Message = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_8) => se_ContentBlocks(_8, context), "content"), + role: [] + }); + }, "se_Message"); + var se_Messages = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_Message(entry, context); + }); + }, "se_Messages"); + var se_ModelInputPayload = /* @__PURE__ */ __name((input, context) => { + return input; + }, "se_ModelInputPayload"); + var se_ReasoningContentBlock = /* @__PURE__ */ __name((input, context) => { + return ReasoningContentBlock.visit(input, { + reasoningText: /* @__PURE__ */ __name((value) => ({ reasoningText: (0, import_smithy_client28._json)(value) }), "reasoningText"), + redactedContent: /* @__PURE__ */ __name((value) => ({ redactedContent: context.base64Encoder(value) }), "redactedContent"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ReasoningContentBlock"); + var se_SystemContentBlock = /* @__PURE__ */ __name((input, context) => { + return SystemContentBlock.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_SystemContentBlock"); + var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_SystemContentBlock(entry, context); + }); + }, "se_SystemContentBlocks"); + var se_Tool = /* @__PURE__ */ __name((input, context) => { + return Tool.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + toolSpec: /* @__PURE__ */ __name((value) => ({ toolSpec: se_ToolSpecification(value, context) }), "toolSpec"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_Tool"); + var se_ToolConfiguration = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + toolChoice: import_smithy_client28._json, + tools: /* @__PURE__ */ __name((_8) => se_Tools(_8, context), "tools") + }); + }, "se_ToolConfiguration"); + var se_ToolInputSchema = /* @__PURE__ */ __name((input, context) => { + return ToolInputSchema.visit(input, { + json: /* @__PURE__ */ __name((value) => ({ json: se_Document(value, context) }), "json"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ToolInputSchema"); + var se_ToolResultBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_8) => se_ToolResultContentBlocks(_8, context), "content"), + status: [], + toolUseId: [] + }); + }, "se_ToolResultBlock"); + var se_ToolResultContentBlock = /* @__PURE__ */ __name((input, context) => { + return ToolResultContentBlock.visit(input, { + document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context) }), "document"), + image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context) }), "image"), + json: /* @__PURE__ */ __name((value) => ({ json: se_Document(value, context) }), "json"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + video: /* @__PURE__ */ __name((value) => ({ video: se_VideoBlock(value, context) }), "video"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ToolResultContentBlock"); + var se_ToolResultContentBlocks = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_ToolResultContentBlock(entry, context); + }); + }, "se_ToolResultContentBlocks"); + var se_Tools = /* @__PURE__ */ __name((input, context) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_Tool(entry, context); + }); + }, "se_Tools"); + var se_ToolSpecification = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + description: [], + inputSchema: /* @__PURE__ */ __name((_8) => se_ToolInputSchema(_8, context), "inputSchema"), + name: [] + }); + }, "se_ToolSpecification"); + var se_ToolUseBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + input: /* @__PURE__ */ __name((_8) => se_Document(_8, context), "input"), + name: [], + toolUseId: [] + }); + }, "se_ToolUseBlock"); + var se_VideoBlock = /* @__PURE__ */ __name((input, context) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_8) => se_VideoSource(_8, context), "source") + }); + }, "se_VideoBlock"); + var se_VideoSource = /* @__PURE__ */ __name((input, context) => { + return VideoSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context.base64Encoder(value) }), "bytes"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_VideoSource"); + var se_Document = /* @__PURE__ */ __name((input, context) => { + return input; + }, "se_Document"); + var de_AsyncInvokeSummaries = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_AsyncInvokeSummary(entry, context); + }); + return retVal; + }, "de_AsyncInvokeSummaries"); + var de_AsyncInvokeSummary = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + clientRequestToken: import_smithy_client28.expectString, + endTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "endTime"), + failureMessage: import_smithy_client28.expectString, + invocationArn: import_smithy_client28.expectString, + lastModifiedTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "lastModifiedTime"), + modelArn: import_smithy_client28.expectString, + outputDataConfig: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28._json)((0, import_core210.awsExpectUnion)(_8)), "outputDataConfig"), + status: import_smithy_client28.expectString, + submitTime: /* @__PURE__ */ __name((_8) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_8)), "submitTime") + }); + }, "de_AsyncInvokeSummary"); + var de_BidirectionalOutputPayloadPart = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + bytes: context.base64Decoder + }); + }, "de_BidirectionalOutputPayloadPart"); + var de_ContentBlock = /* @__PURE__ */ __name((output, context) => { + if (output.cachePoint != null) { + return { + cachePoint: (0, import_smithy_client28._json)(output.cachePoint) + }; + } + if (output.citationsContent != null) { + return { + citationsContent: (0, import_smithy_client28._json)(output.citationsContent) + }; + } + if (output.document != null) { + return { + document: de_DocumentBlock(output.document, context) + }; + } + if (output.guardContent != null) { + return { + guardContent: de_GuardrailConverseContentBlock((0, import_core210.awsExpectUnion)(output.guardContent), context) + }; + } + if (output.image != null) { + return { + image: de_ImageBlock(output.image, context) + }; + } + if (output.reasoningContent != null) { + return { + reasoningContent: de_ReasoningContentBlock((0, import_core210.awsExpectUnion)(output.reasoningContent), context) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.toolResult != null) { + return { + toolResult: de_ToolResultBlock(output.toolResult, context) + }; + } + if (output.toolUse != null) { + return { + toolUse: de_ToolUseBlock(output.toolUse, context) + }; + } + if (output.video != null) { + return { + video: de_VideoBlock(output.video, context) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ContentBlock"); + var de_ContentBlockDelta = /* @__PURE__ */ __name((output, context) => { + if (output.citation != null) { + return { + citation: (0, import_smithy_client28._json)(output.citation) + }; + } + if (output.reasoningContent != null) { + return { + reasoningContent: de_ReasoningContentBlockDelta((0, import_core210.awsExpectUnion)(output.reasoningContent), context) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.toolUse != null) { + return { + toolUse: (0, import_smithy_client28._json)(output.toolUse) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ContentBlockDelta"); + var de_ContentBlockDeltaEvent = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + contentBlockIndex: import_smithy_client28.expectInt32, + delta: /* @__PURE__ */ __name((_8) => de_ContentBlockDelta((0, import_core210.awsExpectUnion)(_8), context), "delta") + }); + }, "de_ContentBlockDeltaEvent"); + var de_ContentBlocks = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_ContentBlock((0, import_core210.awsExpectUnion)(entry), context); + }); + return retVal; + }, "de_ContentBlocks"); + var de_ConverseOutput = /* @__PURE__ */ __name((output, context) => { + if (output.message != null) { + return { + message: de_Message(output.message, context) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ConverseOutput"); + var de_ConverseStreamMetadataEvent = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + metrics: import_smithy_client28._json, + performanceConfig: import_smithy_client28._json, + trace: /* @__PURE__ */ __name((_8) => de_ConverseStreamTrace(_8, context), "trace"), + usage: import_smithy_client28._json + }); + }, "de_ConverseStreamMetadataEvent"); + var de_ConverseStreamTrace = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + guardrail: /* @__PURE__ */ __name((_8) => de_GuardrailTraceAssessment(_8, context), "guardrail"), + promptRouter: import_smithy_client28._json + }); + }, "de_ConverseStreamTrace"); + var de_ConverseTrace = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + guardrail: /* @__PURE__ */ __name((_8) => de_GuardrailTraceAssessment(_8, context), "guardrail"), + promptRouter: import_smithy_client28._json + }); + }, "de_ConverseTrace"); + var de_DocumentBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + citations: import_smithy_client28._json, + context: import_smithy_client28.expectString, + format: import_smithy_client28.expectString, + name: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_8) => de_DocumentSource((0, import_core210.awsExpectUnion)(_8), context), "source") + }); + }, "de_DocumentBlock"); + var de_DocumentSource = /* @__PURE__ */ __name((output, context) => { + if (output.bytes != null) { + return { + bytes: context.base64Decoder(output.bytes) + }; + } + if (output.content != null) { + return { + content: (0, import_smithy_client28._json)(output.content) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_DocumentSource"); + var de_GuardrailAssessment = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + contentPolicy: import_smithy_client28._json, + contextualGroundingPolicy: /* @__PURE__ */ __name((_8) => de_GuardrailContextualGroundingPolicyAssessment(_8, context), "contextualGroundingPolicy"), + invocationMetrics: import_smithy_client28._json, + sensitiveInformationPolicy: import_smithy_client28._json, + topicPolicy: import_smithy_client28._json, + wordPolicy: import_smithy_client28._json + }); + }, "de_GuardrailAssessment"); + var de_GuardrailAssessmentList = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_GuardrailAssessment(entry, context); + }); + return retVal; + }, "de_GuardrailAssessmentList"); + var de_GuardrailAssessmentListMap = /* @__PURE__ */ __name((output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + acc[key] = de_GuardrailAssessmentList(value, context); + return acc; + }, {}); + }, "de_GuardrailAssessmentListMap"); + var de_GuardrailAssessmentMap = /* @__PURE__ */ __name((output, context) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + acc[key] = de_GuardrailAssessment(value, context); + return acc; + }, {}); + }, "de_GuardrailAssessmentMap"); + var de_GuardrailContextualGroundingFilter = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + action: import_smithy_client28.expectString, + detected: import_smithy_client28.expectBoolean, + score: import_smithy_client28.limitedParseDouble, + threshold: import_smithy_client28.limitedParseDouble, + type: import_smithy_client28.expectString + }); + }, "de_GuardrailContextualGroundingFilter"); + var de_GuardrailContextualGroundingFilters = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_GuardrailContextualGroundingFilter(entry, context); + }); + return retVal; + }, "de_GuardrailContextualGroundingFilters"); + var de_GuardrailContextualGroundingPolicyAssessment = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + filters: /* @__PURE__ */ __name((_8) => de_GuardrailContextualGroundingFilters(_8, context), "filters") + }); + }, "de_GuardrailContextualGroundingPolicyAssessment"); + var de_GuardrailConverseContentBlock = /* @__PURE__ */ __name((output, context) => { + if (output.image != null) { + return { + image: de_GuardrailConverseImageBlock(output.image, context) + }; + } + if (output.text != null) { + return { + text: (0, import_smithy_client28._json)(output.text) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_GuardrailConverseContentBlock"); + var de_GuardrailConverseImageBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_8) => de_GuardrailConverseImageSource((0, import_core210.awsExpectUnion)(_8), context), "source") + }); + }, "de_GuardrailConverseImageBlock"); + var de_GuardrailConverseImageSource = /* @__PURE__ */ __name((output, context) => { + if (output.bytes != null) { + return { + bytes: context.base64Decoder(output.bytes) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_GuardrailConverseImageSource"); + var de_GuardrailTraceAssessment = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + actionReason: import_smithy_client28.expectString, + inputAssessment: /* @__PURE__ */ __name((_8) => de_GuardrailAssessmentMap(_8, context), "inputAssessment"), + modelOutput: import_smithy_client28._json, + outputAssessments: /* @__PURE__ */ __name((_8) => de_GuardrailAssessmentListMap(_8, context), "outputAssessments") + }); + }, "de_GuardrailTraceAssessment"); + var de_ImageBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_8) => de_ImageSource((0, import_core210.awsExpectUnion)(_8), context), "source") + }); + }, "de_ImageBlock"); + var de_ImageSource = /* @__PURE__ */ __name((output, context) => { + if (output.bytes != null) { + return { + bytes: context.base64Decoder(output.bytes) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ImageSource"); + var de_Message = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + content: /* @__PURE__ */ __name((_8) => de_ContentBlocks(_8, context), "content"), + role: import_smithy_client28.expectString + }); + }, "de_Message"); + var de_MessageStopEvent = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + additionalModelResponseFields: /* @__PURE__ */ __name((_8) => de_Document(_8, context), "additionalModelResponseFields"), + stopReason: import_smithy_client28.expectString + }); + }, "de_MessageStopEvent"); + var de_PayloadPart = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + bytes: context.base64Decoder + }); + }, "de_PayloadPart"); + var de_ReasoningContentBlock = /* @__PURE__ */ __name((output, context) => { + if (output.reasoningText != null) { + return { + reasoningText: (0, import_smithy_client28._json)(output.reasoningText) + }; + } + if (output.redactedContent != null) { + return { + redactedContent: context.base64Decoder(output.redactedContent) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ReasoningContentBlock"); + var de_ReasoningContentBlockDelta = /* @__PURE__ */ __name((output, context) => { + if (output.redactedContent != null) { + return { + redactedContent: context.base64Decoder(output.redactedContent) + }; + } + if ((0, import_smithy_client28.expectString)(output.signature) !== void 0) { + return { signature: (0, import_smithy_client28.expectString)(output.signature) }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ReasoningContentBlockDelta"); + var de_ToolResultBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + content: /* @__PURE__ */ __name((_8) => de_ToolResultContentBlocks(_8, context), "content"), + status: import_smithy_client28.expectString, + toolUseId: import_smithy_client28.expectString + }); + }, "de_ToolResultBlock"); + var de_ToolResultContentBlock = /* @__PURE__ */ __name((output, context) => { + if (output.document != null) { + return { + document: de_DocumentBlock(output.document, context) + }; + } + if (output.image != null) { + return { + image: de_ImageBlock(output.image, context) + }; + } + if (output.json != null) { + return { + json: de_Document(output.json, context) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.video != null) { + return { + video: de_VideoBlock(output.video, context) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ToolResultContentBlock"); + var de_ToolResultContentBlocks = /* @__PURE__ */ __name((output, context) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_ToolResultContentBlock((0, import_core210.awsExpectUnion)(entry), context); + }); + return retVal; + }, "de_ToolResultContentBlocks"); + var de_ToolUseBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + input: /* @__PURE__ */ __name((_8) => de_Document(_8, context), "input"), + name: import_smithy_client28.expectString, + toolUseId: import_smithy_client28.expectString + }); + }, "de_ToolUseBlock"); + var de_VideoBlock = /* @__PURE__ */ __name((output, context) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_8) => de_VideoSource((0, import_core210.awsExpectUnion)(_8), context), "source") + }); + }, "de_VideoBlock"); + var de_VideoSource = /* @__PURE__ */ __name((output, context) => { + if (output.bytes != null) { + return { + bytes: context.base64Decoder(output.bytes) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_VideoSource"); + var de_Document = /* @__PURE__ */ __name((output, context) => { + return output; + }, "de_Document"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var _a6 = "accept"; + var _cT = "contentType"; + var _ct = "content-type"; + var _gI = "guardrailIdentifier"; + var _gV = "guardrailVersion"; + var _mR = "maxResults"; + var _nT = "nextToken"; + var _pCL = "performanceConfigLatency"; + var _sB = "sortBy"; + var _sE = "statusEquals"; + var _sO = "sortOrder"; + var _sTA = "submitTimeAfter"; + var _sTB = "submitTimeBefore"; + var _t2 = "trace"; + var _xaba = "x-amzn-bedrock-accept"; + var _xabct = "x-amzn-bedrock-content-type"; + var _xabg = "x-amzn-bedrock-guardrailidentifier"; + var _xabg_ = "x-amzn-bedrock-guardrailversion"; + var _xabpl = "x-amzn-bedrock-performanceconfig-latency"; + var _xabt = "x-amzn-bedrock-trace"; + var ApplyGuardrailCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ApplyGuardrail", {}).n("BedrockRuntimeClient", "ApplyGuardrailCommand").f(ApplyGuardrailRequestFilterSensitiveLog, void 0).ser(se_ApplyGuardrailCommand).de(de_ApplyGuardrailCommand).build() { + static { + __name(this, "ApplyGuardrailCommand"); + } + }; + var ConverseCommand2 = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "Converse", {}).n("BedrockRuntimeClient", "ConverseCommand").f(ConverseRequestFilterSensitiveLog, ConverseResponseFilterSensitiveLog).ser(se_ConverseCommand).de(de_ConverseCommand).build() { + static { + __name(this, "ConverseCommand"); + } + }; + var ConverseStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ConverseStream", { + /** + * @internal + */ + eventStream: { + output: true + } + }).n("BedrockRuntimeClient", "ConverseStreamCommand").f(ConverseStreamRequestFilterSensitiveLog, ConverseStreamResponseFilterSensitiveLog).ser(se_ConverseStreamCommand).de(de_ConverseStreamCommand).build() { + static { + __name(this, "ConverseStreamCommand"); + } + }; + var GetAsyncInvokeCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "GetAsyncInvoke", {}).n("BedrockRuntimeClient", "GetAsyncInvokeCommand").f(void 0, GetAsyncInvokeResponseFilterSensitiveLog).ser(se_GetAsyncInvokeCommand).de(de_GetAsyncInvokeCommand).build() { + static { + __name(this, "GetAsyncInvokeCommand"); + } + }; + var InvokeModelCommand2 = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModel", {}).n("BedrockRuntimeClient", "InvokeModelCommand").f(InvokeModelRequestFilterSensitiveLog, InvokeModelResponseFilterSensitiveLog).ser(se_InvokeModelCommand).de(de_InvokeModelCommand).build() { + static { + __name(this, "InvokeModelCommand"); + } + }; + var InvokeModelWithBidirectionalStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()), + (0, import_middleware_eventstream.getEventStreamPlugin)(config7), + (0, import_middleware_websocket.getWebSocketPlugin)(config7, { + headerPrefix: "x-amz-bedrock-" + }) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModelWithBidirectionalStream", { + /** + * @internal + */ + eventStream: { + input: true, + output: true + } + }).n("BedrockRuntimeClient", "InvokeModelWithBidirectionalStreamCommand").f( + InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog, + InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog + ).ser(se_InvokeModelWithBidirectionalStreamCommand).de(de_InvokeModelWithBidirectionalStreamCommand).build() { + static { + __name(this, "InvokeModelWithBidirectionalStreamCommand"); + } + }; + var InvokeModelWithResponseStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModelWithResponseStream", { + /** + * @internal + */ + eventStream: { + output: true + } + }).n("BedrockRuntimeClient", "InvokeModelWithResponseStreamCommand").f(InvokeModelWithResponseStreamRequestFilterSensitiveLog, InvokeModelWithResponseStreamResponseFilterSensitiveLog).ser(se_InvokeModelWithResponseStreamCommand).de(de_InvokeModelWithResponseStreamCommand).build() { + static { + __name(this, "InvokeModelWithResponseStreamCommand"); + } + }; + var ListAsyncInvokesCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ListAsyncInvokes", {}).n("BedrockRuntimeClient", "ListAsyncInvokesCommand").f(void 0, ListAsyncInvokesResponseFilterSensitiveLog).ser(se_ListAsyncInvokesCommand).de(de_ListAsyncInvokesCommand).build() { + static { + __name(this, "ListAsyncInvokesCommand"); + } + }; + var StartAsyncInvokeCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config7, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config7, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config7, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "StartAsyncInvoke", {}).n("BedrockRuntimeClient", "StartAsyncInvokeCommand").f(StartAsyncInvokeRequestFilterSensitiveLog, void 0).ser(se_StartAsyncInvokeCommand).de(de_StartAsyncInvokeCommand).build() { + static { + __name(this, "StartAsyncInvokeCommand"); + } + }; + var commands3 = { + ApplyGuardrailCommand, + ConverseCommand: ConverseCommand2, + ConverseStreamCommand, + GetAsyncInvokeCommand, + InvokeModelCommand: InvokeModelCommand2, + InvokeModelWithBidirectionalStreamCommand, + InvokeModelWithResponseStreamCommand, + ListAsyncInvokesCommand, + StartAsyncInvokeCommand + }; + var BedrockRuntime = class extends BedrockRuntimeClient2 { + static { + __name(this, "BedrockRuntime"); + } + }; + (0, import_smithy_client28.createAggregatedClient)(commands3, BedrockRuntime); + var paginateListAsyncInvokes = (0, import_core39.createPaginator)(BedrockRuntimeClient2, ListAsyncInvokesCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// node_modules/@commitlint/types/lib/ensure.js +var require_ensure = __commonJS({ + "node_modules/@commitlint/types/lib/ensure.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/format.js +var require_format = __commonJS({ + "node_modules/@commitlint/types/lib/format.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/is-ignored.js +var require_is_ignored = __commonJS({ + "node_modules/@commitlint/types/lib/is-ignored.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/lint.js +var require_lint = __commonJS({ + "node_modules/@commitlint/types/lib/lint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/load.js +var require_load = __commonJS({ + "node_modules/@commitlint/types/lib/load.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/parse.js +var require_parse3 = __commonJS({ + "node_modules/@commitlint/types/lib/parse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/prompt.js +var require_prompt = __commonJS({ + "node_modules/@commitlint/types/lib/prompt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/rules.js +var require_rules = __commonJS({ + "node_modules/@commitlint/types/lib/rules.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RuleConfigQuality = exports2.RuleConfigSeverity = void 0; + var RuleConfigSeverity2; + (function(RuleConfigSeverity3) { + RuleConfigSeverity3[RuleConfigSeverity3["Disabled"] = 0] = "Disabled"; + RuleConfigSeverity3[RuleConfigSeverity3["Warning"] = 1] = "Warning"; + RuleConfigSeverity3[RuleConfigSeverity3["Error"] = 2] = "Error"; + })(RuleConfigSeverity2 || (exports2.RuleConfigSeverity = RuleConfigSeverity2 = {})); + var RuleConfigQuality; + (function(RuleConfigQuality2) { + RuleConfigQuality2[RuleConfigQuality2["User"] = 0] = "User"; + RuleConfigQuality2[RuleConfigQuality2["Qualified"] = 1] = "Qualified"; + })(RuleConfigQuality || (exports2.RuleConfigQuality = RuleConfigQuality = {})); + } +}); + +// node_modules/@commitlint/types/lib/index.js +var require_lib5 = __commonJS({ + "node_modules/@commitlint/types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + var desc = Object.getOwnPropertyDescriptor(m7, k9); + if (!desc || ("get" in desc ? !m7.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m7[k9]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m7, k9, k22) { + if (k22 === void 0) k22 = k9; + o5[k22] = m7[k9]; + }); + var __exportStar2 = exports2 && exports2.__exportStar || function(m7, exports3) { + for (var p6 in m7) if (p6 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p6)) __createBinding2(exports3, m7, p6); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_ensure(), exports2); + __exportStar2(require_format(), exports2); + __exportStar2(require_is_ignored(), exports2); + __exportStar2(require_lint(), exports2); + __exportStar2(require_load(), exports2); + __exportStar2(require_parse3(), exports2); + __exportStar2(require_prompt(), exports2); + __exportStar2(require_rules(), exports2); + } +}); + +// node_modules/ignore/index.js +var require_ignore = __commonJS({ + "node_modules/ignore/index.js"(exports2, module2) { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") { + TMP_KEY_IGNORE = Symbol.for("node-ignore"); + } + var KEY_IGNORE = TMP_KEY_IGNORE; var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; @@ -46739,7 +72421,7 @@ var require_ignore = __commonJS({ // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` - (_7, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + (_8, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" ], // normal intermediate wildcards [ @@ -46751,7 +72433,7 @@ var require_ignore = __commonJS({ /(^|[^\\]+)(\\\*)+(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' - (_7, p1, p22) => { + (_8, p1, p22) => { const unescaped = p22.replace(/\\\*/g, "[^\\/]*"); return p1 + unescaped; } @@ -46795,7 +72477,7 @@ var require_ignore = __commonJS({ // trailing wildcard [ /(\^|\\\/)?\\\*$/, - (_7, p1) => { + (_8, p1) => { const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; return `${prefix}(?=$|\\/$)`; } @@ -46854,9 +72536,9 @@ var require_ignore = __commonJS({ return doThrow(`path must not be empty`, TypeError); } if (checkPath.isNotRelative(path5)) { - const r3 = "`path.relative()`d"; + const r5 = "`path.relative()`d"; return doThrow( - `path should be a ${r3} string, but got "${originalPath}"`, + `path should be a ${r5} string, but got "${originalPath}"`, RangeError ); } @@ -46864,7 +72546,7 @@ var require_ignore = __commonJS({ }; var isNotRelative = (path5) => REGEX_TEST_INVALID_PATH.test(path5); checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p4) => p4; + checkPath.convert = (p6) => p6; var Ignore2 = class { constructor({ ignorecase = true, @@ -46941,33 +72623,33 @@ var require_ignore = __commonJS({ }; } // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { + _test(originalPath, cache3, checkUnignored, slices) { const path5 = originalPath && checkPath.convert(originalPath); checkPath( path5, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError ); - return this._t(path5, cache, checkUnignored, slices); + return this._t(path5, cache3, checkUnignored, slices); } - _t(path5, cache, checkUnignored, slices) { - if (path5 in cache) { - return cache[path5]; + _t(path5, cache3, checkUnignored, slices) { + if (path5 in cache3) { + return cache3[path5]; } if (!slices) { slices = path5.split(SLASH); } slices.pop(); if (!slices.length) { - return cache[path5] = this._testOne(path5, checkUnignored); + return cache3[path5] = this._testOne(path5, checkUnignored); } const parent = this._t( slices.join(SLASH) + SLASH, - cache, + cache3, checkUnignored, slices ); - return cache[path5] = parent.ignored ? parent : this._testOne(path5, checkUnignored); + return cache3[path5] = parent.ignored ? parent : this._testOne(path5, checkUnignored); } ignores(path5) { return this._test(path5, this._ignoreCache, false).ignored; @@ -47006,124 +72688,124 @@ var k = "unknown-flag"; var C = "argument"; var { stringify: h } = JSON; var O = /\B([A-Z])/g; -var v = (t2) => t2.replace(O, "-$1").toLowerCase(); +var v = (t4) => t4.replace(O, "-$1").toLowerCase(); var { hasOwnProperty: D } = Object.prototype; -var w = (t2, n2) => D.call(t2, n2); -var L = (t2) => Array.isArray(t2); -var b = (t2) => typeof t2 == "function" ? [t2, false] : L(t2) ? [t2[0], true] : b(t2.type); -var d = (t2, n2) => t2 === Boolean ? n2 !== "false" : n2; -var m = (t2, n2) => typeof n2 == "boolean" ? n2 : t2 === Number && n2 === "" ? Number.NaN : t2(n2); +var w = (t4, n4) => D.call(t4, n4); +var L = (t4) => Array.isArray(t4); +var b = (t4) => typeof t4 == "function" ? [t4, false] : L(t4) ? [t4[0], true] : b(t4.type); +var d = (t4, n4) => t4 === Boolean ? n4 !== "false" : n4; +var m = (t4, n4) => typeof n4 == "boolean" ? n4 : t4 === Number && n4 === "" ? Number.NaN : t4(n4); var R = /[\s.:=]/; -var B = (t2) => { - const n2 = `Flag name ${h(t2)}`; - if (t2.length === 0) throw new Error(`${n2} cannot be empty`); - if (t2.length === 1) throw new Error(`${n2} must be longer than a character`); - const r3 = t2.match(R); - if (r3) throw new Error(`${n2} cannot contain ${h(r3?.[0])}`); +var B = (t4) => { + const n4 = `Flag name ${h(t4)}`; + if (t4.length === 0) throw new Error(`${n4} cannot be empty`); + if (t4.length === 1) throw new Error(`${n4} must be longer than a character`); + const r5 = t4.match(R); + if (r5) throw new Error(`${n4} cannot contain ${h(r5?.[0])}`); }; -var K = (t2) => { - const n2 = {}, r3 = (e3, o3) => { - if (w(n2, e3)) throw new Error(`Duplicate flags named ${h(e3)}`); - n2[e3] = o3; +var K = (t4) => { + const n4 = {}, r5 = (e5, o5) => { + if (w(n4, e5)) throw new Error(`Duplicate flags named ${h(e5)}`); + n4[e5] = o5; }; - for (const e3 in t2) { - if (!w(t2, e3)) continue; - B(e3); - const o3 = t2[e3], s2 = [[], ...b(o3), o3]; - r3(e3, s2); - const i3 = v(e3); - if (e3 !== i3 && r3(i3, s2), "alias" in o3 && typeof o3.alias == "string") { - const { alias: a4 } = o3, l3 = `Flag alias ${h(a4)} for flag ${h(e3)}`; - if (a4.length === 0) throw new Error(`${l3} cannot be empty`); - if (a4.length > 1) throw new Error(`${l3} must be a single character`); - r3(a4, s2); - } - } - return n2; + for (const e5 in t4) { + if (!w(t4, e5)) continue; + B(e5); + const o5 = t4[e5], s4 = [[], ...b(o5), o5]; + r5(e5, s4); + const i5 = v(e5); + if (e5 !== i5 && r5(i5, s4), "alias" in o5 && typeof o5.alias == "string") { + const { alias: a6 } = o5, l5 = `Flag alias ${h(a6)} for flag ${h(e5)}`; + if (a6.length === 0) throw new Error(`${l5} cannot be empty`); + if (a6.length > 1) throw new Error(`${l5} must be a single character`); + r5(a6, s4); + } + } + return n4; }; -var _ = (t2, n2) => { - const r3 = {}; - for (const e3 in t2) { - if (!w(t2, e3)) continue; - const [o3, , s2, i3] = n2[e3]; - if (o3.length === 0 && "default" in i3) { - let { default: a4 } = i3; - typeof a4 == "function" && (a4 = a4()), r3[e3] = a4; - } else r3[e3] = s2 ? o3 : o3.pop(); - } - return r3; +var _ = (t4, n4) => { + const r5 = {}; + for (const e5 in t4) { + if (!w(t4, e5)) continue; + const [o5, , s4, i5] = n4[e5]; + if (o5.length === 0 && "default" in i5) { + let { default: a6 } = i5; + typeof a6 == "function" && (a6 = a6()), r5[e5] = a6; + } else r5[e5] = s4 ? o5 : o5.pop(); + } + return r5; }; var F = "--"; var G = /[.:=]/; var T = /^-{1,2}\w/; -var N = (t2) => { - if (!T.test(t2)) return; - const n2 = !t2.startsWith(F); - let r3 = t2.slice(n2 ? 1 : 2), e3; - const o3 = r3.match(G); - if (o3) { - const { index: s2 } = o3; - e3 = r3.slice(s2 + 1), r3 = r3.slice(0, s2); - } - return [r3, e3, n2]; +var N = (t4) => { + if (!T.test(t4)) return; + const n4 = !t4.startsWith(F); + let r5 = t4.slice(n4 ? 1 : 2), e5; + const o5 = r5.match(G); + if (o5) { + const { index: s4 } = o5; + e5 = r5.slice(s4 + 1), r5 = r5.slice(0, s4); + } + return [r5, e5, n4]; }; -var $ = (t2, { onFlag: n2, onArgument: r3 }) => { - let e3; - const o3 = (s2, i3) => { - if (typeof e3 != "function") return true; - e3(s2, i3), e3 = void 0; +var $ = (t4, { onFlag: n4, onArgument: r5 }) => { + let e5; + const o5 = (s4, i5) => { + if (typeof e5 != "function") return true; + e5(s4, i5), e5 = void 0; }; - for (let s2 = 0; s2 < t2.length; s2 += 1) { - const i3 = t2[s2]; - if (i3 === F) { - o3(); - const l3 = t2.slice(s2 + 1); - r3?.(l3, [s2], true); + for (let s4 = 0; s4 < t4.length; s4 += 1) { + const i5 = t4[s4]; + if (i5 === F) { + o5(); + const l5 = t4.slice(s4 + 1); + r5?.(l5, [s4], true); break; } - const a4 = N(i3); - if (a4) { - if (o3(), !n2) continue; - const [l3, f4, g4] = a4; - if (g4) for (let c3 = 0; c3 < l3.length; c3 += 1) { - o3(); - const u3 = c3 === l3.length - 1; - e3 = n2(l3[c3], u3 ? f4 : void 0, [s2, c3 + 1, u3]); + const a6 = N(i5); + if (a6) { + if (o5(), !n4) continue; + const [l5, f6, g6] = a6; + if (g6) for (let c5 = 0; c5 < l5.length; c5 += 1) { + o5(); + const u5 = c5 === l5.length - 1; + e5 = n4(l5[c5], u5 ? f6 : void 0, [s4, c5 + 1, u5]); } - else e3 = n2(l3, f4, [s2]); - } else o3(i3, [s2]) && r3?.([i3], [s2]); + else e5 = n4(l5, f6, [s4]); + } else o5(i5, [s4]) && r5?.([i5], [s4]); } - o3(); + o5(); }; -var E = (t2, n2) => { - for (const [r3, e3, o3] of n2.reverse()) { - if (e3) { - const s2 = t2[r3]; - let i3 = s2.slice(0, e3); - if (o3 || (i3 += s2.slice(e3 + 1)), i3 !== "-") { - t2[r3] = i3; +var E = (t4, n4) => { + for (const [r5, e5, o5] of n4.reverse()) { + if (e5) { + const s4 = t4[r5]; + let i5 = s4.slice(0, e5); + if (o5 || (i5 += s4.slice(e5 + 1)), i5 !== "-") { + t4[r5] = i5; continue; } } - t2.splice(r3, 1); + t4.splice(r5, 1); } }; -var U = (t2, n2 = process.argv.slice(2), { ignore: r3 } = {}) => { - const e3 = [], o3 = K(t2), s2 = {}, i3 = []; - return i3[F] = [], $(n2, { onFlag(a4, l3, f4) { - const g4 = w(o3, a4); - if (!r3?.(g4 ? V : k, a4, l3)) { - if (g4) { - const [c3, u3] = o3[a4], y6 = d(u3, l3), p4 = (P4, A5) => { - e3.push(f4), A5 && e3.push(A5), c3.push(m(u3, P4 || "")); +var U = (t4, n4 = process.argv.slice(2), { ignore: r5 } = {}) => { + const e5 = [], o5 = K(t4), s4 = {}, i5 = []; + return i5[F] = [], $(n4, { onFlag(a6, l5, f6) { + const g6 = w(o5, a6); + if (!r5?.(g6 ? V : k, a6, l5)) { + if (g6) { + const [c5, u5] = o5[a6], y7 = d(u5, l5), p6 = (P4, A6) => { + e5.push(f6), A6 && e5.push(A6), c5.push(m(u5, P4 || "")); }; - return y6 === void 0 ? p4 : p4(y6); + return y7 === void 0 ? p6 : p6(y7); } - w(s2, a4) || (s2[a4] = []), s2[a4].push(l3 === void 0 ? true : l3), e3.push(f4); + w(s4, a6) || (s4[a6] = []), s4[a6].push(l5 === void 0 ? true : l5), e5.push(f6); } - }, onArgument(a4, l3, f4) { - r3?.(C, n2[l3[0]]) || (i3.push(...a4), f4 ? (i3[F] = a4, n2.splice(l3[0])) : e3.push(l3)); - } }), E(n2, e3), { flags: _(t2, o3), unknownFlags: s2, _: i3 }; + }, onArgument(a6, l5, f6) { + r5?.(C, n4[l5[0]]) || (i5.push(...a6), f6 ? (i5[F] = a6, n4.splice(l5[0])) : e5.push(l5)); + } }), E(n4, e5), { flags: _(t4, o5), unknownFlags: s4, _: i5 }; }; // node_modules/cleye/dist/index.mjs @@ -47140,21 +72822,21 @@ var I = Object.getOwnPropertySymbols; var ED = Object.getPrototypeOf; var L2 = Object.prototype.hasOwnProperty; var eD = Object.prototype.propertyIsEnumerable; -var W = (D5, F5, u3) => F5 in D5 ? m2(D5, F5, { enumerable: true, configurable: true, writable: true, value: u3 }) : D5[F5] = u3; -var p = (D5, F5) => { - for (var u3 in F5 || (F5 = {})) L2.call(F5, u3) && W(D5, u3, F5[u3]); - if (I) for (var u3 of I(F5)) eD.call(F5, u3) && W(D5, u3, F5[u3]); - return D5; +var W = (D6, F6, u5) => F6 in D6 ? m2(D6, F6, { enumerable: true, configurable: true, writable: true, value: u5 }) : D6[F6] = u5; +var p = (D6, F6) => { + for (var u5 in F6 || (F6 = {})) L2.call(F6, u5) && W(D6, u5, F6[u5]); + if (I) for (var u5 of I(F6)) eD.call(F6, u5) && W(D6, u5, F6[u5]); + return D6; }; -var c = (D5, F5) => uD(D5, CD(F5)); -var nD = (D5) => m2(D5, "__esModule", { value: true }); -var rD = (D5, F5) => () => (D5 && (F5 = D5(D5 = 0)), F5); -var iD = (D5, F5) => () => (F5 || D5((F5 = { exports: {} }).exports, F5), F5.exports); -var oD = (D5, F5, u3, C5) => { - if (F5 && typeof F5 == "object" || typeof F5 == "function") for (let t2 of tD(F5)) !L2.call(D5, t2) && (u3 || t2 !== "default") && m2(D5, t2, { get: () => F5[t2], enumerable: !(C5 = FD(F5, t2)) || C5.enumerable }); - return D5; +var c = (D6, F6) => uD(D6, CD(F6)); +var nD = (D6) => m2(D6, "__esModule", { value: true }); +var rD = (D6, F6) => () => (D6 && (F6 = D6(D6 = 0)), F6); +var iD = (D6, F6) => () => (F6 || D6((F6 = { exports: {} }).exports, F6), F6.exports); +var oD = (D6, F6, u5, C6) => { + if (F6 && typeof F6 == "object" || typeof F6 == "function") for (let t4 of tD(F6)) !L2.call(D6, t4) && (u5 || t4 !== "default") && m2(D6, t4, { get: () => F6[t4], enumerable: !(C6 = FD(F6, t4)) || C6.enumerable }); + return D6; }; -var BD = (D5, F5) => oD(nD(m2(D5 != null ? DD(ED(D5)) : {}, "default", !F5 && D5 && D5.__esModule ? { get: () => D5.default, enumerable: true } : { value: D5, enumerable: true })), D5); +var BD = (D6, F6) => oD(nD(m2(D6 != null ? DD(ED(D6)) : {}, "default", !F6 && D6 && D6.__esModule ? { get: () => D6.default, enumerable: true } : { value: D6, enumerable: true })), D6); var i = rD(() => { }); var $2 = iD((LD, N6) => { @@ -47167,158 +72849,158 @@ var $2 = iD((LD, N6) => { i(); i(); i(); -var v2 = (D5) => { - var u3, C5, t2; - let F5 = (u3 = process.stdout.columns) != null ? u3 : Number.POSITIVE_INFINITY; - return typeof D5 == "function" && (D5 = D5(F5)), D5 || (D5 = {}), Array.isArray(D5) ? { columns: D5, stdoutColumns: F5 } : { columns: (C5 = D5.columns) != null ? C5 : [], stdoutColumns: (t2 = D5.stdoutColumns) != null ? t2 : F5 }; +var v2 = (D6) => { + var u5, C6, t4; + let F6 = (u5 = process.stdout.columns) != null ? u5 : Number.POSITIVE_INFINITY; + return typeof D6 == "function" && (D6 = D6(F6)), D6 || (D6 = {}), Array.isArray(D6) ? { columns: D6, stdoutColumns: F6 } : { columns: (C6 = D6.columns) != null ? C6 : [], stdoutColumns: (t4 = D6.stdoutColumns) != null ? t4 : F6 }; }; i(); i(); i(); i(); i(); -function w2({ onlyFirst: D5 = false } = {}) { - let F5 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); - return new RegExp(F5, D5 ? void 0 : "g"); +function w2({ onlyFirst: D6 = false } = {}) { + let F6 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); + return new RegExp(F6, D6 ? void 0 : "g"); } -function d2(D5) { - if (typeof D5 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof D5}\``); - return D5.replace(w2(), ""); +function d2(D6) { + if (typeof D6 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof D6}\``); + return D6.replace(w2(), ""); } i(); -function y(D5) { - return Number.isInteger(D5) ? D5 >= 4352 && (D5 <= 4447 || D5 === 9001 || D5 === 9002 || 11904 <= D5 && D5 <= 12871 && D5 !== 12351 || 12880 <= D5 && D5 <= 19903 || 19968 <= D5 && D5 <= 42182 || 43360 <= D5 && D5 <= 43388 || 44032 <= D5 && D5 <= 55203 || 63744 <= D5 && D5 <= 64255 || 65040 <= D5 && D5 <= 65049 || 65072 <= D5 && D5 <= 65131 || 65281 <= D5 && D5 <= 65376 || 65504 <= D5 && D5 <= 65510 || 110592 <= D5 && D5 <= 110593 || 127488 <= D5 && D5 <= 127569 || 131072 <= D5 && D5 <= 262141) : false; +function y(D6) { + return Number.isInteger(D6) ? D6 >= 4352 && (D6 <= 4447 || D6 === 9001 || D6 === 9002 || 11904 <= D6 && D6 <= 12871 && D6 !== 12351 || 12880 <= D6 && D6 <= 19903 || 19968 <= D6 && D6 <= 42182 || 43360 <= D6 && D6 <= 43388 || 44032 <= D6 && D6 <= 55203 || 63744 <= D6 && D6 <= 64255 || 65040 <= D6 && D6 <= 65049 || 65072 <= D6 && D6 <= 65131 || 65281 <= D6 && D6 <= 65376 || 65504 <= D6 && D6 <= 65510 || 110592 <= D6 && D6 <= 110593 || 127488 <= D6 && D6 <= 127569 || 131072 <= D6 && D6 <= 262141) : false; } var j = BD($2(), 1); -function g(D5) { - if (typeof D5 != "string" || D5.length === 0 || (D5 = d2(D5), D5.length === 0)) return 0; - D5 = D5.replace((0, j.default)(), " "); - let F5 = 0; - for (let u3 = 0; u3 < D5.length; u3++) { - let C5 = D5.codePointAt(u3); - C5 <= 31 || C5 >= 127 && C5 <= 159 || C5 >= 768 && C5 <= 879 || (C5 > 65535 && u3++, F5 += y(C5) ? 2 : 1); +function g(D6) { + if (typeof D6 != "string" || D6.length === 0 || (D6 = d2(D6), D6.length === 0)) return 0; + D6 = D6.replace((0, j.default)(), " "); + let F6 = 0; + for (let u5 = 0; u5 < D6.length; u5++) { + let C6 = D6.codePointAt(u5); + C6 <= 31 || C6 >= 127 && C6 <= 159 || C6 >= 768 && C6 <= 879 || (C6 > 65535 && u5++, F6 += y(C6) ? 2 : 1); } - return F5; + return F6; } -var b2 = (D5) => Math.max(...D5.split(` +var b2 = (D6) => Math.max(...D6.split(` `).map(g)); -var k2 = (D5) => { - let F5 = []; - for (let u3 of D5) { - let { length: C5 } = u3, t2 = C5 - F5.length; - for (let E4 = 0; E4 < t2; E4 += 1) F5.push(0); - for (let E4 = 0; E4 < C5; E4 += 1) { - let e3 = b2(u3[E4]); - e3 > F5[E4] && (F5[E4] = e3); +var k2 = (D6) => { + let F6 = []; + for (let u5 of D6) { + let { length: C6 } = u5, t4 = C6 - F6.length; + for (let E5 = 0; E5 < t4; E5 += 1) F6.push(0); + for (let E5 = 0; E5 < C6; E5 += 1) { + let e5 = b2(u5[E5]); + e5 > F6[E5] && (F6[E5] = e5); } } - return F5; + return F6; }; i(); var _2 = /^\d+%$/; var z = { width: "auto", align: "left", contentWidth: 0, paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0, horizontalPadding: 0, paddingLeftString: "", paddingRightString: "" }; -var sD = (D5, F5) => { - var C5; - let u3 = []; - for (let t2 = 0; t2 < D5.length; t2 += 1) { - let E4 = (C5 = F5[t2]) != null ? C5 : "auto"; - if (typeof E4 == "number" || E4 === "auto" || E4 === "content-width" || typeof E4 == "string" && _2.test(E4)) { - u3.push(c(p({}, z), { width: E4, contentWidth: D5[t2] })); +var sD = (D6, F6) => { + var C6; + let u5 = []; + for (let t4 = 0; t4 < D6.length; t4 += 1) { + let E5 = (C6 = F6[t4]) != null ? C6 : "auto"; + if (typeof E5 == "number" || E5 === "auto" || E5 === "content-width" || typeof E5 == "string" && _2.test(E5)) { + u5.push(c(p({}, z), { width: E5, contentWidth: D6[t4] })); continue; } - if (E4 && typeof E4 == "object") { - let e3 = c(p(p({}, z), E4), { contentWidth: D5[t2] }); - e3.horizontalPadding = e3.paddingLeft + e3.paddingRight, u3.push(e3); + if (E5 && typeof E5 == "object") { + let e5 = c(p(p({}, z), E5), { contentWidth: D6[t4] }); + e5.horizontalPadding = e5.paddingLeft + e5.paddingRight, u5.push(e5); continue; } - throw new Error(`Invalid column width: ${JSON.stringify(E4)}`); + throw new Error(`Invalid column width: ${JSON.stringify(E5)}`); } - return u3; + return u5; }; -function aD(D5, F5) { - for (let u3 of D5) { - let { width: C5 } = u3; - if (C5 === "content-width" && (u3.width = u3.contentWidth), C5 === "auto") { - let n2 = Math.min(20, u3.contentWidth); - u3.width = n2, u3.autoOverflow = u3.contentWidth - n2; +function aD(D6, F6) { + for (let u5 of D6) { + let { width: C6 } = u5; + if (C6 === "content-width" && (u5.width = u5.contentWidth), C6 === "auto") { + let n4 = Math.min(20, u5.contentWidth); + u5.width = n4, u5.autoOverflow = u5.contentWidth - n4; } - if (typeof C5 == "string" && _2.test(C5)) { - let n2 = Number.parseFloat(C5.slice(0, -1)) / 100; - u3.width = Math.floor(F5 * n2) - (u3.paddingLeft + u3.paddingRight); + if (typeof C6 == "string" && _2.test(C6)) { + let n4 = Number.parseFloat(C6.slice(0, -1)) / 100; + u5.width = Math.floor(F6 * n4) - (u5.paddingLeft + u5.paddingRight); } - let { horizontalPadding: t2 } = u3, E4 = 1, e3 = E4 + t2; - if (e3 >= F5) { - let n2 = e3 - F5, o3 = Math.ceil(u3.paddingLeft / t2 * n2), B3 = n2 - o3; - u3.paddingLeft -= o3, u3.paddingRight -= B3, u3.horizontalPadding = u3.paddingLeft + u3.paddingRight; + let { horizontalPadding: t4 } = u5, E5 = 1, e5 = E5 + t4; + if (e5 >= F6) { + let n4 = e5 - F6, o5 = Math.ceil(u5.paddingLeft / t4 * n4), B4 = n4 - o5; + u5.paddingLeft -= o5, u5.paddingRight -= B4, u5.horizontalPadding = u5.paddingLeft + u5.paddingRight; } - u3.paddingLeftString = u3.paddingLeft ? " ".repeat(u3.paddingLeft) : "", u3.paddingRightString = u3.paddingRight ? " ".repeat(u3.paddingRight) : ""; - let r3 = F5 - u3.horizontalPadding; - u3.width = Math.max(Math.min(u3.width, r3), E4); + u5.paddingLeftString = u5.paddingLeft ? " ".repeat(u5.paddingLeft) : "", u5.paddingRightString = u5.paddingRight ? " ".repeat(u5.paddingRight) : ""; + let r5 = F6 - u5.horizontalPadding; + u5.width = Math.max(Math.min(u5.width, r5), E5); } } var G2 = () => Object.assign([], { columns: 0 }); -function lD(D5, F5) { - let u3 = [G2()], [C5] = u3; - for (let t2 of D5) { - let E4 = t2.width + t2.horizontalPadding; - C5.columns + E4 > F5 && (C5 = G2(), u3.push(C5)), C5.push(t2), C5.columns += E4; +function lD(D6, F6) { + let u5 = [G2()], [C6] = u5; + for (let t4 of D6) { + let E5 = t4.width + t4.horizontalPadding; + C6.columns + E5 > F6 && (C6 = G2(), u5.push(C6)), C6.push(t4), C6.columns += E5; } - for (let t2 of u3) { - let E4 = t2.reduce((s2, l3) => s2 + l3.width + l3.horizontalPadding, 0), e3 = F5 - E4; - if (e3 === 0) continue; - let r3 = t2.filter((s2) => "autoOverflow" in s2), n2 = r3.filter((s2) => s2.autoOverflow > 0), o3 = n2.reduce((s2, l3) => s2 + l3.autoOverflow, 0), B3 = Math.min(o3, e3); - for (let s2 of n2) { - let l3 = Math.floor(s2.autoOverflow / o3 * B3); - s2.width += l3, e3 -= l3; + for (let t4 of u5) { + let E5 = t4.reduce((s4, l5) => s4 + l5.width + l5.horizontalPadding, 0), e5 = F6 - E5; + if (e5 === 0) continue; + let r5 = t4.filter((s4) => "autoOverflow" in s4), n4 = r5.filter((s4) => s4.autoOverflow > 0), o5 = n4.reduce((s4, l5) => s4 + l5.autoOverflow, 0), B4 = Math.min(o5, e5); + for (let s4 of n4) { + let l5 = Math.floor(s4.autoOverflow / o5 * B4); + s4.width += l5, e5 -= l5; } - let a4 = Math.floor(e3 / r3.length); - for (let s2 = 0; s2 < r3.length; s2 += 1) { - let l3 = r3[s2]; - s2 === r3.length - 1 ? l3.width += e3 : l3.width += a4, e3 -= a4; + let a6 = Math.floor(e5 / r5.length); + for (let s4 = 0; s4 < r5.length; s4 += 1) { + let l5 = r5[s4]; + s4 === r5.length - 1 ? l5.width += e5 : l5.width += a6, e5 -= a6; } } - return u3; + return u5; } -function Z(D5, F5, u3) { - let C5 = sD(u3, F5); - return aD(C5, D5), lD(C5, D5); +function Z(D6, F6, u5) { + let C6 = sD(u5, F6); + return aD(C6, D6), lD(C6, D6); } i(); i(); i(); var O2 = 10; -var U2 = (D5 = 0) => (F5) => `\x1B[${F5 + D5}m`; -var V2 = (D5 = 0) => (F5) => `\x1B[${38 + D5};5;${F5}m`; -var Y = (D5 = 0) => (F5, u3, C5) => `\x1B[${38 + D5};2;${F5};${u3};${C5}m`; +var U2 = (D6 = 0) => (F6) => `\x1B[${F6 + D6}m`; +var V2 = (D6 = 0) => (F6) => `\x1B[${38 + D6};5;${F6}m`; +var Y = (D6 = 0) => (F6, u5, C6) => `\x1B[${38 + D6};2;${F6};${u5};${C6}m`; function AD() { - let D5 = /* @__PURE__ */ new Map(), F5 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; - F5.color.gray = F5.color.blackBright, F5.bgColor.bgGray = F5.bgColor.bgBlackBright, F5.color.grey = F5.color.blackBright, F5.bgColor.bgGrey = F5.bgColor.bgBlackBright; - for (let [u3, C5] of Object.entries(F5)) { - for (let [t2, E4] of Object.entries(C5)) F5[t2] = { open: `\x1B[${E4[0]}m`, close: `\x1B[${E4[1]}m` }, C5[t2] = F5[t2], D5.set(E4[0], E4[1]); - Object.defineProperty(F5, u3, { value: C5, enumerable: false }); - } - return Object.defineProperty(F5, "codes", { value: D5, enumerable: false }), F5.color.close = "\x1B[39m", F5.bgColor.close = "\x1B[49m", F5.color.ansi = U2(), F5.color.ansi256 = V2(), F5.color.ansi16m = Y(), F5.bgColor.ansi = U2(O2), F5.bgColor.ansi256 = V2(O2), F5.bgColor.ansi16m = Y(O2), Object.defineProperties(F5, { rgbToAnsi256: { value: (u3, C5, t2) => u3 === C5 && C5 === t2 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(C5 / 255 * 5) + Math.round(t2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => { - let C5 = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(u3.toString(16)); - if (!C5) return [0, 0, 0]; - let { colorString: t2 } = C5.groups; - t2.length === 3 && (t2 = t2.split("").map((e3) => e3 + e3).join("")); - let E4 = Number.parseInt(t2, 16); - return [E4 >> 16 & 255, E4 >> 8 & 255, E4 & 255]; - }, enumerable: false }, hexToAnsi256: { value: (u3) => F5.rgbToAnsi256(...F5.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => { - if (u3 < 8) return 30 + u3; - if (u3 < 16) return 90 + (u3 - 8); - let C5, t2, E4; - if (u3 >= 232) C5 = ((u3 - 232) * 10 + 8) / 255, t2 = C5, E4 = C5; + let D6 = /* @__PURE__ */ new Map(), F6 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; + F6.color.gray = F6.color.blackBright, F6.bgColor.bgGray = F6.bgColor.bgBlackBright, F6.color.grey = F6.color.blackBright, F6.bgColor.bgGrey = F6.bgColor.bgBlackBright; + for (let [u5, C6] of Object.entries(F6)) { + for (let [t4, E5] of Object.entries(C6)) F6[t4] = { open: `\x1B[${E5[0]}m`, close: `\x1B[${E5[1]}m` }, C6[t4] = F6[t4], D6.set(E5[0], E5[1]); + Object.defineProperty(F6, u5, { value: C6, enumerable: false }); + } + return Object.defineProperty(F6, "codes", { value: D6, enumerable: false }), F6.color.close = "\x1B[39m", F6.bgColor.close = "\x1B[49m", F6.color.ansi = U2(), F6.color.ansi256 = V2(), F6.color.ansi16m = Y(), F6.bgColor.ansi = U2(O2), F6.bgColor.ansi256 = V2(O2), F6.bgColor.ansi16m = Y(O2), Object.defineProperties(F6, { rgbToAnsi256: { value: (u5, C6, t4) => u5 === C6 && C6 === t4 ? u5 < 8 ? 16 : u5 > 248 ? 231 : Math.round((u5 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u5 / 255 * 5) + 6 * Math.round(C6 / 255 * 5) + Math.round(t4 / 255 * 5), enumerable: false }, hexToRgb: { value: (u5) => { + let C6 = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(u5.toString(16)); + if (!C6) return [0, 0, 0]; + let { colorString: t4 } = C6.groups; + t4.length === 3 && (t4 = t4.split("").map((e5) => e5 + e5).join("")); + let E5 = Number.parseInt(t4, 16); + return [E5 >> 16 & 255, E5 >> 8 & 255, E5 & 255]; + }, enumerable: false }, hexToAnsi256: { value: (u5) => F6.rgbToAnsi256(...F6.hexToRgb(u5)), enumerable: false }, ansi256ToAnsi: { value: (u5) => { + if (u5 < 8) return 30 + u5; + if (u5 < 16) return 90 + (u5 - 8); + let C6, t4, E5; + if (u5 >= 232) C6 = ((u5 - 232) * 10 + 8) / 255, t4 = C6, E5 = C6; else { - u3 -= 16; - let n2 = u3 % 36; - C5 = Math.floor(u3 / 36) / 5, t2 = Math.floor(n2 / 6) / 5, E4 = n2 % 6 / 5; + u5 -= 16; + let n4 = u5 % 36; + C6 = Math.floor(u5 / 36) / 5, t4 = Math.floor(n4 / 6) / 5, E5 = n4 % 6 / 5; } - let e3 = Math.max(C5, t2, E4) * 2; - if (e3 === 0) return 30; - let r3 = 30 + (Math.round(E4) << 2 | Math.round(t2) << 1 | Math.round(C5)); - return e3 === 2 && (r3 += 60), r3; - }, enumerable: false }, rgbToAnsi: { value: (u3, C5, t2) => F5.ansi256ToAnsi(F5.rgbToAnsi256(u3, C5, t2)), enumerable: false }, hexToAnsi: { value: (u3) => F5.ansi256ToAnsi(F5.hexToAnsi256(u3)), enumerable: false } }), F5; + let e5 = Math.max(C6, t4, E5) * 2; + if (e5 === 0) return 30; + let r5 = 30 + (Math.round(E5) << 2 | Math.round(t4) << 1 | Math.round(C6)); + return e5 === 2 && (r5 += 60), r5; + }, enumerable: false }, rgbToAnsi: { value: (u5, C6, t4) => F6.ansi256ToAnsi(F6.rgbToAnsi256(u5, C6, t4)), enumerable: false }, hexToAnsi: { value: (u5) => F6.ansi256ToAnsi(F6.hexToAnsi256(u5)), enumerable: false } }), F6; } var fD = AD(); var K2 = fD; @@ -47329,344 +73011,344 @@ var q = "["; var pD = "]"; var H = "m"; var M = `${pD}8;;`; -var J = (D5) => `${x.values().next().value}${q}${D5}${H}`; -var Q = (D5) => `${x.values().next().value}${M}${D5}${R2}`; -var hD = (D5) => D5.split(" ").map((F5) => g(F5)); -var S = (D5, F5, u3) => { - let C5 = [...F5], t2 = false, E4 = false, e3 = g(d2(D5[D5.length - 1])); - for (let [r3, n2] of C5.entries()) { - let o3 = g(n2); - if (e3 + o3 <= u3 ? D5[D5.length - 1] += n2 : (D5.push(n2), e3 = 0), x.has(n2) && (t2 = true, E4 = C5.slice(r3 + 1).join("").startsWith(M)), t2) { - E4 ? n2 === R2 && (t2 = false, E4 = false) : n2 === H && (t2 = false); +var J = (D6) => `${x.values().next().value}${q}${D6}${H}`; +var Q = (D6) => `${x.values().next().value}${M}${D6}${R2}`; +var hD = (D6) => D6.split(" ").map((F6) => g(F6)); +var S = (D6, F6, u5) => { + let C6 = [...F6], t4 = false, E5 = false, e5 = g(d2(D6[D6.length - 1])); + for (let [r5, n4] of C6.entries()) { + let o5 = g(n4); + if (e5 + o5 <= u5 ? D6[D6.length - 1] += n4 : (D6.push(n4), e5 = 0), x.has(n4) && (t4 = true, E5 = C6.slice(r5 + 1).join("").startsWith(M)), t4) { + E5 ? n4 === R2 && (t4 = false, E5 = false) : n4 === H && (t4 = false); continue; } - e3 += o3, e3 === u3 && r3 < C5.length - 1 && (D5.push(""), e3 = 0); + e5 += o5, e5 === u5 && r5 < C6.length - 1 && (D6.push(""), e5 = 0); } - !e3 && D5[D5.length - 1].length > 0 && D5.length > 1 && (D5[D5.length - 2] += D5.pop()); + !e5 && D6[D6.length - 1].length > 0 && D6.length > 1 && (D6[D6.length - 2] += D6.pop()); }; -var cD = (D5) => { - let F5 = D5.split(" "), u3 = F5.length; - for (; u3 > 0 && !(g(F5[u3 - 1]) > 0); ) u3--; - return u3 === F5.length ? D5 : F5.slice(0, u3).join(" ") + F5.slice(u3).join(""); +var cD = (D6) => { + let F6 = D6.split(" "), u5 = F6.length; + for (; u5 > 0 && !(g(F6[u5 - 1]) > 0); ) u5--; + return u5 === F6.length ? D6 : F6.slice(0, u5).join(" ") + F6.slice(u5).join(""); }; -var dD = (D5, F5, u3 = {}) => { - if (u3.trim !== false && D5.trim() === "") return ""; - let C5 = "", t2, E4, e3 = hD(D5), r3 = [""]; - for (let [o3, B3] of D5.split(" ").entries()) { - u3.trim !== false && (r3[r3.length - 1] = r3[r3.length - 1].trimStart()); - let a4 = g(r3[r3.length - 1]); - if (o3 !== 0 && (a4 >= F5 && (u3.wordWrap === false || u3.trim === false) && (r3.push(""), a4 = 0), (a4 > 0 || u3.trim === false) && (r3[r3.length - 1] += " ", a4++)), u3.hard && e3[o3] > F5) { - let s2 = F5 - a4, l3 = 1 + Math.floor((e3[o3] - s2 - 1) / F5); - Math.floor((e3[o3] - 1) / F5) < l3 && r3.push(""), S(r3, B3, F5); +var dD = (D6, F6, u5 = {}) => { + if (u5.trim !== false && D6.trim() === "") return ""; + let C6 = "", t4, E5, e5 = hD(D6), r5 = [""]; + for (let [o5, B4] of D6.split(" ").entries()) { + u5.trim !== false && (r5[r5.length - 1] = r5[r5.length - 1].trimStart()); + let a6 = g(r5[r5.length - 1]); + if (o5 !== 0 && (a6 >= F6 && (u5.wordWrap === false || u5.trim === false) && (r5.push(""), a6 = 0), (a6 > 0 || u5.trim === false) && (r5[r5.length - 1] += " ", a6++)), u5.hard && e5[o5] > F6) { + let s4 = F6 - a6, l5 = 1 + Math.floor((e5[o5] - s4 - 1) / F6); + Math.floor((e5[o5] - 1) / F6) < l5 && r5.push(""), S(r5, B4, F6); continue; } - if (a4 + e3[o3] > F5 && a4 > 0 && e3[o3] > 0) { - if (u3.wordWrap === false && a4 < F5) { - S(r3, B3, F5); + if (a6 + e5[o5] > F6 && a6 > 0 && e5[o5] > 0) { + if (u5.wordWrap === false && a6 < F6) { + S(r5, B4, F6); continue; } - r3.push(""); + r5.push(""); } - if (a4 + e3[o3] > F5 && u3.wordWrap === false) { - S(r3, B3, F5); + if (a6 + e5[o5] > F6 && u5.wordWrap === false) { + S(r5, B4, F6); continue; } - r3[r3.length - 1] += B3; + r5[r5.length - 1] += B4; } - u3.trim !== false && (r3 = r3.map((o3) => cD(o3))); - let n2 = [...r3.join(` + u5.trim !== false && (r5 = r5.map((o5) => cD(o5))); + let n4 = [...r5.join(` `)]; - for (let [o3, B3] of n2.entries()) { - if (C5 += B3, x.has(B3)) { - let { groups: s2 } = new RegExp(`(?:\\${q}(?\\d+)m|\\${M}(?.*)${R2})`).exec(n2.slice(o3).join("")) || { groups: {} }; - if (s2.code !== void 0) { - let l3 = Number.parseFloat(s2.code); - t2 = l3 === gD ? void 0 : l3; - } else s2.uri !== void 0 && (E4 = s2.uri.length === 0 ? void 0 : s2.uri); - } - let a4 = K2.codes.get(Number(t2)); - n2[o3 + 1] === ` -` ? (E4 && (C5 += Q("")), t2 && a4 && (C5 += J(a4))) : B3 === ` -` && (t2 && a4 && (C5 += J(t2)), E4 && (C5 += Q(E4))); - } - return C5; + for (let [o5, B4] of n4.entries()) { + if (C6 += B4, x.has(B4)) { + let { groups: s4 } = new RegExp(`(?:\\${q}(?\\d+)m|\\${M}(?.*)${R2})`).exec(n4.slice(o5).join("")) || { groups: {} }; + if (s4.code !== void 0) { + let l5 = Number.parseFloat(s4.code); + t4 = l5 === gD ? void 0 : l5; + } else s4.uri !== void 0 && (E5 = s4.uri.length === 0 ? void 0 : s4.uri); + } + let a6 = K2.codes.get(Number(t4)); + n4[o5 + 1] === ` +` ? (E5 && (C6 += Q("")), t4 && a6 && (C6 += J(a6))) : B4 === ` +` && (t4 && a6 && (C6 += J(t4)), E5 && (C6 += Q(E5))); + } + return C6; }; -function T2(D5, F5, u3) { - return String(D5).normalize().replace(/\r\n/g, ` +function T2(D6, F6, u5) { + return String(D6).normalize().replace(/\r\n/g, ` `).split(` -`).map((C5) => dD(C5, F5, u3)).join(` +`).map((C6) => dD(C6, F6, u5)).join(` `); } -var X = (D5) => Array.from({ length: D5 }).fill(""); -function P(D5, F5) { - let u3 = [], C5 = 0; - for (let t2 of D5) { - let E4 = 0, e3 = t2.map((n2) => { - var a4; - let o3 = (a4 = F5[C5]) != null ? a4 : ""; - C5 += 1, n2.preprocess && (o3 = n2.preprocess(o3)), b2(o3) > n2.width && (o3 = T2(o3, n2.width, { hard: true })); - let B3 = o3.split(` +var X = (D6) => Array.from({ length: D6 }).fill(""); +function P(D6, F6) { + let u5 = [], C6 = 0; + for (let t4 of D6) { + let E5 = 0, e5 = t4.map((n4) => { + var a6; + let o5 = (a6 = F6[C6]) != null ? a6 : ""; + C6 += 1, n4.preprocess && (o5 = n4.preprocess(o5)), b2(o5) > n4.width && (o5 = T2(o5, n4.width, { hard: true })); + let B4 = o5.split(` `); - if (n2.postprocess) { - let { postprocess: s2 } = n2; - B3 = B3.map((l3, h4) => s2.call(n2, l3, h4)); - } - return n2.paddingTop && B3.unshift(...X(n2.paddingTop)), n2.paddingBottom && B3.push(...X(n2.paddingBottom)), B3.length > E4 && (E4 = B3.length), c(p({}, n2), { lines: B3 }); - }), r3 = []; - for (let n2 = 0; n2 < E4; n2 += 1) { - let o3 = e3.map((B3) => { - var h4; - let a4 = (h4 = B3.lines[n2]) != null ? h4 : "", s2 = Number.isFinite(B3.width) ? " ".repeat(B3.width - g(a4)) : "", l3 = B3.paddingLeftString; - return B3.align === "right" && (l3 += s2), l3 += a4, B3.align === "left" && (l3 += s2), l3 + B3.paddingRightString; + if (n4.postprocess) { + let { postprocess: s4 } = n4; + B4 = B4.map((l5, h6) => s4.call(n4, l5, h6)); + } + return n4.paddingTop && B4.unshift(...X(n4.paddingTop)), n4.paddingBottom && B4.push(...X(n4.paddingBottom)), B4.length > E5 && (E5 = B4.length), c(p({}, n4), { lines: B4 }); + }), r5 = []; + for (let n4 = 0; n4 < E5; n4 += 1) { + let o5 = e5.map((B4) => { + var h6; + let a6 = (h6 = B4.lines[n4]) != null ? h6 : "", s4 = Number.isFinite(B4.width) ? " ".repeat(B4.width - g(a6)) : "", l5 = B4.paddingLeftString; + return B4.align === "right" && (l5 += s4), l5 += a6, B4.align === "left" && (l5 += s4), l5 + B4.paddingRightString; }).join(""); - r3.push(o3); + r5.push(o5); } - u3.push(r3.join(` + u5.push(r5.join(` `)); } - return u3.join(` + return u5.join(` `); } -function mD(D5, F5) { - if (!D5 || D5.length === 0) return ""; - let u3 = k2(D5), C5 = u3.length; - if (C5 === 0) return ""; - let { stdoutColumns: t2, columns: E4 } = v2(F5); - if (E4.length > C5) throw new Error(`${E4.length} columns defined, but only ${C5} columns found`); - let e3 = Z(t2, E4, u3); - return D5.map((r3) => P(e3, r3)).join(` +function mD(D6, F6) { + if (!D6 || D6.length === 0) return ""; + let u5 = k2(D6), C6 = u5.length; + if (C6 === 0) return ""; + let { stdoutColumns: t4, columns: E5 } = v2(F6); + if (E5.length > C6) throw new Error(`${E5.length} columns defined, but only ${C6} columns found`); + let e5 = Z(t4, E5, u5); + return D6.map((r5) => P(e5, r5)).join(` `); } i(); var bD = ["<", ">", "=", ">=", "<="]; -function xD(D5) { - if (!bD.includes(D5)) throw new TypeError(`Invalid breakpoint operator: ${D5}`); -} -function wD(D5) { - let F5 = Object.keys(D5).map((u3) => { - let [C5, t2] = u3.split(" "); - xD(C5); - let E4 = Number.parseInt(t2, 10); - if (Number.isNaN(E4)) throw new TypeError(`Invalid breakpoint value: ${t2}`); - let e3 = D5[u3]; - return { operator: C5, breakpoint: E4, value: e3 }; - }).sort((u3, C5) => C5.breakpoint - u3.breakpoint); - return (u3) => { - var C5; - return (C5 = F5.find(({ operator: t2, breakpoint: E4 }) => t2 === "=" && u3 === E4 || t2 === ">" && u3 > E4 || t2 === "<" && u3 < E4 || t2 === ">=" && u3 >= E4 || t2 === "<=" && u3 <= E4)) == null ? void 0 : C5.value; +function xD(D6) { + if (!bD.includes(D6)) throw new TypeError(`Invalid breakpoint operator: ${D6}`); +} +function wD(D6) { + let F6 = Object.keys(D6).map((u5) => { + let [C6, t4] = u5.split(" "); + xD(C6); + let E5 = Number.parseInt(t4, 10); + if (Number.isNaN(E5)) throw new TypeError(`Invalid breakpoint value: ${t4}`); + let e5 = D6[u5]; + return { operator: C6, breakpoint: E5, value: e5 }; + }).sort((u5, C6) => C6.breakpoint - u5.breakpoint); + return (u5) => { + var C6; + return (C6 = F6.find(({ operator: t4, breakpoint: E5 }) => t4 === "=" && u5 === E5 || t4 === ">" && u5 > E5 || t4 === "<" && u5 < E5 || t4 === ">=" && u5 >= E5 || t4 === "<=" && u5 <= E5)) == null ? void 0 : C6.value; }; } // node_modules/cleye/dist/index.mjs -var S2 = (t2) => t2.replace(/[\W_]([a-z\d])?/gi, (e3, r3) => r3 ? r3.toUpperCase() : ""); -var q2 = (t2) => t2.replace(/\B([A-Z])/g, "-$1").toLowerCase(); -var I2 = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: (t2) => t2.trim() }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } }; -function D2(t2) { - let e3 = false; - return { type: "table", data: { tableData: Object.keys(t2).sort((a4, i3) => a4.localeCompare(i3)).map((a4) => { - const i3 = t2[a4], s2 = "alias" in i3; - return s2 && (e3 = true), { name: a4, flag: i3, flagFormatted: `--${q2(a4)}`, aliasesEnabled: e3, aliasFormatted: s2 ? `-${i3.alias}` : void 0 }; - }).map((a4) => (a4.aliasesEnabled = e3, [{ type: "flagName", data: a4 }, { type: "flagDescription", data: a4 }])), tableBreakpoints: I2 } }; -} -var A = (t2) => !t2 || (t2.version ?? (t2.help ? t2.help.version : void 0)); -var C2 = (t2) => { - const e3 = "parent" in t2 && t2.parent?.name; - return (e3 ? `${e3} ` : "") + t2.name; +var S2 = (t4) => t4.replace(/[\W_]([a-z\d])?/gi, (e5, r5) => r5 ? r5.toUpperCase() : ""); +var q2 = (t4) => t4.replace(/\B([A-Z])/g, "-$1").toLowerCase(); +var I2 = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: (t4) => t4.trim() }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } }; +function D2(t4) { + let e5 = false; + return { type: "table", data: { tableData: Object.keys(t4).sort((a6, i5) => a6.localeCompare(i5)).map((a6) => { + const i5 = t4[a6], s4 = "alias" in i5; + return s4 && (e5 = true), { name: a6, flag: i5, flagFormatted: `--${q2(a6)}`, aliasesEnabled: e5, aliasFormatted: s4 ? `-${i5.alias}` : void 0 }; + }).map((a6) => (a6.aliasesEnabled = e5, [{ type: "flagName", data: a6 }, { type: "flagDescription", data: a6 }])), tableBreakpoints: I2 } }; +} +var A = (t4) => !t4 || (t4.version ?? (t4.help ? t4.help.version : void 0)); +var C2 = (t4) => { + const e5 = "parent" in t4 && t4.parent?.name; + return (e5 ? `${e5} ` : "") + t4.name; }; -function R3(t2) { - const e3 = []; - t2.name && e3.push(C2(t2)); - const r3 = A(t2) ?? ("parent" in t2 && A(t2.parent)); - if (r3 && e3.push(`v${r3}`), e3.length !== 0) return { id: "name", type: "text", data: `${e3.join(" ")} +function R3(t4) { + const e5 = []; + t4.name && e5.push(C2(t4)); + const r5 = A(t4) ?? ("parent" in t4 && A(t4.parent)); + if (r5 && e5.push(`v${r5}`), e5.length !== 0) return { id: "name", type: "text", data: `${e5.join(" ")} ` }; } -function L3(t2) { - const { help: e3 } = t2; - if (!(!e3 || !e3.description)) return { id: "description", type: "text", data: `${e3.description} +function L3(t4) { + const { help: e5 } = t4; + if (!(!e5 || !e5.description)) return { id: "description", type: "text", data: `${e5.description} ` }; } -function T3(t2) { - const e3 = t2.help || {}; - if ("usage" in e3) return e3.usage ? { id: "usage", type: "section", data: { title: "Usage:", body: Array.isArray(e3.usage) ? e3.usage.join(` -`) : e3.usage } } : void 0; - if (t2.name) { - const r3 = [], n2 = [C2(t2)]; - if (t2.flags && Object.keys(t2.flags).length > 0 && n2.push("[flags...]"), t2.parameters && t2.parameters.length > 0) { - const { parameters: a4 } = t2, i3 = a4.indexOf("--"), s2 = i3 > -1 && a4.slice(i3 + 1).some((o3) => o3.startsWith("<")); - n2.push(a4.map((o3) => o3 !== "--" ? o3 : s2 ? "--" : "[--]").join(" ")); - } - if (n2.length > 1 && r3.push(n2.join(" ")), "commands" in t2 && t2.commands?.length && r3.push(`${t2.name} `), r3.length > 0) return { id: "usage", type: "section", data: { title: "Usage:", body: r3.join(` +function T3(t4) { + const e5 = t4.help || {}; + if ("usage" in e5) return e5.usage ? { id: "usage", type: "section", data: { title: "Usage:", body: Array.isArray(e5.usage) ? e5.usage.join(` +`) : e5.usage } } : void 0; + if (t4.name) { + const r5 = [], n4 = [C2(t4)]; + if (t4.flags && Object.keys(t4.flags).length > 0 && n4.push("[flags...]"), t4.parameters && t4.parameters.length > 0) { + const { parameters: a6 } = t4, i5 = a6.indexOf("--"), s4 = i5 > -1 && a6.slice(i5 + 1).some((o5) => o5.startsWith("<")); + n4.push(a6.map((o5) => o5 !== "--" ? o5 : s4 ? "--" : "[--]").join(" ")); + } + if (n4.length > 1 && r5.push(n4.join(" ")), "commands" in t4 && t4.commands?.length && r5.push(`${t4.name} `), r5.length > 0) return { id: "usage", type: "section", data: { title: "Usage:", body: r5.join(` `) } }; } } -function _3(t2) { - return !("commands" in t2) || !t2.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t2.commands.map((n2) => [n2.options.name, n2.options.help ? n2.options.help.description : ""]), tableOptions: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }] } }, indentBody: 0 } }; +function _3(t4) { + return !("commands" in t4) || !t4.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t4.commands.map((n4) => [n4.options.name, n4.options.help ? n4.options.help.description : ""]), tableOptions: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }] } }, indentBody: 0 } }; } -function k3(t2) { - if (!(!t2.flags || Object.keys(t2.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: D2(t2.flags), indentBody: 0 } }; +function k3(t4) { + if (!(!t4.flags || Object.keys(t4.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: D2(t4.flags), indentBody: 0 } }; } -function F2(t2) { - const { help: e3 } = t2; - if (!e3 || !e3.examples || e3.examples.length === 0) return; - let { examples: r3 } = e3; - if (Array.isArray(r3) && (r3 = r3.join(` -`)), r3) return { id: "examples", type: "section", data: { title: "Examples:", body: r3 } }; +function F2(t4) { + const { help: e5 } = t4; + if (!e5 || !e5.examples || e5.examples.length === 0) return; + let { examples: r5 } = e5; + if (Array.isArray(r5) && (r5 = r5.join(` +`)), r5) return { id: "examples", type: "section", data: { title: "Examples:", body: r5 } }; } -function H2(t2) { - if (!("alias" in t2) || !t2.alias) return; - const { alias: e3 } = t2; - return { id: "aliases", type: "section", data: { title: "Aliases:", body: Array.isArray(e3) ? e3.join(", ") : e3 } }; +function H2(t4) { + if (!("alias" in t4) || !t4.alias) return; + const { alias: e5 } = t4; + return { id: "aliases", type: "section", data: { title: "Aliases:", body: Array.isArray(e5) ? e5.join(", ") : e5 } }; } -var U3 = (t2) => [R3, L3, T3, _3, k3, F2, H2].map((e3) => e3(t2)).filter(Boolean); +var U3 = (t4) => [R3, L3, T3, _3, k3, F2, H2].map((e5) => e5(t4)).filter(Boolean); var J2 = import_tty.default.WriteStream.prototype.hasColors(); var M2 = class { - text(e3) { - return e3; + text(e5) { + return e5; } - bold(e3) { - return J2 ? `\x1B[1m${e3}\x1B[22m` : e3.toLocaleUpperCase(); + bold(e5) { + return J2 ? `\x1B[1m${e5}\x1B[22m` : e5.toLocaleUpperCase(); } - indentText({ text: e3, spaces: r3 }) { - return e3.replace(/^/gm, " ".repeat(r3)); + indentText({ text: e5, spaces: r5 }) { + return e5.replace(/^/gm, " ".repeat(r5)); } - heading(e3) { - return this.bold(e3); + heading(e5) { + return this.bold(e5); } - section({ title: e3, body: r3, indentBody: n2 = 2 }) { - return `${(e3 ? `${this.heading(e3)} -` : "") + (r3 ? this.indentText({ text: this.render(r3), spaces: n2 }) : "")} + section({ title: e5, body: r5, indentBody: n4 = 2 }) { + return `${(e5 ? `${this.heading(e5)} +` : "") + (r5 ? this.indentText({ text: this.render(r5), spaces: n4 }) : "")} `; } - table({ tableData: e3, tableOptions: r3, tableBreakpoints: n2 }) { - return mD(e3.map((a4) => a4.map((i3) => this.render(i3))), n2 ? wD(n2) : r3); + table({ tableData: e5, tableOptions: r5, tableBreakpoints: n4 }) { + return mD(e5.map((a6) => a6.map((i5) => this.render(i5))), n4 ? wD(n4) : r5); } - flagParameter(e3) { - return e3 === Boolean ? "" : e3 === String ? "" : e3 === Number ? "" : Array.isArray(e3) ? this.flagParameter(e3[0]) : ""; + flagParameter(e5) { + return e5 === Boolean ? "" : e5 === String ? "" : e5 === Number ? "" : Array.isArray(e5) ? this.flagParameter(e5[0]) : ""; } - flagOperator(e3) { + flagOperator(e5) { return " "; } - flagName(e3) { - const { flag: r3, flagFormatted: n2, aliasesEnabled: a4, aliasFormatted: i3 } = e3; - let s2 = ""; - if (i3 ? s2 += `${i3}, ` : a4 && (s2 += " "), s2 += n2, "placeholder" in r3 && typeof r3.placeholder == "string") s2 += `${this.flagOperator(e3)}${r3.placeholder}`; + flagName(e5) { + const { flag: r5, flagFormatted: n4, aliasesEnabled: a6, aliasFormatted: i5 } = e5; + let s4 = ""; + if (i5 ? s4 += `${i5}, ` : a6 && (s4 += " "), s4 += n4, "placeholder" in r5 && typeof r5.placeholder == "string") s4 += `${this.flagOperator(e5)}${r5.placeholder}`; else { - const o3 = this.flagParameter("type" in r3 ? r3.type : r3); - o3 && (s2 += `${this.flagOperator(e3)}${o3}`); + const o5 = this.flagParameter("type" in r5 ? r5.type : r5); + o5 && (s4 += `${this.flagOperator(e5)}${o5}`); } - return s2; + return s4; } - flagDefault(e3) { - return JSON.stringify(e3); + flagDefault(e5) { + return JSON.stringify(e5); } - flagDescription({ flag: e3 }) { - let r3 = "description" in e3 ? e3.description ?? "" : ""; - if ("default" in e3) { - let { default: n2 } = e3; - typeof n2 == "function" && (n2 = n2()), n2 && (r3 += ` (default: ${this.flagDefault(n2)})`); + flagDescription({ flag: e5 }) { + let r5 = "description" in e5 ? e5.description ?? "" : ""; + if ("default" in e5) { + let { default: n4 } = e5; + typeof n4 == "function" && (n4 = n4()), n4 && (r5 += ` (default: ${this.flagDefault(n4)})`); } - return r3; + return r5; } - render(e3) { - if (typeof e3 == "string") return e3; - if (Array.isArray(e3)) return e3.map((r3) => this.render(r3)).join(` + render(e5) { + if (typeof e5 == "string") return e5; + if (Array.isArray(e5)) return e5.map((r5) => this.render(r5)).join(` `); - if ("type" in e3 && this[e3.type]) { - const r3 = this[e3.type]; - if (typeof r3 == "function") return r3.call(this, e3.data); + if ("type" in e5 && this[e5.type]) { + const r5 = this[e5.type]; + if (typeof r5 == "function") return r5.call(this, e5.data); } - throw new Error(`Invalid node type: ${JSON.stringify(e3)}`); + throw new Error(`Invalid node type: ${JSON.stringify(e5)}`); } }; var y2 = /^[\w.-]+$/; var { stringify: d3 } = JSON; var V3 = /[|\\{}()[\]^$+*?.]/; -function w3(t2) { - const e3 = []; - let r3, n2; - for (const a4 of t2) { - if (n2) throw new Error(`Invalid parameter: Spread parameter ${d3(n2)} must be last`); - const i3 = a4[0], s2 = a4[a4.length - 1]; - let o3; - if (i3 === "<" && s2 === ">" && (o3 = true, r3)) throw new Error(`Invalid parameter: Required parameter ${d3(a4)} cannot come after optional parameter ${d3(r3)}`); - if (i3 === "[" && s2 === "]" && (o3 = false, r3 = a4), o3 === void 0) throw new Error(`Invalid parameter: ${d3(a4)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`); - let l3 = a4.slice(1, -1); - const f4 = l3.slice(-3) === "..."; - f4 && (n2 = a4, l3 = l3.slice(0, -3)); - const p4 = l3.match(V3); - if (p4) throw new Error(`Invalid parameter: ${d3(a4)}. Invalid character found ${d3(p4[0])}`); - e3.push({ name: l3, required: o3, spread: f4 }); - } - return e3; -} -function b3(t2, e3, r3, n2) { - for (let a4 = 0; a4 < e3.length; a4 += 1) { - const { name: i3, required: s2, spread: o3 } = e3[a4], l3 = S2(i3); - if (l3 in t2) throw new Error(`Invalid parameter: ${d3(i3)} is used more than once.`); - const f4 = o3 ? r3.slice(a4) : r3[a4]; - if (o3 && (a4 = e3.length), s2 && (!f4 || o3 && f4.length === 0)) return console.error(`Error: Missing required parameter ${d3(i3)} -`), n2(), process.exit(1); - t2[l3] = f4; - } -} -function W2(t2) { - return t2 === void 0 || t2 !== false; -} -function x2(t2, e3, r3, n2) { - const a4 = { ...e3.flags }, i3 = e3.version; - i3 && (a4.version = { type: Boolean, description: "Show version" }); - const { help: s2 } = e3, o3 = W2(s2); - o3 && !("help" in a4) && (a4.help = { type: Boolean, alias: "h", description: "Show help" }); - const l3 = U(a4, n2, { ignore: e3.ignoreArgv }), f4 = () => { - console.log(e3.version); +function w3(t4) { + const e5 = []; + let r5, n4; + for (const a6 of t4) { + if (n4) throw new Error(`Invalid parameter: Spread parameter ${d3(n4)} must be last`); + const i5 = a6[0], s4 = a6[a6.length - 1]; + let o5; + if (i5 === "<" && s4 === ">" && (o5 = true, r5)) throw new Error(`Invalid parameter: Required parameter ${d3(a6)} cannot come after optional parameter ${d3(r5)}`); + if (i5 === "[" && s4 === "]" && (o5 = false, r5 = a6), o5 === void 0) throw new Error(`Invalid parameter: ${d3(a6)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`); + let l5 = a6.slice(1, -1); + const f6 = l5.slice(-3) === "..."; + f6 && (n4 = a6, l5 = l5.slice(0, -3)); + const p6 = l5.match(V3); + if (p6) throw new Error(`Invalid parameter: ${d3(a6)}. Invalid character found ${d3(p6[0])}`); + e5.push({ name: l5, required: o5, spread: f6 }); + } + return e5; +} +function b3(t4, e5, r5, n4) { + for (let a6 = 0; a6 < e5.length; a6 += 1) { + const { name: i5, required: s4, spread: o5 } = e5[a6], l5 = S2(i5); + if (l5 in t4) throw new Error(`Invalid parameter: ${d3(i5)} is used more than once.`); + const f6 = o5 ? r5.slice(a6) : r5[a6]; + if (o5 && (a6 = e5.length), s4 && (!f6 || o5 && f6.length === 0)) return console.error(`Error: Missing required parameter ${d3(i5)} +`), n4(), process.exit(1); + t4[l5] = f6; + } +} +function W2(t4) { + return t4 === void 0 || t4 !== false; +} +function x2(t4, e5, r5, n4) { + const a6 = { ...e5.flags }, i5 = e5.version; + i5 && (a6.version = { type: Boolean, description: "Show version" }); + const { help: s4 } = e5, o5 = W2(s4); + o5 && !("help" in a6) && (a6.help = { type: Boolean, alias: "h", description: "Show help" }); + const l5 = U(a6, n4, { ignore: e5.ignoreArgv }), f6 = () => { + console.log(e5.version); }; - if (i3 && l3.flags.version === true) return f4(), process.exit(0); - const p4 = new M2(), O5 = o3 && s2?.render ? s2.render : (c3) => p4.render(c3), u3 = (c3) => { - const m5 = U3({ ...e3, ...c3 ? { help: c3 } : {}, flags: a4 }); - console.log(O5(m5, p4)); + if (i5 && l5.flags.version === true) return f6(), process.exit(0); + const p6 = new M2(), O5 = o5 && s4?.render ? s4.render : (c5) => p6.render(c5), u5 = (c5) => { + const m7 = U3({ ...e5, ...c5 ? { help: c5 } : {}, flags: a6 }); + console.log(O5(m7, p6)); }; - if (o3 && l3.flags.help === true) return u3(), process.exit(0); - if (e3.parameters) { - let { parameters: c3 } = e3, m5 = l3._; - const g4 = c3.indexOf("--"), v5 = c3.slice(g4 + 1), h4 = /* @__PURE__ */ Object.create(null); - if (g4 > -1 && v5.length > 0) { - c3 = c3.slice(0, g4); - const E4 = l3._["--"]; - m5 = m5.slice(0, -E4.length || void 0), b3(h4, w3(c3), m5, u3), b3(h4, w3(v5), E4, u3); - } else b3(h4, w3(c3), m5, u3); - Object.assign(l3._, h4); - } - const $6 = { ...l3, showVersion: f4, showHelp: u3 }; - return typeof r3 == "function" && r3($6), { command: t2, ...$6 }; -} -function z2(t2, e3) { - const r3 = /* @__PURE__ */ new Map(); - for (const n2 of e3) { - const a4 = [n2.options.name], { alias: i3 } = n2.options; - i3 && (Array.isArray(i3) ? a4.push(...i3) : a4.push(i3)); - for (const s2 of a4) { - if (r3.has(s2)) throw new Error(`Duplicate command name found: ${d3(s2)}`); - r3.set(s2, n2); - } - } - return r3.get(t2); -} -function Z2(t2, e3, r3 = process.argv.slice(2)) { - if (!t2) throw new Error("Options is required"); - if ("name" in t2 && (!t2.name || !y2.test(t2.name))) throw new Error(`Invalid script name: ${d3(t2.name)}`); - const n2 = r3[0]; - if (t2.commands && y2.test(n2)) { - const a4 = z2(n2, t2.commands); - if (a4) return x2(a4.options.name, { ...a4.options, parent: t2 }, a4.callback, r3.slice(1)); - } - return x2(void 0, t2, e3, r3); -} -function G3(t2, e3) { - if (!t2) throw new Error("Command options are required"); - const { name: r3 } = t2; - if (t2.name === void 0) throw new Error("Command name is required"); - if (!y2.test(r3)) throw new Error(`Invalid command name ${JSON.stringify(r3)}. Command names must be one word.`); - return { options: t2, callback: e3 }; + if (o5 && l5.flags.help === true) return u5(), process.exit(0); + if (e5.parameters) { + let { parameters: c5 } = e5, m7 = l5._; + const g6 = c5.indexOf("--"), v8 = c5.slice(g6 + 1), h6 = /* @__PURE__ */ Object.create(null); + if (g6 > -1 && v8.length > 0) { + c5 = c5.slice(0, g6); + const E5 = l5._["--"]; + m7 = m7.slice(0, -E5.length || void 0), b3(h6, w3(c5), m7, u5), b3(h6, w3(v8), E5, u5); + } else b3(h6, w3(c5), m7, u5); + Object.assign(l5._, h6); + } + const $6 = { ...l5, showVersion: f6, showHelp: u5 }; + return typeof r5 == "function" && r5($6), { command: t4, ...$6 }; +} +function z2(t4, e5) { + const r5 = /* @__PURE__ */ new Map(); + for (const n4 of e5) { + const a6 = [n4.options.name], { alias: i5 } = n4.options; + i5 && (Array.isArray(i5) ? a6.push(...i5) : a6.push(i5)); + for (const s4 of a6) { + if (r5.has(s4)) throw new Error(`Duplicate command name found: ${d3(s4)}`); + r5.set(s4, n4); + } + } + return r5.get(t4); +} +function Z2(t4, e5, r5 = process.argv.slice(2)) { + if (!t4) throw new Error("Options is required"); + if ("name" in t4 && (!t4.name || !y2.test(t4.name))) throw new Error(`Invalid script name: ${d3(t4.name)}`); + const n4 = r5[0]; + if (t4.commands && y2.test(n4)) { + const a6 = z2(n4, t4.commands); + if (a6) return x2(a6.options.name, { ...a6.options, parent: t4 }, a6.callback, r5.slice(1)); + } + return x2(void 0, t4, e5, r5); +} +function G3(t4, e5) { + if (!t4) throw new Error("Command options are required"); + const { name: r5 } = t4; + if (t4.name === void 0) throw new Error("Command name is required"); + if (!y2.test(r5)) throw new Error(`Invalid command name ${JSON.stringify(r5)}. Command names must be one word.`); + return { options: t4, callback: e5 }; } // package.json @@ -47723,6 +73405,7 @@ var package_default = { "deploy:patch": "npm version patch && npm run deploy:build", lint: "eslint src --ext ts && tsc --noEmit", format: "prettier --write src", + "format:check": "prettier --check src", test: "node --no-warnings --experimental-vm-modules $( [ -f ./node_modules/.bin/jest ] && echo ./node_modules/.bin/jest || which jest ) test/unit", "test:all": "npm run test:unit:docker && npm run test:e2e:docker", "test:docker-build": "docker build -t oco-test -f test/Dockerfile .", @@ -47757,6 +73440,7 @@ var package_default = { "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1", "@anthropic-ai/sdk": "^0.19.2", + "@aws-sdk/client-bedrock-runtime": "^3.844.0", "@azure/openai": "^1.0.0-beta.12", "@clack/prompts": "^0.6.1", "@dqbd/tiktoken": "^1.0.2", @@ -47788,42 +73472,42 @@ var import_node_process = require("node:process"); var f = __toESM(require("node:readline"), 1); var import_node_readline = __toESM(require("node:readline"), 1); var import_node_tty = require("node:tty"); -function q3({ onlyFirst: t2 = false } = {}) { - const u3 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); - return new RegExp(u3, t2 ? void 0 : "g"); +function q3({ onlyFirst: t4 = false } = {}) { + const u5 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"); + return new RegExp(u5, t4 ? void 0 : "g"); } -function S3(t2) { - if (typeof t2 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t2}\``); - return t2.replace(q3(), ""); +function S3(t4) { + if (typeof t4 != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof t4}\``); + return t4.replace(q3(), ""); } -function j2(t2) { - return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2; +function j2(t4) { + return t4 && t4.__esModule && Object.prototype.hasOwnProperty.call(t4, "default") ? t4.default : t4; } var M3 = { exports: {} }; -(function(t2) { - var u3 = {}; - t2.exports = u3, u3.eastAsianWidth = function(e3) { - var s2 = e3.charCodeAt(0), C5 = e3.length == 2 ? e3.charCodeAt(1) : 0, D5 = s2; - return 55296 <= s2 && s2 <= 56319 && 56320 <= C5 && C5 <= 57343 && (s2 &= 1023, C5 &= 1023, D5 = s2 << 10 | C5, D5 += 65536), D5 == 12288 || 65281 <= D5 && D5 <= 65376 || 65504 <= D5 && D5 <= 65510 ? "F" : D5 == 8361 || 65377 <= D5 && D5 <= 65470 || 65474 <= D5 && D5 <= 65479 || 65482 <= D5 && D5 <= 65487 || 65490 <= D5 && D5 <= 65495 || 65498 <= D5 && D5 <= 65500 || 65512 <= D5 && D5 <= 65518 ? "H" : 4352 <= D5 && D5 <= 4447 || 4515 <= D5 && D5 <= 4519 || 4602 <= D5 && D5 <= 4607 || 9001 <= D5 && D5 <= 9002 || 11904 <= D5 && D5 <= 11929 || 11931 <= D5 && D5 <= 12019 || 12032 <= D5 && D5 <= 12245 || 12272 <= D5 && D5 <= 12283 || 12289 <= D5 && D5 <= 12350 || 12353 <= D5 && D5 <= 12438 || 12441 <= D5 && D5 <= 12543 || 12549 <= D5 && D5 <= 12589 || 12593 <= D5 && D5 <= 12686 || 12688 <= D5 && D5 <= 12730 || 12736 <= D5 && D5 <= 12771 || 12784 <= D5 && D5 <= 12830 || 12832 <= D5 && D5 <= 12871 || 12880 <= D5 && D5 <= 13054 || 13056 <= D5 && D5 <= 19903 || 19968 <= D5 && D5 <= 42124 || 42128 <= D5 && D5 <= 42182 || 43360 <= D5 && D5 <= 43388 || 44032 <= D5 && D5 <= 55203 || 55216 <= D5 && D5 <= 55238 || 55243 <= D5 && D5 <= 55291 || 63744 <= D5 && D5 <= 64255 || 65040 <= D5 && D5 <= 65049 || 65072 <= D5 && D5 <= 65106 || 65108 <= D5 && D5 <= 65126 || 65128 <= D5 && D5 <= 65131 || 110592 <= D5 && D5 <= 110593 || 127488 <= D5 && D5 <= 127490 || 127504 <= D5 && D5 <= 127546 || 127552 <= D5 && D5 <= 127560 || 127568 <= D5 && D5 <= 127569 || 131072 <= D5 && D5 <= 194367 || 177984 <= D5 && D5 <= 196605 || 196608 <= D5 && D5 <= 262141 ? "W" : 32 <= D5 && D5 <= 126 || 162 <= D5 && D5 <= 163 || 165 <= D5 && D5 <= 166 || D5 == 172 || D5 == 175 || 10214 <= D5 && D5 <= 10221 || 10629 <= D5 && D5 <= 10630 ? "Na" : D5 == 161 || D5 == 164 || 167 <= D5 && D5 <= 168 || D5 == 170 || 173 <= D5 && D5 <= 174 || 176 <= D5 && D5 <= 180 || 182 <= D5 && D5 <= 186 || 188 <= D5 && D5 <= 191 || D5 == 198 || D5 == 208 || 215 <= D5 && D5 <= 216 || 222 <= D5 && D5 <= 225 || D5 == 230 || 232 <= D5 && D5 <= 234 || 236 <= D5 && D5 <= 237 || D5 == 240 || 242 <= D5 && D5 <= 243 || 247 <= D5 && D5 <= 250 || D5 == 252 || D5 == 254 || D5 == 257 || D5 == 273 || D5 == 275 || D5 == 283 || 294 <= D5 && D5 <= 295 || D5 == 299 || 305 <= D5 && D5 <= 307 || D5 == 312 || 319 <= D5 && D5 <= 322 || D5 == 324 || 328 <= D5 && D5 <= 331 || D5 == 333 || 338 <= D5 && D5 <= 339 || 358 <= D5 && D5 <= 359 || D5 == 363 || D5 == 462 || D5 == 464 || D5 == 466 || D5 == 468 || D5 == 470 || D5 == 472 || D5 == 474 || D5 == 476 || D5 == 593 || D5 == 609 || D5 == 708 || D5 == 711 || 713 <= D5 && D5 <= 715 || D5 == 717 || D5 == 720 || 728 <= D5 && D5 <= 731 || D5 == 733 || D5 == 735 || 768 <= D5 && D5 <= 879 || 913 <= D5 && D5 <= 929 || 931 <= D5 && D5 <= 937 || 945 <= D5 && D5 <= 961 || 963 <= D5 && D5 <= 969 || D5 == 1025 || 1040 <= D5 && D5 <= 1103 || D5 == 1105 || D5 == 8208 || 8211 <= D5 && D5 <= 8214 || 8216 <= D5 && D5 <= 8217 || 8220 <= D5 && D5 <= 8221 || 8224 <= D5 && D5 <= 8226 || 8228 <= D5 && D5 <= 8231 || D5 == 8240 || 8242 <= D5 && D5 <= 8243 || D5 == 8245 || D5 == 8251 || D5 == 8254 || D5 == 8308 || D5 == 8319 || 8321 <= D5 && D5 <= 8324 || D5 == 8364 || D5 == 8451 || D5 == 8453 || D5 == 8457 || D5 == 8467 || D5 == 8470 || 8481 <= D5 && D5 <= 8482 || D5 == 8486 || D5 == 8491 || 8531 <= D5 && D5 <= 8532 || 8539 <= D5 && D5 <= 8542 || 8544 <= D5 && D5 <= 8555 || 8560 <= D5 && D5 <= 8569 || D5 == 8585 || 8592 <= D5 && D5 <= 8601 || 8632 <= D5 && D5 <= 8633 || D5 == 8658 || D5 == 8660 || D5 == 8679 || D5 == 8704 || 8706 <= D5 && D5 <= 8707 || 8711 <= D5 && D5 <= 8712 || D5 == 8715 || D5 == 8719 || D5 == 8721 || D5 == 8725 || D5 == 8730 || 8733 <= D5 && D5 <= 8736 || D5 == 8739 || D5 == 8741 || 8743 <= D5 && D5 <= 8748 || D5 == 8750 || 8756 <= D5 && D5 <= 8759 || 8764 <= D5 && D5 <= 8765 || D5 == 8776 || D5 == 8780 || D5 == 8786 || 8800 <= D5 && D5 <= 8801 || 8804 <= D5 && D5 <= 8807 || 8810 <= D5 && D5 <= 8811 || 8814 <= D5 && D5 <= 8815 || 8834 <= D5 && D5 <= 8835 || 8838 <= D5 && D5 <= 8839 || D5 == 8853 || D5 == 8857 || D5 == 8869 || D5 == 8895 || D5 == 8978 || 9312 <= D5 && D5 <= 9449 || 9451 <= D5 && D5 <= 9547 || 9552 <= D5 && D5 <= 9587 || 9600 <= D5 && D5 <= 9615 || 9618 <= D5 && D5 <= 9621 || 9632 <= D5 && D5 <= 9633 || 9635 <= D5 && D5 <= 9641 || 9650 <= D5 && D5 <= 9651 || 9654 <= D5 && D5 <= 9655 || 9660 <= D5 && D5 <= 9661 || 9664 <= D5 && D5 <= 9665 || 9670 <= D5 && D5 <= 9672 || D5 == 9675 || 9678 <= D5 && D5 <= 9681 || 9698 <= D5 && D5 <= 9701 || D5 == 9711 || 9733 <= D5 && D5 <= 9734 || D5 == 9737 || 9742 <= D5 && D5 <= 9743 || 9748 <= D5 && D5 <= 9749 || D5 == 9756 || D5 == 9758 || D5 == 9792 || D5 == 9794 || 9824 <= D5 && D5 <= 9825 || 9827 <= D5 && D5 <= 9829 || 9831 <= D5 && D5 <= 9834 || 9836 <= D5 && D5 <= 9837 || D5 == 9839 || 9886 <= D5 && D5 <= 9887 || 9918 <= D5 && D5 <= 9919 || 9924 <= D5 && D5 <= 9933 || 9935 <= D5 && D5 <= 9953 || D5 == 9955 || 9960 <= D5 && D5 <= 9983 || D5 == 10045 || D5 == 10071 || 10102 <= D5 && D5 <= 10111 || 11093 <= D5 && D5 <= 11097 || 12872 <= D5 && D5 <= 12879 || 57344 <= D5 && D5 <= 63743 || 65024 <= D5 && D5 <= 65039 || D5 == 65533 || 127232 <= D5 && D5 <= 127242 || 127248 <= D5 && D5 <= 127277 || 127280 <= D5 && D5 <= 127337 || 127344 <= D5 && D5 <= 127386 || 917760 <= D5 && D5 <= 917999 || 983040 <= D5 && D5 <= 1048573 || 1048576 <= D5 && D5 <= 1114109 ? "A" : "N"; - }, u3.characterLength = function(e3) { - var s2 = this.eastAsianWidth(e3); - return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1; +(function(t4) { + var u5 = {}; + t4.exports = u5, u5.eastAsianWidth = function(e5) { + var s4 = e5.charCodeAt(0), C6 = e5.length == 2 ? e5.charCodeAt(1) : 0, D6 = s4; + return 55296 <= s4 && s4 <= 56319 && 56320 <= C6 && C6 <= 57343 && (s4 &= 1023, C6 &= 1023, D6 = s4 << 10 | C6, D6 += 65536), D6 == 12288 || 65281 <= D6 && D6 <= 65376 || 65504 <= D6 && D6 <= 65510 ? "F" : D6 == 8361 || 65377 <= D6 && D6 <= 65470 || 65474 <= D6 && D6 <= 65479 || 65482 <= D6 && D6 <= 65487 || 65490 <= D6 && D6 <= 65495 || 65498 <= D6 && D6 <= 65500 || 65512 <= D6 && D6 <= 65518 ? "H" : 4352 <= D6 && D6 <= 4447 || 4515 <= D6 && D6 <= 4519 || 4602 <= D6 && D6 <= 4607 || 9001 <= D6 && D6 <= 9002 || 11904 <= D6 && D6 <= 11929 || 11931 <= D6 && D6 <= 12019 || 12032 <= D6 && D6 <= 12245 || 12272 <= D6 && D6 <= 12283 || 12289 <= D6 && D6 <= 12350 || 12353 <= D6 && D6 <= 12438 || 12441 <= D6 && D6 <= 12543 || 12549 <= D6 && D6 <= 12589 || 12593 <= D6 && D6 <= 12686 || 12688 <= D6 && D6 <= 12730 || 12736 <= D6 && D6 <= 12771 || 12784 <= D6 && D6 <= 12830 || 12832 <= D6 && D6 <= 12871 || 12880 <= D6 && D6 <= 13054 || 13056 <= D6 && D6 <= 19903 || 19968 <= D6 && D6 <= 42124 || 42128 <= D6 && D6 <= 42182 || 43360 <= D6 && D6 <= 43388 || 44032 <= D6 && D6 <= 55203 || 55216 <= D6 && D6 <= 55238 || 55243 <= D6 && D6 <= 55291 || 63744 <= D6 && D6 <= 64255 || 65040 <= D6 && D6 <= 65049 || 65072 <= D6 && D6 <= 65106 || 65108 <= D6 && D6 <= 65126 || 65128 <= D6 && D6 <= 65131 || 110592 <= D6 && D6 <= 110593 || 127488 <= D6 && D6 <= 127490 || 127504 <= D6 && D6 <= 127546 || 127552 <= D6 && D6 <= 127560 || 127568 <= D6 && D6 <= 127569 || 131072 <= D6 && D6 <= 194367 || 177984 <= D6 && D6 <= 196605 || 196608 <= D6 && D6 <= 262141 ? "W" : 32 <= D6 && D6 <= 126 || 162 <= D6 && D6 <= 163 || 165 <= D6 && D6 <= 166 || D6 == 172 || D6 == 175 || 10214 <= D6 && D6 <= 10221 || 10629 <= D6 && D6 <= 10630 ? "Na" : D6 == 161 || D6 == 164 || 167 <= D6 && D6 <= 168 || D6 == 170 || 173 <= D6 && D6 <= 174 || 176 <= D6 && D6 <= 180 || 182 <= D6 && D6 <= 186 || 188 <= D6 && D6 <= 191 || D6 == 198 || D6 == 208 || 215 <= D6 && D6 <= 216 || 222 <= D6 && D6 <= 225 || D6 == 230 || 232 <= D6 && D6 <= 234 || 236 <= D6 && D6 <= 237 || D6 == 240 || 242 <= D6 && D6 <= 243 || 247 <= D6 && D6 <= 250 || D6 == 252 || D6 == 254 || D6 == 257 || D6 == 273 || D6 == 275 || D6 == 283 || 294 <= D6 && D6 <= 295 || D6 == 299 || 305 <= D6 && D6 <= 307 || D6 == 312 || 319 <= D6 && D6 <= 322 || D6 == 324 || 328 <= D6 && D6 <= 331 || D6 == 333 || 338 <= D6 && D6 <= 339 || 358 <= D6 && D6 <= 359 || D6 == 363 || D6 == 462 || D6 == 464 || D6 == 466 || D6 == 468 || D6 == 470 || D6 == 472 || D6 == 474 || D6 == 476 || D6 == 593 || D6 == 609 || D6 == 708 || D6 == 711 || 713 <= D6 && D6 <= 715 || D6 == 717 || D6 == 720 || 728 <= D6 && D6 <= 731 || D6 == 733 || D6 == 735 || 768 <= D6 && D6 <= 879 || 913 <= D6 && D6 <= 929 || 931 <= D6 && D6 <= 937 || 945 <= D6 && D6 <= 961 || 963 <= D6 && D6 <= 969 || D6 == 1025 || 1040 <= D6 && D6 <= 1103 || D6 == 1105 || D6 == 8208 || 8211 <= D6 && D6 <= 8214 || 8216 <= D6 && D6 <= 8217 || 8220 <= D6 && D6 <= 8221 || 8224 <= D6 && D6 <= 8226 || 8228 <= D6 && D6 <= 8231 || D6 == 8240 || 8242 <= D6 && D6 <= 8243 || D6 == 8245 || D6 == 8251 || D6 == 8254 || D6 == 8308 || D6 == 8319 || 8321 <= D6 && D6 <= 8324 || D6 == 8364 || D6 == 8451 || D6 == 8453 || D6 == 8457 || D6 == 8467 || D6 == 8470 || 8481 <= D6 && D6 <= 8482 || D6 == 8486 || D6 == 8491 || 8531 <= D6 && D6 <= 8532 || 8539 <= D6 && D6 <= 8542 || 8544 <= D6 && D6 <= 8555 || 8560 <= D6 && D6 <= 8569 || D6 == 8585 || 8592 <= D6 && D6 <= 8601 || 8632 <= D6 && D6 <= 8633 || D6 == 8658 || D6 == 8660 || D6 == 8679 || D6 == 8704 || 8706 <= D6 && D6 <= 8707 || 8711 <= D6 && D6 <= 8712 || D6 == 8715 || D6 == 8719 || D6 == 8721 || D6 == 8725 || D6 == 8730 || 8733 <= D6 && D6 <= 8736 || D6 == 8739 || D6 == 8741 || 8743 <= D6 && D6 <= 8748 || D6 == 8750 || 8756 <= D6 && D6 <= 8759 || 8764 <= D6 && D6 <= 8765 || D6 == 8776 || D6 == 8780 || D6 == 8786 || 8800 <= D6 && D6 <= 8801 || 8804 <= D6 && D6 <= 8807 || 8810 <= D6 && D6 <= 8811 || 8814 <= D6 && D6 <= 8815 || 8834 <= D6 && D6 <= 8835 || 8838 <= D6 && D6 <= 8839 || D6 == 8853 || D6 == 8857 || D6 == 8869 || D6 == 8895 || D6 == 8978 || 9312 <= D6 && D6 <= 9449 || 9451 <= D6 && D6 <= 9547 || 9552 <= D6 && D6 <= 9587 || 9600 <= D6 && D6 <= 9615 || 9618 <= D6 && D6 <= 9621 || 9632 <= D6 && D6 <= 9633 || 9635 <= D6 && D6 <= 9641 || 9650 <= D6 && D6 <= 9651 || 9654 <= D6 && D6 <= 9655 || 9660 <= D6 && D6 <= 9661 || 9664 <= D6 && D6 <= 9665 || 9670 <= D6 && D6 <= 9672 || D6 == 9675 || 9678 <= D6 && D6 <= 9681 || 9698 <= D6 && D6 <= 9701 || D6 == 9711 || 9733 <= D6 && D6 <= 9734 || D6 == 9737 || 9742 <= D6 && D6 <= 9743 || 9748 <= D6 && D6 <= 9749 || D6 == 9756 || D6 == 9758 || D6 == 9792 || D6 == 9794 || 9824 <= D6 && D6 <= 9825 || 9827 <= D6 && D6 <= 9829 || 9831 <= D6 && D6 <= 9834 || 9836 <= D6 && D6 <= 9837 || D6 == 9839 || 9886 <= D6 && D6 <= 9887 || 9918 <= D6 && D6 <= 9919 || 9924 <= D6 && D6 <= 9933 || 9935 <= D6 && D6 <= 9953 || D6 == 9955 || 9960 <= D6 && D6 <= 9983 || D6 == 10045 || D6 == 10071 || 10102 <= D6 && D6 <= 10111 || 11093 <= D6 && D6 <= 11097 || 12872 <= D6 && D6 <= 12879 || 57344 <= D6 && D6 <= 63743 || 65024 <= D6 && D6 <= 65039 || D6 == 65533 || 127232 <= D6 && D6 <= 127242 || 127248 <= D6 && D6 <= 127277 || 127280 <= D6 && D6 <= 127337 || 127344 <= D6 && D6 <= 127386 || 917760 <= D6 && D6 <= 917999 || 983040 <= D6 && D6 <= 1048573 || 1048576 <= D6 && D6 <= 1114109 ? "A" : "N"; + }, u5.characterLength = function(e5) { + var s4 = this.eastAsianWidth(e5); + return s4 == "F" || s4 == "W" || s4 == "A" ? 2 : 1; }; - function F5(e3) { - return e3.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; - } - u3.length = function(e3) { - for (var s2 = F5(e3), C5 = 0, D5 = 0; D5 < s2.length; D5++) C5 = C5 + this.characterLength(s2[D5]); - return C5; - }, u3.slice = function(e3, s2, C5) { - textLen = u3.length(e3), s2 = s2 || 0, C5 = C5 || 1, s2 < 0 && (s2 = textLen + s2), C5 < 0 && (C5 = textLen + C5); - for (var D5 = "", i3 = 0, n2 = F5(e3), E4 = 0; E4 < n2.length; E4++) { - var h4 = n2[E4], o3 = u3.length(h4); - if (i3 >= s2 - (o3 == 2 ? 1 : 0)) if (i3 + o3 <= C5) D5 += h4; + function F6(e5) { + return e5.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; + } + u5.length = function(e5) { + for (var s4 = F6(e5), C6 = 0, D6 = 0; D6 < s4.length; D6++) C6 = C6 + this.characterLength(s4[D6]); + return C6; + }, u5.slice = function(e5, s4, C6) { + textLen = u5.length(e5), s4 = s4 || 0, C6 = C6 || 1, s4 < 0 && (s4 = textLen + s4), C6 < 0 && (C6 = textLen + C6); + for (var D6 = "", i5 = 0, n4 = F6(e5), E5 = 0; E5 < n4.length; E5++) { + var h6 = n4[E5], o5 = u5.length(h6); + if (i5 >= s4 - (o5 == 2 ? 1 : 0)) if (i5 + o5 <= C6) D6 += h6; else break; - i3 += o3; + i5 += o5; } - return D5; + return D6; }; })(M3); var J3 = M3.exports; @@ -47832,65 +73516,65 @@ var X2 = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; var DD2 = j2(X2); -function A2(t2, u3 = {}) { - if (typeof t2 != "string" || t2.length === 0 || (u3 = { ambiguousIsNarrow: true, ...u3 }, t2 = S3(t2), t2.length === 0)) return 0; - t2 = t2.replace(DD2(), " "); - const F5 = u3.ambiguousIsNarrow ? 1 : 2; - let e3 = 0; - for (const s2 of t2) { - const C5 = s2.codePointAt(0); - if (C5 <= 31 || C5 >= 127 && C5 <= 159 || C5 >= 768 && C5 <= 879) continue; - switch (Q2.eastAsianWidth(s2)) { +function A2(t4, u5 = {}) { + if (typeof t4 != "string" || t4.length === 0 || (u5 = { ambiguousIsNarrow: true, ...u5 }, t4 = S3(t4), t4.length === 0)) return 0; + t4 = t4.replace(DD2(), " "); + const F6 = u5.ambiguousIsNarrow ? 1 : 2; + let e5 = 0; + for (const s4 of t4) { + const C6 = s4.codePointAt(0); + if (C6 <= 31 || C6 >= 127 && C6 <= 159 || C6 >= 768 && C6 <= 879) continue; + switch (Q2.eastAsianWidth(s4)) { case "F": case "W": - e3 += 2; + e5 += 2; break; case "A": - e3 += F5; + e5 += F6; break; default: - e3 += 1; + e5 += 1; } } - return e3; + return e5; } var m3 = 10; -var T4 = (t2 = 0) => (u3) => `\x1B[${u3 + t2}m`; -var P2 = (t2 = 0) => (u3) => `\x1B[${38 + t2};5;${u3}m`; -var W3 = (t2 = 0) => (u3, F5, e3) => `\x1B[${38 + t2};2;${u3};${F5};${e3}m`; +var T4 = (t4 = 0) => (u5) => `\x1B[${u5 + t4}m`; +var P2 = (t4 = 0) => (u5) => `\x1B[${38 + t4};5;${u5}m`; +var W3 = (t4 = 0) => (u5, F6, e5) => `\x1B[${38 + t4};2;${u5};${F6};${e5}m`; var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; Object.keys(r.modifier); var uD2 = Object.keys(r.color); var FD2 = Object.keys(r.bgColor); [...uD2, ...FD2]; function tD2() { - const t2 = /* @__PURE__ */ new Map(); - for (const [u3, F5] of Object.entries(r)) { - for (const [e3, s2] of Object.entries(F5)) r[e3] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F5[e3] = r[e3], t2.set(s2[0], s2[1]); - Object.defineProperty(r, u3, { value: F5, enumerable: false }); - } - return Object.defineProperty(r, "codes", { value: t2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T4(), r.color.ansi256 = P2(), r.color.ansi16m = W3(), r.bgColor.ansi = T4(m3), r.bgColor.ansi256 = P2(m3), r.bgColor.ansi16m = W3(m3), Object.defineProperties(r, { rgbToAnsi256: { value: (u3, F5, e3) => u3 === F5 && F5 === e3 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(F5 / 255 * 5) + Math.round(e3 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => { - const F5 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16)); - if (!F5) return [0, 0, 0]; - let [e3] = F5; - e3.length === 3 && (e3 = [...e3].map((C5) => C5 + C5).join("")); - const s2 = Number.parseInt(e3, 16); - return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255]; - }, enumerable: false }, hexToAnsi256: { value: (u3) => r.rgbToAnsi256(...r.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => { - if (u3 < 8) return 30 + u3; - if (u3 < 16) return 90 + (u3 - 8); - let F5, e3, s2; - if (u3 >= 232) F5 = ((u3 - 232) * 10 + 8) / 255, e3 = F5, s2 = F5; + const t4 = /* @__PURE__ */ new Map(); + for (const [u5, F6] of Object.entries(r)) { + for (const [e5, s4] of Object.entries(F6)) r[e5] = { open: `\x1B[${s4[0]}m`, close: `\x1B[${s4[1]}m` }, F6[e5] = r[e5], t4.set(s4[0], s4[1]); + Object.defineProperty(r, u5, { value: F6, enumerable: false }); + } + return Object.defineProperty(r, "codes", { value: t4, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T4(), r.color.ansi256 = P2(), r.color.ansi16m = W3(), r.bgColor.ansi = T4(m3), r.bgColor.ansi256 = P2(m3), r.bgColor.ansi16m = W3(m3), Object.defineProperties(r, { rgbToAnsi256: { value: (u5, F6, e5) => u5 === F6 && F6 === e5 ? u5 < 8 ? 16 : u5 > 248 ? 231 : Math.round((u5 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u5 / 255 * 5) + 6 * Math.round(F6 / 255 * 5) + Math.round(e5 / 255 * 5), enumerable: false }, hexToRgb: { value: (u5) => { + const F6 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u5.toString(16)); + if (!F6) return [0, 0, 0]; + let [e5] = F6; + e5.length === 3 && (e5 = [...e5].map((C6) => C6 + C6).join("")); + const s4 = Number.parseInt(e5, 16); + return [s4 >> 16 & 255, s4 >> 8 & 255, s4 & 255]; + }, enumerable: false }, hexToAnsi256: { value: (u5) => r.rgbToAnsi256(...r.hexToRgb(u5)), enumerable: false }, ansi256ToAnsi: { value: (u5) => { + if (u5 < 8) return 30 + u5; + if (u5 < 16) return 90 + (u5 - 8); + let F6, e5, s4; + if (u5 >= 232) F6 = ((u5 - 232) * 10 + 8) / 255, e5 = F6, s4 = F6; else { - u3 -= 16; - const i3 = u3 % 36; - F5 = Math.floor(u3 / 36) / 5, e3 = Math.floor(i3 / 6) / 5, s2 = i3 % 6 / 5; + u5 -= 16; + const i5 = u5 % 36; + F6 = Math.floor(u5 / 36) / 5, e5 = Math.floor(i5 / 6) / 5, s4 = i5 % 6 / 5; } - const C5 = Math.max(F5, e3, s2) * 2; - if (C5 === 0) return 30; - let D5 = 30 + (Math.round(s2) << 2 | Math.round(e3) << 1 | Math.round(F5)); - return C5 === 2 && (D5 += 60), D5; - }, enumerable: false }, rgbToAnsi: { value: (u3, F5, e3) => r.ansi256ToAnsi(r.rgbToAnsi256(u3, F5, e3)), enumerable: false }, hexToAnsi: { value: (u3) => r.ansi256ToAnsi(r.hexToAnsi256(u3)), enumerable: false } }), r; + const C6 = Math.max(F6, e5, s4) * 2; + if (C6 === 0) return 30; + let D6 = 30 + (Math.round(s4) << 2 | Math.round(e5) << 1 | Math.round(F6)); + return C6 === 2 && (D6 += 60), D6; + }, enumerable: false }, rgbToAnsi: { value: (u5, F6, e5) => r.ansi256ToAnsi(r.rgbToAnsi256(u5, F6, e5)), enumerable: false }, hexToAnsi: { value: (u5) => r.ansi256ToAnsi(r.hexToAnsi256(u5)), enumerable: false } }), r; } var eD2 = tD2(); var g2 = /* @__PURE__ */ new Set(["\x1B", "\x9B"]); @@ -47900,174 +73584,174 @@ var O3 = "["; var CD2 = "]"; var I3 = "m"; var w4 = `${CD2}8;;`; -var N3 = (t2) => `${g2.values().next().value}${O3}${t2}${I3}`; -var L4 = (t2) => `${g2.values().next().value}${w4}${t2}${b4}`; -var iD2 = (t2) => t2.split(" ").map((u3) => A2(u3)); -var y3 = (t2, u3, F5) => { - const e3 = [...u3]; - let s2 = false, C5 = false, D5 = A2(S3(t2[t2.length - 1])); - for (const [i3, n2] of e3.entries()) { - const E4 = A2(n2); - if (D5 + E4 <= F5 ? t2[t2.length - 1] += n2 : (t2.push(n2), D5 = 0), g2.has(n2) && (s2 = true, C5 = e3.slice(i3 + 1).join("").startsWith(w4)), s2) { - C5 ? n2 === b4 && (s2 = false, C5 = false) : n2 === I3 && (s2 = false); +var N3 = (t4) => `${g2.values().next().value}${O3}${t4}${I3}`; +var L4 = (t4) => `${g2.values().next().value}${w4}${t4}${b4}`; +var iD2 = (t4) => t4.split(" ").map((u5) => A2(u5)); +var y3 = (t4, u5, F6) => { + const e5 = [...u5]; + let s4 = false, C6 = false, D6 = A2(S3(t4[t4.length - 1])); + for (const [i5, n4] of e5.entries()) { + const E5 = A2(n4); + if (D6 + E5 <= F6 ? t4[t4.length - 1] += n4 : (t4.push(n4), D6 = 0), g2.has(n4) && (s4 = true, C6 = e5.slice(i5 + 1).join("").startsWith(w4)), s4) { + C6 ? n4 === b4 && (s4 = false, C6 = false) : n4 === I3 && (s4 = false); continue; } - D5 += E4, D5 === F5 && i3 < e3.length - 1 && (t2.push(""), D5 = 0); + D6 += E5, D6 === F6 && i5 < e5.length - 1 && (t4.push(""), D6 = 0); } - !D5 && t2[t2.length - 1].length > 0 && t2.length > 1 && (t2[t2.length - 2] += t2.pop()); + !D6 && t4[t4.length - 1].length > 0 && t4.length > 1 && (t4[t4.length - 2] += t4.pop()); }; -var rD2 = (t2) => { - const u3 = t2.split(" "); - let F5 = u3.length; - for (; F5 > 0 && !(A2(u3[F5 - 1]) > 0); ) F5--; - return F5 === u3.length ? t2 : u3.slice(0, F5).join(" ") + u3.slice(F5).join(""); +var rD2 = (t4) => { + const u5 = t4.split(" "); + let F6 = u5.length; + for (; F6 > 0 && !(A2(u5[F6 - 1]) > 0); ) F6--; + return F6 === u5.length ? t4 : u5.slice(0, F6).join(" ") + u5.slice(F6).join(""); }; -var ED2 = (t2, u3, F5 = {}) => { - if (F5.trim !== false && t2.trim() === "") return ""; - let e3 = "", s2, C5; - const D5 = iD2(t2); - let i3 = [""]; - for (const [E4, h4] of t2.split(" ").entries()) { - F5.trim !== false && (i3[i3.length - 1] = i3[i3.length - 1].trimStart()); - let o3 = A2(i3[i3.length - 1]); - if (E4 !== 0 && (o3 >= u3 && (F5.wordWrap === false || F5.trim === false) && (i3.push(""), o3 = 0), (o3 > 0 || F5.trim === false) && (i3[i3.length - 1] += " ", o3++)), F5.hard && D5[E4] > u3) { - const B3 = u3 - o3, p4 = 1 + Math.floor((D5[E4] - B3 - 1) / u3); - Math.floor((D5[E4] - 1) / u3) < p4 && i3.push(""), y3(i3, h4, u3); +var ED2 = (t4, u5, F6 = {}) => { + if (F6.trim !== false && t4.trim() === "") return ""; + let e5 = "", s4, C6; + const D6 = iD2(t4); + let i5 = [""]; + for (const [E5, h6] of t4.split(" ").entries()) { + F6.trim !== false && (i5[i5.length - 1] = i5[i5.length - 1].trimStart()); + let o5 = A2(i5[i5.length - 1]); + if (E5 !== 0 && (o5 >= u5 && (F6.wordWrap === false || F6.trim === false) && (i5.push(""), o5 = 0), (o5 > 0 || F6.trim === false) && (i5[i5.length - 1] += " ", o5++)), F6.hard && D6[E5] > u5) { + const B4 = u5 - o5, p6 = 1 + Math.floor((D6[E5] - B4 - 1) / u5); + Math.floor((D6[E5] - 1) / u5) < p6 && i5.push(""), y3(i5, h6, u5); continue; } - if (o3 + D5[E4] > u3 && o3 > 0 && D5[E4] > 0) { - if (F5.wordWrap === false && o3 < u3) { - y3(i3, h4, u3); + if (o5 + D6[E5] > u5 && o5 > 0 && D6[E5] > 0) { + if (F6.wordWrap === false && o5 < u5) { + y3(i5, h6, u5); continue; } - i3.push(""); + i5.push(""); } - if (o3 + D5[E4] > u3 && F5.wordWrap === false) { - y3(i3, h4, u3); + if (o5 + D6[E5] > u5 && F6.wordWrap === false) { + y3(i5, h6, u5); continue; } - i3[i3.length - 1] += h4; + i5[i5.length - 1] += h6; } - F5.trim !== false && (i3 = i3.map((E4) => rD2(E4))); - const n2 = [...i3.join(` + F6.trim !== false && (i5 = i5.map((E5) => rD2(E5))); + const n4 = [...i5.join(` `)]; - for (const [E4, h4] of n2.entries()) { - if (e3 += h4, g2.has(h4)) { - const { groups: B3 } = new RegExp(`(?:\\${O3}(?\\d+)m|\\${w4}(?.*)${b4})`).exec(n2.slice(E4).join("")) || { groups: {} }; - if (B3.code !== void 0) { - const p4 = Number.parseFloat(B3.code); - s2 = p4 === sD2 ? void 0 : p4; - } else B3.uri !== void 0 && (C5 = B3.uri.length === 0 ? void 0 : B3.uri); - } - const o3 = eD2.codes.get(Number(s2)); - n2[E4 + 1] === ` -` ? (C5 && (e3 += L4("")), s2 && o3 && (e3 += N3(o3))) : h4 === ` -` && (s2 && o3 && (e3 += N3(s2)), C5 && (e3 += L4(C5))); - } - return e3; + for (const [E5, h6] of n4.entries()) { + if (e5 += h6, g2.has(h6)) { + const { groups: B4 } = new RegExp(`(?:\\${O3}(?\\d+)m|\\${w4}(?.*)${b4})`).exec(n4.slice(E5).join("")) || { groups: {} }; + if (B4.code !== void 0) { + const p6 = Number.parseFloat(B4.code); + s4 = p6 === sD2 ? void 0 : p6; + } else B4.uri !== void 0 && (C6 = B4.uri.length === 0 ? void 0 : B4.uri); + } + const o5 = eD2.codes.get(Number(s4)); + n4[E5 + 1] === ` +` ? (C6 && (e5 += L4("")), s4 && o5 && (e5 += N3(o5))) : h6 === ` +` && (s4 && o5 && (e5 += N3(s4)), C6 && (e5 += L4(C6))); + } + return e5; }; -function R4(t2, u3, F5) { - return String(t2).normalize().replace(/\r\n/g, ` +function R4(t4, u5, F6) { + return String(t4).normalize().replace(/\r\n/g, ` `).split(` -`).map((e3) => ED2(e3, u3, F5)).join(` +`).map((e5) => ED2(e5, u5, F6)).join(` `); } var oD2 = Object.defineProperty; -var nD2 = (t2, u3, F5) => u3 in t2 ? oD2(t2, u3, { enumerable: true, configurable: true, writable: true, value: F5 }) : t2[u3] = F5; -var a = (t2, u3, F5) => (nD2(t2, typeof u3 != "symbol" ? u3 + "" : u3, F5), F5); -function aD2(t2, u3) { - if (t2 === u3) return; - const F5 = t2.split(` -`), e3 = u3.split(` -`), s2 = []; - for (let C5 = 0; C5 < Math.max(F5.length, e3.length); C5++) F5[C5] !== e3[C5] && s2.push(C5); - return s2; +var nD2 = (t4, u5, F6) => u5 in t4 ? oD2(t4, u5, { enumerable: true, configurable: true, writable: true, value: F6 }) : t4[u5] = F6; +var a = (t4, u5, F6) => (nD2(t4, typeof u5 != "symbol" ? u5 + "" : u5, F6), F6); +function aD2(t4, u5) { + if (t4 === u5) return; + const F6 = t4.split(` +`), e5 = u5.split(` +`), s4 = []; + for (let C6 = 0; C6 < Math.max(F6.length, e5.length); C6++) F6[C6] !== e5[C6] && s4.push(C6); + return s4; } var V4 = Symbol("clack:cancel"); -function hD2(t2) { - return t2 === V4; +function hD2(t4) { + return t4 === V4; } -function v3(t2, u3) { - t2.isTTY && t2.setRawMode(u3); +function v3(t4, u5) { + t4.isTTY && t4.setRawMode(u5); } var z3 = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]); var lD2 = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]); var x3 = class { - constructor({ render: u3, input: F5 = import_node_process.stdin, output: e3 = import_node_process.stdout, ...s2 }, C5 = true) { - a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", /* @__PURE__ */ new Map()), a(this, "_prevFrame", ""), this.opts = s2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u3.bind(this), this._track = C5, this.input = F5, this.output = e3; + constructor({ render: u5, input: F6 = import_node_process.stdin, output: e5 = import_node_process.stdout, ...s4 }, C6 = true) { + a(this, "input"), a(this, "output"), a(this, "rl"), a(this, "opts"), a(this, "_track", false), a(this, "_render"), a(this, "_cursor", 0), a(this, "state", "initial"), a(this, "value"), a(this, "error", ""), a(this, "subscribers", /* @__PURE__ */ new Map()), a(this, "_prevFrame", ""), this.opts = s4, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u5.bind(this), this._track = C6, this.input = F6, this.output = e5; } prompt() { - const u3 = new import_node_tty.WriteStream(0); - return u3._write = (F5, e3, s2) => { - this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s2(); - }, this.input.pipe(u3), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u3, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v3(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F5, e3) => { + const u5 = new import_node_tty.WriteStream(0); + return u5._write = (F6, e5, s4) => { + this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s4(); + }, this.input.pipe(u5), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u5, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v3(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F6, e5) => { this.once("submit", () => { - this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v3(this.input, false), F5(this.value); + this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v3(this.input, false), F6(this.value); }), this.once("cancel", () => { - this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v3(this.input, false), F5(V4); + this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), v3(this.input, false), F6(V4); }); }); } - on(u3, F5) { - const e3 = this.subscribers.get(u3) ?? []; - e3.push({ cb: F5 }), this.subscribers.set(u3, e3); + on(u5, F6) { + const e5 = this.subscribers.get(u5) ?? []; + e5.push({ cb: F6 }), this.subscribers.set(u5, e5); } - once(u3, F5) { - const e3 = this.subscribers.get(u3) ?? []; - e3.push({ cb: F5, once: true }), this.subscribers.set(u3, e3); + once(u5, F6) { + const e5 = this.subscribers.get(u5) ?? []; + e5.push({ cb: F6, once: true }), this.subscribers.set(u5, e5); } - emit(u3, ...F5) { - const e3 = this.subscribers.get(u3) ?? [], s2 = []; - for (const C5 of e3) C5.cb(...F5), C5.once && s2.push(() => e3.splice(e3.indexOf(C5), 1)); - for (const C5 of s2) C5(); + emit(u5, ...F6) { + const e5 = this.subscribers.get(u5) ?? [], s4 = []; + for (const C6 of e5) C6.cb(...F6), C6.once && s4.push(() => e5.splice(e5.indexOf(C6), 1)); + for (const C6 of s4) C6(); } unsubscribe() { this.subscribers.clear(); } - onKeypress(u3, F5) { - if (this.state === "error" && (this.state = "active"), F5?.name && !this._track && z3.has(F5.name) && this.emit("cursor", z3.get(F5.name)), F5?.name && lD2.has(F5.name) && this.emit("cursor", F5.name), u3 && (u3.toLowerCase() === "y" || u3.toLowerCase() === "n") && this.emit("confirm", u3.toLowerCase() === "y"), u3 === " " && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u3 && this.emit("key", u3.toLowerCase()), F5?.name === "return") { + onKeypress(u5, F6) { + if (this.state === "error" && (this.state = "active"), F6?.name && !this._track && z3.has(F6.name) && this.emit("cursor", z3.get(F6.name)), F6?.name && lD2.has(F6.name) && this.emit("cursor", F6.name), u5 && (u5.toLowerCase() === "y" || u5.toLowerCase() === "n") && this.emit("confirm", u5.toLowerCase() === "y"), u5 === " " && this.opts.placeholder && (this.value || (this.rl.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u5 && this.emit("key", u5.toLowerCase()), F6?.name === "return") { if (this.opts.validate) { - const e3 = this.opts.validate(this.value); - e3 && (this.error = e3, this.state = "error", this.rl.write(this.value)); + const e5 = this.opts.validate(this.value); + e5 && (this.error = e5, this.state = "error", this.rl.write(this.value)); } this.state !== "error" && (this.state = "submit"); } - u3 === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close(); + u5 === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close(); } close() { this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(` `), v3(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe(); } restoreCursor() { - const u3 = R4(this._prevFrame, process.stdout.columns, { hard: true }).split(` + const u5 = R4(this._prevFrame, process.stdout.columns, { hard: true }).split(` `).length - 1; - this.output.write(import_sisteransi.cursor.move(-999, u3 * -1)); + this.output.write(import_sisteransi.cursor.move(-999, u5 * -1)); } render() { - const u3 = R4(this._render(this) ?? "", process.stdout.columns, { hard: true }); - if (u3 !== this._prevFrame) { + const u5 = R4(this._render(this) ?? "", process.stdout.columns, { hard: true }); + if (u5 !== this._prevFrame) { if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide); else { - const F5 = aD2(this._prevFrame, u3); - if (this.restoreCursor(), F5 && F5?.length === 1) { - const e3 = F5[0]; - this.output.write(import_sisteransi.cursor.move(0, e3)), this.output.write(import_sisteransi.erase.lines(1)); - const s2 = u3.split(` + const F6 = aD2(this._prevFrame, u5); + if (this.restoreCursor(), F6 && F6?.length === 1) { + const e5 = F6[0]; + this.output.write(import_sisteransi.cursor.move(0, e5)), this.output.write(import_sisteransi.erase.lines(1)); + const s4 = u5.split(` `); - this.output.write(s2[e3]), this._prevFrame = u3, this.output.write(import_sisteransi.cursor.move(0, s2.length - e3 - 1)); + this.output.write(s4[e5]), this._prevFrame = u5, this.output.write(import_sisteransi.cursor.move(0, s4.length - e5 - 1)); return; - } else if (F5 && F5?.length > 1) { - const e3 = F5[0]; - this.output.write(import_sisteransi.cursor.move(0, e3)), this.output.write(import_sisteransi.erase.down()); - const s2 = u3.split(` -`).slice(e3); - this.output.write(s2.join(` -`)), this._prevFrame = u3; + } else if (F6 && F6?.length > 1) { + const e5 = F6[0]; + this.output.write(import_sisteransi.cursor.move(0, e5)), this.output.write(import_sisteransi.erase.down()); + const s4 = u5.split(` +`).slice(e5); + this.output.write(s4.join(` +`)), this._prevFrame = u5; return; } this.output.write(import_sisteransi.erase.down()); } - this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3; + this.output.write(u5), this.state === "initial" && (this.state = "active"), this._prevFrame = u5; } } }; @@ -48078,25 +73762,25 @@ var xD2 = class extends x3 { get _value() { return this.cursor === 0; } - constructor(u3) { - super(u3, false), this.value = !!u3.initialValue, this.on("value", () => { + constructor(u5) { + super(u5, false), this.value = !!u5.initialValue, this.on("value", () => { this.value = this._value; - }), this.on("confirm", (F5) => { - this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F5, this.state = "submit", this.close(); + }), this.on("confirm", (F6) => { + this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = F6, this.state = "submit", this.close(); }), this.on("cursor", () => { this.value = !this.value; }); } }; var pD2 = Object.defineProperty; -var fD2 = (t2, u3, F5) => u3 in t2 ? pD2(t2, u3, { enumerable: true, configurable: true, writable: true, value: F5 }) : t2[u3] = F5; -var K3 = (t2, u3, F5) => (fD2(t2, typeof u3 != "symbol" ? u3 + "" : u3, F5), F5); +var fD2 = (t4, u5, F6) => u5 in t4 ? pD2(t4, u5, { enumerable: true, configurable: true, writable: true, value: F6 }) : t4[u5] = F6; +var K3 = (t4, u5, F6) => (fD2(t4, typeof u5 != "symbol" ? u5 + "" : u5, F6), F6); var gD2 = class extends x3 { - constructor(u3) { - super(u3, false), K3(this, "options"), K3(this, "cursor", 0), this.options = u3.options, this.value = [...u3.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F5 }) => F5 === u3.cursorAt), 0), this.on("key", (F5) => { - F5 === "a" && this.toggleAll(); - }), this.on("cursor", (F5) => { - switch (F5) { + constructor(u5) { + super(u5, false), K3(this, "options"), K3(this, "cursor", 0), this.options = u5.options, this.value = [...u5.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F6 }) => F6 === u5.cursorAt), 0), this.on("key", (F6) => { + F6 === "a" && this.toggleAll(); + }), this.on("cursor", (F6) => { + switch (F6) { case "left": case "up": this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1; @@ -48115,21 +73799,21 @@ var gD2 = class extends x3 { return this.options[this.cursor].value; } toggleAll() { - const u3 = this.value.length === this.options.length; - this.value = u3 ? [] : this.options.map((F5) => F5.value); + const u5 = this.value.length === this.options.length; + this.value = u5 ? [] : this.options.map((F6) => F6.value); } toggleValue() { - const u3 = this.value.includes(this._value); - this.value = u3 ? this.value.filter((F5) => F5 !== this._value) : [...this.value, this._value]; + const u5 = this.value.includes(this._value); + this.value = u5 ? this.value.filter((F6) => F6 !== this._value) : [...this.value, this._value]; } }; var bD2 = Object.defineProperty; -var wD2 = (t2, u3, F5) => u3 in t2 ? bD2(t2, u3, { enumerable: true, configurable: true, writable: true, value: F5 }) : t2[u3] = F5; -var Z3 = (t2, u3, F5) => (wD2(t2, typeof u3 != "symbol" ? u3 + "" : u3, F5), F5); +var wD2 = (t4, u5, F6) => u5 in t4 ? bD2(t4, u5, { enumerable: true, configurable: true, writable: true, value: F6 }) : t4[u5] = F6; +var Z3 = (t4, u5, F6) => (wD2(t4, typeof u5 != "symbol" ? u5 + "" : u5, F6), F6); var yD = class extends x3 { - constructor(u3) { - super(u3, false), Z3(this, "options"), Z3(this, "cursor", 0), this.options = u3.options, this.cursor = this.options.findIndex(({ value: F5 }) => F5 === u3.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F5) => { - switch (F5) { + constructor(u5) { + super(u5, false), Z3(this, "options"), Z3(this, "cursor", 0), this.options = u5.options, this.cursor = this.options.findIndex(({ value: F6 }) => F6 === u5.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F6) => { + switch (F6) { case "left": case "up": this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1; @@ -48150,20 +73834,20 @@ var yD = class extends x3 { } }; var PD = globalThis.process.platform.startsWith("win"); -function WD({ input: t2 = import_node_process.stdin, output: u3 = import_node_process.stdout, overwrite: F5 = true, hideCursor: e3 = true } = {}) { - const s2 = f.createInterface({ input: t2, output: u3, prompt: "", tabSize: 1 }); - f.emitKeypressEvents(t2, s2), t2.isTTY && t2.setRawMode(true); - const C5 = (D5, { name: i3 }) => { - if (String(D5) === "" && process.exit(0), !F5) return; - let n2 = i3 === "return" ? 0 : -1, E4 = i3 === "return" ? -1 : 0; - f.moveCursor(u3, n2, E4, () => { - f.clearLine(u3, 1, () => { - t2.once("keypress", C5); +function WD({ input: t4 = import_node_process.stdin, output: u5 = import_node_process.stdout, overwrite: F6 = true, hideCursor: e5 = true } = {}) { + const s4 = f.createInterface({ input: t4, output: u5, prompt: "", tabSize: 1 }); + f.emitKeypressEvents(t4, s4), t4.isTTY && t4.setRawMode(true); + const C6 = (D6, { name: i5 }) => { + if (String(D6) === "" && process.exit(0), !F6) return; + let n4 = i5 === "return" ? 0 : -1, E5 = i5 === "return" ? -1 : 0; + f.moveCursor(u5, n4, E5, () => { + f.clearLine(u5, 1, () => { + t4.once("keypress", C6); }); }); }; - return e3 && process.stdout.write(import_sisteransi.cursor.hide), t2.once("keypress", C5), () => { - t2.off("keypress", C5), e3 && process.stdout.write(import_sisteransi.cursor.show), t2.isTTY && !PD && t2.setRawMode(false), s2.terminal = false, s2.close(); + return e5 && process.stdout.write(import_sisteransi.cursor.hide), t4.once("keypress", C6), () => { + t4.off("keypress", C6), e5 && process.stdout.write(import_sisteransi.cursor.show), t4.isTTY && !PD && t4.setRawMode(false), s4.terminal = false, s4.close(); }; } @@ -48175,7 +73859,7 @@ function N4() { return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm"; } var p2 = N4(); -var u = (r3, n2) => p2 ? r3 : n2; +var u = (r5, n4) => p2 ? r5 : n4; var W4 = u("\u25C6", "*"); var D3 = u("\u25A0", "x"); var F3 = u("\u25B2", "x"); @@ -48197,8 +73881,8 @@ var U5 = u("\u25CF", "\u2022"); var Z4 = u("\u25C6", "*"); var z4 = u("\u25B2", "!"); var X3 = u("\u25A0", "x"); -var h2 = (r3) => { - switch (r3) { +var h2 = (r5) => { + switch (r5) { case "initial": case "active": return import_picocolors.default.cyan(W4); @@ -48210,84 +73894,84 @@ var h2 = (r3) => { return import_picocolors.default.green(f2); } }; -var Q3 = (r3) => { - const n2 = r3.active ?? "Yes", s2 = r3.inactive ?? "No"; - return new xD2({ active: n2, inactive: s2, initialValue: r3.initialValue ?? true, render() { - const t2 = `${import_picocolors.default.gray(a2)} -${h2(this.state)} ${r3.message} -`, i3 = this.value ? n2 : s2; +var Q3 = (r5) => { + const n4 = r5.active ?? "Yes", s4 = r5.inactive ?? "No"; + return new xD2({ active: n4, inactive: s4, initialValue: r5.initialValue ?? true, render() { + const t4 = `${import_picocolors.default.gray(a2)} +${h2(this.state)} ${r5.message} +`, i5 = this.value ? n4 : s4; switch (this.state) { case "submit": - return `${t2}${import_picocolors.default.gray(a2)} ${import_picocolors.default.dim(i3)}`; + return `${t4}${import_picocolors.default.gray(a2)} ${import_picocolors.default.dim(i5)}`; case "cancel": - return `${t2}${import_picocolors.default.gray(a2)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i3))} + return `${t4}${import_picocolors.default.gray(a2)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i5))} ${import_picocolors.default.gray(a2)}`; default: - return `${t2}${import_picocolors.default.cyan(a2)} ${this.value ? `${import_picocolors.default.green(w5)} ${n2}` : `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(n2)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(s2)}` : `${import_picocolors.default.green(w5)} ${s2}`} + return `${t4}${import_picocolors.default.cyan(a2)} ${this.value ? `${import_picocolors.default.green(w5)} ${n4}` : `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(n4)}`} ${import_picocolors.default.dim("/")} ${this.value ? `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(s4)}` : `${import_picocolors.default.green(w5)} ${s4}`} ${import_picocolors.default.cyan(o)} `; } } }).prompt(); }; -var ee = (r3) => { - const n2 = (s2, t2) => { - const i3 = s2.label ?? String(s2.value); - return t2 === "active" ? `${import_picocolors.default.green(w5)} ${i3} ${s2.hint ? import_picocolors.default.dim(`(${s2.hint})`) : ""}` : t2 === "selected" ? `${import_picocolors.default.dim(i3)}` : t2 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i3))}` : `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(i3)}`; +var ee = (r5) => { + const n4 = (s4, t4) => { + const i5 = s4.label ?? String(s4.value); + return t4 === "active" ? `${import_picocolors.default.green(w5)} ${i5} ${s4.hint ? import_picocolors.default.dim(`(${s4.hint})`) : ""}` : t4 === "selected" ? `${import_picocolors.default.dim(i5)}` : t4 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i5))}` : `${import_picocolors.default.dim(S4)} ${import_picocolors.default.dim(i5)}`; }; - return new yD({ options: r3.options, initialValue: r3.initialValue, render() { - const s2 = `${import_picocolors.default.gray(a2)} -${h2(this.state)} ${r3.message} + return new yD({ options: r5.options, initialValue: r5.initialValue, render() { + const s4 = `${import_picocolors.default.gray(a2)} +${h2(this.state)} ${r5.message} `; switch (this.state) { case "submit": - return `${s2}${import_picocolors.default.gray(a2)} ${n2(this.options[this.cursor], "selected")}`; + return `${s4}${import_picocolors.default.gray(a2)} ${n4(this.options[this.cursor], "selected")}`; case "cancel": - return `${s2}${import_picocolors.default.gray(a2)} ${n2(this.options[this.cursor], "cancelled")} + return `${s4}${import_picocolors.default.gray(a2)} ${n4(this.options[this.cursor], "cancelled")} ${import_picocolors.default.gray(a2)}`; default: - return `${s2}${import_picocolors.default.cyan(a2)} ${this.options.map((t2, i3) => n2(t2, i3 === this.cursor ? "active" : "inactive")).join(` + return `${s4}${import_picocolors.default.cyan(a2)} ${this.options.map((t4, i5) => n4(t4, i5 === this.cursor ? "active" : "inactive")).join(` ${import_picocolors.default.cyan(a2)} `)} ${import_picocolors.default.cyan(o)} `; } } }).prompt(); }; -var re = (r3) => { - const n2 = (s2, t2) => { - const i3 = s2.label ?? String(s2.value); - return t2 === "active" ? `${import_picocolors.default.cyan(_5)} ${i3} ${s2.hint ? import_picocolors.default.dim(`(${s2.hint})`) : ""}` : t2 === "selected" ? `${import_picocolors.default.green(y4)} ${import_picocolors.default.dim(i3)}` : t2 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i3))}` : t2 === "active-selected" ? `${import_picocolors.default.green(y4)} ${i3} ${s2.hint ? import_picocolors.default.dim(`(${s2.hint})`) : ""}` : t2 === "submitted" ? `${import_picocolors.default.dim(i3)}` : `${import_picocolors.default.dim(A3)} ${import_picocolors.default.dim(i3)}`; +var re = (r5) => { + const n4 = (s4, t4) => { + const i5 = s4.label ?? String(s4.value); + return t4 === "active" ? `${import_picocolors.default.cyan(_5)} ${i5} ${s4.hint ? import_picocolors.default.dim(`(${s4.hint})`) : ""}` : t4 === "selected" ? `${import_picocolors.default.green(y4)} ${import_picocolors.default.dim(i5)}` : t4 === "cancelled" ? `${import_picocolors.default.strikethrough(import_picocolors.default.dim(i5))}` : t4 === "active-selected" ? `${import_picocolors.default.green(y4)} ${i5} ${s4.hint ? import_picocolors.default.dim(`(${s4.hint})`) : ""}` : t4 === "submitted" ? `${import_picocolors.default.dim(i5)}` : `${import_picocolors.default.dim(A3)} ${import_picocolors.default.dim(i5)}`; }; - return new gD2({ options: r3.options, initialValues: r3.initialValues, required: r3.required ?? true, cursorAt: r3.cursorAt, validate(s2) { - if (this.required && s2.length === 0) return `Please select at least one option. + return new gD2({ options: r5.options, initialValues: r5.initialValues, required: r5.required ?? true, cursorAt: r5.cursorAt, validate(s4) { + if (this.required && s4.length === 0) return `Please select at least one option. ${import_picocolors.default.reset(import_picocolors.default.dim(`Press ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" space ")))} to select, ${import_picocolors.default.gray(import_picocolors.default.bgWhite(import_picocolors.default.inverse(" enter ")))} to submit`))}`; }, render() { - let s2 = `${import_picocolors.default.gray(a2)} -${h2(this.state)} ${r3.message} + let s4 = `${import_picocolors.default.gray(a2)} +${h2(this.state)} ${r5.message} `; switch (this.state) { case "submit": - return `${s2}${import_picocolors.default.gray(a2)} ${this.options.filter(({ value: t2 }) => this.value.includes(t2)).map((t2) => n2(t2, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`; + return `${s4}${import_picocolors.default.gray(a2)} ${this.options.filter(({ value: t4 }) => this.value.includes(t4)).map((t4) => n4(t4, "submitted")).join(import_picocolors.default.dim(", ")) || import_picocolors.default.dim("none")}`; case "cancel": { - const t2 = this.options.filter(({ value: i3 }) => this.value.includes(i3)).map((i3) => n2(i3, "cancelled")).join(import_picocolors.default.dim(", ")); - return `${s2}${import_picocolors.default.gray(a2)} ${t2.trim() ? `${t2} + const t4 = this.options.filter(({ value: i5 }) => this.value.includes(i5)).map((i5) => n4(i5, "cancelled")).join(import_picocolors.default.dim(", ")); + return `${s4}${import_picocolors.default.gray(a2)} ${t4.trim() ? `${t4} ${import_picocolors.default.gray(a2)}` : ""}`; } case "error": { - const t2 = this.error.split(` -`).map((i3, c3) => c3 === 0 ? `${import_picocolors.default.yellow(o)} ${import_picocolors.default.yellow(i3)}` : ` ${i3}`).join(` + const t4 = this.error.split(` +`).map((i5, c5) => c5 === 0 ? `${import_picocolors.default.yellow(o)} ${import_picocolors.default.yellow(i5)}` : ` ${i5}`).join(` `); - return s2 + import_picocolors.default.yellow(a2) + " " + this.options.map((i3, c3) => { - const l3 = this.value.includes(i3.value), $6 = c3 === this.cursor; - return $6 && l3 ? n2(i3, "active-selected") : l3 ? n2(i3, "selected") : n2(i3, $6 ? "active" : "inactive"); + return s4 + import_picocolors.default.yellow(a2) + " " + this.options.map((i5, c5) => { + const l5 = this.value.includes(i5.value), $6 = c5 === this.cursor; + return $6 && l5 ? n4(i5, "active-selected") : l5 ? n4(i5, "selected") : n4(i5, $6 ? "active" : "inactive"); }).join(` ${import_picocolors.default.yellow(a2)} `) + ` -` + t2 + ` +` + t4 + ` `; } default: - return `${s2}${import_picocolors.default.cyan(a2)} ${this.options.map((t2, i3) => { - const c3 = this.value.includes(t2.value), l3 = i3 === this.cursor; - return l3 && c3 ? n2(t2, "active-selected") : c3 ? n2(t2, "selected") : n2(t2, l3 ? "active" : "inactive"); + return `${s4}${import_picocolors.default.cyan(a2)} ${this.options.map((t4, i5) => { + const c5 = this.value.includes(t4.value), l5 = i5 === this.cursor; + return l5 && c5 ? n4(t4, "active-selected") : c5 ? n4(t4, "selected") : n4(t4, l5 ? "active" : "inactive"); }).join(` ${import_picocolors.default.cyan(a2)} `)} ${import_picocolors.default.cyan(o)} @@ -48295,52 +73979,52 @@ ${import_picocolors.default.cyan(o)} } } }).prompt(); }; -var b5 = (r3) => r3.replace(ue(), ""); -var ie = (r3 = "", n2 = "") => { - const s2 = ` -${r3} +var b5 = (r5) => r5.replace(ue(), ""); +var ie = (r5 = "", n4 = "") => { + const s4 = ` +${r5} `.split(` -`), t2 = Math.max(s2.reduce((c3, l3) => (l3 = b5(l3), l3.length > c3 ? l3.length : c3), 0), b5(n2).length) + 2, i3 = s2.map((c3) => `${import_picocolors.default.gray(a2)} ${import_picocolors.default.dim(c3)}${" ".repeat(t2 - b5(c3).length)}${import_picocolors.default.gray(a2)}`).join(` +`), t4 = Math.max(s4.reduce((c5, l5) => (l5 = b5(l5), l5.length > c5 ? l5.length : c5), 0), b5(n4).length) + 2, i5 = s4.map((c5) => `${import_picocolors.default.gray(a2)} ${import_picocolors.default.dim(c5)}${" ".repeat(t4 - b5(c5).length)}${import_picocolors.default.gray(a2)}`).join(` `); process.stdout.write(`${import_picocolors.default.gray(a2)} -${import_picocolors.default.green(f2)} ${import_picocolors.default.reset(n2)} ${import_picocolors.default.gray(R5.repeat(Math.max(t2 - n2.length - 1, 1)) + G4)} -${i3} -${import_picocolors.default.gray(H3 + R5.repeat(t2 + 2) + K4)} +${import_picocolors.default.green(f2)} ${import_picocolors.default.reset(n4)} ${import_picocolors.default.gray(R5.repeat(Math.max(t4 - n4.length - 1, 1)) + G4)} +${i5} +${import_picocolors.default.gray(H3 + R5.repeat(t4 + 2) + K4)} `); }; -var ae = (r3 = "") => { - process.stdout.write(`${import_picocolors.default.gray(L5)} ${r3} +var ae = (r5 = "") => { + process.stdout.write(`${import_picocolors.default.gray(L5)} ${r5} `); }; -var ce = (r3 = "") => { +var ce = (r5 = "") => { process.stdout.write(`${import_picocolors.default.gray(a2)} -${import_picocolors.default.gray(o)} ${r3} +${import_picocolors.default.gray(o)} ${r5} `); }; var C3 = p2 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"]; var le = () => { - let r3, n2; - const s2 = p2 ? 80 : 120; - return { start(t2 = "") { - t2 = t2.replace(/\.?\.?\.$/, ""), r3 = WD(), process.stdout.write(`${import_picocolors.default.gray(a2)} -${import_picocolors.default.magenta("\u25CB")} ${t2} + let r5, n4; + const s4 = p2 ? 80 : 120; + return { start(t4 = "") { + t4 = t4.replace(/\.?\.?\.$/, ""), r5 = WD(), process.stdout.write(`${import_picocolors.default.gray(a2)} +${import_picocolors.default.magenta("\u25CB")} ${t4} `); - let i3 = 0, c3 = 0; - n2 = setInterval(() => { - let l3 = C3[i3]; - process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l3)} ${t2}${Math.floor(c3) >= 1 ? ".".repeat(Math.floor(c3)).slice(0, 3) : ""} -`), i3 = i3 === C3.length - 1 ? 0 : i3 + 1, c3 = c3 === C3.length ? 0 : c3 + 0.125; - }, s2); - }, stop(t2 = "") { - process.stdout.write(import_sisteransi2.cursor.move(-999, -2)), process.stdout.write(import_sisteransi2.erase.down(2)), clearInterval(n2), process.stdout.write(`${import_picocolors.default.gray(a2)} -${import_picocolors.default.green(f2)} ${t2} -`), r3(); + let i5 = 0, c5 = 0; + n4 = setInterval(() => { + let l5 = C3[i5]; + process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l5)} ${t4}${Math.floor(c5) >= 1 ? ".".repeat(Math.floor(c5)).slice(0, 3) : ""} +`), i5 = i5 === C3.length - 1 ? 0 : i5 + 1, c5 = c5 === C3.length ? 0 : c5 + 0.125; + }, s4); + }, stop(t4 = "") { + process.stdout.write(import_sisteransi2.cursor.move(-999, -2)), process.stdout.write(import_sisteransi2.erase.down(2)), clearInterval(n4), process.stdout.write(`${import_picocolors.default.gray(a2)} +${import_picocolors.default.green(f2)} ${t4} +`), r5(); } }; }; function ue() { - const r3 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"); - return new RegExp(r3, "g"); + const r5 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"); + return new RegExp(r5, "g"); } // node_modules/chalk/source/vendor/ansi-styles/index.js @@ -48621,10 +74305,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { return 3; } if ("TERM_PROGRAM" in env) { - const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + const version3 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": { - return version >= 3 ? 3 : 2; + return version3 >= 3 ? 3 : 2; } case "Apple_Terminal": { return 2; @@ -49460,11 +75144,11 @@ var setKillTimeout = (kill, signal, options, killResult) => { return; } const timeout = getForceKillAfterTimeout(options); - const t2 = setTimeout(() => { + const t4 = setTimeout(() => { kill("SIGKILL"); }, timeout); - if (t2.unref) { - t2.unref(); + if (t4.unref) { + t4.unref(); } }; var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult; @@ -50273,6 +75957,58 @@ var CONFIG_KEYS = /* @__PURE__ */ ((CONFIG_KEYS2) => { return CONFIG_KEYS2; })(CONFIG_KEYS || {}); var MODEL_LIST = { + bedrock: [ + // Anthropic Claude models + "anthropic.claude-instant-v1", + "anthropic.claude-v2", + "anthropic.claude-v2:1", + "anthropic.claude-3-sonnet-20240229-v1:0", + "anthropic.claude-3-haiku-20240307-v1:0", + "anthropic.claude-3-opus-20240229-v1:0", + "anthropic.claude-3-5-sonnet-20240620-v1:0", + "anthropic.claude-3-5-sonnet-20241022-v2:0", + "anthropic.claude-3-7-sonnet-20250219-v1:0", + "anthropic.claude-3-5-haiku-20241022-v1:0", + "anthropic.claude-opus-4-20250514-v1:0", + "anthropic.claude-sonnet-4-20250514-v1:0", + // Amazon models + "amazon.titan-text-lite-v1", + "amazon.titan-text-express-v1", + "amazon.titan-text-premier-v1:0", + "amazon.nova-lite-v1:0", + "amazon.nova-pro-v1:0", + "amazon.nova-micro-v1:0", + "amazon.nova-premier-v1:0", + // Meta Llama models + "meta.llama3-8b-instruct-v1:0", + "meta.llama3-70b-instruct-v1:0", + "meta.llama3-1-8b-instruct-v1:0", + "meta.llama3-1-70b-instruct-v1:0", + "meta.llama3-2-11b-instruct-v1:0", + "meta.llama3-2-90b-instruct-v1:0", + "meta.llama3-3-70b-instruct-v1:0", + "meta.llama4-scout-17b-instruct-v1:0", + "meta.llama4-maverick-17b-instruct-v1:0", + // AI21 models + "ai21.jamba-instruct-v1:0", + "ai21.jamba-1-5-large-v1:0", + "ai21.jamba-1-5-mini-v1:0", + // Cohere models + "cohere.command-text-v14", + "cohere.command-light-text-v14", + "cohere.command-r-v1:0", + "cohere.command-r-plus-v1:0", + // Mistral models + "mistral.mistral-7b-instruct-v0:2", + "mistral.mixtral-8x7b-instruct-v0:1", + "mistral.mistral-large-2402-v1:0", + "mistral.mistral-small-2402-v1:0", + "mistral.pixtral-large-2502-v1:0", + // Stability models + "stability.stable-diffusion-xl-v1", + // Deepseek models + "deepseek.r1-v1:0" + ], openai: [ "gpt-4o-mini", "gpt-3.5-turbo", @@ -50722,6 +76458,9 @@ var getDefaultModel = (provider) => { return MODEL_LIST.deepseek[0]; case "openrouter": return MODEL_LIST.openrouter[0]; + case "bedrock": + return MODEL_LIST.bedrock[6]; + // Default to Claude 3.5 Sonnet which is a good balance default: return MODEL_LIST.openai[0]; } @@ -50876,9 +76615,10 @@ var configValidators = { "flowise", "groq", "deepseek", - "openrouter" + "openrouter", + "bedrock" ].includes(value) || value.startsWith("ollama"), - `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek' or 'openai' (default)` + `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek', 'bedrock' or 'openai' (default)` ); return value; }, @@ -50895,7 +76635,7 @@ var configValidators = { "OCO_TEST_MOCK_TYPE" /* OCO_TEST_MOCK_TYPE */, TEST_MOCK_TYPES.includes(value), `${value} is not supported yet, use ${TEST_MOCK_TYPES.map( - (t2) => `'${t2}'` + (t4) => `'${t4}'` ).join(", ")}` ); return value; @@ -50922,6 +76662,7 @@ var OCO_AI_PROVIDER_ENUM = /* @__PURE__ */ ((OCO_AI_PROVIDER_ENUM2) => { OCO_AI_PROVIDER_ENUM2["MLX"] = "mlx"; OCO_AI_PROVIDER_ENUM2["DEEPSEEK"] = "deepseek"; OCO_AI_PROVIDER_ENUM2["OPENROUTER"] = "openrouter"; + OCO_AI_PROVIDER_ENUM2["BEDROCK"] = "bedrock"; return OCO_AI_PROVIDER_ENUM2; })(OCO_AI_PROVIDER_ENUM || {}); var defaultConfigPath = (0, import_path.join)((0, import_os.homedir)(), ".opencommit"); @@ -51008,17 +76749,17 @@ var mergeConfigs = (main, fallback) => { }; var cleanUndefinedValues = (config7) => { return Object.fromEntries( - Object.entries(config7).map(([_7, v5]) => { + Object.entries(config7).map(([_8, v8]) => { try { - if (typeof v5 === "string") { - if (v5 === "undefined") return [_7, void 0]; - if (v5 === "null") return [_7, null]; - const parsedValue = JSON.parse(v5); - return [_7, parsedValue]; + if (typeof v8 === "string") { + if (v8 === "undefined") return [_8, void 0]; + if (v8 === "null") return [_8, null]; + const parsedValue = JSON.parse(v8); + return [_8, parsedValue]; } - return [_7, v5]; + return [_8, v8]; } catch (error) { - return [_7, v5]; + return [_8, v8]; } }) ); @@ -51320,7 +77061,7 @@ init_isFile(); // node_modules/formdata-node/lib/esm/isBlob.js init_Blob(); -var isBlob = (value) => value instanceof Blob3; +var isBlob2 = (value) => value instanceof Blob3; // node_modules/formdata-node/lib/esm/FormData.js init_isFunction(); @@ -51331,10 +77072,10 @@ var deprecateConstructorEntries = (0, import_util.deprecate)(() => { }, 'Constructor "entries" argument is not spec-compliant and will be removed in next major release.'); // node_modules/formdata-node/lib/esm/FormData.js -var __classPrivateFieldGet3 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet3 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _FormData_instances; var _FormData_entries; @@ -51419,7 +77160,7 @@ var FormData3 = class { type: rawValue.type, lastModified: rawValue.lastModified }); - } else if (isBlob(rawValue)) { + } else if (isBlob2(rawValue)) { value = new File3([rawValue], fileName === void 0 ? "blob" : fileName, { type: rawValue.type }); @@ -51489,8 +77230,8 @@ function isPlainObject(value) { var isPlainObject_default = isPlainObject; // node_modules/form-data-encoder/lib/esm/util/normalizeValue.js -var normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i3, str2) => { - if (match === "\r" && str2[i3 + 1] !== "\n" || match === "\n" && str2[i3 - 1] !== "\r") { +var normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i5, str2) => { + if (match === "\r" && str2[i5 + 1] !== "\n" || match === "\n" && str2[i5 - 1] !== "\r") { return "\r\n"; } return match; @@ -51512,16 +77253,16 @@ var isFileLike = (value) => Boolean(value && typeof value === "object" && isFunc var isFormData = (value) => Boolean(value && isFunction_default(value.constructor) && value[Symbol.toStringTag] === "FormData" && isFunction_default(value.append) && isFunction_default(value.getAll) && isFunction_default(value.entries) && isFunction_default(value[Symbol.iterator])); // node_modules/form-data-encoder/lib/esm/FormDataEncoder.js -var __classPrivateFieldSet3 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet3 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet4 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet4 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _FormDataEncoder_instances; var _FormDataEncoder_CRLF; @@ -51847,19 +77588,19 @@ var Stream = class _Stream { if (sse.event === "completion") { try { yield JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } } if (sse.event === "message_start" || sse.event === "message_delta" || sse.event === "message_stop" || sse.event === "content_block_start" || sse.event === "content_block_delta" || sse.event === "content_block_stop") { try { yield JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } } if (sse.event === "ping") { @@ -51873,10 +77614,10 @@ var Stream = class _Stream { } } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -51916,10 +77657,10 @@ var Stream = class _Stream { yield JSON.parse(line); } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -52030,15 +77771,15 @@ async function* iterSSEChunks(iterator2) { function findDoubleNewlineIndex(buffer) { const newline = 10; const carriage = 13; - for (let i3 = 0; i3 < buffer.length - 2; i3++) { - if (buffer[i3] === newline && buffer[i3 + 1] === newline) { - return i3 + 2; + for (let i5 = 0; i5 < buffer.length - 2; i5++) { + if (buffer[i5] === newline && buffer[i5 + 1] === newline) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === carriage) { - return i3 + 2; + if (buffer[i5] === carriage && buffer[i5 + 1] === carriage) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === newline && i3 + 3 < buffer.length && buffer[i3 + 2] === carriage && buffer[i3 + 3] === newline) { - return i3 + 4; + if (buffer[i5] === carriage && buffer[i5 + 1] === newline && i5 + 3 < buffer.length && buffer[i5 + 2] === carriage && buffer[i5 + 3] === newline) { + return i5 + 4; } } return -1; @@ -52070,7 +77811,7 @@ var SSEDecoder = class { if (line.startsWith(":")) { return null; } - let [fieldname, _7, value] = partition(line, ":"); + let [fieldname, _8, value] = partition(line, ":"); if (value.startsWith(" ")) { value = value.substring(1); } @@ -52171,9 +77912,9 @@ function readableStreamAsyncIterable(stream4) { if (result?.done) reader.releaseLock(); return result; - } catch (e3) { + } catch (e5) { reader.releaseLock(); - throw e3; + throw e5; } }, async return() { @@ -52228,33 +77969,33 @@ async function getBytes(value) { } function propsForError(value) { const props = Object.getOwnPropertyNames(value); - return `[${props.map((p4) => `"${p4}"`).join(", ")}]`; + return `[${props.map((p6) => `"${p6}"`).join(", ")}]`; } function getName(value) { return getStringFromMaybeBuffer(value.name) || getStringFromMaybeBuffer(value.filename) || // For fs.ReadStream getStringFromMaybeBuffer(value.path)?.split(/[\\/]/).pop(); } -var getStringFromMaybeBuffer = (x5) => { - if (typeof x5 === "string") - return x5; - if (typeof Buffer !== "undefined" && x5 instanceof Buffer) - return String(x5); +var getStringFromMaybeBuffer = (x7) => { + if (typeof x7 === "string") + return x7; + if (typeof Buffer !== "undefined" && x7 instanceof Buffer) + return String(x7); return void 0; }; var isAsyncIterableIterator = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function"; var isMultipartBody = (body) => body && typeof body === "object" && body.body && body[Symbol.toStringTag] === "MultipartBody"; // node_modules/@anthropic-ai/sdk/core.mjs -var __classPrivateFieldSet5 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet5 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet6 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet6 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractPage_client; async function defaultParseResponse(props) { @@ -52308,7 +78049,7 @@ var APIPromise = class _APIPromise extends Promise { * - `import '@anthropic-ai/sdk/shims/web'` (otherwise) */ asResponse() { - return this.responsePromise.then((p4) => p4.response); + return this.responsePromise.then((p6) => p6.response); } /** * Gets the parsed response data and the raw `Response` instance. @@ -52519,7 +78260,7 @@ var APIClient = class { debug(`response (error; ${retryMessage2})`, response.status, url2, responseHeaders); return this.retryRequest(options, retriesRemaining, responseHeaders); } - const errText = await response.text().catch((e3) => castToError(e3).message); + const errText = await response.text().catch((e5) => castToError(e5).message); const errJSON = safeJSON(errText); const errMessage = errJSON ? void 0 : errText; const retryMessage = retriesRemaining ? `(error; no more retries left)` : `(error; not retryable)`; @@ -52545,7 +78286,7 @@ var APIClient = class { return url2.toString(); } stringifyQuery(query) { - return Object.entries(query).filter(([_7, value]) => typeof value !== "undefined").map(([key, value]) => { + return Object.entries(query).filter(([_8, value]) => typeof value !== "undefined").map(([key, value]) => { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; } @@ -52820,14 +78561,14 @@ var isAbsoluteURL = (url2) => { return startsWithSchemeRegexp.test(url2); }; var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); -var validatePositiveInteger = (name, n2) => { - if (typeof n2 !== "number" || !Number.isInteger(n2)) { +var validatePositiveInteger = (name, n4) => { + if (typeof n4 !== "number" || !Number.isInteger(n4)) { throw new AnthropicError(`${name} must be an integer`); } - if (n2 < 0) { + if (n4 < 0) { throw new AnthropicError(`${name} must be a positive integer`); } - return n2; + return n4; }; var castToError = (err) => { if (err instanceof Error) @@ -52854,13 +78595,13 @@ function hasOwn(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } function applyHeadersMut(targetHeaders, newHeaders) { - for (const k7 in newHeaders) { - if (!hasOwn(newHeaders, k7)) + for (const k9 in newHeaders) { + if (!hasOwn(newHeaders, k9)) continue; - const lowerKey = k7.toLowerCase(); + const lowerKey = k9.toLowerCase(); if (!lowerKey) continue; - const val = newHeaders[k7]; + const val = newHeaders[k9]; if (val === null) { delete targetHeaders[lowerKey]; } else if (val !== void 0) { @@ -52874,10 +78615,10 @@ function debug(action, ...args) { } } var uuid4 = () => { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c3) => { - const r3 = Math.random() * 16 | 0; - const v5 = c3 === "x" ? r3 : r3 & 3 | 8; - return v5.toString(16); + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c5) => { + const r5 = Math.random() * 16 | 0; + const v8 = c5 === "x" ? r5 : r5 & 3 | 8; + return v8.toString(16); }); }; @@ -52903,16 +78644,16 @@ var Completions = class extends APIResource { })(Completions || (Completions = {})); // node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs -var __classPrivateFieldSet6 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet6 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet7 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet7 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _MessageStream_instances; var _MessageStream_currentMessageSnapshot; @@ -53082,7 +78823,7 @@ var MessageStream = class _MessageStream { const listeners = __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event]; if (!listeners) return this; - const index = listeners.findIndex((l3) => l3.listener === listener); + const index = listeners.findIndex((l5) => l5.listener === listener); if (index >= 0) listeners.splice(index, 1); return this; @@ -53149,7 +78890,7 @@ var MessageStream = class _MessageStream { } const listeners = __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event]; if (listeners) { - __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once); + __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event] = listeners.filter((l5) => !l5.once); listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { @@ -53484,9 +79225,9 @@ function bind(fn, thisArg) { var { toString } = Object.prototype; var { getPrototypeOf } = Object; var { iterator, toStringTag } = Symbol; -var kindOf = /* @__PURE__ */ ((cache) => (thing) => { +var kindOf = /* @__PURE__ */ ((cache3) => (thing) => { const str2 = toString.call(thing); - return cache[str2] || (cache[str2] = str2.slice(8, -1).toLowerCase()); + return cache3[str2] || (cache3[str2] = str2.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); var kindOfTest = (type2) => { type2 = type2.toLowerCase(); @@ -53522,7 +79263,7 @@ var isPlainObject3 = (val) => { }; var isDate = kindOfTest("Date"); var isFile2 = kindOfTest("File"); -var isBlob2 = kindOfTest("Blob"); +var isBlob3 = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream2 = (val) => isObject(val) && isFunction3(val.pipe); var isFormData2 = (thing) => { @@ -53531,27 +79272,27 @@ var isFormData2 = (thing) => { kind3 === "object" && isFunction3(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); -var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); +var [isReadableStream2, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); var trim = (str2) => str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function forEach(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") { return; } - let i3; - let l3; + let i5; + let l5; if (typeof obj !== "object") { obj = [obj]; } if (isArray(obj)) { - for (i3 = 0, l3 = obj.length; i3 < l3; i3++) { - fn.call(null, obj[i3], i3, obj); + for (i5 = 0, l5 = obj.length; i5 < l5; i5++) { + fn.call(null, obj[i5], i5, obj); } } else { const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; let key; - for (i3 = 0; i3 < len; i3++) { - key = keys[i3]; + for (i5 = 0; i5 < len; i5++) { + key = keys[i5]; fn.call(null, obj[key], key, obj); } } @@ -53559,10 +79300,10 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) { function findKey(obj, key) { key = key.toLowerCase(); const keys = Object.keys(obj); - let i3 = keys.length; + let i5 = keys.length; let _key; - while (i3-- > 0) { - _key = keys[i3]; + while (i5-- > 0) { + _key = keys[i5]; if (key === _key.toLowerCase()) { return _key; } @@ -53589,20 +79330,20 @@ function merge() { result[targetKey] = val; } }; - for (let i3 = 0, l3 = arguments.length; i3 < l3; i3++) { - arguments[i3] && forEach(arguments[i3], assignValue); + for (let i5 = 0, l5 = arguments.length; i5 < l5; i5++) { + arguments[i5] && forEach(arguments[i5], assignValue); } return result; } -var extend = (a4, b7, thisArg, { allOwnKeys } = {}) => { - forEach(b7, (val, key) => { +var extend = (a6, b9, thisArg, { allOwnKeys } = {}) => { + forEach(b9, (val, key) => { if (thisArg && isFunction3(val)) { - a4[key] = bind(val, thisArg); + a6[key] = bind(val, thisArg); } else { - a4[key] = val; + a6[key] = val; } }, { allOwnKeys }); - return a4; + return a6; }; var stripBOM = (content) => { if (content.charCodeAt(0) === 65279) { @@ -53620,16 +79361,16 @@ var inherits = (constructor, superConstructor, props, descriptors3) => { }; var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { let props; - let i3; + let i5; let prop; const merged = {}; destObj = destObj || {}; if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); - i3 = props.length; - while (i3-- > 0) { - prop = props[i3]; + i5 = props.length; + while (i5-- > 0) { + prop = props[i5]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; @@ -53651,11 +79392,11 @@ var endsWith = (str2, searchString, position) => { var toArray = (thing) => { if (!thing) return null; if (isArray(thing)) return thing; - let i3 = thing.length; - if (!isNumber(i3)) return null; - const arr = new Array(i3); - while (i3-- > 0) { - arr[i3] = thing[i3]; + let i5 = thing.length; + if (!isNumber(i5)) return null; + const arr = new Array(i5); + while (i5-- > 0) { + arr[i5] = thing[i5]; } return arr; }; @@ -53685,7 +79426,7 @@ var isHTMLForm = kindOfTest("HTMLFormElement"); var toCamelCase = (str2) => { return str2.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, - function replacer(m5, p1, p22) { + function replacer(m7, p1, p22) { return p1.toUpperCase() + p22; } ); @@ -53742,19 +79483,19 @@ function isSpecCompliantForm(thing) { } var toJSONObject = (obj) => { const stack = new Array(10); - const visit = (source, i3) => { + const visit = (source, i5) => { if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } if (!("toJSON" in source)) { - stack[i3] = source; + stack[i5] = source; const target = isArray(source) ? [] : {}; forEach(source, (value, key) => { - const reducedValue = visit(value, i3 + 1); + const reducedValue = visit(value, i5 + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); - stack[i3] = void 0; + stack[i5] = void 0; return target; } } @@ -53796,14 +79537,14 @@ var utils_default = { isBoolean, isObject, isPlainObject: isPlainObject3, - isReadableStream, + isReadableStream: isReadableStream2, isRequest, isResponse, isHeaders, isUndefined, isDate, isFile: isFile2, - isBlob: isBlob2, + isBlob: isBlob3, isRegExp, isFunction: isFunction3, isStream: isStream2, @@ -53933,9 +79674,9 @@ function removeBrackets(key) { } function renderKey(path5, key, dots) { if (!path5) return key; - return path5.concat(key).map(function each(token, i3) { + return path5.concat(key).map(function each(token, i5) { token = removeBrackets(token); - return !dots && i3 ? "[" + token + "]" : token; + return !dots && i5 ? "[" + token + "]" : token; }).join(dots ? "." : ""); } function isFlatArray(arr) { @@ -54155,9 +79896,9 @@ var InterceptorManager = class { * @returns {void} */ forEach(fn) { - utils_default.forEach(this.handlers, function forEachHandler(h4) { - if (h4 !== null) { - fn(h4); + utils_default.forEach(this.handlers, function forEachHandler(h6) { + if (h6 !== null) { + fn(h6); } }); } @@ -54191,8 +79932,8 @@ var generateString = (size = 16, alphabet2 = ALPHABET.ALPHA_DIGIT) => { const { length } = alphabet2; const randomValues = new Uint32Array(size); import_crypto.default.randomFillSync(randomValues); - for (let i3 = 0; i3 < size; i3++) { - str2 += alphabet2[randomValues[i3] % length]; + for (let i5 = 0; i5 < size; i5++) { + str2 += alphabet2[randomValues[i5] % length]; } return str2; }; @@ -54254,11 +79995,11 @@ function parsePropPath(name) { function arrayToObject(arr) { const obj = {}; const keys = Object.keys(arr); - let i3; + let i5; const len = keys.length; let key; - for (i3 = 0; i3 < len; i3++) { - key = keys[i3]; + for (i5 = 0; i5 < len; i5++) { + key = keys[i5]; obj[key] = arr[key]; } return obj; @@ -54304,9 +80045,9 @@ function stringifySafely(rawValue, parser, encoder) { try { (parser || JSON.parse)(rawValue); return utils_default.trim(rawValue); - } catch (e3) { - if (e3.name !== "SyntaxError") { - throw e3; + } catch (e5) { + if (e5.name !== "SyntaxError") { + throw e5; } } } @@ -54368,12 +80109,12 @@ var defaults = { const strictJSONParsing = !silentJSONParsing && JSONRequested; try { return JSON.parse(data); - } catch (e3) { + } catch (e5) { if (strictJSONParsing) { - if (e3.name === "SyntaxError") { - throw AxiosError_default.from(e3, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + if (e5.name === "SyntaxError") { + throw AxiosError_default.from(e5, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); } - throw e3; + throw e5; } } } @@ -54431,11 +80172,11 @@ var parseHeaders_default = (rawHeaders) => { const parsed = {}; let key; let val; - let i3; + let i5; rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { - i3 = line.indexOf(":"); - key = line.substring(0, i3).trim().toLowerCase(); - val = line.substring(i3 + 1).trim(); + i5 = line.indexOf(":"); + key = line.substring(0, i5).trim().toLowerCase(); + val = line.substring(i5 + 1).trim(); if (!key || parsed[key] && ignoreDuplicateOf[key]) { return; } @@ -54489,7 +80230,7 @@ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) { } } function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w7, char, str2) => { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w9, char, str2) => { return char.toUpperCase() + str2; }); } @@ -54591,10 +80332,10 @@ var AxiosHeaders = class { } clear(matcher) { const keys = Object.keys(this); - let i3 = keys.length; + let i5 = keys.length; let deleted = false; - while (i3--) { - const key = keys[i3]; + while (i5--) { + const key = keys[i5]; if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; @@ -55063,11 +80804,11 @@ function speedometer(samplesCount, min) { } bytes[head] = chunkLength; timestamps[head] = now; - let i3 = tail; + let i5 = tail; let bytesCount = 0; - while (i3 !== head) { - bytesCount += bytes[i3++]; - i3 = i3 % samplesCount; + while (i5 !== head) { + bytesCount += bytes[i5++]; + i5 = i5 % samplesCount; } head = (head + 1) % samplesCount; if (head === tail) { @@ -55121,9 +80862,9 @@ var throttle_default = throttle; var progressEventReducer = (listener, isDownloadStream, freq = 3) => { let bytesNotified = 0; const _speedometer = speedometer_default(50, 250); - return throttle_default((e3) => { - const loaded = e3.loaded; - const total = e3.lengthComputable ? e3.total : void 0; + return throttle_default((e5) => { + const loaded = e5.loaded; + const total = e5.lengthComputable ? e5.total : void 0; const progressBytes = loaded - bytesNotified; const rate = _speedometer(progressBytes); const inRange = loaded <= total; @@ -55135,7 +80876,7 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => { bytes: progressBytes, rate: rate ? rate : void 0, estimated: rate && total && inRange ? (total - loaded) / rate : void 0, - event: e3, + event: e5, lengthComputable: total != null, [isDownloadStream ? "download" : "upload"]: true }; @@ -55353,7 +81094,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config7) { try { const knownLength = await import_util4.default.promisify(data.getLength).call(data); Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - } catch (e3) { + } catch (e5) { } } } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { @@ -55710,30 +81451,30 @@ function mergeConfig(config1, config22) { } return source; } - function mergeDeepProperties(a4, b7, prop, caseless) { - if (!utils_default.isUndefined(b7)) { - return getMergedValue(a4, b7, prop, caseless); - } else if (!utils_default.isUndefined(a4)) { - return getMergedValue(void 0, a4, prop, caseless); + function mergeDeepProperties(a6, b9, prop, caseless) { + if (!utils_default.isUndefined(b9)) { + return getMergedValue(a6, b9, prop, caseless); + } else if (!utils_default.isUndefined(a6)) { + return getMergedValue(void 0, a6, prop, caseless); } } - function valueFromConfig2(a4, b7) { - if (!utils_default.isUndefined(b7)) { - return getMergedValue(void 0, b7); + function valueFromConfig2(a6, b9) { + if (!utils_default.isUndefined(b9)) { + return getMergedValue(void 0, b9); } } - function defaultToConfig2(a4, b7) { - if (!utils_default.isUndefined(b7)) { - return getMergedValue(void 0, b7); - } else if (!utils_default.isUndefined(a4)) { - return getMergedValue(void 0, a4); + function defaultToConfig2(a6, b9) { + if (!utils_default.isUndefined(b9)) { + return getMergedValue(void 0, b9); + } else if (!utils_default.isUndefined(a6)) { + return getMergedValue(void 0, a6); } } - function mergeDirectKeys(a4, b7, prop) { + function mergeDirectKeys(a6, b9, prop) { if (prop in config22) { - return getMergedValue(a4, b7); + return getMergedValue(a6, b9); } else if (prop in config1) { - return getMergedValue(void 0, a4); + return getMergedValue(void 0, a6); } } const mergeMap = { @@ -55765,7 +81506,7 @@ function mergeConfig(config1, config22) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a4, b7, prop) => mergeDeepProperties(headersToObject(a4), headersToObject(b7), prop, true) + headers: (a6, b9, prop) => mergeDeepProperties(headersToObject(a6), headersToObject(b9), prop, true) }; utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; @@ -56013,10 +81754,10 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => { const iterator2 = readBytes(stream4, chunkSize); let bytes = 0; let done; - let _onFinish = (e3) => { + let _onFinish = (e5) => { if (!done) { done = true; - onFinish && onFinish(e3); + onFinish && onFinish(e5); } }; return new ReadableStream({ @@ -56055,7 +81796,7 @@ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__ var test = (fn, ...args) => { try { return !!fn(...args); - } catch (e3) { + } catch (e5) { return false; } }; @@ -56078,7 +81819,7 @@ var resolvers = { }; isFetchSupported && ((res) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => { - !resolvers[type2] && (resolvers[type2] = utils_default.isFunction(res[type2]) ? (res2) => res2[type2]() : (_7, config7) => { + !resolvers[type2] && (resolvers[type2] = utils_default.isFunction(res[type2]) ? (res2) => res2[type2]() : (_8, config7) => { throw new AxiosError_default(`Response type '${type2}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config7); }); }); @@ -56222,7 +81963,7 @@ utils_default.forEach(knownAdapters, (fn, value) => { if (fn) { try { Object.defineProperty(fn, "name", { value }); - } catch (e3) { + } catch (e5) { } Object.defineProperty(fn, "adapterName", { value }); } @@ -56236,8 +81977,8 @@ var adapters_default = { let nameOrAdapter; let adapter; const rejectedReasons = {}; - for (let i3 = 0; i3 < length; i3++) { - nameOrAdapter = adapters[i3]; + for (let i5 = 0; i5 < length; i5++) { + nameOrAdapter = adapters[i5]; let id; adapter = nameOrAdapter; if (!isResolvedHandle(nameOrAdapter)) { @@ -56249,15 +81990,15 @@ var adapters_default = { if (adapter) { break; } - rejectedReasons[id || "#" + i3] = adapter; + rejectedReasons[id || "#" + i5] = adapter; } if (!adapter) { const reasons = Object.entries(rejectedReasons).map( - ([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build") + ([id, state3]) => `adapter ${id} ` + (state3 === false ? "is not supported by the environment" : "is not available in the build") ); - let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + let s4 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; throw new AxiosError_default( - `There is no suitable adapter to dispatch the request ` + s2, + `There is no suitable adapter to dispatch the request ` + s4, "ERR_NOT_SUPPORT" ); } @@ -56313,29 +82054,29 @@ function dispatchRequest(config7) { // node_modules/axios/lib/helpers/validator.js var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i3) => { +["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i5) => { validators[type2] = function validator(thing) { - return typeof thing === type2 || "a" + (i3 < 1 ? "n " : " ") + type2; + return typeof thing === type2 || "a" + (i5 < 1 ? "n " : " ") + type2; }; }); var deprecatedWarnings = {}; -validators.transitional = function transitional(validator, version, message) { +validators.transitional = function transitional(validator, version3, message) { function formatMessage(opt, desc) { return "[Axios v" + VERSION2 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : ""); } return (value, opt, opts) => { if (validator === false) { throw new AxiosError_default( - formatMessage(opt, " has been removed" + (version ? " in " + version : "")), + formatMessage(opt, " has been removed" + (version3 ? " in " + version3 : "")), AxiosError_default.ERR_DEPRECATED ); } - if (version && !deprecatedWarnings[opt]) { + if (version3 && !deprecatedWarnings[opt]) { deprecatedWarnings[opt] = true; console.warn( formatMessage( opt, - " has been deprecated since v" + version + " and will be removed in the near future" + " has been deprecated since v" + version3 + " and will be removed in the near future" ) ); } @@ -56353,9 +82094,9 @@ function assertOptions(options, schema, allowUnknown) { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); - let i3 = keys.length; - while (i3-- > 0) { - const opt = keys[i3]; + let i5 = keys.length; + while (i5-- > 0) { + const opt = keys[i5]; const validator = schema[opt]; if (validator) { const value = options[opt]; @@ -56407,7 +82148,7 @@ var Axios = class { } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { err.stack += "\n" + stack; } - } catch (e3) { + } catch (e5) { } } throw err; @@ -56477,7 +82218,7 @@ var Axios = class { responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); }); let promise; - let i3 = 0; + let i5 = 0; let len; if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), void 0]; @@ -56485,17 +82226,17 @@ var Axios = class { chain.push.apply(chain, responseInterceptorChain); len = chain.length; promise = Promise.resolve(config7); - while (i3 < len) { - promise = promise.then(chain[i3++], chain[i3++]); + while (i5 < len) { + promise = promise.then(chain[i5++], chain[i5++]); } return promise; } len = requestInterceptorChain.length; let newConfig = config7; - i3 = 0; - while (i3 < len) { - const onFulfilled = requestInterceptorChain[i3++]; - const onRejected = requestInterceptorChain[i3++]; + i5 = 0; + while (i5 < len) { + const onFulfilled = requestInterceptorChain[i5++]; + const onRejected = requestInterceptorChain[i5++]; try { newConfig = onFulfilled(newConfig); } catch (error) { @@ -56508,10 +82249,10 @@ var Axios = class { } catch (error) { return Promise.reject(error); } - i3 = 0; + i5 = 0; len = responseInterceptorChain.length; - while (i3 < len) { - promise = promise.then(responseInterceptorChain[i3++], responseInterceptorChain[i3++]); + while (i5 < len) { + promise = promise.then(responseInterceptorChain[i5++], responseInterceptorChain[i5++]); } return promise; } @@ -56561,9 +82302,9 @@ var CancelToken = class _CancelToken { const token = this; this.promise.then((cancel) => { if (!token._listeners) return; - let i3 = token._listeners.length; - while (i3-- > 0) { - token._listeners[i3](cancel); + let i5 = token._listeners.length; + while (i5-- > 0) { + token._listeners[i5](cancel); } token._listeners = null; }); @@ -56635,8 +82376,8 @@ var CancelToken = class _CancelToken { */ static source() { let cancel; - const token = new _CancelToken(function executor(c3) { - cancel = c3; + const token = new _CancelToken(function executor(c5) { + cancel = c5; }); return { token, @@ -56792,24 +82533,24 @@ function removeContentTags(content, tag) { let result = ""; let skipUntil = null; let depth = 0; - for (let i3 = 0; i3 < content.length; i3++) { - if (content.substring(i3, i3 + openTag.length) === openTag) { + for (let i5 = 0; i5 < content.length; i5++) { + if (content.substring(i5, i5 + openTag.length) === openTag) { depth++; if (depth === 1) { - skipUntil = content.indexOf(closeTag, i3 + openTag.length); - i3 = i3 + openTag.length - 1; + skipUntil = content.indexOf(closeTag, i5 + openTag.length); + i5 = i5 + openTag.length - 1; continue; } - } else if (content.substring(i3, i3 + closeTag.length) === closeTag && depth > 0) { + } else if (content.substring(i5, i5 + closeTag.length) === closeTag && depth > 0) { depth--; if (depth === 0) { - i3 = i3 + closeTag.length - 1; + i5 = i5 + closeTag.length - 1; skipUntil = null; continue; } } if (skipUntil === null) { - result += content[i3]; + result += content[i5]; } } result = result.replace(/[ \t]+/g, " ").trim(); @@ -56849,7 +82590,7 @@ var AnthropicEngine = class { max_tokens: this.config.maxTokensOutput }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a4, b7) => a4 + b7, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); } @@ -56930,24 +82671,24 @@ function isObject2(input) { } // node_modules/@azure/core-util/dist/esm/error.js -function isError(e3) { - if (isObject2(e3)) { - const hasName = typeof e3.name === "string"; - const hasMessage = typeof e3.message === "string"; +function isError(e5) { + if (isObject2(e5)) { + const hasName = typeof e5.name === "string"; + const hasMessage = typeof e5.message === "string"; return hasName && hasMessage; } return false; } -function getErrorMessage(e3) { - if (isError(e3)) { - return e3.message; +function getErrorMessage(e5) { + if (isError(e5)) { + return e5.message; } else { let stringified; try { - if (typeof e3 === "object" && e3) { - stringified = JSON.stringify(e3); + if (typeof e5 === "object" && e5) { + stringified = JSON.stringify(e5); } else { - stringified = String(e3); + stringified = String(e5); } } catch (err) { stringified = "[unable to stringify input]"; @@ -56988,92 +82729,16 @@ function isTokenCredential(credential) { return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); } -// node_modules/tslib/tslib.es6.mjs -function __rest(s2, e3) { - var t2 = {}; - for (var p4 in s2) if (Object.prototype.hasOwnProperty.call(s2, p4) && e3.indexOf(p4) < 0) - t2[p4] = s2[p4]; - if (s2 != null && typeof Object.getOwnPropertySymbols === "function") - for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s2); i3 < p4.length; i3++) { - if (e3.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p4[i3])) - t2[p4[i3]] = s2[p4[i3]]; - } - return t2; -} -function __values(o3) { - var s2 = typeof Symbol === "function" && Symbol.iterator, m5 = s2 && o3[s2], i3 = 0; - if (m5) return m5.call(o3); - if (o3 && typeof o3.length === "number") return { - next: function() { - if (o3 && i3 >= o3.length) o3 = void 0; - return { value: o3 && o3[i3++], done: !o3 }; - } - }; - throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __await(v5) { - return this instanceof __await ? (this.v = v5, this) : new __await(v5); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g4 = generator.apply(thisArg, _arguments || []), i3, q6 = []; - return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { - return this; - }, i3; - function verb(n2) { - if (g4[n2]) i3[n2] = function(v5) { - return new Promise(function(a4, b7) { - q6.push([n2, v5, a4, b7]) > 1 || resume(n2, v5); - }); - }; - } - function resume(n2, v5) { - try { - step(g4[n2](v5)); - } catch (e3) { - settle2(q6[0][3], e3); - } - } - function step(r3) { - r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q6[0][2], r3); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle2(f4, v5) { - if (f4(v5), q6.shift(), q6.length) resume(q6[0][0], q6[0][1]); - } -} -function __asyncValues(o3) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m5 = o3[Symbol.asyncIterator], i3; - return m5 ? m5.call(o3) : (o3 = typeof __values === "function" ? __values(o3) : o3[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { - return this; - }, i3); - function verb(n2) { - i3[n2] = o3[n2] && function(v5) { - return new Promise(function(resolve, reject) { - v5 = o3[n2](v5), settle2(resolve, reject, v5.done, v5.value); - }); - }; - } - function settle2(resolve, reject, d7, v5) { - Promise.resolve(v5).then(function(v6) { - resolve({ value: v6, done: d7 }); - }, reject); - } -} +// node_modules/@azure/openai/dist-esm/src/OpenAIClient.js +init_tslib_es6(); // node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); var HttpPipeline = class _HttpPipeline { constructor(policies) { - var _a5; + var _a6; this._policies = []; - this._policies = (_a5 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a5 !== void 0 ? _a5 : []; + this._policies = (_a6 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a6 !== void 0 ? _a6 : []; this._orderedPolicies = void 0; } addPolicy(policy, options = {}) { @@ -57368,9 +83033,9 @@ function setLogLevel(level) { } azureLogLevel = level; const enabledNamespaces2 = []; - for (const logger3 of registeredLoggers) { - if (shouldEnable(logger3)) { - enabledNamespaces2.push(logger3.namespace); + for (const logger5 of registeredLoggers) { + if (shouldEnable(logger5)) { + enabledNamespaces2.push(logger5.namespace); } } debug_default.enable(enabledNamespaces2.join(",")); @@ -57397,26 +83062,26 @@ function patchLogMethod(parent, child) { }; } function createLogger(parent, level) { - const logger3 = Object.assign(parent.extend(level), { + const logger5 = Object.assign(parent.extend(level), { level }); - patchLogMethod(parent, logger3); - if (shouldEnable(logger3)) { + patchLogMethod(parent, logger5); + if (shouldEnable(logger5)) { const enabledNamespaces2 = debug_default.disable(); - debug_default.enable(enabledNamespaces2 + "," + logger3.namespace); + debug_default.enable(enabledNamespaces2 + "," + logger5.namespace); } - registeredLoggers.add(logger3); - return logger3; + registeredLoggers.add(logger5); + return logger5; } -function shouldEnable(logger3) { - return Boolean(azureLogLevel && levelMap[logger3.level] <= levelMap[azureLogLevel]); +function shouldEnable(logger5) { + return Boolean(azureLogLevel && levelMap[logger5.level] <= levelMap[azureLogLevel]); } function isAzureLogLevel(logLevel) { return AZURE_LOG_LEVELS.includes(logLevel); } // node_modules/@azure/core-rest-pipeline/dist/esm/log.js -var logger = createClientLogger("core-rest-pipeline"); +var logger2 = createClientLogger("core-rest-pipeline"); // node_modules/@azure/core-rest-pipeline/dist/esm/util/sanitizer.js var RedactedString = "REDACTED"; @@ -57466,8 +83131,8 @@ var Sanitizer = class { constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n2) => n2.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p4) => p4.toLowerCase())); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n4) => n4.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p6) => p6.toLowerCase())); } sanitize(obj) { const seen = /* @__PURE__ */ new Set(); @@ -57512,11 +83177,11 @@ var Sanitizer = class { return value; } const sanitized = {}; - for (const k7 of Object.keys(value)) { - if (this.allowedQueryParameters.has(k7.toLowerCase())) { - sanitized[k7] = value[k7]; + for (const k9 of Object.keys(value)) { + if (this.allowedQueryParameters.has(k9.toLowerCase())) { + sanitized[k9] = value[k9]; } else { - sanitized[k7] = RedactedString; + sanitized[k9] = RedactedString; } } return sanitized; @@ -57541,8 +83206,8 @@ var Sanitizer = class { // node_modules/@azure/core-rest-pipeline/dist/esm/policies/logPolicy.js var logPolicyName = "logPolicy"; function logPolicy(options = {}) { - var _a5; - const logger3 = (_a5 = options.logger) !== null && _a5 !== void 0 ? _a5 : logger.info; + var _a6; + const logger5 = (_a6 = options.logger) !== null && _a6 !== void 0 ? _a6 : logger2.info; const sanitizer = new Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters @@ -57550,13 +83215,13 @@ function logPolicy(options = {}) { return { name: logPolicyName, async sendRequest(request3, next) { - if (!logger3.enabled) { + if (!logger5.enabled) { return next(request3); } - logger3(`Request: ${sanitizer.sanitize(request3)}`); + logger5(`Request: ${sanitizer.sanitize(request3)}`); const response = await next(request3); - logger3(`Response status code: ${response.status}`); - logger3(`Headers: ${sanitizer.sanitize(response.headers)}`); + logger5(`Response status code: ${response.status}`); + logger5(`Headers: ${sanitizer.sanitize(response.headers)}`); return response; } }; @@ -57599,16 +83264,16 @@ var process8 = __toESM(require("node:process"), 1); function getHeaderName() { return "User-Agent"; } -function setPlatformSpecificData(map) { +function setPlatformSpecificData(map2) { const versions2 = process8.versions; if (versions2.bun) { - map.set("Bun", versions2.bun); + map2.set("Bun", versions2.bun); } else if (versions2.deno) { - map.set("Deno", versions2.deno); + map2.set("Deno", versions2.deno); } else if (versions2.node) { - map.set("Node", versions2.node); + map2.set("Node", versions2.node); } - map.set("OS", `(${os3.arch()}-${os3.type()}-${os3.release()})`); + map2.set("OS", `(${os3.arch()}-${os3.type()}-${os3.release()})`); } // node_modules/@azure/core-rest-pipeline/dist/esm/constants.js @@ -57653,11 +83318,12 @@ function userAgentPolicy(options = {}) { } // node_modules/@azure/core-rest-pipeline/dist/esm/util/concat.js +init_tslib_es6(); var import_node_stream2 = require("node:stream"); // node_modules/@azure/core-rest-pipeline/dist/esm/util/typeGuards.js -function isBlob3(x5) { - return typeof x5.stream === "function"; +function isBlob4(x7) { + return typeof x7.stream === "function"; } // node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js @@ -57673,8 +83339,8 @@ var unimplementedMethods = { } }; var rawContent = Symbol("rawContent"); -function hasRawContent(x5) { - return typeof x5[rawContent] === "function"; +function hasRawContent(x7) { + return typeof x7[rawContent] === "function"; } function getRawContent(blob) { if (hasRawContent(blob)) { @@ -57684,9 +83350,9 @@ function getRawContent(blob) { } } function createFile(content, name, options = {}) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; if (isNode) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a5 = options.type) !== null && _a5 !== void 0 ? _a5 : "", lastModified: (_b2 = options.lastModified) !== null && _b2 !== void 0 ? _b2 : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c2 = options.webkitRelativePath) !== null && _c2 !== void 0 ? _c2 : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a6 = options.type) !== null && _a6 !== void 0 ? _a6 : "", lastModified: (_b2 = options.lastModified) !== null && _b2 !== void 0 ? _b2 : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c2 = options.webkitRelativePath) !== null && _c2 !== void 0 ? _c2 : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); } else { return new File([content], name, options); } @@ -57728,7 +83394,7 @@ function ensureNodeStream(stream4) { function toStream(source) { if (source instanceof Uint8Array) { return import_node_stream2.Readable.from(Buffer.from(source)); - } else if (isBlob3(source)) { + } else if (isBlob4(source)) { return toStream(getRawContent(source)); } else { return ensureNodeStream(source); @@ -57736,13 +83402,13 @@ function toStream(source) { } async function concat(sources) { return function() { - const streams = sources.map((x5) => typeof x5 === "function" ? x5() : x5).map(toStream); + const streams = sources.map((x7) => typeof x7 === "function" ? x7() : x7).map(toStream); return import_node_stream2.Readable.from(function() { return __asyncGenerator(this, arguments, function* () { - var _a5, e_1, _b2, _c2; + var _a6, e_1, _b2, _c2; for (const stream4 of streams) { try { - for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream4)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a5 = stream_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream4)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a6 = stream_1_1.done, !_a6; _d2 = true) { _c2 = stream_1_1.value; _d2 = false; const chunk = _c2; @@ -57752,7 +83418,7 @@ async function concat(sources) { e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1)); + if (!_d2 && !_a6 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1)); } finally { if (e_1) throw e_1.error; } @@ -57778,7 +83444,7 @@ function encodeHeaders(headers) { function getLength(source) { if (source instanceof Uint8Array) { return source.byteLength; - } else if (isBlob3(source)) { + } else if (isBlob4(source)) { return source.size === -1 ? void 0 : source.size; } else { return void 0; @@ -57822,7 +83488,7 @@ function assertValidBoundary(boundary) { if (boundary.length > maxBoundaryLength) { throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); } - if (Array.from(boundary).some((x5) => !validBoundaryCharacters.has(x5))) { + if (Array.from(boundary).some((x7) => !validBoundaryCharacters.has(x7))) { throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); } } @@ -57830,7 +83496,7 @@ function multipartPolicy() { return { name: multipartPolicyName, async sendRequest(request3, next) { - var _a5; + var _a6; if (!request3.multipartBody) { return next(request3); } @@ -57838,7 +83504,7 @@ function multipartPolicy() { throw new Error("multipartBody and regular body cannot be set at the same time"); } let boundary = request3.multipartBody.boundary; - const contentTypeHeader = (_a5 = request3.headers.get("Content-Type")) !== null && _a5 !== void 0 ? _a5 : "multipart/mixed"; + const contentTypeHeader = (_a6 = request3.headers.get("Content-Type")) !== null && _a6 !== void 0 ? _a6 : "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}`); @@ -57938,7 +83604,7 @@ function getRetryAfterInMs(response) { const date = Date.parse(retryAfterHeader); const diff = date - Date.now(); return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (e3) { + } catch (e5) { return void 0; } } @@ -57964,8 +83630,8 @@ function throttlingRetryStrategy() { var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; function exponentialRetryStrategy(options = {}) { - var _a5, _b2; - const retryInterval = (_a5 = options.retryDelayInMs) !== null && _a5 !== void 0 ? _a5 : DEFAULT_CLIENT_RETRY_INTERVAL; + var _a6, _b2; + const retryInterval = (_a6 = options.retryDelayInMs) !== null && _a6 !== void 0 ? _a6 : DEFAULT_CLIENT_RETRY_INTERVAL; const maxRetryInterval = (_b2 = options.maxRetryDelayInMs) !== null && _b2 !== void 0 ? _b2 : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; let retryAfterInMs = retryInterval; return { @@ -58003,11 +83669,11 @@ function isSystemError(err) { var retryPolicyLogger = createClientLogger("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) { - const logger3 = options.logger || retryPolicyLogger; + const logger5 = options.logger || retryPolicyLogger; return { name: retryPolicyName, async sendRequest(request3, next) { - var _a5, _b2; + var _a6, _b2; let response; let responseError; let retryCount = -1; @@ -58016,24 +83682,24 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO response = void 0; responseError = void 0; try { - logger3.info(`Retry ${retryCount}: Attempting to send request`, request3.requestId); + logger5.info(`Retry ${retryCount}: Attempting to send request`, request3.requestId); response = await next(request3); - logger3.info(`Retry ${retryCount}: Received a response from request`, request3.requestId); - } catch (e3) { - logger3.error(`Retry ${retryCount}: Received an error from request`, request3.requestId); - responseError = e3; - if (!e3 || responseError.name !== "RestError") { - throw e3; + logger5.info(`Retry ${retryCount}: Received a response from request`, request3.requestId); + } catch (e5) { + logger5.error(`Retry ${retryCount}: Received an error from request`, request3.requestId); + responseError = e5; + if (!e5 || responseError.name !== "RestError") { + throw e5; } response = responseError.response; } - if ((_a5 = request3.abortSignal) === null || _a5 === void 0 ? void 0 : _a5.aborted) { - logger3.error(`Retry ${retryCount}: Request aborted.`); + if ((_a6 = request3.abortSignal) === null || _a6 === void 0 ? void 0 : _a6.aborted) { + logger5.error(`Retry ${retryCount}: Request aborted.`); const abortError = new AbortError(); throw abortError; } if (retryCount >= ((_b2 = options.maxRetries) !== null && _b2 !== void 0 ? _b2 : DEFAULT_RETRY_POLICY_COUNT)) { - logger3.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + logger5.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) { throw responseError; } else if (response) { @@ -58042,7 +83708,7 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO throw new Error("Maximum retries reached with no response or error to throw"); } } - logger3.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + logger5.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); strategiesLoop: for (const strategy of strategies) { const strategyLogger = strategy.logger || retryPolicyLogger; strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); @@ -58072,11 +83738,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO } } if (responseError) { - logger3.info(`None of the retry strategies could work with the received error. Throwing it.`); + logger5.info(`None of the retry strategies could work with the received error. Throwing it.`); throw responseError; } if (response) { - logger3.info(`None of the retry strategies could work with the received response. Returning it.`); + logger5.info(`None of the retry strategies could work with the received response. Returning it.`); return response; } } @@ -58087,11 +83753,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO // node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js var defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { - var _a5; + var _a6; return { name: defaultRetryPolicyName, sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], { - maxRetries: (_a5 = options.maxRetries) !== null && _a5 !== void 0 ? _a5 : DEFAULT_RETRY_POLICY_COUNT + maxRetries: (_a6 = options.maxRetries) !== null && _a6 !== void 0 ? _a6 : DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } @@ -58100,8 +83766,8 @@ function defaultRetryPolicy(options = {}) { function normalizeName(name) { return name.toLowerCase(); } -function* headerIterator(map) { - for (const entry of map.values()) { +function* headerIterator(map2) { + for (const entry of map2.values()) { yield [entry.name, entry.value]; } } @@ -58129,8 +83795,8 @@ var HttpHeadersImpl = class { * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a5; - return (_a5 = this._headersMap.get(normalizeName(name))) === null || _a5 === void 0 ? void 0 : _a5.value; + var _a6; + return (_a6 = this._headersMap.get(normalizeName(name))) === null || _a6 === void 0 ? void 0 : _a6.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -58334,7 +84000,7 @@ function setProxyAgentOnRequest(request3, cachedAgents, proxyUrl) { const url2 = new URL(request3.url); const isInsecure = url2.protocol !== "https:"; if (request3.tlsSettings) { - logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + logger2.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } const headers = request3.headers.toJSON(); if (isInsecure) { @@ -58358,8 +84024,8 @@ function proxyPolicy(proxySettings, options) { return { name: proxyPolicyName, async sendRequest(request3, next) { - var _a5; - if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a5 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a5 !== void 0 ? _a5 : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + var _a6; + if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a6 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a6 !== void 0 ? _a6 : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request3, cachedAgents, defaultProxy); } else if (request3.proxySettings) { setProxyAgentOnRequest(request3, cachedAgents, getUrlFromProxySettings(request3.proxySettings)); @@ -58479,8 +84145,8 @@ function getInstrumenter() { function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a5; - const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a5 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a5 === void 0 ? void 0 : _a5.tracingContext })); + var _a6; + const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a6 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a6 === void 0 ? void 0 : _a6.tracingContext })); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(knownContextKeys.namespace)) { @@ -58552,11 +84218,11 @@ var RestError = class _RestError extends Error { }; RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; RestError.PARSE_ERROR = "PARSE_ERROR"; -function isRestError(e3) { - if (e3 instanceof RestError) { +function isRestError(e5) { + if (e5 instanceof RestError) { return true; } - return isError(e3) && e3.name === "RestError"; + return isError(e5) && e5.name === "RestError"; } // node_modules/@azure/core-rest-pipeline/dist/esm/policies/tracingPolicy.js @@ -58567,8 +84233,8 @@ function tracingPolicy(options = {}) { return { name: tracingPolicyName, async sendRequest(request3, next) { - var _a5, _b2; - if (!tracingClient || !((_a5 = request3.tracingOptions) === null || _a5 === void 0 ? void 0 : _a5.tracingContext)) { + var _a6, _b2; + if (!tracingClient || !((_a6 = request3.tracingOptions) === null || _a6 === void 0 ? void 0 : _a6.tracingContext)) { return next(request3); } const { span, tracingContext } = (_b2 = tryCreateSpan(tracingClient, request3, userAgent)) !== null && _b2 !== void 0 ? _b2 : {}; @@ -58593,8 +84259,8 @@ function tryCreateTracingClient() { packageName: "@azure/core-rest-pipeline", packageVersion: SDK_VERSION }); - } catch (e3) { - logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Error when creating the TracingClient: ${getErrorMessage(e5)}`); return void 0; } } @@ -58620,8 +84286,8 @@ function tryCreateSpan(tracingClient, request3, userAgent) { request3.headers.set(key, value); } return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } catch (e3) { - logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e5)}`); return void 0; } } @@ -58635,8 +84301,8 @@ function tryProcessError(span, error) { span.setAttribute("http.status_code", error.statusCode); } span.end(); - } catch (e3) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e5)}`); } } function tryProcessResponse(span, response) { @@ -58650,14 +84316,14 @@ function tryProcessResponse(span, response) { status: "success" }); span.end(); - } catch (e3) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e5)}`); } } // node_modules/@azure/core-rest-pipeline/dist/esm/createPipelineFromOptions.js function createPipelineFromOptions(options) { - var _a5; + var _a6; const pipeline = createEmptyPipeline(); if (isNode) { if (options.tlsOptions) { @@ -58668,7 +84334,7 @@ function createPipelineFromOptions(options) { } pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] }); pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); - pipeline.addPolicy(setClientRequestIdPolicy((_a5 = options.telemetryOptions) === null || _a5 === void 0 ? void 0 : _a5.clientRequestIdHeaderName)); + pipeline.addPolicy(setClientRequestIdPolicy((_a6 = options.telemetryOptions) === null || _a6 === void 0 ? void 0 : _a6.clientRequestIdHeaderName)); pipeline.addPolicy(multipartPolicy(), { afterPhase: "Deserialize" }); pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: "Retry" }); pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: "Retry" }); @@ -58685,7 +84351,7 @@ var https2 = __toESM(require("node:https"), 1); var zlib2 = __toESM(require("node:zlib"), 1); var import_node_stream3 = require("node:stream"); var DEFAULT_TLS_SETTINGS = {}; -function isReadableStream2(body) { +function isReadableStream3(body) { return body && typeof body.pipe === "function"; } function isStreamComplete(stream4) { @@ -58706,8 +84372,8 @@ var ReportTransform = class extends import_node_stream3.Transform { try { this.progressCallback({ loadedBytes: this.loadedBytes }); callback(); - } catch (e3) { - callback(e3); + } catch (e5) { + callback(e5); } } constructor(progressCallback) { @@ -58725,7 +84391,7 @@ var NodeHttpClient = class { * @param request - The request to be made. */ async sendRequest(request3) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; const abortController = new AbortController(); let abortListener; if (request3.abortSignal) { @@ -58758,10 +84424,10 @@ var NodeHttpClient = class { if (body && request3.onUploadProgress) { const onUploadProgress = request3.onUploadProgress; const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e3) => { - logger.error("Error in upload progress", e3); + uploadReportStream.on("error", (e5) => { + logger2.error("Error in upload progress", e5); }); - if (isReadableStream2(body)) { + if (isReadableStream3(body)) { body.pipe(uploadReportStream); } else { uploadReportStream.end(body); @@ -58770,7 +84436,7 @@ var NodeHttpClient = class { } const res = await this.makeRequest(request3, abortController, body); const headers = getResponseHeaders(res); - const status = (_a5 = res.statusCode) !== null && _a5 !== void 0 ? _a5 : 0; + const status = (_a6 = res.statusCode) !== null && _a6 !== void 0 ? _a6 : 0; const response = { status, headers, @@ -58784,8 +84450,8 @@ var NodeHttpClient = class { const onDownloadProgress = request3.onDownloadProgress; if (onDownloadProgress) { const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e3) => { - logger.error("Error in download progress", e3); + downloadReportStream.on("error", (e5) => { + logger2.error("Error in download progress", e5); }); responseStream.pipe(downloadReportStream); responseStream = downloadReportStream; @@ -58802,32 +84468,32 @@ var NodeHttpClient = class { } finally { if (request3.abortSignal && abortListener) { let uploadStreamDone = Promise.resolve(); - if (isReadableStream2(body)) { + if (isReadableStream3(body)) { uploadStreamDone = isStreamComplete(body); } let downloadStreamDone = Promise.resolve(); - if (isReadableStream2(responseStream)) { + if (isReadableStream3(responseStream)) { downloadStreamDone = isStreamComplete(responseStream); } Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a6; + var _a7; if (abortListener) { - (_a6 = request3.abortSignal) === null || _a6 === void 0 ? void 0 : _a6.removeEventListener("abort", abortListener); + (_a7 = request3.abortSignal) === null || _a7 === void 0 ? void 0 : _a7.removeEventListener("abort", abortListener); } - }).catch((e3) => { - logger.warning("Error when cleaning up abortListener on httpRequest", e3); + }).catch((e5) => { + logger2.warning("Error when cleaning up abortListener on httpRequest", e5); }); } } } makeRequest(request3, abortController, body) { - var _a5; + var _a6; const url2 = new URL(request3.url); const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request3.allowInsecureConnection) { throw new Error(`Cannot connect to ${request3.url} while allowInsecureConnection is false.`); } - const agent = (_a5 = request3.agent) !== null && _a5 !== void 0 ? _a5 : this.getOrCreateAgent(request3, isInsecure); + const agent = (_a6 = request3.agent) !== null && _a6 !== void 0 ? _a6 : this.getOrCreateAgent(request3, isInsecure); const options = { agent, hostname: url2.hostname, @@ -58839,15 +84505,15 @@ var NodeHttpClient = class { return new Promise((resolve, reject) => { const req = isInsecure ? http2.request(options, resolve) : https2.request(options, resolve); req.once("error", (err) => { - var _a6; - reject(new RestError(err.message, { code: (_a6 = err.code) !== null && _a6 !== void 0 ? _a6 : RestError.REQUEST_SEND_ERROR, request: request3 })); + var _a7; + reject(new RestError(err.message, { code: (_a7 = err.code) !== null && _a7 !== void 0 ? _a7 : RestError.REQUEST_SEND_ERROR, request: request3 })); }); abortController.signal.addEventListener("abort", () => { const abortError = new AbortError("The operation was aborted."); req.destroy(abortError); reject(abortError); }); - if (body && isReadableStream2(body)) { + if (body && isReadableStream3(body)) { body.pipe(req); } else if (body) { if (typeof body === "string" || Buffer.isBuffer(body)) { @@ -58855,7 +84521,7 @@ var NodeHttpClient = class { } else if (isArrayBuffer2(body)) { req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); } else { - logger.error("Unrecognized body type", body); + logger2.error("Unrecognized body type", body); reject(new RestError("Unrecognized body type")); } } else { @@ -58864,7 +84530,7 @@ var NodeHttpClient = class { }); } getOrCreateAgent(request3, isInsecure) { - var _a5; + var _a6; const disableKeepAlive = request3.disableKeepAlive; if (isInsecure) { if (disableKeepAlive) { @@ -58878,12 +84544,12 @@ var NodeHttpClient = class { if (disableKeepAlive && !request3.tlsSettings) { return https2.globalAgent; } - const tlsSettings = (_a5 = request3.tlsSettings) !== null && _a5 !== void 0 ? _a5 : DEFAULT_TLS_SETTINGS; + const tlsSettings = (_a6 = request3.tlsSettings) !== null && _a6 !== void 0 ? _a6 : DEFAULT_TLS_SETTINGS; let agent = this.cachedHttpsAgents.get(tlsSettings); if (agent && agent.options.keepAlive === !disableKeepAlive) { return agent; } - logger.info("No cached TLS Agent exist, creating a new Agent"); + logger2.info("No cached TLS Agent exist, creating a new Agent"); agent = new https2.Agent(Object.assign({ // keepAlive is true if disableKeepAlive is false. keepAlive: !disableKeepAlive @@ -58933,11 +84599,11 @@ function streamToText(stream4) { stream4.on("end", () => { resolve(Buffer.concat(buffer).toString("utf8")); }); - stream4.on("error", (e3) => { - if (e3 && (e3 === null || e3 === void 0 ? void 0 : e3.name) === "AbortError") { - reject(e3); + stream4.on("error", (e5) => { + if (e5 && (e5 === null || e5 === void 0 ? void 0 : e5.name) === "AbortError") { + reject(e5); } else { - reject(new RestError(`Error reading response as text: ${e3.message}`, { + reject(new RestError(`Error reading response as text: ${e5.message}`, { code: RestError.PARSE_ERROR })); } @@ -58949,7 +84615,7 @@ function getBodyLength2(body) { return 0; } else if (Buffer.isBuffer(body)) { return body.length; - } else if (isReadableStream2(body)) { + } else if (isReadableStream3(body)) { return null; } else if (isArrayBuffer2(body)) { return body.byteLength; @@ -58971,10 +84637,10 @@ function createDefaultHttpClient() { // node_modules/@azure/core-rest-pipeline/dist/esm/pipelineRequest.js var PipelineRequestImpl = class { constructor(options) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; this.url = options.url; this.body = options.body; - this.headers = (_a5 = options.headers) !== null && _a5 !== void 0 ? _a5 : createHttpHeaders(); + this.headers = (_a6 = options.headers) !== null && _a6 !== void 0 ? _a6 : createHttpHeaders(); this.method = (_b2 = options.method) !== null && _b2 !== void 0 ? _b2 : "GET"; this.timeout = (_c2 = options.timeout) !== null && _c2 !== void 0 ? _c2 : 0; this.multipartBody = options.multipartBody; @@ -59010,7 +84676,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a5) { + } catch (_a6) { return null; } } else { @@ -59045,8 +84711,8 @@ function createTokenCycler(credential, tokenCyclerOptions) { * window and not already refreshing) */ get shouldRefresh() { - var _a5; - return !cycler.isRefreshing && ((_a5 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a5 !== void 0 ? _a5 : 0) - options.refreshWindowInMs < Date.now(); + var _a6; + return !cycler.isRefreshing && ((_a6 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a6 !== void 0 ? _a6 : 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -59057,14 +84723,14 @@ function createTokenCycler(credential, tokenCyclerOptions) { } }; function refresh(scopes, getTokenOptions) { - var _a5; + var _a6; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a5 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a5 !== void 0 ? _a5 : Date.now() + (_a6 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a6 !== void 0 ? _a6 : Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -59111,10 +84777,10 @@ function getChallenge(response) { return; } function bearerTokenAuthenticationPolicy(options) { - var _a5; + var _a6; const { credential, scopes, challengeCallbacks } = options; - const logger3 = options.logger || logger; - const callbacks = Object.assign({ authorizeRequest: (_a5 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a5 !== void 0 ? _a5 : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const logger5 = options.logger || logger2; + const callbacks = Object.assign({ authorizeRequest: (_a6 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a6 !== void 0 ? _a6 : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); const getAccessToken = credential ? createTokenCycler( credential /* , options */ @@ -59142,7 +84808,7 @@ function bearerTokenAuthenticationPolicy(options) { scopes: Array.isArray(scopes) ? scopes : [scopes], request: request3, getAccessToken, - logger: logger3 + logger: logger5 }); let response; let error; @@ -59158,7 +84824,7 @@ function bearerTokenAuthenticationPolicy(options) { request: request3, response, getAccessToken, - logger: logger3 + logger: logger5 }); if (shouldSendRequest) { return next(request3); @@ -59203,7 +84869,7 @@ function keyCredentialAuthenticationPolicy(credential, apiKeyHeaderName) { // node_modules/@azure-rest/core-client/dist/esm/clientHelpers.js var cachedHttpClient; function addCredentialPipelinePolicy(pipeline, endpoint, options = {}) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const { credential, clientOptions } = options; if (!credential) { return; @@ -59211,7 +84877,7 @@ function addCredentialPipelinePolicy(pipeline, endpoint, options = {}) { if (isTokenCredential(credential)) { const tokenPolicy = bearerTokenAuthenticationPolicy({ credential, - scopes: (_b2 = (_a5 = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.credentials) === null || _a5 === void 0 ? void 0 : _a5.scopes) !== null && _b2 !== void 0 ? _b2 : `${endpoint}/.default` + scopes: (_b2 = (_a6 = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.credentials) === null || _a6 === void 0 ? void 0 : _a6.scopes) !== null && _b2 !== void 0 ? _b2 : `${endpoint}/.default` }); pipeline.addPolicy(tokenPolicy); } else if (isKeyCredential2(credential)) { @@ -59240,9 +84906,9 @@ function getCachedDefaultHttpsClient() { // node_modules/@azure-rest/core-client/dist/esm/operationOptionHelpers.js function operationOptionsToRequestParameters(options) { - var _a5, _b2, _c2, _d2, _e2, _f; + var _a6, _b2, _c2, _d2, _e2, _f; return { - allowInsecureConnection: (_a5 = options.requestOptions) === null || _a5 === void 0 ? void 0 : _a5.allowInsecureConnection, + allowInsecureConnection: (_a6 = options.requestOptions) === null || _a6 === void 0 ? void 0 : _a6.allowInsecureConnection, timeout: (_b2 = options.requestOptions) === null || _b2 === void 0 ? void 0 : _b2.timeout, skipUrlEncoding: (_c2 = options.requestOptions) === null || _c2 === void 0 ? void 0 : _c2.skipUrlEncoding, abortSignal: options.abortSignal, @@ -59255,18 +84921,18 @@ function operationOptionsToRequestParameters(options) { } // node_modules/@azure-rest/core-client/dist/esm/helpers/isReadableStream.js -function isReadableStream3(body) { +function isReadableStream4(body) { return Boolean(body) && typeof body.pipe === "function"; } // node_modules/@azure-rest/core-client/dist/esm/sendRequest.js async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { - var _a5; + var _a6; const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : getCachedDefaultHttpsClient(); const request3 = buildPipelineRequest(method, url2, options); const response = await pipeline.sendRequest(httpClient, request3); const headers = response.headers.toJSON(); - const stream4 = (_a5 = response.readableStreamBody) !== null && _a5 !== void 0 ? _a5 : response.browserStreamBody; + const stream4 = (_a6 = response.readableStreamBody) !== null && _a6 !== void 0 ? _a6 : response.browserStreamBody; const parsedBody = options.responseAsStream || stream4 !== void 0 ? void 0 : getResponseBody(response); const body = stream4 !== null && stream4 !== void 0 ? stream4 : parsedBody; if (options === null || options === void 0 ? void 0 : options.onResponse) { @@ -59280,8 +84946,8 @@ async function sendRequest(method, url2, pipeline, options = {}, customHttpClien }; } function getRequestContentType(options = {}) { - var _a5, _b2, _c2; - return (_c2 = (_a5 = options.contentType) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2["content-type"]) !== null && _c2 !== void 0 ? _c2 : getContentType(options.body); + var _a6, _b2, _c2; + return (_c2 = (_a6 = options.contentType) !== null && _a6 !== void 0 ? _a6 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2["content-type"]) !== null && _c2 !== void 0 ? _c2 : getContentType(options.body); } function getContentType(body) { if (ArrayBuffer.isView(body)) { @@ -59298,11 +84964,11 @@ function getContentType(body) { return "application/json; charset=UTF-8"; } function buildPipelineRequest(method, url2, options = {}) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; const requestContentType = getRequestContentType(options); const { body, formData } = getRequestBody(options.body, requestContentType); const hasContent = body !== void 0 || formData !== void 0; - const headers = createHttpHeaders(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c2 = (_a5 = options.accept) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2.accept) !== null && _c2 !== void 0 ? _c2 : "application/json" }), hasContent && requestContentType && { + const headers = createHttpHeaders(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c2 = (_a6 = options.accept) !== null && _a6 !== void 0 ? _a6 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2.accept) !== null && _c2 !== void 0 ? _c2 : "application/json" }), hasContent && requestContentType && { "content-type": requestContentType })); return createPipelineRequest({ @@ -59325,7 +84991,7 @@ function getRequestBody(body, contentType = "") { if (body === void 0) { return { body: void 0 }; } - if (isReadableStream3(body)) { + if (isReadableStream4(body)) { return { body }; } const firstType = contentType.split(";")[0]; @@ -59366,8 +85032,8 @@ function processFormData(formData) { return processedFormData; } function getResponseBody(response) { - var _a5, _b2; - const contentType = (_a5 = response.headers.get("content-type")) !== null && _a5 !== void 0 ? _a5 : ""; + var _a6, _b2; + const contentType = (_a6 = response.headers.get("content-type")) !== null && _a6 !== void 0 ? _a6 : ""; const firstType = contentType.split(";")[0]; const bodyToParse = (_b2 = response.bodyAsText) !== null && _b2 !== void 0 ? _b2 : ""; if (firstType === "text/plain") { @@ -59383,9 +85049,9 @@ function getResponseBody(response) { } } function createParseError(response, err) { - var _a5; + var _a6; const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; - const errCode = (_a5 = err.code) !== null && _a5 !== void 0 ? _a5 : RestError.PARSE_ERROR; + const errCode = (_a6 = err.code) !== null && _a6 !== void 0 ? _a6 : RestError.PARSE_ERROR; return new RestError(msg, { code: errCode, statusCode: response.status, @@ -59439,7 +85105,7 @@ function skipQueryParameterEncoding(url2) { return url2; } function buildBaseUrl(endpoint, options) { - var _a5; + var _a6; if (!options.pathParameters) { return endpoint; } @@ -59455,7 +85121,7 @@ function buildBaseUrl(endpoint, options) { if (!options.skipUrlEncoding) { value = encodeURIComponent(param); } - endpoint = (_a5 = replaceAll(endpoint, `{${key}}`, value)) !== null && _a5 !== void 0 ? _a5 : ""; + endpoint = (_a6 = replaceAll(endpoint, `{${key}}`, value)) !== null && _a6 !== void 0 ? _a6 : ""; } return endpoint; } @@ -59475,7 +85141,7 @@ function replaceAll(value, searchValue, replaceValue) { // node_modules/@azure-rest/core-client/dist/esm/getClient.js function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { - var _a5, _b2; + var _a6, _b2; let credentials; if (credentialsOrPipelineOptions) { if (isCredential(credentialsOrPipelineOptions)) { @@ -59485,7 +85151,7 @@ function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { } } const pipeline = createDefaultPipeline(endpoint, credentials, clientOptions); - if ((_a5 = clientOptions.additionalPolicies) === null || _a5 === void 0 ? void 0 : _a5.length) { + if ((_a6 = clientOptions.additionalPolicies) === null || _a6 === void 0 ? void 0 : _a6.length) { for (const { policy, position } of clientOptions.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; pipeline.addPolicy(policy, { @@ -59531,8 +85197,8 @@ function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { }; } function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { - var _a5; - allowInsecureConnection = (_a5 = options.allowInsecureConnection) !== null && _a5 !== void 0 ? _a5 : allowInsecureConnection; + var _a6; + allowInsecureConnection = (_a6 = options.allowInsecureConnection) !== null && _a6 !== void 0 ? _a6 : allowInsecureConnection; return { then: function(onFulfilled, onrejected) { return sendRequest(method, url2, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection }), httpClient).then(onFulfilled, onrejected); @@ -59553,19 +85219,19 @@ function isCredential(param) { } // node_modules/@azure/openai/dist-esm/src/logger.js -var logger2 = createClientLogger("openai"); +var logger3 = createClientLogger("openai"); // node_modules/@azure/openai/dist-esm/src/rest/openAIClient.js function createClient(endpoint, credentials, options = {}) { - var _a5, _b2, _c2, _d2, _e2, _f, _g, _h; - const baseUrl = (_a5 = options.baseUrl) !== null && _a5 !== void 0 ? _a5 : `${endpoint}/openai`; + var _a6, _b2, _c2, _d2, _e2, _f, _g, _h; + const baseUrl = (_a6 = options.baseUrl) !== null && _a6 !== void 0 ? _a6 : `${endpoint}/openai`; options.apiVersion = (_b2 = options.apiVersion) !== null && _b2 !== void 0 ? _b2 : "2024-03-01-preview"; const userAgentInfo = `azsdk-js-openai-rest/1.0.0-beta.12`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` : `${userAgentInfo}`; options = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { - logger: (_d2 = (_c2 = options.loggingOptions) === null || _c2 === void 0 ? void 0 : _c2.logger) !== null && _d2 !== void 0 ? _d2 : logger2.info + logger: (_d2 = (_c2 = options.loggingOptions) === null || _c2 === void 0 ? void 0 : _c2.logger) !== null && _d2 !== void 0 ? _d2 : logger3.info }, credentials: { scopes: (_f = (_e2 = options.credentials) === null || _e2 === void 0 ? void 0 : _e2.scopes) !== null && _f !== void 0 ? _f : ["https://cognitiveservices.azure.com/.default"], apiKeyHeaderName: (_h = (_g = options.credentials) === null || _g === void 0 ? void 0 : _g.apiKeyHeaderName) !== null && _h !== void 0 ? _h : "api-key" @@ -59597,7 +85263,7 @@ function isUnexpected(response) { return !pathDetails.includes(response.status); } function getParametrizedPathSuccess(method, path5) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const pathParts = path5.split("/"); let matchedLen = -1, matchedValue = []; for (const [key, value] of Object.entries(responseMap)) { @@ -59607,17 +85273,17 @@ function getParametrizedPathSuccess(method, path5) { const candidatePath = getPathFromMapKey(key); const candidateParts = candidatePath.split("/"); let found = true; - for (let i3 = candidateParts.length - 1, j4 = pathParts.length - 1; i3 >= 1 && j4 >= 1; i3--, j4--) { - if (((_a5 = candidateParts[i3]) === null || _a5 === void 0 ? void 0 : _a5.startsWith("{")) && ((_b2 = candidateParts[i3]) === null || _b2 === void 0 ? void 0 : _b2.indexOf("}")) !== -1) { - const start = candidateParts[i3].indexOf("}") + 1, end = (_c2 = candidateParts[i3]) === null || _c2 === void 0 ? void 0 : _c2.length; - const isMatched = new RegExp(`${(_d2 = candidateParts[i3]) === null || _d2 === void 0 ? void 0 : _d2.slice(start, end)}`).test(pathParts[j4] || ""); + for (let i5 = candidateParts.length - 1, j6 = pathParts.length - 1; i5 >= 1 && j6 >= 1; i5--, j6--) { + if (((_a6 = candidateParts[i5]) === null || _a6 === void 0 ? void 0 : _a6.startsWith("{")) && ((_b2 = candidateParts[i5]) === null || _b2 === void 0 ? void 0 : _b2.indexOf("}")) !== -1) { + const start = candidateParts[i5].indexOf("}") + 1, end = (_c2 = candidateParts[i5]) === null || _c2 === void 0 ? void 0 : _c2.length; + const isMatched = new RegExp(`${(_d2 = candidateParts[i5]) === null || _d2 === void 0 ? void 0 : _d2.slice(start, end)}`).test(pathParts[j6] || ""); if (!isMatched) { found = false; break; } continue; } - if (candidateParts[i3] !== pathParts[j4]) { + if (candidateParts[i5] !== pathParts[j6]) { found = false; break; } @@ -59643,10 +85309,16 @@ function createOpenAI(endpoint, credential, options = {}) { return clientContext; } +// node_modules/@azure/openai/dist-esm/src/api/operations.js +init_tslib_es6(); + +// node_modules/@azure/openai/dist-esm/src/utils/serializeUtil.js +init_tslib_es6(); + // node_modules/@azure/openai/dist-esm/src/api/util.js -function wrapError(f4, message) { +function wrapError(f6, message) { try { - const result = f4(); + const result = f6(); return result; } catch (cause) { throw new Error(`${message}: ${cause}`, { cause }); @@ -59656,7 +85328,7 @@ function camelCaseKeys(obj) { if (typeof obj !== "object" || !obj) return obj; if (Array.isArray(obj)) { - return obj.map((v5) => camelCaseKeys(v5)); + return obj.map((v8) => camelCaseKeys(v8)); } else { for (const key of Object.keys(obj)) { const value = obj[key]; @@ -59673,7 +85345,7 @@ function snakeCaseKeys(obj) { if (typeof obj !== "object" || !obj) return obj; if (Array.isArray(obj)) { - return obj.map((v5) => snakeCaseKeys(v5)); + return obj.map((v8) => snakeCaseKeys(v8)); } else { for (const key of Object.keys(obj)) { const value = obj[key]; @@ -59742,7 +85414,7 @@ function serializeChatMessageImageContentItem(obj) { }; } function serializeAzureSearchChatExtensionConfiguration(obj) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; return { type: obj["type"], parameters: { @@ -59754,7 +85426,7 @@ function serializeAzureSearchChatExtensionConfiguration(obj) { endpoint: obj["endpoint"], index_name: obj["indexName"], fields_mapping: !obj.fieldsMapping ? void 0 : { - title_field: (_a5 = obj.fieldsMapping) === null || _a5 === void 0 ? void 0 : _a5["titleField"], + title_field: (_a6 = obj.fieldsMapping) === null || _a6 === void 0 ? void 0 : _a6["titleField"], url_field: (_b2 = obj.fieldsMapping) === null || _b2 === void 0 ? void 0 : _b2["urlField"], filepath_field: (_c2 = obj.fieldsMapping) === null || _c2 === void 0 ? void 0 : _c2["filepathField"], content_fields: (_d2 = obj.fieldsMapping) === null || _d2 === void 0 ? void 0 : _d2["contentFields"], @@ -59810,7 +85482,7 @@ function serializeAzureCosmosDBChatExtensionConfiguration(obj) { }; } function serializeElasticsearchChatExtensionConfiguration(obj) { - var _a5, _b2, _c2, _d2, _e2, _f; + var _a6, _b2, _c2, _d2, _e2, _f; return { type: obj["type"], parameters: { @@ -59822,7 +85494,7 @@ function serializeElasticsearchChatExtensionConfiguration(obj) { endpoint: obj["endpoint"], index_name: obj["indexName"], fields_mapping: !obj.fieldsMapping ? void 0 : { - title_field: (_a5 = obj.fieldsMapping) === null || _a5 === void 0 ? void 0 : _a5["titleField"], + title_field: (_a6 = obj.fieldsMapping) === null || _a6 === void 0 ? void 0 : _a6["titleField"], url_field: (_b2 = obj.fieldsMapping) === null || _b2 === void 0 ? void 0 : _b2["urlField"], filepath_field: (_c2 = obj.fieldsMapping) === null || _c2 === void 0 ? void 0 : _c2["filepathField"], content_fields: (_d2 = obj.fieldsMapping) === null || _d2 === void 0 ? void 0 : _d2["contentFields"], @@ -59956,11 +85628,11 @@ function streamToText2(stream4) { stream4.on("end", () => { resolve(Buffer.concat(buffer).toString("utf8")); }); - stream4.on("error", (e3) => { - if (e3 && (e3 === null || e3 === void 0 ? void 0 : e3.name) === "AbortError") { - reject(e3); + stream4.on("error", (e5) => { + if (e5 && (e5 === null || e5 === void 0 ? void 0 : e5.name) === "AbortError") { + reject(e5); } else { - reject(new RestError(`Error reading response as text: ${e3.message}`, { + reject(new RestError(`Error reading response as text: ${e5.message}`, { code: RestError.PARSE_ERROR })); } @@ -59968,7 +85640,11 @@ function streamToText2(stream4) { }); } +// node_modules/@azure/core-sse/dist/esm/sse.js +init_tslib_es6(); + // node_modules/@azure/core-sse/dist/esm/utils.js +init_tslib_es6(); function createStream(asyncIter, cancel) { const stream4 = iteratorToStream(asyncIter, cancel); return polyfillStream(stream4, cancel); @@ -59979,8 +85655,8 @@ function polyfillStream(stream4, dispose) { return stream4; } function makeAsyncDisposable(webStream, dispose) { - var _a5; - (_a5 = Symbol.asyncDispose) !== null && _a5 !== void 0 ? _a5 : Symbol.asyncDispose = Symbol("Symbol.asyncDispose"); + var _a6; + (_a6 = Symbol.asyncDispose) !== null && _a6 !== void 0 ? _a6 : Symbol.asyncDispose = Symbol("Symbol.asyncDispose"); if (!webStream[Symbol.asyncDispose]) { webStream[Symbol.asyncDispose] = () => dispose(); } @@ -60007,7 +85683,7 @@ function iteratorToStream(iterator2, cancel) { }); } function ensureAsyncIterable(stream4) { - if (isReadableStream4(stream4)) { + if (isReadableStream5(stream4)) { makeAsyncIterable2(stream4); return { cancel: () => stream4.cancel(), @@ -60022,7 +85698,7 @@ function ensureAsyncIterable(stream4) { }; } } -function isReadableStream4(body) { +function isReadableStream5(body) { return Boolean(body && typeof body.getReader === "function" && typeof body.tee === "function"); } function toAsyncIterable(stream4) { @@ -60057,10 +85733,10 @@ function createSseStream(chunkStream) { const asyncIter = toMessage(toLine(iterable)); return createStream(asyncIter, cancel); } -function concatBuffer(a4, b7) { - const res = new Uint8Array(a4.length + b7.length); - res.set(a4); - res.set(b7, a4.length); +function concatBuffer(a6, b9) { + const res = new Uint8Array(a6.length + b9.length); + res.set(a6); + res.set(b9, a6.length); return res; } function createMessage() { @@ -60073,13 +85749,13 @@ function createMessage() { } function toLine(chunkIter) { return __asyncGenerator(this, arguments, function* toLine_1() { - var _a5, e_1, _b2, _c2; + var _a6, e_1, _b2, _c2; let buf; let bufIdx = 0; let fieldLen = -1; let discardTrailingNewline = false; try { - for (var _d2 = true, chunkIter_1 = __asyncValues(chunkIter), chunkIter_1_1; chunkIter_1_1 = yield __await(chunkIter_1.next()), _a5 = chunkIter_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, chunkIter_1 = __asyncValues(chunkIter), chunkIter_1_1; chunkIter_1_1 = yield __await(chunkIter_1.next()), _a6 = chunkIter_1_1.done, !_a6; _d2 = true) { _c2 = chunkIter_1_1.value; _d2 = false; const chunk = _c2; @@ -60134,7 +85810,7 @@ function toLine(chunkIter) { e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = chunkIter_1.return)) yield __await(_b2.call(chunkIter_1)); + if (!_d2 && !_a6 && (_b2 = chunkIter_1.return)) yield __await(_b2.call(chunkIter_1)); } finally { if (e_1) throw e_1.error; } @@ -60143,11 +85819,11 @@ function toLine(chunkIter) { } function toMessage(lineIter) { return __asyncGenerator(this, arguments, function* toMessage_1() { - var _a5, e_2, _b2, _c2; + var _a6, e_2, _b2, _c2; let message = createMessage(); const decoder = new TextDecoder(); try { - for (var _d2 = true, lineIter_1 = __asyncValues(lineIter), lineIter_1_1; lineIter_1_1 = yield __await(lineIter_1.next()), _a5 = lineIter_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, lineIter_1 = __asyncValues(lineIter), lineIter_1_1; lineIter_1_1 = yield __await(lineIter_1.next()), _a6 = lineIter_1_1.done, !_a6; _d2 = true) { _c2 = lineIter_1_1.value; _d2 = false; const { line, fieldLen } = _c2; @@ -60182,7 +85858,7 @@ function toMessage(lineIter) { e_2 = { error: e_2_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = lineIter_1.return)) yield __await(_b2.call(lineIter_1)); + if (!_d2 && !_a6 && (_b2 = lineIter_1.return)) yield __await(_b2.call(lineIter_1)); } finally { if (e_2) throw e_2.error; } @@ -60191,6 +85867,7 @@ function toMessage(lineIter) { } // node_modules/@azure/openai/dist-esm/src/api/readableStreamUtils.js +init_tslib_es6(); function polyfillStream2(stream4) { makeAsyncIterable3(stream4); return stream4; @@ -60301,8 +85978,8 @@ function getCompletionsResult(body) { prompt_filter_results, prompt_annotations }) - }), { choices: choices.map((_a5) => { - var { content_filter_results } = _a5, choice = __rest(_a5, ["content_filter_results"]); + }), { choices: choices.map((_a6) => { + var { content_filter_results } = _a6, choice = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(choice)), !content_filter_results ? {} : { contentFilterResults: parseContentFilterResultsForChoiceOutput(content_filter_results) }); @@ -60318,7 +85995,7 @@ function streamCompletions(context, deploymentName, prompt, options = { requestO return getOaiSSEs(response, getCompletionsResult); } function _getChatCompletionsSend(context, deploymentId, body, options = { requestOptions: {} }) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; return context.path("/deployments/{deploymentId}/chat/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { model: body["model"], stream: body["stream"], @@ -60331,9 +86008,9 @@ function _getChatCompletionsSend(context, deploymentId, body, options = { reques stop: body["stop"], presence_penalty: body["presencePenalty"], frequency_penalty: body["frequencyPenalty"], - data_sources: body["dataSources"] === void 0 ? body["dataSources"] : body["dataSources"].map((p4) => serializeAzureChatExtensionConfigurationUnion(p4)), + data_sources: body["dataSources"] === void 0 ? body["dataSources"] : body["dataSources"].map((p6) => serializeAzureChatExtensionConfigurationUnion(p6)), enhancements: !body.enhancements ? void 0 : { - grounding: !((_a5 = body.enhancements) === null || _a5 === void 0 ? void 0 : _a5.grounding) ? void 0 : { enabled: (_c2 = (_b2 = body.enhancements) === null || _b2 === void 0 ? void 0 : _b2.grounding) === null || _c2 === void 0 ? void 0 : _c2["enabled"] }, + grounding: !((_a6 = body.enhancements) === null || _a6 === void 0 ? void 0 : _a6.grounding) ? void 0 : { enabled: (_c2 = (_b2 = body.enhancements) === null || _b2 === void 0 ? void 0 : _b2.grounding) === null || _c2 === void 0 ? void 0 : _c2["enabled"] }, ocr: !((_d2 = body.enhancements) === null || _d2 === void 0 ? void 0 : _d2.ocr) ? void 0 : { enabled: (_f = (_e2 = body.enhancements) === null || _e2 === void 0 ? void 0 : _e2.ocr) === null || _f === void 0 ? void 0 : _f["enabled"] } }, seed: body["seed"], @@ -60342,13 +86019,13 @@ function _getChatCompletionsSend(context, deploymentId, body, options = { reques response_format: !body.responseFormat ? void 0 : { type: (_g = body.responseFormat) === null || _g === void 0 ? void 0 : _g["type"] }, tool_choice: body["toolChoice"], tools: body["tools"], - functions: body["functions"] === void 0 ? body["functions"] : body["functions"].map((p4) => ({ - name: p4["name"], - description: p4["description"], - parameters: p4["parameters"] + functions: body["functions"] === void 0 ? body["functions"] : body["functions"].map((p6) => ({ + name: p6["name"], + description: p6["description"], + parameters: p6["parameters"] })), function_call: body["functionCall"], - messages: body["messages"].map((p4) => serializeChatRequestMessageUnion(p4)) + messages: body["messages"].map((p6) => serializeChatRequestMessageUnion(p6)) } })); } async function _getChatCompletionsDeserialize(result) { @@ -60370,8 +86047,8 @@ function getChatCompletionsResult(body) { promptTokens: usage["prompt_tokens"], totalTokens: usage["total_tokens"] } - }), { choices: !choices ? [] : choices.map((_a5) => { - var { content_filter_results } = _a5, choice = __rest(_a5, ["content_filter_results"]); + }), { choices: !choices ? [] : choices.map((_a6) => { + var { content_filter_results } = _a6, choice = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(choice)), !content_filter_results ? {} : { contentFilterResults: parseContentFilterResultsForChoiceOutput(content_filter_results) }); @@ -60414,54 +86091,54 @@ async function _getImageGenerationsDeserialize(result) { } return { created: new Date(result.body["created"]), - data: result.body["data"].map((p4) => { - var _a5, _b2, _c2, _d2, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s, _t2, _u, _v, _w, _x, _y, _z, _0, _1, _22, _32, _42, _52, _62, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _222, _23, _24, _25; + data: result.body["data"].map((p6) => { + var _a6, _b2, _c2, _d2, _e2, _f, _g, _h, _j, _k, _l, _m2, _o, _p, _q, _r2, _s, _t2, _u, _v, _w, _x, _y, _z, _0, _1, _22, _32, _42, _52, _62, _72, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _222, _23, _24, _25; return { - url: p4["url"], - base64Data: p4["b64_json"], - contentFilterResults: !p4.content_filter_results ? void 0 : { - sexual: !((_a5 = p4.content_filter_results) === null || _a5 === void 0 ? void 0 : _a5.sexual) ? void 0 : { - severity: (_c2 = (_b2 = p4.content_filter_results) === null || _b2 === void 0 ? void 0 : _b2.sexual) === null || _c2 === void 0 ? void 0 : _c2["severity"], - filtered: (_e2 = (_d2 = p4.content_filter_results) === null || _d2 === void 0 ? void 0 : _d2.sexual) === null || _e2 === void 0 ? void 0 : _e2["filtered"] + url: p6["url"], + base64Data: p6["b64_json"], + contentFilterResults: !p6.content_filter_results ? void 0 : { + sexual: !((_a6 = p6.content_filter_results) === null || _a6 === void 0 ? void 0 : _a6.sexual) ? void 0 : { + severity: (_c2 = (_b2 = p6.content_filter_results) === null || _b2 === void 0 ? void 0 : _b2.sexual) === null || _c2 === void 0 ? void 0 : _c2["severity"], + filtered: (_e2 = (_d2 = p6.content_filter_results) === null || _d2 === void 0 ? void 0 : _d2.sexual) === null || _e2 === void 0 ? void 0 : _e2["filtered"] }, - violence: !((_f = p4.content_filter_results) === null || _f === void 0 ? void 0 : _f.violence) ? void 0 : { - severity: (_h = (_g = p4.content_filter_results) === null || _g === void 0 ? void 0 : _g.violence) === null || _h === void 0 ? void 0 : _h["severity"], - filtered: (_k = (_j = p4.content_filter_results) === null || _j === void 0 ? void 0 : _j.violence) === null || _k === void 0 ? void 0 : _k["filtered"] + violence: !((_f = p6.content_filter_results) === null || _f === void 0 ? void 0 : _f.violence) ? void 0 : { + severity: (_h = (_g = p6.content_filter_results) === null || _g === void 0 ? void 0 : _g.violence) === null || _h === void 0 ? void 0 : _h["severity"], + filtered: (_k = (_j = p6.content_filter_results) === null || _j === void 0 ? void 0 : _j.violence) === null || _k === void 0 ? void 0 : _k["filtered"] }, - hate: !((_l = p4.content_filter_results) === null || _l === void 0 ? void 0 : _l.hate) ? void 0 : { - severity: (_o = (_m = p4.content_filter_results) === null || _m === void 0 ? void 0 : _m.hate) === null || _o === void 0 ? void 0 : _o["severity"], - filtered: (_q = (_p = p4.content_filter_results) === null || _p === void 0 ? void 0 : _p.hate) === null || _q === void 0 ? void 0 : _q["filtered"] + hate: !((_l = p6.content_filter_results) === null || _l === void 0 ? void 0 : _l.hate) ? void 0 : { + severity: (_o = (_m2 = p6.content_filter_results) === null || _m2 === void 0 ? void 0 : _m2.hate) === null || _o === void 0 ? void 0 : _o["severity"], + filtered: (_q = (_p = p6.content_filter_results) === null || _p === void 0 ? void 0 : _p.hate) === null || _q === void 0 ? void 0 : _q["filtered"] }, - selfHarm: !((_r2 = p4.content_filter_results) === null || _r2 === void 0 ? void 0 : _r2.self_harm) ? void 0 : { - severity: (_t2 = (_s = p4.content_filter_results) === null || _s === void 0 ? void 0 : _s.self_harm) === null || _t2 === void 0 ? void 0 : _t2["severity"], - filtered: (_v = (_u = p4.content_filter_results) === null || _u === void 0 ? void 0 : _u.self_harm) === null || _v === void 0 ? void 0 : _v["filtered"] + selfHarm: !((_r2 = p6.content_filter_results) === null || _r2 === void 0 ? void 0 : _r2.self_harm) ? void 0 : { + severity: (_t2 = (_s = p6.content_filter_results) === null || _s === void 0 ? void 0 : _s.self_harm) === null || _t2 === void 0 ? void 0 : _t2["severity"], + filtered: (_v = (_u = p6.content_filter_results) === null || _u === void 0 ? void 0 : _u.self_harm) === null || _v === void 0 ? void 0 : _v["filtered"] } }, - revisedPrompt: p4["revised_prompt"], - promptFilterResults: !p4.prompt_filter_results ? void 0 : { - sexual: !((_w = p4.prompt_filter_results) === null || _w === void 0 ? void 0 : _w.sexual) ? void 0 : { - severity: (_y = (_x = p4.prompt_filter_results) === null || _x === void 0 ? void 0 : _x.sexual) === null || _y === void 0 ? void 0 : _y["severity"], - filtered: (_0 = (_z = p4.prompt_filter_results) === null || _z === void 0 ? void 0 : _z.sexual) === null || _0 === void 0 ? void 0 : _0["filtered"] + revisedPrompt: p6["revised_prompt"], + promptFilterResults: !p6.prompt_filter_results ? void 0 : { + sexual: !((_w = p6.prompt_filter_results) === null || _w === void 0 ? void 0 : _w.sexual) ? void 0 : { + severity: (_y = (_x = p6.prompt_filter_results) === null || _x === void 0 ? void 0 : _x.sexual) === null || _y === void 0 ? void 0 : _y["severity"], + filtered: (_0 = (_z = p6.prompt_filter_results) === null || _z === void 0 ? void 0 : _z.sexual) === null || _0 === void 0 ? void 0 : _0["filtered"] }, - violence: !((_1 = p4.prompt_filter_results) === null || _1 === void 0 ? void 0 : _1.violence) ? void 0 : { - severity: (_32 = (_22 = p4.prompt_filter_results) === null || _22 === void 0 ? void 0 : _22.violence) === null || _32 === void 0 ? void 0 : _32["severity"], - filtered: (_52 = (_42 = p4.prompt_filter_results) === null || _42 === void 0 ? void 0 : _42.violence) === null || _52 === void 0 ? void 0 : _52["filtered"] + violence: !((_1 = p6.prompt_filter_results) === null || _1 === void 0 ? void 0 : _1.violence) ? void 0 : { + severity: (_32 = (_22 = p6.prompt_filter_results) === null || _22 === void 0 ? void 0 : _22.violence) === null || _32 === void 0 ? void 0 : _32["severity"], + filtered: (_52 = (_42 = p6.prompt_filter_results) === null || _42 === void 0 ? void 0 : _42.violence) === null || _52 === void 0 ? void 0 : _52["filtered"] }, - hate: !((_62 = p4.prompt_filter_results) === null || _62 === void 0 ? void 0 : _62.hate) ? void 0 : { - severity: (_8 = (_7 = p4.prompt_filter_results) === null || _7 === void 0 ? void 0 : _7.hate) === null || _8 === void 0 ? void 0 : _8["severity"], - filtered: (_10 = (_9 = p4.prompt_filter_results) === null || _9 === void 0 ? void 0 : _9.hate) === null || _10 === void 0 ? void 0 : _10["filtered"] + hate: !((_62 = p6.prompt_filter_results) === null || _62 === void 0 ? void 0 : _62.hate) ? void 0 : { + severity: (_8 = (_72 = p6.prompt_filter_results) === null || _72 === void 0 ? void 0 : _72.hate) === null || _8 === void 0 ? void 0 : _8["severity"], + filtered: (_10 = (_9 = p6.prompt_filter_results) === null || _9 === void 0 ? void 0 : _9.hate) === null || _10 === void 0 ? void 0 : _10["filtered"] }, - selfHarm: !((_11 = p4.prompt_filter_results) === null || _11 === void 0 ? void 0 : _11.self_harm) ? void 0 : { - severity: (_13 = (_12 = p4.prompt_filter_results) === null || _12 === void 0 ? void 0 : _12.self_harm) === null || _13 === void 0 ? void 0 : _13["severity"], - filtered: (_15 = (_14 = p4.prompt_filter_results) === null || _14 === void 0 ? void 0 : _14.self_harm) === null || _15 === void 0 ? void 0 : _15["filtered"] + selfHarm: !((_11 = p6.prompt_filter_results) === null || _11 === void 0 ? void 0 : _11.self_harm) ? void 0 : { + severity: (_13 = (_12 = p6.prompt_filter_results) === null || _12 === void 0 ? void 0 : _12.self_harm) === null || _13 === void 0 ? void 0 : _13["severity"], + filtered: (_15 = (_14 = p6.prompt_filter_results) === null || _14 === void 0 ? void 0 : _14.self_harm) === null || _15 === void 0 ? void 0 : _15["filtered"] }, - profanity: !((_16 = p4.prompt_filter_results) === null || _16 === void 0 ? void 0 : _16.profanity) ? void 0 : { - filtered: (_18 = (_17 = p4.prompt_filter_results) === null || _17 === void 0 ? void 0 : _17.profanity) === null || _18 === void 0 ? void 0 : _18["filtered"], - detected: (_20 = (_19 = p4.prompt_filter_results) === null || _19 === void 0 ? void 0 : _19.profanity) === null || _20 === void 0 ? void 0 : _20["detected"] + profanity: !((_16 = p6.prompt_filter_results) === null || _16 === void 0 ? void 0 : _16.profanity) ? void 0 : { + filtered: (_18 = (_17 = p6.prompt_filter_results) === null || _17 === void 0 ? void 0 : _17.profanity) === null || _18 === void 0 ? void 0 : _18["filtered"], + detected: (_20 = (_19 = p6.prompt_filter_results) === null || _19 === void 0 ? void 0 : _19.profanity) === null || _20 === void 0 ? void 0 : _20["detected"] }, - jailbreak: !((_21 = p4.prompt_filter_results) === null || _21 === void 0 ? void 0 : _21.jailbreak) ? void 0 : { - filtered: (_23 = (_222 = p4.prompt_filter_results) === null || _222 === void 0 ? void 0 : _222.jailbreak) === null || _23 === void 0 ? void 0 : _23["filtered"], - detected: (_25 = (_24 = p4.prompt_filter_results) === null || _24 === void 0 ? void 0 : _24.jailbreak) === null || _25 === void 0 ? void 0 : _25["detected"] + jailbreak: !((_21 = p6.prompt_filter_results) === null || _21 === void 0 ? void 0 : _21.jailbreak) ? void 0 : { + filtered: (_23 = (_222 = p6.prompt_filter_results) === null || _222 === void 0 ? void 0 : _222.jailbreak) === null || _23 === void 0 ? void 0 : _23["filtered"], + detected: (_25 = (_24 = p6.prompt_filter_results) === null || _24 === void 0 ? void 0 : _24.jailbreak) === null || _25 === void 0 ? void 0 : _25["detected"] } } }; @@ -60485,9 +86162,9 @@ async function _getEmbeddingsDeserialize(result) { throw result.body.error; } return { - data: result.body["data"].map((p4) => ({ - embedding: p4["embedding"], - index: p4["index"] + data: result.body["data"].map((p6) => ({ + embedding: p6["embedding"], + index: p6["index"] })), usage: { promptTokens: result.body.usage["prompt_tokens"], @@ -60501,24 +86178,24 @@ async function getEmbeddings(context, deploymentId, body, options = { requestOpt } function getContentFilterResultsForPrompt({ prompt_annotations, prompt_filter_results }) { const res = prompt_filter_results !== null && prompt_filter_results !== void 0 ? prompt_filter_results : prompt_annotations; - return res === null || res === void 0 ? void 0 : res.map((_a5) => { - var { content_filter_results } = _a5, rest = __rest(_a5, ["content_filter_results"]); + return res === null || res === void 0 ? void 0 : res.map((_a6) => { + var { content_filter_results } = _a6, rest = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(rest)), { contentFilterResults: parseContentFilterResultDetailsForPromptOutput(content_filter_results) }); }); } -function parseContentFilterResultDetailsForPromptOutput(_a5 = {}) { - var { error } = _a5, rest = __rest(_a5, ["error"]); +function parseContentFilterResultDetailsForPromptOutput(_a6 = {}) { + var { error } = _a6, rest = __rest(_a6, ["error"]); return error ? parseError(error) : camelCaseKeys(rest); } function parseError(error) { - var _a5; + var _a6; return { - error: Object.assign(Object.assign({}, error), { details: (_a5 = error["details"]) !== null && _a5 !== void 0 ? _a5 : [] }) + error: Object.assign(Object.assign({}, error), { details: (_a6 = error["details"]) !== null && _a6 !== void 0 ? _a6 : [] }) }; } -function parseContentFilterResultsForChoiceOutput(_a5 = {}) { +function parseContentFilterResultsForChoiceOutput(_a6 = {}) { var _b2; - var { error } = _a5, successResult = __rest(_a5, ["error"]); + var { error } = _a6, successResult = __rest(_a6, ["error"]); return error ? { error: Object.assign(Object.assign({}, error), { details: (_b2 = error["details"]) !== null && _b2 !== void 0 ? _b2 : [] }) } : camelCaseKeys(successResult); @@ -60565,15 +86242,15 @@ function nonAzurePolicy() { } // node_modules/@azure/openai/dist-esm/src/OpenAIClient.js -function createOpenAIEndpoint(version) { - return `https://api.openai.com/v${version}`; +function createOpenAIEndpoint(version3) { + return `https://api.openai.com/v${version3}`; } function isCred(cred) { return isTokenCredential(cred) || cred.key !== void 0; } var OpenAIClient = class { constructor(endpointOrOpenAiKey, credOrOptions = {}, options = {}) { - var _a5, _b2; + var _a6, _b2; this._isAzure = false; let opts; let endpoint; @@ -60588,7 +86265,7 @@ var OpenAIClient = class { cred = endpointOrOpenAiKey; const { credentials } = credOrOptions, restOpts = __rest(credOrOptions, ["credentials"]); opts = Object.assign({ credentials: { - apiKeyHeaderName: (_a5 = credentials === null || credentials === void 0 ? void 0 : credentials.apiKeyHeaderName) !== null && _a5 !== void 0 ? _a5 : "Authorization", + apiKeyHeaderName: (_a6 = credentials === null || credentials === void 0 ? void 0 : credentials.apiKeyHeaderName) !== null && _a6 !== void 0 ? _a6 : "Authorization", scopes: credentials === null || credentials === void 0 ? void 0 : credentials.scopes } }, restOpts); } @@ -60687,7 +86364,7 @@ var AzureEngine = class { constructor(config7) { this.generateCommitMessage = async (messages) => { try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a4, b7) => a4 + b7, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); } @@ -60861,8 +86538,8 @@ var RequestUrl = class { this.requestOptions = requestOptions; } toString() { - var _a5, _b2; - const apiVersion = ((_a5 = this.requestOptions) === null || _a5 === void 0 ? void 0 : _a5.apiVersion) || DEFAULT_API_VERSION; + var _a6, _b2; + const apiVersion = ((_a6 = this.requestOptions) === null || _a6 === void 0 ? void 0 : _a6.apiVersion) || DEFAULT_API_VERSION; const baseUrl = ((_b2 = this.requestOptions) === null || _b2 === void 0 ? void 0 : _b2.baseUrl) || DEFAULT_BASE_URL; let url2 = `${baseUrl}/${apiVersion}/${this.model}:${this.task}`; if (this.stream) { @@ -60889,8 +86566,8 @@ async function getHeaders(url2) { if (!(customHeaders instanceof Headers)) { try { customHeaders = new Headers(customHeaders); - } catch (e3) { - throw new GoogleGenerativeAIRequestInputError(`unable to convert customHeaders value ${JSON.stringify(customHeaders)} to Headers: ${e3.message}`); + } catch (e5) { + throw new GoogleGenerativeAIRequestInputError(`unable to convert customHeaders value ${JSON.stringify(customHeaders)} to Headers: ${e5.message}`); } } for (const [headerName, headerValue] of customHeaders.entries()) { @@ -60930,15 +86607,15 @@ async function _makeRequestInternal(model, task, apiKey, stream4, body, requestO message += ` ${JSON.stringify(json.error.details)}`; errorDetails = json.error.details; } - } catch (e3) { + } catch (e5) { } throw new GoogleGenerativeAIFetchError(`Error fetching from ${url2.toString()}: [${response.status} ${response.statusText}] ${message}`, response.status, response.statusText, errorDetails); } - } catch (e3) { - let err = e3; - if (!(e3 instanceof GoogleGenerativeAIFetchError || e3 instanceof GoogleGenerativeAIRequestInputError)) { - err = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e3.message}`); - err.stack = e3.stack; + } catch (e5) { + let err = e5; + if (!(e5 instanceof GoogleGenerativeAIFetchError || e5 instanceof GoogleGenerativeAIRequestInputError)) { + err = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e5.message}`); + err.stack = e5.stack; } throw err; } @@ -61001,9 +86678,9 @@ function addHelpers(response) { return response; } function getText(response) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const textStrings = []; - if ((_b2 = (_a5 = response.candidates) === null || _a5 === void 0 ? void 0 : _a5[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { + if ((_b2 = (_a6 = response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { for (const part of (_d2 = (_c2 = response.candidates) === null || _c2 === void 0 ? void 0 : _c2[0].content) === null || _d2 === void 0 ? void 0 : _d2.parts) { if (part.text) { textStrings.push(part.text); @@ -61017,9 +86694,9 @@ function getText(response) { } } function getFunctionCalls(response) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const functionCalls = []; - if ((_b2 = (_a5 = response.candidates) === null || _a5 === void 0 ? void 0 : _a5[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { + if ((_b2 = (_a6 = response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { for (const part of (_d2 = (_c2 = response.candidates) === null || _c2 === void 0 ? void 0 : _c2[0].content) === null || _d2 === void 0 ? void 0 : _d2.parts) { if (part.functionCall) { functionCalls.push(part.functionCall); @@ -61037,11 +86714,11 @@ function hadBadFinishReason(candidate) { return !!candidate.finishReason && badFinishReasons.includes(candidate.finishReason); } function formatBlockErrorMessage(response) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; let message = ""; if ((!response.candidates || response.candidates.length === 0) && response.promptFeedback) { message += "Response was blocked"; - if ((_a5 = response.promptFeedback) === null || _a5 === void 0 ? void 0 : _a5.blockReason) { + if ((_a6 = response.promptFeedback) === null || _a6 === void 0 ? void 0 : _a6.blockReason) { message += ` due to ${response.promptFeedback.blockReason}`; } if ((_b2 = response.promptFeedback) === null || _b2 === void 0 ? void 0 : _b2.blockReasonMessage) { @@ -61058,31 +86735,31 @@ function formatBlockErrorMessage(response) { } return message; } -function __await2(v5) { - return this instanceof __await2 ? (this.v = v5, this) : new __await2(v5); +function __await2(v8) { + return this instanceof __await2 ? (this.v = v8, this) : new __await2(v8); } function __asyncGenerator2(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g4 = generator.apply(thisArg, _arguments || []), i3, q6 = []; - return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + var g6 = generator.apply(thisArg, _arguments || []), i5, q8 = []; + return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { return this; - }, i3; - function verb(n2) { - if (g4[n2]) i3[n2] = function(v5) { - return new Promise(function(a4, b7) { - q6.push([n2, v5, a4, b7]) > 1 || resume(n2, v5); + }, i5; + function verb(n4) { + if (g6[n4]) i5[n4] = function(v8) { + return new Promise(function(a6, b9) { + q8.push([n4, v8, a6, b9]) > 1 || resume(n4, v8); }); }; } - function resume(n2, v5) { + function resume(n4, v8) { try { - step(g4[n2](v5)); - } catch (e3) { - settle2(q6[0][3], e3); + step(g6[n4](v8)); + } catch (e5) { + settle2(q8[0][3], e5); } } - function step(r3) { - r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q6[0][2], r3); + function step(r5) { + r5.value instanceof __await2 ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle2(q8[0][2], r5); } function fulfill(value) { resume("next", value); @@ -61090,8 +86767,8 @@ function __asyncGenerator2(thisArg, _arguments, generator) { function reject(value) { resume("throw", value); } - function settle2(f4, v5) { - if (f4(v5), q6.shift(), q6.length) resume(q6[0][0], q6[0][1]); + function settle2(f6, v8) { + if (f6(v8), q8.shift(), q8.length) resume(q8[0][0], q8[0][1]); } } var responseLineRE = /^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/; @@ -61149,7 +86826,7 @@ function getResponseStream(inputStream) { while (match) { try { parsedResponse = JSON.parse(match[1]); - } catch (e3) { + } catch (e5) { controller.error(new GoogleGenerativeAIError(`Error parsing JSON response: "${match[1]}"`)); return; } @@ -61172,22 +86849,22 @@ function aggregateResponses(responses) { for (const response of responses) { if (response.candidates) { for (const candidate of response.candidates) { - const i3 = candidate.index; + const i5 = candidate.index; if (!aggregatedResponse.candidates) { aggregatedResponse.candidates = []; } - if (!aggregatedResponse.candidates[i3]) { - aggregatedResponse.candidates[i3] = { + if (!aggregatedResponse.candidates[i5]) { + aggregatedResponse.candidates[i5] = { index: candidate.index }; } - aggregatedResponse.candidates[i3].citationMetadata = candidate.citationMetadata; - aggregatedResponse.candidates[i3].finishReason = candidate.finishReason; - aggregatedResponse.candidates[i3].finishMessage = candidate.finishMessage; - aggregatedResponse.candidates[i3].safetyRatings = candidate.safetyRatings; + aggregatedResponse.candidates[i5].citationMetadata = candidate.citationMetadata; + aggregatedResponse.candidates[i5].finishReason = candidate.finishReason; + aggregatedResponse.candidates[i5].finishMessage = candidate.finishMessage; + aggregatedResponse.candidates[i5].safetyRatings = candidate.safetyRatings; if (candidate.content && candidate.content.parts) { - if (!aggregatedResponse.candidates[i3].content) { - aggregatedResponse.candidates[i3].content = { + if (!aggregatedResponse.candidates[i5].content) { + aggregatedResponse.candidates[i5].content = { role: candidate.content.role || "user", parts: [] }; @@ -61203,7 +86880,7 @@ function aggregateResponses(responses) { if (Object.keys(newPart).length === 0) { newPart.text = ""; } - aggregatedResponse.candidates[i3].content.parts.push(newPart); + aggregatedResponse.candidates[i5].content.parts.push(newPart); } } } @@ -61394,11 +87071,11 @@ var ChatSession = class { * {@link GenerateContentResult} */ async sendMessage(request3) { - var _a5, _b2, _c2, _d2, _e2; + var _a6, _b2, _c2, _d2, _e2; await this._sendPromise; const newContent = formatNewContent(request3); const generateContentRequest = { - safetySettings: (_a5 = this.params) === null || _a5 === void 0 ? void 0 : _a5.safetySettings, + safetySettings: (_a6 = this.params) === null || _a6 === void 0 ? void 0 : _a6.safetySettings, generationConfig: (_b2 = this.params) === null || _b2 === void 0 ? void 0 : _b2.generationConfig, tools: (_c2 = this.params) === null || _c2 === void 0 ? void 0 : _c2.tools, toolConfig: (_d2 = this.params) === null || _d2 === void 0 ? void 0 : _d2.toolConfig, @@ -61407,14 +87084,14 @@ var ChatSession = class { }; let finalResult; this._sendPromise = this._sendPromise.then(() => generateContent(this._apiKey, this.model, generateContentRequest, this.requestOptions)).then((result) => { - var _a6; + var _a7; if (result.response.candidates && result.response.candidates.length > 0) { this._history.push(newContent); const responseContent = Object.assign({ parts: [], // Response seems to come back without a role set. role: "model" - }, (_a6 = result.response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content); + }, (_a7 = result.response.candidates) === null || _a7 === void 0 ? void 0 : _a7[0].content); this._history.push(responseContent); } else { const blockErrorMessage = formatBlockErrorMessage(result.response); @@ -61433,11 +87110,11 @@ var ChatSession = class { * and a response promise. */ async sendMessageStream(request3) { - var _a5, _b2, _c2, _d2, _e2; + var _a6, _b2, _c2, _d2, _e2; await this._sendPromise; const newContent = formatNewContent(request3); const generateContentRequest = { - safetySettings: (_a5 = this.params) === null || _a5 === void 0 ? void 0 : _a5.safetySettings, + safetySettings: (_a6 = this.params) === null || _a6 === void 0 ? void 0 : _a6.safetySettings, generationConfig: (_b2 = this.params) === null || _b2 === void 0 ? void 0 : _b2.generationConfig, tools: (_c2 = this.params) === null || _c2 === void 0 ? void 0 : _c2.tools, toolConfig: (_d2 = this.params) === null || _d2 === void 0 ? void 0 : _d2.toolConfig, @@ -61461,9 +87138,9 @@ var ChatSession = class { console.warn(`sendMessageStream() was unsuccessful. ${blockErrorMessage}. Inspect response object for details.`); } } - }).catch((e3) => { - if (e3.message !== SILENT_ERROR) { - console.error(e3); + }).catch((e5) => { + if (e5.message !== SILENT_ERROR) { + console.error(e5); } }); return streamPromise; @@ -61567,15 +87244,15 @@ var GeminiEngine = class { this.config = config7; } async generateCommitMessage(messages) { - const systemInstruction = messages.filter((m5) => m5.role === "system").map((m5) => m5.content).join("\n"); + const systemInstruction = messages.filter((m7) => m7.role === "system").map((m7) => m7.content).join("\n"); const gemini = this.client.getGenerativeModel({ model: this.config.model, systemInstruction }); - const contents = messages.filter((m5) => m5.role !== "system").map( - (m5) => ({ - parts: [{ text: m5.content }], - role: m5.role === "user" ? m5.role : "model" + const contents = messages.filter((m7) => m7.role !== "system").map( + (m7) => ({ + parts: [{ text: m7.content }], + role: m7.role === "user" ? m7.role : "model" }) ); try { @@ -61805,10 +87482,10 @@ var Stream2 = class _Stream { let data; try { data = JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } if (data && data.error) { throw new APIError3(void 0, data.error, void 0, void 0); @@ -61818,10 +87495,10 @@ var Stream2 = class _Stream { let data; try { data = JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } if (sse.event == "error") { throw new APIError3(void 0, data.error, data.message, void 0); @@ -61830,10 +87507,10 @@ var Stream2 = class _Stream { } } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -61873,10 +87550,10 @@ var Stream2 = class _Stream { yield JSON.parse(line); } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -61987,15 +87664,15 @@ async function* iterSSEChunks2(iterator2) { function findDoubleNewlineIndex2(buffer) { const newline = 10; const carriage = 13; - for (let i3 = 0; i3 < buffer.length - 2; i3++) { - if (buffer[i3] === newline && buffer[i3 + 1] === newline) { - return i3 + 2; + for (let i5 = 0; i5 < buffer.length - 2; i5++) { + if (buffer[i5] === newline && buffer[i5 + 1] === newline) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === carriage) { - return i3 + 2; + if (buffer[i5] === carriage && buffer[i5 + 1] === carriage) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === newline && i3 + 3 < buffer.length && buffer[i3 + 2] === carriage && buffer[i3 + 3] === newline) { - return i3 + 4; + if (buffer[i5] === carriage && buffer[i5 + 1] === newline && i5 + 3 < buffer.length && buffer[i5 + 2] === carriage && buffer[i5 + 3] === newline) { + return i5 + 4; } } return -1; @@ -62027,7 +87704,7 @@ var SSEDecoder2 = class { if (line.startsWith(":")) { return null; } - let [fieldname, _7, value] = partition2(line, ":"); + let [fieldname, _8, value] = partition2(line, ":"); if (value.startsWith(" ")) { value = value.substring(1); } @@ -62128,9 +87805,9 @@ function readableStreamAsyncIterable2(stream4) { if (result?.done) reader.releaseLock(); return result; - } catch (e3) { + } catch (e5) { reader.releaseLock(); - throw e3; + throw e5; } }, async return() { @@ -62188,17 +87865,17 @@ async function getBytes2(value) { } function propsForError2(value) { const props = Object.getOwnPropertyNames(value); - return `[${props.map((p4) => `"${p4}"`).join(", ")}]`; + return `[${props.map((p6) => `"${p6}"`).join(", ")}]`; } function getName2(value) { return getStringFromMaybeBuffer2(value.name) || getStringFromMaybeBuffer2(value.filename) || // For fs.ReadStream getStringFromMaybeBuffer2(value.path)?.split(/[\\/]/).pop(); } -var getStringFromMaybeBuffer2 = (x5) => { - if (typeof x5 === "string") - return x5; - if (typeof Buffer !== "undefined" && x5 instanceof Buffer) - return String(x5); +var getStringFromMaybeBuffer2 = (x7) => { + if (typeof x7 === "string") + return x7; + if (typeof Buffer !== "undefined" && x7 instanceof Buffer) + return String(x7); return void 0; }; var isAsyncIterableIterator2 = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function"; @@ -62233,16 +87910,16 @@ var addFormValue = async (form, key, value) => { }; // node_modules/openai/core.mjs -var __classPrivateFieldSet7 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet8 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet8 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet9 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractPage_client2; async function defaultParseResponse2(props) { @@ -62296,7 +87973,7 @@ var APIPromise2 = class _APIPromise extends Promise { * - `import 'openai/shims/web'` (otherwise) */ asResponse() { - return this.responsePromise.then((p4) => p4.response); + return this.responsePromise.then((p6) => p6.response); } /** * Gets the parsed response data and the raw `Response` instance. @@ -62512,7 +88189,7 @@ var APIClient2 = class { debug2(`response (error; ${retryMessage2})`, response.status, url2, responseHeaders); return this.retryRequest(options, retriesRemaining, responseHeaders); } - const errText = await response.text().catch((e3) => castToError2(e3).message); + const errText = await response.text().catch((e5) => castToError2(e5).message); const errJSON = safeJSON2(errText); const errMessage = errJSON ? void 0 : errText; const retryMessage = retriesRemaining ? `(error; no more retries left)` : `(error; not retryable)`; @@ -62538,7 +88215,7 @@ var APIClient2 = class { return url2.toString(); } stringifyQuery(query) { - return Object.entries(query).filter(([_7, value]) => typeof value !== "undefined").map(([key, value]) => { + return Object.entries(query).filter(([_8, value]) => typeof value !== "undefined").map(([key, value]) => { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; } @@ -62616,7 +88293,7 @@ var APIClient2 = class { var AbstractPage2 = class { constructor(client, response, body, options) { _AbstractPage_client2.set(this, void 0); - __classPrivateFieldSet7(this, _AbstractPage_client2, client, "f"); + __classPrivateFieldSet8(this, _AbstractPage_client2, client, "f"); this.options = options; this.response = response; this.body = body; @@ -62643,7 +88320,7 @@ var AbstractPage2 = class { nextOptions.query = void 0; nextOptions.path = nextInfo.url.toString(); } - return await __classPrivateFieldGet8(this, _AbstractPage_client2, "f").requestAPIList(this.constructor, nextOptions); + return await __classPrivateFieldGet9(this, _AbstractPage_client2, "f").requestAPIList(this.constructor, nextOptions); } async *iterPages() { let page = this; @@ -62707,7 +88384,7 @@ var requestOptionsKeys = { __streamClass: true }; var isRequestOptions = (obj) => { - return typeof obj === "object" && obj !== null && !isEmptyObj2(obj) && Object.keys(obj).every((k7) => hasOwn2(requestOptionsKeys, k7)); + return typeof obj === "object" && obj !== null && !isEmptyObj2(obj) && Object.keys(obj).every((k9) => hasOwn2(requestOptionsKeys, k9)); }; var getPlatformProperties2 = () => { if (typeof Deno !== "undefined" && Deno.build != null) { @@ -62832,14 +88509,14 @@ var isAbsoluteURL3 = (url2) => { return startsWithSchemeRegexp2.test(url2); }; var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); -var validatePositiveInteger2 = (name, n2) => { - if (typeof n2 !== "number" || !Number.isInteger(n2)) { +var validatePositiveInteger2 = (name, n4) => { + if (typeof n4 !== "number" || !Number.isInteger(n4)) { throw new OpenAIError(`${name} must be an integer`); } - if (n2 < 0) { + if (n4 < 0) { throw new OpenAIError(`${name} must be a positive integer`); } - return n2; + return n4; }; var castToError2 = (err) => { if (err instanceof Error) @@ -62866,13 +88543,13 @@ function hasOwn2(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } function applyHeadersMut2(targetHeaders, newHeaders) { - for (const k7 in newHeaders) { - if (!hasOwn2(newHeaders, k7)) + for (const k9 in newHeaders) { + if (!hasOwn2(newHeaders, k9)) continue; - const lowerKey = k7.toLowerCase(); + const lowerKey = k9.toLowerCase(); if (!lowerKey) continue; - const val = newHeaders[k7]; + const val = newHeaders[k9]; if (val === null) { delete targetHeaders[lowerKey]; } else if (val !== void 0) { @@ -62886,10 +88563,10 @@ function debug2(action, ...args) { } } var uuid42 = () => { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c3) => { - const r3 = Math.random() * 16 | 0; - const v5 = c3 === "x" ? r3 : r3 & 3 | 8; - return v5.toString(16); + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c5) => { + const r5 = Math.random() * 16 | 0; + const v8 = c5 === "x" ? r5 : r5 & 3 | 8; + return v8.toString(16); }); }; var isRunningInBrowser = () => { @@ -63283,16 +88960,16 @@ var isToolMessage = (message) => { }; // node_modules/openai/lib/EventStream.mjs -var __classPrivateFieldSet8 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet9 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet9 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet10 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _EventStream_instances; var _EventStream_connectedPromise; @@ -63326,17 +89003,17 @@ var EventStream = class { _EventStream_errored.set(this, false); _EventStream_aborted.set(this, false); _EventStream_catchingPromiseCreated.set(this, false); - __classPrivateFieldSet8(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_resolveConnectedPromise, resolve, "f"); - __classPrivateFieldSet8(this, _EventStream_rejectConnectedPromise, reject, "f"); + __classPrivateFieldSet9(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet9(this, _EventStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet9(this, _EventStream_rejectConnectedPromise, reject, "f"); }), "f"); - __classPrivateFieldSet8(this, _EventStream_endPromise, new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_resolveEndPromise, resolve, "f"); - __classPrivateFieldSet8(this, _EventStream_rejectEndPromise, reject, "f"); + __classPrivateFieldSet9(this, _EventStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet9(this, _EventStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet9(this, _EventStream_rejectEndPromise, reject, "f"); }), "f"); - __classPrivateFieldGet9(this, _EventStream_connectedPromise, "f").catch(() => { + __classPrivateFieldGet10(this, _EventStream_connectedPromise, "f").catch(() => { }); - __classPrivateFieldGet9(this, _EventStream_endPromise, "f").catch(() => { + __classPrivateFieldGet10(this, _EventStream_endPromise, "f").catch(() => { }); } _run(executor) { @@ -63344,23 +89021,23 @@ var EventStream = class { executor().then(() => { this._emitFinal(); this._emit("end"); - }, __classPrivateFieldGet9(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); + }, __classPrivateFieldGet10(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); }, 0); } _connected() { if (this.ended) return; - __classPrivateFieldGet9(this, _EventStream_resolveConnectedPromise, "f").call(this); + __classPrivateFieldGet10(this, _EventStream_resolveConnectedPromise, "f").call(this); this._emit("connect"); } get ended() { - return __classPrivateFieldGet9(this, _EventStream_ended, "f"); + return __classPrivateFieldGet10(this, _EventStream_ended, "f"); } get errored() { - return __classPrivateFieldGet9(this, _EventStream_errored, "f"); + return __classPrivateFieldGet10(this, _EventStream_errored, "f"); } get aborted() { - return __classPrivateFieldGet9(this, _EventStream_aborted, "f"); + return __classPrivateFieldGet10(this, _EventStream_aborted, "f"); } abort() { this.controller.abort(); @@ -63373,7 +89050,7 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ on(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = []); + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = []); listeners.push({ listener }); return this; } @@ -63385,10 +89062,10 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ off(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event]; + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event]; if (!listeners) return this; - const index = listeners.findIndex((l3) => l3.listener === listener); + const index = listeners.findIndex((l5) => l5.listener === listener); if (index >= 0) listeners.splice(index, 1); return this; @@ -63399,7 +89076,7 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ once(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = []); + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = []); listeners.push({ listener, once: true }); return this; } @@ -63416,46 +89093,46 @@ var EventStream = class { */ emitted(event) { return new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_catchingPromiseCreated, true, "f"); + __classPrivateFieldSet9(this, _EventStream_catchingPromiseCreated, true, "f"); if (event !== "error") this.once("error", reject); this.once(event, resolve); }); } async done() { - __classPrivateFieldSet8(this, _EventStream_catchingPromiseCreated, true, "f"); - await __classPrivateFieldGet9(this, _EventStream_endPromise, "f"); + __classPrivateFieldSet9(this, _EventStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet10(this, _EventStream_endPromise, "f"); } _emit(event, ...args) { - if (__classPrivateFieldGet9(this, _EventStream_ended, "f")) { + if (__classPrivateFieldGet10(this, _EventStream_ended, "f")) { return; } if (event === "end") { - __classPrivateFieldSet8(this, _EventStream_ended, true, "f"); - __classPrivateFieldGet9(this, _EventStream_resolveEndPromise, "f").call(this); + __classPrivateFieldSet9(this, _EventStream_ended, true, "f"); + __classPrivateFieldGet10(this, _EventStream_resolveEndPromise, "f").call(this); } - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event]; + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event]; if (listeners) { - __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once); + __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = listeners.filter((l5) => !l5.once); listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { const error = args[0]; - if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + if (!__classPrivateFieldGet10(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { Promise.reject(error); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectEndPromise, "f").call(this, error); this._emit("end"); return; } if (event === "error") { const error = args[0]; - if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + if (!__classPrivateFieldGet10(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { Promise.reject(error); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectEndPromise, "f").call(this, error); this._emit("end"); } } @@ -63463,12 +89140,12 @@ var EventStream = class { } }; _EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_endPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_listeners = /* @__PURE__ */ new WeakMap(), _EventStream_ended = /* @__PURE__ */ new WeakMap(), _EventStream_errored = /* @__PURE__ */ new WeakMap(), _EventStream_aborted = /* @__PURE__ */ new WeakMap(), _EventStream_catchingPromiseCreated = /* @__PURE__ */ new WeakMap(), _EventStream_instances = /* @__PURE__ */ new WeakSet(), _EventStream_handleError = function _EventStream_handleError2(error) { - __classPrivateFieldSet8(this, _EventStream_errored, true, "f"); + __classPrivateFieldSet9(this, _EventStream_errored, true, "f"); if (error instanceof Error && error.name === "AbortError") { error = new APIUserAbortError3(); } if (error instanceof APIUserAbortError3) { - __classPrivateFieldSet8(this, _EventStream_aborted, true, "f"); + __classPrivateFieldSet9(this, _EventStream_aborted, true, "f"); return this._emit("abort", error); } if (error instanceof OpenAIError) { @@ -63554,7 +89231,7 @@ function hasAutoParseableInput(params) { if (isAutoParsableResponseFormat(params.response_format)) { return true; } - return params.tools?.some((t2) => isAutoParsableTool(t2) || t2.type === "function" && t2.function.strict === true) ?? false; + return params.tools?.some((t4) => isAutoParsableTool(t4) || t4.type === "function" && t4.function.strict === true) ?? false; } function validateInputTools(tools) { for (const tool of tools ?? []) { @@ -63568,10 +89245,10 @@ function validateInputTools(tools) { } // node_modules/openai/lib/AbstractChatCompletionRunner.mjs -var __classPrivateFieldGet10 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet11 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractChatCompletionRunner_instances; var _AbstractChatCompletionRunner_getFinalContent; @@ -63633,7 +89310,7 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalContent() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); } /** * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, @@ -63641,7 +89318,7 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalMessage() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); } /** * @returns a promise that resolves with the content of the final FunctionCall, or rejects @@ -63649,15 +89326,15 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalFunctionCall() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); } async finalFunctionCallResult() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); } async totalUsage() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); } allChatCompletions() { return [...this._chatCompletions]; @@ -63666,20 +89343,20 @@ var AbstractChatCompletionRunner = class extends EventStream { const completion = this._chatCompletions[this._chatCompletions.length - 1]; if (completion) this._emit("finalChatCompletion", completion); - const finalMessage = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + const finalMessage = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); if (finalMessage) this._emit("finalMessage", finalMessage); - const finalContent = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + const finalContent = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); if (finalContent) this._emit("finalContent", finalContent); - const finalFunctionCall = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); + const finalFunctionCall = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); if (finalFunctionCall) this._emit("finalFunctionCall", finalFunctionCall); - const finalFunctionCallResult = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); + const finalFunctionCallResult = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); if (finalFunctionCallResult != null) this._emit("finalFunctionCallResult", finalFunctionCallResult); - if (this._chatCompletions.some((c3) => c3.usage)) { - this._emit("totalUsage", __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); + if (this._chatCompletions.some((c5) => c5.usage)) { + this._emit("totalUsage", __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); } } async _createChatCompletion(client, params, options) { @@ -63689,7 +89366,7 @@ var AbstractChatCompletionRunner = class extends EventStream { this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); + __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); const chatCompletion = await client.chat.completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal }); this._connected(); return this._addChatCompletion(parseChatCompletion(chatCompletion, params)); @@ -63706,18 +89383,18 @@ var AbstractChatCompletionRunner = class extends EventStream { const singleFunctionToCall = typeof function_call !== "string" && function_call?.name; const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; const functionsByName = {}; - for (const f4 of params.functions) { - functionsByName[f4.name || f4.function.name] = f4; + for (const f6 of params.functions) { + functionsByName[f6.name || f6.function.name] = f6; } - const functions = params.functions.map((f4) => ({ - name: f4.name || f4.function.name, - parameters: f4.parameters, - description: f4.description + const functions = params.functions.map((f6) => ({ + name: f6.name || f6.function.name, + parameters: f6.parameters, + description: f6.description })); for (const message of params.messages) { this._addMessage(message, false); } - for (let i3 = 0; i3 < maxChatCompletions; ++i3) { + for (let i5 = 0; i5 < maxChatCompletions; ++i5) { const chatCompletion = await this._createChatCompletion(client, { ...restParams, function_call, @@ -63733,7 +89410,7 @@ var AbstractChatCompletionRunner = class extends EventStream { const { name, arguments: args } = message.function_call; const fn = functionsByName[name]; if (!fn) { - const content2 = `Invalid function_call: ${JSON.stringify(name)}. Available options are: ${functions.map((f4) => JSON.stringify(f4.name)).join(", ")}. Please try again`; + const content2 = `Invalid function_call: ${JSON.stringify(name)}. Available options are: ${functions.map((f6) => JSON.stringify(f6.name)).join(", ")}. Please try again`; this._addMessage({ role, name, content: content2 }); continue; } else if (singleFunctionToCall && singleFunctionToCall !== name) { @@ -63753,7 +89430,7 @@ var AbstractChatCompletionRunner = class extends EventStream { continue; } const rawContent2 = await fn.function(parsed, this); - const content = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); + const content = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); this._addMessage({ role, name, content }); if (singleFunctionToCall) return; @@ -63784,24 +89461,24 @@ var AbstractChatCompletionRunner = class extends EventStream { return tool; }); const functionsByName = {}; - for (const f4 of inputTools) { - if (f4.type === "function") { - functionsByName[f4.function.name || f4.function.function.name] = f4.function; + for (const f6 of inputTools) { + if (f6.type === "function") { + functionsByName[f6.function.name || f6.function.function.name] = f6.function; } } - const tools = "tools" in params ? inputTools.map((t2) => t2.type === "function" ? { + const tools = "tools" in params ? inputTools.map((t4) => t4.type === "function" ? { type: "function", function: { - name: t2.function.name || t2.function.function.name, - parameters: t2.function.parameters, - description: t2.function.description, - strict: t2.function.strict + name: t4.function.name || t4.function.function.name, + parameters: t4.function.parameters, + description: t4.function.description, + strict: t4.function.strict } - } : t2) : void 0; + } : t4) : void 0; for (const message of params.messages) { this._addMessage(message, false); } - for (let i3 = 0; i3 < maxChatCompletions; ++i3) { + for (let i5 = 0; i5 < maxChatCompletions; ++i5) { const chatCompletion = await this._createChatCompletion(client, { ...restParams, tool_choice, @@ -63839,7 +89516,7 @@ var AbstractChatCompletionRunner = class extends EventStream { continue; } const rawContent2 = await fn.function(parsed, this); - const content = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); + const content = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); this._addMessage({ role, tool_call_id, content }); if (singleFunctionToCall) { return; @@ -63850,11 +89527,11 @@ var AbstractChatCompletionRunner = class extends EventStream { } }; _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _AbstractChatCompletionRunner_getFinalContent = function _AbstractChatCompletionRunner_getFinalContent2() { - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; }, _AbstractChatCompletionRunner_getFinalMessage = function _AbstractChatCompletionRunner_getFinalMessage2() { - let i3 = this.messages.length; - while (i3-- > 0) { - const message = this.messages[i3]; + let i5 = this.messages.length; + while (i5-- > 0) { + const message = this.messages[i5]; if (isAssistantMessage(message)) { const { function_call, ...rest } = message; const ret = { @@ -63870,8 +89547,8 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra } throw new OpenAIError("stream ended without producing a ChatCompletionMessage with role=assistant"); }, _AbstractChatCompletionRunner_getFinalFunctionCall = function _AbstractChatCompletionRunner_getFinalFunctionCall2() { - for (let i3 = this.messages.length - 1; i3 >= 0; i3--) { - const message = this.messages[i3]; + for (let i5 = this.messages.length - 1; i5 >= 0; i5--) { + const message = this.messages[i5]; if (isAssistantMessage(message) && message?.function_call) { return message.function_call; } @@ -63881,12 +89558,12 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra } return; }, _AbstractChatCompletionRunner_getFinalFunctionCallResult = function _AbstractChatCompletionRunner_getFinalFunctionCallResult2() { - for (let i3 = this.messages.length - 1; i3 >= 0; i3--) { - const message = this.messages[i3]; + for (let i5 = this.messages.length - 1; i5 >= 0; i5--) { + const message = this.messages[i5]; if (isFunctionMessage(message) && message.content != null) { return message.content; } - if (isToolMessage(message) && message.content != null && typeof message.content === "string" && this.messages.some((x5) => x5.role === "assistant" && x5.tool_calls?.some((y6) => y6.type === "function" && y6.id === message.tool_call_id))) { + if (isToolMessage(message) && message.content != null && typeof message.content === "string" && this.messages.some((x7) => x7.role === "assistant" && x7.tool_calls?.some((y7) => y7.type === "function" && y7.id === message.tool_call_id))) { return message.content; } } @@ -64163,16 +89840,16 @@ var generate = (tokens) => { var partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input))))); // node_modules/openai/lib/ChatCompletionStream.mjs -var __classPrivateFieldSet9 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet10 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet11 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet12 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _ChatCompletionStream_instances; var _ChatCompletionStream_params; @@ -64193,11 +89870,11 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl _ChatCompletionStream_params.set(this, void 0); _ChatCompletionStream_choiceEventStates.set(this, void 0); _ChatCompletionStream_currentChatCompletionSnapshot.set(this, void 0); - __classPrivateFieldSet9(this, _ChatCompletionStream_params, params, "f"); - __classPrivateFieldSet9(this, _ChatCompletionStream_choiceEventStates, [], "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_params, params, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_choiceEventStates, [], "f"); } get currentChatCompletionSnapshot() { - return __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + return __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); } /** * Intended for use on the frontend, consuming a stream produced with @@ -64224,16 +89901,16 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); const stream4 = await client.chat.completions.create({ ...params, stream: true }, { ...options, signal: this.controller.signal }); this._connected(); for await (const chunk of stream4) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + return this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } async _fromReadableStream(readableStream, options) { const signal = options?.signal; @@ -64242,32 +89919,32 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); this._connected(); const stream4 = Stream2.fromReadableStream(readableStream, this.controller); let chatId; for await (const chunk of stream4) { if (chatId && chatId !== chunk.id) { - this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); chatId = chunk.id; } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + return this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } [(_ChatCompletionStream_params = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_choiceEventStates = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_currentChatCompletionSnapshot = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_instances = /* @__PURE__ */ new WeakSet(), _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest2() { if (this.ended) return; - __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); }, _ChatCompletionStream_getChoiceEventState = function _ChatCompletionStream_getChoiceEventState2(choice) { - let state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; - if (state2) { - return state2; + let state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; + if (state3) { + return state3; } - state2 = { + state3 = { content_done: false, refusal_done: false, logprobs_content_done: false, @@ -64275,12 +89952,12 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl done_tool_calls: /* @__PURE__ */ new Set(), current_tool_call_index: null }; - __classPrivateFieldGet11(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state2; - return state2; + __classPrivateFieldGet12(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state3; + return state3; }, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk2(chunk) { if (this.ended) return; - const completion = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); + const completion = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); this._emit("chunk", chunk, completion); for (const choice of chunk.choices) { const choiceSnapshot = completion.choices[choice.index]; @@ -64310,21 +89987,21 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl snapshot: choiceSnapshot.logprobs?.refusal ?? [] }); } - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); if (choiceSnapshot.finish_reason) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); - if (state2.current_tool_call_index != null) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state2.current_tool_call_index); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state3.current_tool_call_index != null) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state3.current_tool_call_index); } } for (const toolCall of choice.delta.tool_calls ?? []) { - if (state2.current_tool_call_index !== toolCall.index) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); - if (state2.current_tool_call_index != null) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state2.current_tool_call_index); + if (state3.current_tool_call_index !== toolCall.index) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state3.current_tool_call_index != null) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state3.current_tool_call_index); } } - state2.current_tool_call_index = toolCall.index; + state3.current_tool_call_index = toolCall.index; } for (const toolCallDelta of choice.delta.tool_calls ?? []) { const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallDelta.index]; @@ -64345,8 +90022,8 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } } }, _ChatCompletionStream_emitToolCallDoneEvent = function _ChatCompletionStream_emitToolCallDoneEvent2(choiceSnapshot, toolCallIndex) { - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); - if (state2.done_tool_calls.has(toolCallIndex)) { + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (state3.done_tool_calls.has(toolCallIndex)) { return; } const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallIndex]; @@ -64357,7 +90034,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl throw new Error("tool call snapshot missing `type`"); } if (toolCallSnapshot.type === "function") { - const inputTool = __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => tool.type === "function" && tool.function.name === toolCallSnapshot.function.name); + const inputTool = __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => tool.type === "function" && tool.function.name === toolCallSnapshot.function.name); this._emit("tool_calls.function.arguments.done", { name: toolCallSnapshot.function.name, index: toolCallIndex, @@ -64368,50 +90045,50 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl assertNever(toolCallSnapshot.type); } }, _ChatCompletionStream_emitContentDoneEvents = function _ChatCompletionStream_emitContentDoneEvents2(choiceSnapshot) { - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); - if (choiceSnapshot.message.content && !state2.content_done) { - state2.content_done = true; - const responseFormat = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.message.content && !state3.content_done) { + state3.content_done = true; + const responseFormat = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); this._emit("content.done", { content: choiceSnapshot.message.content, parsed: responseFormat ? responseFormat.$parseRaw(choiceSnapshot.message.content) : null }); } - if (choiceSnapshot.message.refusal && !state2.refusal_done) { - state2.refusal_done = true; + if (choiceSnapshot.message.refusal && !state3.refusal_done) { + state3.refusal_done = true; this._emit("refusal.done", { refusal: choiceSnapshot.message.refusal }); } - if (choiceSnapshot.logprobs?.content && !state2.logprobs_content_done) { - state2.logprobs_content_done = true; + if (choiceSnapshot.logprobs?.content && !state3.logprobs_content_done) { + state3.logprobs_content_done = true; this._emit("logprobs.content.done", { content: choiceSnapshot.logprobs.content }); } - if (choiceSnapshot.logprobs?.refusal && !state2.logprobs_refusal_done) { - state2.logprobs_refusal_done = true; + if (choiceSnapshot.logprobs?.refusal && !state3.logprobs_refusal_done) { + state3.logprobs_refusal_done = true; this._emit("logprobs.refusal.done", { refusal: choiceSnapshot.logprobs.refusal }); } }, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest2() { if (this.ended) { throw new OpenAIError(`stream has ended, this shouldn't happen`); } - const snapshot = __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + const snapshot = __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); if (!snapshot) { throw new OpenAIError(`request ended without sending any chunks`); } - __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); - __classPrivateFieldSet9(this, _ChatCompletionStream_choiceEventStates, [], "f"); - return finalizeChatCompletion(snapshot, __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")); + __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_choiceEventStates, [], "f"); + return finalizeChatCompletion(snapshot, __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")); }, _ChatCompletionStream_getAutoParseableResponseFormat = function _ChatCompletionStream_getAutoParseableResponseFormat2() { - const responseFormat = __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")?.response_format; + const responseFormat = __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")?.response_format; if (isAutoParsableResponseFormat(responseFormat)) { return responseFormat; } return null; }, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion2(chunk) { - var _a5, _b2, _c2, _d2; - let snapshot = __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + var _a6, _b2, _c2, _d2; + let snapshot = __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); const { choices, ...rest } = chunk; if (!snapshot) { - snapshot = __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, { + snapshot = __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, { ...rest, choices: [] }, "f"); @@ -64431,7 +90108,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl assertIsEmpty(rest3); Object.assign(choice.logprobs, rest3); if (content2) { - (_a5 = choice.logprobs).content ?? (_a5.content = []); + (_a6 = choice.logprobs).content ?? (_a6.content = []); choice.logprobs.content.push(...content2); } if (refusal2) { @@ -64442,7 +90119,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } if (finish_reason) { choice.finish_reason = finish_reason; - if (__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f") && hasAutoParseableInput(__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f"))) { + if (__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f") && hasAutoParseableInput(__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f"))) { if (finish_reason === "length") { throw new LengthFinishReasonError(); } @@ -64476,7 +90153,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } if (content) { choice.message.content = (choice.message.content || "") + content; - if (!choice.message.refusal && __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { + if (!choice.message.refusal && __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { choice.message.parsed = partialParse(choice.message.content); } } @@ -64496,7 +90173,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl tool_call.function.name = fn.name; if (fn?.arguments) { tool_call.function.arguments += fn.arguments; - if (shouldParseToolCall(__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f"), tool_call)) { + if (shouldParseToolCall(__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f"), tool_call)) { tool_call.function.parsed_arguments = partialParse(tool_call.function.arguments); } } @@ -64605,23 +90282,23 @@ function finalizeChatCompletion(snapshot, params) { role, content, refusal: message.refusal ?? null, - tool_calls: tool_calls.map((tool_call, i3) => { + tool_calls: tool_calls.map((tool_call, i5) => { const { function: fn, type: type2, id: id2, ...toolRest } = tool_call; const { arguments: args, name, ...fnRest } = fn || {}; if (id2 == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].id + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].id ${str(snapshot)}`); } if (type2 == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].type + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].type ${str(snapshot)}`); } if (name == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].function.name + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].function.name ${str(snapshot)}`); } if (args == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].function.arguments + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].function.arguments ${str(snapshot)}`); } return { ...toolRest, id: id2, type: type2, function: { ...fnRest, name, arguments: args } }; @@ -64644,8 +90321,8 @@ ${str(snapshot)}`); }; return maybeParseChatCompletion(completion, params); } -function str(x5) { - return JSON.stringify(x5); +function str(x7) { + return JSON.stringify(x7); } function assertIsEmpty(obj) { return; @@ -64729,16 +90406,16 @@ var Chat2 = class extends APIResource2 { })(Chat2 || (Chat2 = {})); // node_modules/openai/lib/AssistantStream.mjs -var __classPrivateFieldGet12 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet13 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; -var __classPrivateFieldSet10 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet11 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; var _AssistantStream_instances; var _AssistantStream_events; @@ -64844,12 +90521,12 @@ var AssistantStream = class _AssistantStream extends EventStream { this._connected(); const stream4 = Stream2.fromReadableStream(readableStream, this.controller); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } toReadableStream() { const stream4 = new Stream2(this[Symbol.asyncIterator].bind(this), this.controller); @@ -64877,12 +90554,12 @@ var AssistantStream = class _AssistantStream extends EventStream { }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } static createThreadAssistantStream(params, thread, options) { const runner = new _AssistantStream(); @@ -64901,30 +90578,30 @@ var AssistantStream = class _AssistantStream extends EventStream { return runner; } currentEvent() { - return __classPrivateFieldGet12(this, _AssistantStream_currentEvent, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentEvent, "f"); } currentRun() { - return __classPrivateFieldGet12(this, _AssistantStream_currentRunSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentRunSnapshot, "f"); } currentMessageSnapshot() { - return __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f"); } currentRunStepSnapshot() { - return __classPrivateFieldGet12(this, _AssistantStream_currentRunStepSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentRunStepSnapshot, "f"); } async finalRunSteps() { await this.done(); - return Object.values(__classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")); + return Object.values(__classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")); } async finalMessages() { await this.done(); - return Object.values(__classPrivateFieldGet12(this, _AssistantStream_messageSnapshots, "f")); + return Object.values(__classPrivateFieldGet13(this, _AssistantStream_messageSnapshots, "f")); } async finalRun() { await this.done(); - if (!__classPrivateFieldGet12(this, _AssistantStream_finalRun, "f")) + if (!__classPrivateFieldGet13(this, _AssistantStream_finalRun, "f")) throw Error("Final run was not received."); - return __classPrivateFieldGet12(this, _AssistantStream_finalRun, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_finalRun, "f"); } async _createThreadAssistantStream(thread, params, options) { const signal = options?.signal; @@ -64937,12 +90614,12 @@ var AssistantStream = class _AssistantStream extends EventStream { const stream4 = await thread.createAndRun(body, { ...options, signal: this.controller.signal }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } async _createAssistantStream(run, threadId, params, options) { const signal = options?.signal; @@ -64955,12 +90632,12 @@ var AssistantStream = class _AssistantStream extends EventStream { const stream4 = await run.create(threadId, body, { ...options, signal: this.controller.signal }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } static accumulateDelta(acc, delta) { for (const [key, deltaValue] of Object.entries(delta)) { @@ -64984,7 +90661,7 @@ var AssistantStream = class _AssistantStream extends EventStream { } else if (isObj(accValue) && isObj(deltaValue)) { accValue = this.accumulateDelta(accValue, deltaValue); } else if (Array.isArray(accValue) && Array.isArray(deltaValue)) { - if (accValue.every((x5) => typeof x5 === "string" || typeof x5 === "number")) { + if (accValue.every((x7) => typeof x7 === "string" || typeof x7 === "number")) { accValue.push(...deltaValue); continue; } @@ -65011,8 +90688,8 @@ var AssistantStream = class _AssistantStream extends EventStream { _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { if (this.ended) return; - __classPrivateFieldSet10(this, _AssistantStream_currentEvent, event, "f"); - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); + __classPrivateFieldSet11(this, _AssistantStream_currentEvent, event, "f"); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); switch (event.event) { case "thread.created": break; @@ -65025,7 +90702,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.cancelling": case "thread.run.cancelled": case "thread.run.expired": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); break; case "thread.run.step.created": case "thread.run.step.in_progress": @@ -65034,14 +90711,14 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); break; case "thread.message.created": case "thread.message.in_progress": case "thread.message.delta": case "thread.message.completed": case "thread.message.incomplete": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); break; case "error": throw new Error("Encountered an error event in event processing - errors should be processed earlier"); @@ -65050,13 +90727,13 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { if (this.ended) { throw new OpenAIError(`stream has ended, this shouldn't happen`); } - if (!__classPrivateFieldGet12(this, _AssistantStream_finalRun, "f")) + if (!__classPrivateFieldGet13(this, _AssistantStream_finalRun, "f")) throw Error("Final run has not been received"); - return __classPrivateFieldGet12(this, _AssistantStream_finalRun, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_finalRun, "f"); }, _AssistantStream_handleMessage = function _AssistantStream_handleMessage2(event) { - const [accumulatedMessage, newContent] = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); - __classPrivateFieldSet10(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); - __classPrivateFieldGet12(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; + const [accumulatedMessage, newContent] = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); + __classPrivateFieldSet11(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); + __classPrivateFieldGet13(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; for (const content of newContent) { const snapshotContent = accumulatedMessage.content[content.index]; if (snapshotContent?.type == "text") { @@ -65082,46 +90759,46 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { throw Error("The snapshot associated with this text delta is not text or missing"); } } - if (content.index != __classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f")) { - if (__classPrivateFieldGet12(this, _AssistantStream_currentContent, "f")) { - switch (__classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").type) { + if (content.index != __classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f")) { + if (__classPrivateFieldGet13(this, _AssistantStream_currentContent, "f")) { + switch (__classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").type) { case "text": - this._emit("textDone", __classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").text, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("textDone", __classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").text, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; case "image_file": - this._emit("imageFileDone", __classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").image_file, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("imageFileDone", __classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").image_file, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; } } - __classPrivateFieldSet10(this, _AssistantStream_currentContentIndex, content.index, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentContentIndex, content.index, "f"); } - __classPrivateFieldSet10(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); } } break; case "thread.message.completed": case "thread.message.incomplete": - if (__classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f") !== void 0) { - const currentContent = event.data.content[__classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f")]; + if (__classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f") !== void 0) { + const currentContent = event.data.content[__classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f")]; if (currentContent) { switch (currentContent.type) { case "image_file": - this._emit("imageFileDone", currentContent.image_file, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("imageFileDone", currentContent.image_file, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; case "text": - this._emit("textDone", currentContent.text, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("textDone", currentContent.text, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; } } } - if (__classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")) { + if (__classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")) { this._emit("messageDone", event.data); } - __classPrivateFieldSet10(this, _AssistantStream_messageSnapshot, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_messageSnapshot, void 0, "f"); } }, _AssistantStream_handleRunStep = function _AssistantStream_handleRunStep2(event) { - const accumulatedRunStep = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); - __classPrivateFieldSet10(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); + const accumulatedRunStep = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); + __classPrivateFieldSet11(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); switch (event.event) { case "thread.run.step.created": this._emit("runStepCreated", event.data); @@ -65130,16 +90807,16 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { const delta = event.data.delta; if (delta.step_details && delta.step_details.type == "tool_calls" && delta.step_details.tool_calls && accumulatedRunStep.step_details.type == "tool_calls") { for (const toolCall of delta.step_details.tool_calls) { - if (toolCall.index == __classPrivateFieldGet12(this, _AssistantStream_currentToolCallIndex, "f")) { + if (toolCall.index == __classPrivateFieldGet13(this, _AssistantStream_currentToolCallIndex, "f")) { this._emit("toolCallDelta", toolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index]); } else { - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); } - __classPrivateFieldSet10(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) - this._emit("toolCallCreated", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) + this._emit("toolCallCreated", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); } } } @@ -65149,12 +90826,12 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": - __classPrivateFieldSet10(this, _AssistantStream_currentRunStepSnapshot, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentRunStepSnapshot, void 0, "f"); const details = event.data.step_details; if (details.type == "tool_calls") { - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, void 0, "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, void 0, "f"); } } this._emit("runStepDone", event.data, accumulatedRunStep); @@ -65163,34 +90840,34 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { break; } }, _AssistantStream_handleEvent = function _AssistantStream_handleEvent2(event) { - __classPrivateFieldGet12(this, _AssistantStream_events, "f").push(event); + __classPrivateFieldGet13(this, _AssistantStream_events, "f").push(event); this._emit("event", event); }, _AssistantStream_accumulateRunStep = function _AssistantStream_accumulateRunStep2(event) { switch (event.event) { case "thread.run.step.created": - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; return event.data; case "thread.run.step.delta": - let snapshot = __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + let snapshot = __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; if (!snapshot) { throw Error("Received a RunStepDelta before creation of a snapshot"); } let data = event.data; if (data.delta) { const accumulated = AssistantStream.accumulateDelta(snapshot, data.delta); - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; } - return __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + return __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; case "thread.run.step.completed": case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": case "thread.run.step.in_progress": - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; break; } - if (__classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) - return __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + if (__classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) + return __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; throw new Error("No snapshot available"); }, _AssistantStream_accumulateMessage = function _AssistantStream_accumulateMessage2(event, snapshot) { let newContent = []; @@ -65206,7 +90883,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { for (const contentElement of data.delta.content) { if (contentElement.index in snapshot.content) { let currentContent = snapshot.content[contentElement.index]; - snapshot.content[contentElement.index] = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); + snapshot.content[contentElement.index] = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); } else { snapshot.content[contentElement.index] = contentElement; newContent.push(contentElement); @@ -65227,7 +90904,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { }, _AssistantStream_accumulateContent = function _AssistantStream_accumulateContent2(contentElement, currentContent) { return AssistantStream.accumulateDelta(currentContent, contentElement); }, _AssistantStream_handleRun = function _AssistantStream_handleRun2(event) { - __classPrivateFieldSet10(this, _AssistantStream_currentRunSnapshot, event.data, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentRunSnapshot, event.data, "f"); switch (event.event) { case "thread.run.created": break; @@ -65240,10 +90917,10 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.failed": case "thread.run.completed": case "thread.run.expired": - __classPrivateFieldSet10(this, _AssistantStream_finalRun, event.data, "f"); - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_finalRun, event.data, "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, void 0, "f"); } break; case "thread.run.cancelling": @@ -66369,7 +92046,142 @@ var OpenAiEngine = class { max_tokens: this.config.maxTokensOutput }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a4, b7) => a4 + b7, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); + const completion = await this.client.chat.completions.create(params); + const message = completion.choices[0].message; + let content = message?.content; + return removeContentTags(content, "think"); + } catch (error) { + const err = error; + if (axios_default.isAxiosError(error) && error.response?.status === 401) { + const openAiError = error.response.data.error; + if (openAiError) throw new Error(openAiError.message); + } + throw err; + } + }; + this.config = config7; + const clientOptions = { + apiKey: config7.apiKey + }; + if (config7.baseURL) { + clientOptions.baseURL = config7.baseURL; + } + if (config7.customHeaders) { + const headers = parseCustomHeaders(config7.customHeaders); + if (Object.keys(headers).length > 0) { + clientOptions.defaultHeaders = headers; + } + } + this.client = new OpenAI(clientOptions); + } +}; + +// src/engine/mistral.ts +var Mistral = require_mistralai().Mistral; +var MistralAiEngine = class { + // Using any type for Mistral client to avoid TS errors + constructor(config7) { + this.generateCommitMessage = async (messages) => { + const params = { + model: this.config.model, + messages, + topP: 0.1, + maxTokens: this.config.maxTokensOutput + }; + try { + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); + const completion = await this.client.chat.complete(params); + if (!completion.choices) throw Error("No completion choice available."); + const message = completion.choices[0].message; + if (!message || !message.content) + throw Error("No completion choice available."); + let content = message.content; + return removeContentTags(content, "think"); + } catch (error) { + const err = error; + if (axios_default.isAxiosError(error) && error.response?.status === 401) { + const mistralError = error.response.data.error; + if (mistralError) throw new Error(mistralError.message); + } + throw err; + } + }; + this.config = config7; + if (!config7.baseURL) { + this.client = new Mistral({ apiKey: config7.apiKey }); + } else { + this.client = new Mistral({ + apiKey: config7.apiKey, + serverURL: config7.baseURL + }); + } + } +}; + +// src/engine/groq.ts +var GroqEngine = class extends OpenAiEngine { + constructor(config7) { + config7.baseURL = "https://api.groq.com/openai/v1"; + super(config7); + } +}; + +// src/engine/mlx.ts +var MLXEngine = class { + constructor(config7) { + this.config = config7; + this.client = axios_default.create({ + url: config7.baseURL ? `${config7.baseURL}/${config7.apiKey}` : "http://localhost:8080/v1/chat/completions", + headers: { "Content-Type": "application/json" } + }); + } + async generateCommitMessage(messages) { + const params = { + messages, + temperature: 0, + top_p: 0.1, + repetition_penalty: 1.5, + stream: false + }; + try { + const response = await this.client.post( + this.client.getUri(this.config), + params + ); + const choices = response.data.choices; + const message = choices[0].message; + let content = message?.content; + return removeContentTags(content, "think"); + } catch (err) { + const message = err.response?.data?.error ?? err.message; + throw new Error(`MLX provider error: ${message}`); + } + } +}; + +// src/engine/deepseek.ts +var DeepseekEngine = class extends OpenAiEngine { + constructor(config7) { + super({ + ...config7, + baseURL: "https://api.deepseek.com/v1" + }); + // Identical method from OpenAiEngine, re-implemented here + this.generateCommitMessage = async (messages) => { + const params = { + model: this.config.model, + messages, + temperature: 0, + top_p: 0.1, + max_tokens: this.config.maxTokensOutput + }; + try { + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); const completion = await this.client.chat.completions.create(params); @@ -66385,173 +92197,418 @@ var OpenAiEngine = class { throw err; } }; - this.config = config7; - const clientOptions = { - apiKey: config7.apiKey - }; - if (config7.baseURL) { - clientOptions.baseURL = config7.baseURL; - } - if (config7.customHeaders) { - const headers = parseCustomHeaders(config7.customHeaders); - if (Object.keys(headers).length > 0) { - clientOptions.defaultHeaders = headers; - } - } - this.client = new OpenAI(clientOptions); } }; -// src/engine/mistral.ts -var Mistral = require_mistralai().Mistral; -var MistralAiEngine = class { - // Using any type for Mistral client to avoid TS errors +// src/engine/openrouter.ts +var OpenRouterEngine = class { constructor(config7) { + this.config = config7; this.generateCommitMessage = async (messages) => { - const params = { - model: this.config.model, - messages, - topP: 0.1, - maxTokens: this.config.maxTokensOutput - }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a4, b7) => a4 + b7, 0); - if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) - throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); - const completion = await this.client.chat.complete(params); - if (!completion.choices) - throw Error("No completion choice available."); - const message = completion.choices[0].message; - if (!message || !message.content) - throw Error("No completion choice available."); - let content = message.content; + const response = await this.client.post("", { + model: this.config.model, + messages + }); + const message = response.data.choices[0].message; + let content = message?.content; return removeContentTags(content, "think"); } catch (error) { const err = error; if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const mistralError = error.response.data.error; - if (mistralError) throw new Error(mistralError.message); + const openRouterError = error.response.data.error; + if (openRouterError) throw new Error(openRouterError.message); } throw err; } }; - this.config = config7; - if (!config7.baseURL) { - this.client = new Mistral({ apiKey: config7.apiKey }); - } else { - this.client = new Mistral({ apiKey: config7.apiKey, serverURL: config7.baseURL }); - } - } -}; - -// src/engine/groq.ts -var GroqEngine = class extends OpenAiEngine { - constructor(config7) { - config7.baseURL = "https://api.groq.com/openai/v1"; - super(config7); - } -}; - -// src/engine/mlx.ts -var MLXEngine = class { - constructor(config7) { - this.config = config7; this.client = axios_default.create({ - url: config7.baseURL ? `${config7.baseURL}/${config7.apiKey}` : "http://localhost:8080/v1/chat/completions", - headers: { "Content-Type": "application/json" } + baseURL: "https://openrouter.ai/api/v1/chat/completions", + headers: { + Authorization: `Bearer ${config7.apiKey}`, + "HTTP-Referer": "https://github.com/di-sukharev/opencommit", + "X-Title": "OpenCommit", + "Content-Type": "application/json" + } }); } - async generateCommitMessage(messages) { - const params = { - messages, - temperature: 0, - top_p: 0.1, - repetition_penalty: 1.5, - stream: false - }; - try { - const response = await this.client.post( - this.client.getUri(this.config), - params - ); - const choices = response.data.choices; - const message = choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); - } catch (err) { - const message = err.response?.data?.error ?? err.message; - throw new Error(`MLX provider error: ${message}`); - } - } }; -// src/engine/deepseek.ts -var DeepseekEngine = class extends OpenAiEngine { +// src/engine/bedrock.ts +var import_client_bedrock_runtime = __toESM(require_dist_cjs65(), 1); +var BedrockEngine = class { constructor(config7) { - super({ - ...config7, - baseURL: "https://api.deepseek.com/v1" - }); - // Identical method from OpenAiEngine, re-implemented here this.generateCommitMessage = async (messages) => { - const params = { - model: this.config.model, - messages, - temperature: 0, - top_p: 0.1, - max_tokens: this.config.maxTokensOutput - }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a4, b7) => a4 + b7, 0); - if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a6, b9) => a6 + b9, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); - const completion = await this.client.chat.completions.create(params); - const message = completion.choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); + } + const systemMessage = messages.find((msg) => msg.role === "system")?.content || ""; + const restMessages = messages.filter((msg) => msg.role !== "system"); + if (this.config.useConverseApi !== false) { + return this.generateWithConverseApi(systemMessage, restMessages); + } else { + return this.generateWithInvokeModelApi(systemMessage, restMessages); + } } catch (error) { const err = error; if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openAiError = error.response.data.error; - if (openAiError) throw new Error(openAiError.message); + const bedrockError = error.response.data.error; + if (bedrockError) throw new Error(bedrockError.message); } + ce(`${source_default.red("\u2716")} ${err?.message || err}`); throw err; } }; - } -}; - -// src/engine/openrouter.ts -var OpenRouterEngine = class { - constructor(config7) { this.config = config7; - this.generateCommitMessage = async (messages) => { - try { - const response = await this.client.post("", { - model: this.config.model, - messages - }); - const message = response.data.choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openRouterError = error.response.data.error; - if (openRouterError) throw new Error(openRouterError.message); + const clientOptions = { + region: config7.region || "us-east-1" + // Default to us-east-1 if not specified + }; + if (config7.apiKey) { + if (config7.apiKey.startsWith("Bedrock-API-Key-")) { + if (!config7.customHeaders) { + config7.customHeaders = {}; } - throw err; + config7.customHeaders["x-api-key"] = config7.apiKey; + } else { + const [accessKeyId, secretAccessKey] = config7.apiKey.split(":"); + if (accessKeyId && secretAccessKey) { + clientOptions.credentials = { accessKeyId, secretAccessKey }; + } + } + } + this.client = new import_client_bedrock_runtime.BedrockRuntimeClient(clientOptions); + } + // Helper to identify model family by looking for relevant substrings in the model ID + getModelFamily(modelId) { + if (modelId.includes("claude")) return "anthropic.claude"; + if (modelId.includes("titan")) return "amazon.titan"; + if (modelId.includes("nova")) return "amazon.nova"; + if (modelId.includes("llama")) return "meta.llama"; + if (modelId.includes("ai21") || modelId.includes("jamba") || modelId.includes("jurassic")) return "ai21"; + if (modelId.includes("cohere") || modelId.includes("command")) return "cohere"; + if (modelId.includes("mistral")) return "mistral"; + if (modelId.includes("stability")) return "stability"; + if (modelId.includes("deepseek")) return "deepseek"; + return "unknown"; + } + // Uses the newer Converse API which supports guardrails + async generateWithConverseApi(systemMessage, messages) { + const modelId = this.config.model; + const converseMessages = []; + let systemInstructions = ""; + if (systemMessage) { + systemInstructions = systemMessage; + } + for (let i5 = 0; i5 < messages.length; i5++) { + const message = messages[i5]; + if (message.role === "system") continue; + if (i5 === 0 && message.role === "user" && systemInstructions) { + converseMessages.push({ + role: "user", + content: [{ text: `[System Instructions]: ${systemInstructions} + +[User Message]: ${message.content}` }] + }); + } else { + const role = message.role === "assistant" ? "assistant" : "user"; + converseMessages.push({ + role, + content: [{ text: message.content }] + }); + } + } + const params = { + modelId, + messages: converseMessages, + inferenceConfig: { + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 } }; - this.client = axios_default.create({ - baseURL: "https://openrouter.ai/api/v1/chat/completions", - headers: { - Authorization: `Bearer ${config7.apiKey}`, - "HTTP-Referer": "https://github.com/di-sukharev/opencommit", - "X-Title": "OpenCommit", - "Content-Type": "application/json" + if (this.config.guardrailId) { + params["guardrailConfig"] = { + guardrailId: this.config.guardrailId, + guardrailVersion: this.config.guardrailVersion || "DRAFT" + // Use configured version or default to DRAFT + }; + } + const command = new import_client_bedrock_runtime.ConverseCommand(params); + const response = await this.client.send(command); + if (response.output?.message?.content?.[0]?.text) { + const content = response.output.message.content[0].text; + return removeContentTags(content, "think"); + } + return null; + } + // Uses the older InvokeModel API for backwards compatibility + async generateWithInvokeModelApi(systemMessage, messages) { + let payload; + const modelId = this.config.model; + const modelFamily = this.getModelFamily(modelId); + switch (modelFamily) { + case "anthropic.claude": + payload = { + anthropic_version: "bedrock-2023-05-31", + max_tokens: this.config.maxTokensOutput, + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + case "amazon.titan": + payload = { + inputText: this.formatMessagesAsTitanPrompt(systemMessage, messages), + textGenerationConfig: { + maxTokenCount: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + } + }; + break; + case "amazon.nova": + payload = { + prompt: this.formatMessagesAsNovaPrompt(systemMessage, messages), + temperature: 0, + top_p: 0.1, + max_tokens: this.config.maxTokensOutput + }; + break; + case "meta.llama": + payload = { + prompt: this.formatMessagesAsLlamaPrompt(systemMessage, messages), + max_gen_len: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + case "ai21": + payload = { + prompt: this.formatMessagesAsAI21Prompt(systemMessage, messages), + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + }; + break; + case "cohere": + payload = { + prompt: this.formatMessagesAsGenericPrompt(systemMessage, messages), + max_tokens: this.config.maxTokensOutput, + temperature: 0, + p: 0.1 + }; + break; + case "mistral": + payload = { + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role === "assistant" ? "assistant" : "user", + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + case "stability": + payload = { + text_prompts: [ + { + text: this.formatMessagesAsGenericPrompt(systemMessage, messages) + } + ], + cfg_scale: 7, + steps: 30 + }; + break; + case "deepseek": + payload = { + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + default: + payload = { + max_tokens: this.config.maxTokensOutput, + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + } + const command = new import_client_bedrock_runtime.InvokeModelCommand({ + modelId, + body: JSON.stringify(payload), + contentType: "application/json", + accept: "application/json" + }); + const response = await this.client.send(command); + const responseBody = JSON.parse(new TextDecoder().decode(response.body)); + let content; + switch (modelFamily) { + case "anthropic.claude": + content = responseBody.content?.[0]?.text; + break; + case "amazon.titan": + content = responseBody.results?.[0]?.outputText; + break; + case "amazon.nova": + content = responseBody.completion; + break; + case "meta.llama": + content = responseBody.generation; + break; + case "ai21": + content = responseBody.completions?.[0]?.data?.text; + break; + case "cohere": + content = responseBody.generations?.[0]?.text; + break; + case "mistral": + content = responseBody.outputs?.[0]?.text || responseBody.completion; + break; + case "stability": + content = responseBody.artifacts?.[0]?.text; + break; + case "deepseek": + content = responseBody.content?.[0]?.text || responseBody.generated_text; + break; + default: + content = responseBody.content?.[0]?.text || responseBody.generation || responseBody.text || responseBody.completion || responseBody.answer || responseBody.response; + break; + } + return removeContentTags(content, "think"); + } + formatMessagesAsTitanPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `System: ${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `Human: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `Assistant: ${message.content} + +`; } - }); + } + prompt += "Assistant: "; + return prompt; + } + formatMessagesAsNovaPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `USER: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `ASSISTANT: ${message.content} + +`; + } + } + prompt += "ASSISTANT: "; + return prompt; + } + formatMessagesAsLlamaPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += ` +${systemMessage} + + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += ` +${message.content} + + +`; + } else if (message.role === "assistant") { + prompt += ` +${message.content} + + +`; + } + } + prompt += "\n"; + return prompt; + } + formatMessagesAsAI21Prompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `User: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `Assistant: ${message.content} + +`; + } + } + prompt += "Assistant: "; + return prompt; + } + formatMessagesAsGenericPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + const role = message.role === "user" ? "User" : "Assistant"; + prompt += `${role}: ${message.content} + +`; + } + prompt += "Assistant: "; + return prompt; } }; @@ -66609,6 +92666,8 @@ function getEngine() { return new DeepseekEngine(DEFAULT_CONFIG2); case "openrouter" /* OPENROUTER */: return new OpenRouterEngine(DEFAULT_CONFIG2); + case "bedrock" /* BEDROCK */: + return new BedrockEngine(DEFAULT_CONFIG2); default: return new OpenAiEngine(DEFAULT_CONFIG2); } @@ -66618,10 +92677,10 @@ function getEngine() { var COMMITLINT_LLM_CONFIG_PATH = `${process.env.PWD}/.opencommit-commitlint`; // src/modules/commitlint/crypto.ts -var import_crypto3 = __toESM(require("crypto"), 1); +var import_crypto11 = __toESM(require("crypto"), 1); var computeHash = async (content, algorithm = "sha256") => { try { - const hash = import_crypto3.default.createHash(algorithm); + const hash = import_crypto11.default.createHash(algorithm); hash.update(content); return hash.digest("hex"); } catch (error) { @@ -66631,7 +92690,7 @@ var computeHash = async (content, algorithm = "sha256") => { }; // src/modules/commitlint/prompts.ts -var import_types = __toESM(require_lib5(), 1); +var import_types5 = __toESM(require_lib5(), 1); var config2 = getConfig(); var translation = i18n[config2.OCO_LANGUAGE || "en"]; var getTypeRuleExtraDescription = (type2, prompt) => prompt?.questions?.type?.enum?.[type2]?.description; @@ -66643,11 +92702,11 @@ var llmReadableRules = { enumRule: (key, applicable, value) => `The ${key} should ${applicable} be one of the following values: - ${Array.isArray(value) ? value.join("\n - ") : value}.`, enumTypeRule: (key, applicable, value, prompt) => `The ${key} should ${applicable} be one of the following values: - - ${Array.isArray(value) ? value.map((v5) => { - const description = getTypeRuleExtraDescription(v5, prompt); + - ${Array.isArray(value) ? value.map((v8) => { + const description = getTypeRuleExtraDescription(v8, prompt); if (description) { - return `${v5} (${description})`; - } else return v5; + return `${v8} (${description})`; + } else return v8; }).join("\n - ") : value}.`, fullStopRule: (key, applicable, value) => `The ${key} should ${applicable} end with '${value}'.`, maxLengthRule: (key, applicable, value) => `The ${key} should ${applicable} have ${value} characters or less.`, @@ -66691,7 +92750,7 @@ var rulesPrompts = { }; var getPrompt = (ruleName, ruleConfig, prompt) => { const [severity, applicable, value] = ruleConfig; - if (severity === import_types.RuleConfigSeverity.Disabled) return null; + if (severity === import_types5.RuleConfigSeverity.Disabled) return null; const promptFn = rulesPrompts[ruleName]; if (promptFn) { return promptFn(applicable, value, prompt); @@ -66779,8 +92838,8 @@ var findModulePath = (moduleName) => { ]; for (const basePath of searchPaths) { try { - const resolvedPath = require.resolve(moduleName, { paths: [basePath] }); - return resolvedPath; + const resolvedPath3 = require.resolve(moduleName, { paths: [basePath] }); + return resolvedPath3; } catch { } } @@ -66837,7 +92896,7 @@ var commitlintLLMConfigExists = async () => { try { await import_promises2.default.access(COMMITLINT_LLM_CONFIG_PATH); exists = true; - } catch (e3) { + } catch (e5) { exists = false; } return exists; @@ -67120,7 +93179,10 @@ var config5 = getConfig(); var MAX_TOKENS_INPUT = config5.OCO_TOKENS_MAX_INPUT; var MAX_TOKENS_OUTPUT = config5.OCO_TOKENS_MAX_OUTPUT; var generateCommitMessageChatCompletionPrompt = async (diff, fullGitMojiSpec, context) => { - const INIT_MESSAGES_PROMPT = await getMainCommitPrompt(fullGitMojiSpec, context); + const INIT_MESSAGES_PROMPT = await getMainCommitPrompt( + fullGitMojiSpec, + context + ); const chatContextAsCompletionRequest = [...INIT_MESSAGES_PROMPT]; chatContextAsCompletionRequest.push({ role: "user", @@ -67144,7 +93206,7 @@ var generateCommitMessageByDiff = async (diff, fullGitMojiSpec = false, context ); const INIT_MESSAGES_PROMPT_LENGTH = INIT_MESSAGES_PROMPT.map( (msg) => tokenCount(msg.content) + 4 - ).reduce((a4, b7) => a4 + b7, 0); + ).reduce((a6, b9) => a6 + b9, 0); const MAX_REQUEST_TOKENS = MAX_TOKENS_INPUT - ADJUSTMENT_FACTOR - INIT_MESSAGES_PROMPT_LENGTH - MAX_TOKENS_OUTPUT; if (tokenCount(diff) >= MAX_REQUEST_TOKENS) { const commitMessagePromises = await getCommitMsgsPromisesFromFileDiffs( @@ -67270,7 +93332,7 @@ var getOpenCommitIgnore = () => { const ig = (0, import_ignore.default)(); try { ig.add((0, import_fs3.readFileSync)(".opencommitignore").toString().split("\n")); - } catch (e3) { + } catch (e5) { } return ig; }; @@ -67698,9 +93760,16 @@ var prepareCommitMessageHook = async (isStageAllFlag = false) => { ); spin.stop("Done"); const fileContent = await import_promises4.default.readFile(messageFilePath); + const divider = "# ---------- [OpenCommit] ---------- #"; await import_promises4.default.writeFile( messageFilePath, - commitMessage + "\n" + fileContent.toString() + `# ${commitMessage} + +${divider} +# Remove the # above to use this generated commit message. +# To cancel the commit, just close this window without making any changes. + +${fileContent.toString()}` ); } catch (error) { ce(`${source_default.red("\u2716")} ${error}`); @@ -67713,7 +93782,7 @@ var getOpenCommitLatestVersion = async () => { try { const { stdout } = await execa("npm", ["view", "opencommit", "version"]); return stdout; - } catch (_7) { + } catch (_8) { ce("Error while getting the latest version of opencommit"); return void 0; } @@ -67767,6 +93836,9 @@ function use_single_api_key_and_url_default() { } else if (aiProvider === "flowise" /* FLOWISE */) { apiKey = config7["OCO_FLOWISE_API_KEY"]; apiUrl = config7["OCO_FLOWISE_ENDPOINT"]; + } else if (aiProvider === "bedrock" /* BEDROCK */) { + apiKey = config7["OCO_BEDROCK_API_KEY"]; + apiUrl = config7["OCO_BEDROCK_REGION"]; } else { throw new Error( `Migration failed, set AI provider first. Run "oco config set OCO_AI_PROVIDER=", where is one of: ${Object.values( @@ -67852,6 +93924,16 @@ var runMigrations = async () => { if (!getIsGlobalConfigFileExist()) return; const config7 = getConfig(); if (config7.OCO_AI_PROVIDER === "test" /* TEST */) return; + if ([ + "deepseek" /* DEEPSEEK */, + "groq" /* GROQ */, + "mistral" /* MISTRAL */, + "mlx" /* MLX */, + "openrouter" /* OPENROUTER */, + "bedrock" /* BEDROCK */ + ].includes(config7.OCO_AI_PROVIDER)) { + return; + } const completedMigrations = getCompletedMigrations(); let isMigrated = false; for (const migration of migrations) { diff --git a/out/github-action.cjs b/out/github-action.cjs index d0496f40..b8563dd1 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -69,32 +69,32 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; - var os3 = __importStar(require("os")); + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); @@ -138,11 +138,11 @@ var require_command = __commonJS({ return cmdStr; } }; - function escapeData(s2) { - return utils_1.toCommandValue(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + function escapeData(s4) { + return utils_1.toCommandValue(s4).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } - function escapeProperty(s2) { - return utils_1.toCommandValue(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + function escapeProperty(s4) { + return utils_1.toCommandValue(s4).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } } }); @@ -197,8 +197,8 @@ var init_stringify = __esm({ "node_modules/uuid/dist/esm-node/stringify.js"() { init_validate(); byteToHex = []; - for (let i3 = 0; i3 < 256; ++i3) { - byteToHex.push((i3 + 256).toString(16).substr(1)); + for (let i5 = 0; i5 < 256; ++i5) { + byteToHex.push((i5 + 256).toString(16).substr(1)); } stringify_default = stringify; } @@ -206,8 +206,8 @@ var init_stringify = __esm({ // node_modules/uuid/dist/esm-node/v1.js function v1(options, buf, offset) { - let i3 = buf && offset || 0; - const b3 = buf || new Array(16); + let i5 = buf && offset || 0; + const b5 = buf || new Array(16); options = options || {}; let node = options.node || _nodeId; let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; @@ -237,21 +237,21 @@ function v1(options, buf, offset) { _clockseq = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b3[i3++] = tl >>> 24 & 255; - b3[i3++] = tl >>> 16 & 255; - b3[i3++] = tl >>> 8 & 255; - b3[i3++] = tl & 255; + b5[i5++] = tl >>> 24 & 255; + b5[i5++] = tl >>> 16 & 255; + b5[i5++] = tl >>> 8 & 255; + b5[i5++] = tl & 255; const tmh = msecs / 4294967296 * 1e4 & 268435455; - b3[i3++] = tmh >>> 8 & 255; - b3[i3++] = tmh & 255; - b3[i3++] = tmh >>> 24 & 15 | 16; - b3[i3++] = tmh >>> 16 & 255; - b3[i3++] = clockseq >>> 8 | 128; - b3[i3++] = clockseq & 255; - for (let n2 = 0; n2 < 6; ++n2) { - b3[i3 + n2] = node[n2]; + b5[i5++] = tmh >>> 8 & 255; + b5[i5++] = tmh & 255; + b5[i5++] = tmh >>> 24 & 15 | 16; + b5[i5++] = tmh >>> 16 & 255; + b5[i5++] = clockseq >>> 8 | 128; + b5[i5++] = clockseq & 255; + for (let n4 = 0; n4 < 6; ++n4) { + b5[i5 + n4] = node[n4]; } - return buf || stringify_default(b3); + return buf || stringify_default(b5); } var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; var init_v1 = __esm({ @@ -269,24 +269,24 @@ function parse(uuid) { if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } - let v2; + let v7; const arr = new Uint8Array(16); - arr[0] = (v2 = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v2 >>> 16 & 255; - arr[2] = v2 >>> 8 & 255; - arr[3] = v2 & 255; - arr[4] = (v2 = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v2 & 255; - arr[6] = (v2 = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v2 & 255; - arr[8] = (v2 = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v2 & 255; - arr[10] = (v2 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v2 / 4294967296 & 255; - arr[12] = v2 >>> 24 & 255; - arr[13] = v2 >>> 16 & 255; - arr[14] = v2 >>> 8 & 255; - arr[15] = v2 & 255; + arr[0] = (v7 = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v7 >>> 16 & 255; + arr[2] = v7 >>> 8 & 255; + arr[3] = v7 & 255; + arr[4] = (v7 = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v7 & 255; + arr[6] = (v7 = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v7 & 255; + arr[8] = (v7 = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v7 & 255; + arr[10] = (v7 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v7 / 4294967296 & 255; + arr[12] = v7 >>> 24 & 255; + arr[13] = v7 >>> 16 & 255; + arr[14] = v7 >>> 8 & 255; + arr[15] = v7 & 255; return arr; } var parse_default; @@ -301,12 +301,12 @@ var init_parse = __esm({ function stringToBytes(str2) { str2 = unescape(encodeURIComponent(str2)); const bytes = []; - for (let i3 = 0; i3 < str2.length; ++i3) { - bytes.push(str2.charCodeAt(i3)); + for (let i5 = 0; i5 < str2.length; ++i5) { + bytes.push(str2.charCodeAt(i5)); } return bytes; } -function v35_default(name, version2, hashfunc) { +function v35_default(name, version4, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes(value); @@ -321,12 +321,12 @@ function v35_default(name, version2, hashfunc) { bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version2; + bytes[6] = bytes[6] & 15 | version4; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; - for (let i3 = 0; i3 < 16; ++i3) { - buf[offset + i3] = bytes[i3]; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = bytes[i5]; } return buf; } @@ -386,8 +386,8 @@ function v4(options, buf, offset) { rnds[8] = rnds[8] & 63 | 128; if (buf) { offset = offset || 0; - for (let i3 = 0; i3 < 16; ++i3) { - buf[offset + i3] = rnds[i3]; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = rnds[i5]; } return buf; } @@ -484,33 +484,33 @@ var init_esm_node = __esm({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var fs4 = __importStar(require("fs")); - var os3 = __importStar(require("os")); + var fs4 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -562,7 +562,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new URL(proxyVar); - } catch (_a5) { + } catch (_a6) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new URL(`http://${proxyVar}`); } @@ -595,8 +595,8 @@ var require_proxy = __commonJS({ if (typeof reqPort === "number") { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } - for (const upperNoProxyItem of noProxy.split(",").map((x2) => x2.trim().toUpperCase()).filter((x2) => x2)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x2) => x2 === upperNoProxyItem || x2.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x2.endsWith(`${upperNoProxyItem}`))) { + for (const upperNoProxyItem of noProxy.split(",").map((x4) => x4.trim().toUpperCase()).filter((x4) => x4)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x4) => x4 === upperNoProxyItem || x4.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x4.endsWith(`${upperNoProxyItem}`))) { return true; } } @@ -658,10 +658,10 @@ var require_tunnel = __commonJS({ self2.sockets = []; self2.on("free", function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); - for (var i3 = 0, len = self2.requests.length; i3 < len; ++i3) { - var pending = self2.requests[i3]; + for (var i5 = 0, len = self2.requests.length; i5 < len; ++i5) { + var pending = self2.requests[i5]; if (pending.host === options2.host && pending.port === options2.port) { - self2.requests.splice(i3, 1); + self2.requests.splice(i5, 1); pending.request.onSocket(socket); return; } @@ -807,14 +807,14 @@ var require_tunnel = __commonJS({ return host; } function mergeOptions(target) { - for (var i3 = 1, len = arguments.length; i3 < len; ++i3) { - var overrides = arguments[i3]; + for (var i5 = 1, len = arguments.length; i5 < len; ++i5) { + var overrides = arguments[i5]; if (typeof overrides === "object") { var keys = Object.keys(overrides); - for (var j4 = 0, keyLen = keys.length; j4 < keyLen; ++j4) { - var k4 = keys[j4]; - if (overrides[k4] !== void 0) { - target[k4] = overrides[k4]; + for (var j6 = 0, keyLen = keys.length; j6 < keyLen; ++j6) { + var k6 = keys[j6]; + if (overrides[k6] !== void 0) { + target[k6] = overrides[k6]; } } } @@ -1233,8 +1233,8 @@ var require_constants = __commonJS({ "X-Requested-With", "X-XSS-Protection" ]; - for (let i3 = 0; i3 < wellknownHeaderNames.length; ++i3) { - const key = wellknownHeaderNames[i3]; + for (let i5 = 0; i5 < wellknownHeaderNames.length; ++i5) { + const key = wellknownHeaderNames[i5]; const lowerCasedKey = key.toLowerCase(); headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; } @@ -1258,9 +1258,9 @@ var require_util = __commonJS({ var { InvalidArgumentError } = require_errors(); var { Blob: Blob5 } = require("buffer"); var nodeUtil = require("util"); - var { stringify: stringify3 } = require("querystring"); + var { stringify: stringify5 } = require("querystring"); var { headerNameLowerCasedRecord } = require_constants(); - var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v2) => Number(v2)); + var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v7) => Number(v7)); function nop() { } function isStream2(obj) { @@ -1273,7 +1273,7 @@ var require_util = __commonJS({ if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - const stringified = stringify3(queryParams); + const stringified = stringify5(queryParams); if (stringified) { url2 += "?" + stringified; } @@ -1363,8 +1363,8 @@ var require_util = __commonJS({ if (body == null) { return 0; } else if (isStream2(body)) { - const state2 = body._readableState; - return state2 && state2.objectMode === false && state2.ended === true && Number.isFinite(state2.length) ? state2.length : null; + const state3 = body._readableState; + return state3 && state3.objectMode === false && state3.ended === true && Number.isFinite(state3.length) ? state3.length : null; } else if (isBlobLike3(body)) { return body.size != null ? body.size : null; } else if (isBuffer2(body)) { @@ -1376,8 +1376,8 @@ var require_util = __commonJS({ return !stream5 || !!(stream5.destroyed || stream5[kDestroyed]); } function isReadableAborted(stream5) { - const state2 = stream5 && stream5._readableState; - return isDestroyed(stream5) && state2 && !state2.endEmitted; + const state3 = stream5 && stream5._readableState; + return isDestroyed(stream5) && state3 && !state3.endEmitted; } function destroy2(stream5, err) { if (stream5 == null || !isStream2(stream5) || isDestroyed(stream5)) { @@ -1399,29 +1399,29 @@ var require_util = __commonJS({ } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; function parseKeepAliveTimeout(val) { - const m4 = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); - return m4 ? parseInt(m4[1], 10) * 1e3 : null; + const m6 = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m6 ? parseInt(m6[1], 10) * 1e3 : null; } function headerNameToString(value) { return headerNameLowerCasedRecord[value] || value.toLowerCase(); } function parseHeaders(headers, obj = {}) { if (!Array.isArray(headers)) return headers; - for (let i3 = 0; i3 < headers.length; i3 += 2) { - const key = headers[i3].toString().toLowerCase(); + for (let i5 = 0; i5 < headers.length; i5 += 2) { + const key = headers[i5].toString().toLowerCase(); let val = obj[key]; if (!val) { - if (Array.isArray(headers[i3 + 1])) { - obj[key] = headers[i3 + 1].map((x2) => x2.toString("utf8")); + if (Array.isArray(headers[i5 + 1])) { + obj[key] = headers[i5 + 1].map((x4) => x4.toString("utf8")); } else { - obj[key] = headers[i3 + 1].toString("utf8"); + obj[key] = headers[i5 + 1].toString("utf8"); } } else { if (!Array.isArray(val)) { val = [val]; obj[key] = val; } - val.push(headers[i3 + 1].toString("utf8")); + val.push(headers[i5 + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1433,9 +1433,9 @@ var require_util = __commonJS({ const ret = []; let hasContentLength = false; let contentDispositionIdx = -1; - for (let n2 = 0; n2 < headers.length; n2 += 2) { - const key = headers[n2 + 0].toString(); - const val = headers[n2 + 1].toString("utf8"); + for (let n4 = 0; n4 < headers.length; n4 += 2) { + const key = headers[n4 + 0].toString(); + const val = headers[n4 + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { ret.push(key, val); hasContentLength = true; @@ -1581,11 +1581,11 @@ var require_util = __commonJS({ } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; - const m4 = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; - return m4 ? { - start: parseInt(m4[1]), - end: m4[2] ? parseInt(m4[2]) : null, - size: m4[3] ? parseInt(m4[3]) : null + const m6 = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m6 ? { + start: parseInt(m6[1]), + end: m6[2] ? parseInt(m6[2]) : null, + size: m6[3] ? parseInt(m6[3]) : null } : null; } var kEnumerableProperty = /* @__PURE__ */ Object.create(null); @@ -1739,8 +1739,8 @@ var require_sbmh = __commonJS({ this._needle = needle; this._bufpos = 0; this._lookbehind = Buffer.alloc(needleLength); - for (var i3 = 0; i3 < needleLength - 1; ++i3) { - this._occ[needle[i3]] = needleLength - 1 - i3; + for (var i5 = 0; i5 < needleLength - 1; ++i5) { + this._occ[needle[i5]] = needleLength - 1 - i5; } } inherits2(SBMH, EventEmitter2); @@ -1755,11 +1755,11 @@ var require_sbmh = __commonJS({ } const chlen = chunk.length; this._bufpos = pos || 0; - let r3; - while (r3 !== chlen && this.matches < this.maxMatches) { - r3 = this._sbmh_feed(chunk); + let r5; + while (r5 !== chlen && this.matches < this.maxMatches) { + r5 = this._sbmh_feed(chunk); } - return r3; + return r5; }; SBMH.prototype._sbmh_feed = function(data) { const len = data.length; @@ -1838,8 +1838,8 @@ var require_sbmh = __commonJS({ return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; }; SBMH.prototype._sbmh_memcmp = function(data, pos, len) { - for (var i3 = 0; i3 < len; ++i3) { - if (this._sbmh_lookup_char(data, pos + i3) !== this._needle[i3]) { + for (var i5 = 0; i5 < len; ++i5) { + if (this._sbmh_lookup_char(data, pos + i5) !== this._needle[i5]) { return false; } } @@ -1859,7 +1859,7 @@ var require_PartStream = __commonJS({ ReadableStream7.call(this, opts); } inherits2(PartStream, ReadableStream7); - PartStream.prototype._read = function(n2) { + PartStream.prototype._read = function(n4) { }; module2.exports = PartStream; } @@ -1923,9 +1923,9 @@ var require_HeaderParser = __commonJS({ } inherits2(HeaderParser, EventEmitter2); HeaderParser.prototype.push = function(data) { - const r3 = this.ss.push(data); + const r5 = this.ss.push(data); if (this.finished) { - return r3; + return r5; } }; HeaderParser.prototype.reset = function() { @@ -1953,25 +1953,25 @@ var require_HeaderParser = __commonJS({ } const lines = this.buffer.split(RE_CRLF); const len = lines.length; - let m4, h3; - for (var i3 = 0; i3 < len; ++i3) { - if (lines[i3].length === 0) { + let m6, h5; + for (var i5 = 0; i5 < len; ++i5) { + if (lines[i5].length === 0) { continue; } - if (lines[i3][0] === " " || lines[i3][0] === " ") { - if (h3) { - this.header[h3][this.header[h3].length - 1] += lines[i3]; + if (lines[i5][0] === " " || lines[i5][0] === " ") { + if (h5) { + this.header[h5][this.header[h5].length - 1] += lines[i5]; continue; } } - const posColon = lines[i3].indexOf(":"); + const posColon = lines[i5].indexOf(":"); if (posColon === -1 || posColon === 0) { return; } - m4 = RE_HDR.exec(lines[i3]); - h3 = m4[1].toLowerCase(); - this.header[h3] = this.header[h3] || []; - this.header[h3].push(m4[2] || ""); + m6 = RE_HDR.exec(lines[i5]); + h5 = m6[1].toLowerCase(); + this.header[h5] = this.header[h5] || []; + this.header[h5].push(m6[2] || ""); if (++this.npairs === this.maxHeaderPairs) { break; } @@ -2069,9 +2069,9 @@ var require_Dicer = __commonJS({ this._ignore(); } } - const r3 = this._hparser.push(data); - if (!this._inHeader && r3 !== void 0 && r3 < data.length) { - data = data.slice(r3); + const r5 = this._hparser.push(data); + if (!this._inHeader && r5 !== void 0 && r5 < data.length) { + data = data.slice(r5); } else { return cb(); } @@ -2109,13 +2109,13 @@ var require_Dicer = __commonJS({ Dicer.prototype._oninfo = function(isMatch, data, start, end) { let buf; const self2 = this; - let i3 = 0; - let r3; + let i5 = 0; + let r5; let shouldWriteMore = true; if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && start + i3 < end) { - if (data[start + i3] === DASH) { - ++i3; + while (this._dashes < 2 && start + i5 < end) { + if (data[start + i5] === DASH) { + ++i5; ++this._dashes; } else { if (this._dashes) { @@ -2126,8 +2126,8 @@ var require_Dicer = __commonJS({ } } if (this._dashes === 2) { - if (start + i3 < end && this.listenerCount("trailer") !== 0) { - this.emit("trailer", data.slice(start + i3, end)); + if (start + i5 < end && this.listenerCount("trailer") !== 0) { + this.emit("trailer", data.slice(start + i5, end)); } this.reset(); this._finished = true; @@ -2146,7 +2146,7 @@ var require_Dicer = __commonJS({ } if (!this._part) { this._part = new PartStream(this._partOpts); - this._part._read = function(n2) { + this._part._read = function(n4) { self2._unpause(); }; if (this._isPreamble && this.listenerCount("preamble") !== 0) { @@ -2173,9 +2173,9 @@ var require_Dicer = __commonJS({ if (buf) { this._hparser.push(buf); } - r3 = this._hparser.push(data.slice(start, end)); - if (!this._inHeader && r3 !== void 0 && r3 < end) { - this._oninfo(false, data, start + r3, end); + r5 = this._hparser.push(data.slice(start, end)); + if (!this._inHeader && r5 !== void 0 && r5 < end) { + this._oninfo(false, data, start + r5, end); } } } @@ -2831,15 +2831,15 @@ var require_parseParams = __commonJS({ var STATE_LANG = 3; function parseParams(str2) { const res = []; - let state2 = STATE_KEY; + let state3 = STATE_KEY; let charset = ""; let inquote = false; let escaping = false; - let p3 = 0; + let p5 = 0; let tmp = ""; const len = str2.length; - for (var i3 = 0; i3 < len; ++i3) { - const char = str2[i3]; + for (var i5 = 0; i5 < len; ++i5) { + const char = str2[i5]; if (char === "\\" && inquote) { if (escaping) { escaping = false; @@ -2851,7 +2851,7 @@ var require_parseParams = __commonJS({ if (!escaping) { if (inquote) { inquote = false; - state2 = STATE_KEY; + state3 = STATE_KEY; } else { inquote = true; } @@ -2864,22 +2864,22 @@ var require_parseParams = __commonJS({ tmp += "\\"; } escaping = false; - if ((state2 === STATE_CHARSET || state2 === STATE_LANG) && char === "'") { - if (state2 === STATE_CHARSET) { - state2 = STATE_LANG; + if ((state3 === STATE_CHARSET || state3 === STATE_LANG) && char === "'") { + if (state3 === STATE_CHARSET) { + state3 = STATE_LANG; charset = tmp.substring(1); } else { - state2 = STATE_VALUE; + state3 = STATE_VALUE; } tmp = ""; continue; - } else if (state2 === STATE_KEY && (char === "*" || char === "=") && res.length) { - state2 = char === "*" ? STATE_CHARSET : STATE_VALUE; - res[p3] = [tmp, void 0]; + } else if (state3 === STATE_KEY && (char === "*" || char === "=") && res.length) { + state3 = char === "*" ? STATE_CHARSET : STATE_VALUE; + res[p5] = [tmp, void 0]; tmp = ""; continue; } else if (!inquote && char === ";") { - state2 = STATE_KEY; + state3 = STATE_KEY; if (charset) { if (tmp.length) { tmp = decodeText( @@ -2892,13 +2892,13 @@ var require_parseParams = __commonJS({ } else if (tmp.length) { tmp = decodeText(tmp, "binary", "utf8"); } - if (res[p3] === void 0) { - res[p3] = tmp; + if (res[p5] === void 0) { + res[p5] = tmp; } else { - res[p3][1] = tmp; + res[p5][1] = tmp; } tmp = ""; - ++p3; + ++p5; continue; } else if (!inquote && (char === " " || char === " ")) { continue; @@ -2915,12 +2915,12 @@ var require_parseParams = __commonJS({ } else if (tmp) { tmp = decodeText(tmp, "binary", "utf8"); } - if (res[p3] === void 0) { + if (res[p5] === void 0) { if (tmp) { - res[p3] = tmp; + res[p5] = tmp; } } else { - res[p3][1] = tmp; + res[p5][1] = tmp; } return res; } @@ -2936,12 +2936,12 @@ var require_basename = __commonJS({ if (typeof path2 !== "string") { return ""; } - for (var i3 = path2.length - 1; i3 >= 0; --i3) { - switch (path2.charCodeAt(i3)) { + for (var i5 = path2.length - 1; i5 >= 0; --i5) { + switch (path2.charCodeAt(i5)) { case 47: // '/' case 92: - path2 = path2.slice(i3 + 1); + path2 = path2.slice(i5 + 1); return path2 === ".." || path2 === "." ? "" : path2; } } @@ -2968,7 +2968,7 @@ var require_multipart = __commonJS({ var RE_NAME = /^name$/i; Multipart.detect = /^multipart\/form-data/i; function Multipart(boy, cfg) { - let i3; + let i5; let len; const self2 = this; let boundary; @@ -2978,9 +2978,9 @@ var require_multipart = __commonJS({ const defCharset = cfg.defCharset || "utf8"; const preservePath = cfg.preservePath; const fileOpts = { highWaterMark: cfg.fileHwm }; - for (i3 = 0, len = parsedConType.length; i3 < len; ++i3) { - if (Array.isArray(parsedConType[i3]) && RE_BOUNDARY.test(parsedConType[i3][0])) { - boundary = parsedConType[i3][1]; + for (i5 = 0, len = parsedConType.length; i5 < len; ++i5) { + if (Array.isArray(parsedConType[i5]) && RE_BOUNDARY.test(parsedConType[i5][0])) { + boundary = parsedConType[i5][1]; break; } } @@ -3051,9 +3051,9 @@ var require_multipart = __commonJS({ parsed = parseParams(header["content-type"][0]); if (parsed[0]) { contype = parsed[0].toLowerCase(); - for (i3 = 0, len = parsed.length; i3 < len; ++i3) { - if (RE_CHARSET.test(parsed[i3][0])) { - charset = parsed[i3][1].toLowerCase(); + for (i5 = 0, len = parsed.length; i5 < len; ++i5) { + if (RE_CHARSET.test(parsed[i5][0])) { + charset = parsed[i5][1].toLowerCase(); break; } } @@ -3070,11 +3070,11 @@ var require_multipart = __commonJS({ if (!RE_FIELD.test(parsed[0])) { return skipPart(part); } - for (i3 = 0, len = parsed.length; i3 < len; ++i3) { - if (RE_NAME.test(parsed[i3][0])) { - fieldname = parsed[i3][1]; - } else if (RE_FILENAME.test(parsed[i3][0])) { - filename = parsed[i3][1]; + for (i5 = 0, len = parsed.length; i5 < len; ++i5) { + if (RE_NAME.test(parsed[i5][0])) { + fieldname = parsed[i5][1]; + } else if (RE_FILENAME.test(parsed[i5][0])) { + filename = parsed[i5][1]; if (!preservePath) { filename = basename2(filename); } @@ -3115,7 +3115,7 @@ var require_multipart = __commonJS({ cb(); } }); - file._read = function(n2) { + file._read = function(n4) { if (!self2._pause) { return; } @@ -3196,11 +3196,11 @@ var require_multipart = __commonJS({ }); } Multipart.prototype.write = function(chunk, cb) { - const r3 = this.parser.write(chunk); - if (r3 && !this._pause) { + const r5 = this.parser.write(chunk); + if (r5 && !this._pause) { cb(); } else { - this._needDrain = !r3; + this._needDrain = !r5; this._cb = cb; } }; @@ -3224,7 +3224,7 @@ var require_multipart = __commonJS({ this.truncated = false; } inherits2(FileStream, Readable5); - FileStream.prototype._read = function(n2) { + FileStream.prototype._read = function(n4) { }; module2.exports = Multipart; } @@ -3371,34 +3371,34 @@ var require_Decoder = __commonJS({ Decoder.prototype.write = function(str2) { str2 = str2.replace(RE_PLUS, " "); let res = ""; - let i3 = 0; - let p3 = 0; + let i5 = 0; + let p5 = 0; const len = str2.length; - for (; i3 < len; ++i3) { + for (; i5 < len; ++i5) { if (this.buffer !== void 0) { - if (!HEX[str2.charCodeAt(i3)]) { + if (!HEX[str2.charCodeAt(i5)]) { res += "%" + this.buffer; this.buffer = void 0; - --i3; + --i5; } else { - this.buffer += str2[i3]; - ++p3; + this.buffer += str2[i5]; + ++p5; if (this.buffer.length === 2) { res += String.fromCharCode(parseInt(this.buffer, 16)); this.buffer = void 0; } } - } else if (str2[i3] === "%") { - if (i3 > p3) { - res += str2.substring(p3, i3); - p3 = i3; + } else if (str2[i5] === "%") { + if (i5 > p5) { + res += str2.substring(p5, i5); + p5 = i5; } this.buffer = ""; - ++p3; + ++p5; } } - if (p3 < len && this.buffer === void 0) { - res += str2.substring(p3); + if (p5 < len && this.buffer === void 0) { + res += str2.substring(p5); } return res; }; @@ -3426,9 +3426,9 @@ var require_urlencoded = __commonJS({ this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); this.fieldsLimit = getLimit(limits, "fields", Infinity); let charset; - for (var i3 = 0, len = parsedConType.length; i3 < len; ++i3) { - if (Array.isArray(parsedConType[i3]) && RE_CHARSET.test(parsedConType[i3][0])) { - charset = parsedConType[i3][1].toLowerCase(); + for (var i5 = 0, len = parsedConType.length; i5 < len; ++i5) { + if (Array.isArray(parsedConType[i5]) && RE_CHARSET.test(parsedConType[i5][0])) { + charset = parsedConType[i5][1].toLowerCase(); break; } } @@ -3458,21 +3458,21 @@ var require_urlencoded = __commonJS({ } let idxeq; let idxamp; - let i3; - let p3 = 0; + let i5; + let p5 = 0; const len = data.length; - while (p3 < len) { + while (p5 < len) { if (this._state === "key") { idxeq = idxamp = void 0; - for (i3 = p3; i3 < len; ++i3) { + for (i5 = p5; i5 < len; ++i5) { if (!this._checkingBytes) { - ++p3; + ++p5; } - if (data[i3] === 61) { - idxeq = i3; + if (data[i5] === 61) { + idxeq = i5; break; - } else if (data[i3] === 38) { - idxamp = i3; + } else if (data[i5] === 38) { + idxamp = i5; break; } if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { @@ -3483,8 +3483,8 @@ var require_urlencoded = __commonJS({ } } if (idxeq !== void 0) { - if (idxeq > p3) { - this._key += this.decoder.write(data.toString("binary", p3, idxeq)); + if (idxeq > p5) { + this._key += this.decoder.write(data.toString("binary", p5, idxeq)); } this._state = "val"; this._hitLimit = false; @@ -3493,13 +3493,13 @@ var require_urlencoded = __commonJS({ this._bytesVal = 0; this._valTrunc = false; this.decoder.reset(); - p3 = idxeq + 1; + p5 = idxeq + 1; } else if (idxamp !== void 0) { ++this._fields; let key; const keyTrunc = this._keyTrunc; - if (idxamp > p3) { - key = this._key += this.decoder.write(data.toString("binary", p3, idxamp)); + if (idxamp > p5) { + key = this._key += this.decoder.write(data.toString("binary", p5, idxamp)); } else { key = this._key; } @@ -3518,33 +3518,33 @@ var require_urlencoded = __commonJS({ false ); } - p3 = idxamp + 1; + p5 = idxamp + 1; if (this._fields === this.fieldsLimit) { return cb(); } } else if (this._hitLimit) { - if (i3 > p3) { - this._key += this.decoder.write(data.toString("binary", p3, i3)); + if (i5 > p5) { + this._key += this.decoder.write(data.toString("binary", p5, i5)); } - p3 = i3; + p5 = i5; if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { this._checkingBytes = false; this._keyTrunc = true; } } else { - if (p3 < len) { - this._key += this.decoder.write(data.toString("binary", p3)); + if (p5 < len) { + this._key += this.decoder.write(data.toString("binary", p5)); } - p3 = len; + p5 = len; } } else { idxamp = void 0; - for (i3 = p3; i3 < len; ++i3) { + for (i5 = p5; i5 < len; ++i5) { if (!this._checkingBytes) { - ++p3; + ++p5; } - if (data[i3] === 38) { - idxamp = i3; + if (data[i5] === 38) { + idxamp = i5; break; } if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { @@ -3556,8 +3556,8 @@ var require_urlencoded = __commonJS({ } if (idxamp !== void 0) { ++this._fields; - if (idxamp > p3) { - this._val += this.decoder.write(data.toString("binary", p3, idxamp)); + if (idxamp > p5) { + this._val += this.decoder.write(data.toString("binary", p5, idxamp)); } this.boy.emit( "field", @@ -3573,24 +3573,24 @@ var require_urlencoded = __commonJS({ this._bytesKey = 0; this._keyTrunc = false; this.decoder.reset(); - p3 = idxamp + 1; + p5 = idxamp + 1; if (this._fields === this.fieldsLimit) { return cb(); } } else if (this._hitLimit) { - if (i3 > p3) { - this._val += this.decoder.write(data.toString("binary", p3, i3)); + if (i5 > p5) { + this._val += this.decoder.write(data.toString("binary", p5, i5)); } - p3 = i3; + p5 = i5; if (this._val === "" && this.fieldSizeLimit === 0 || (this._bytesVal = this._val.length) === this.fieldSizeLimit) { this._checkingBytes = false; this._valTrunc = true; } } else { - if (p3 < len) { - this._val += this.decoder.write(data.toString("binary", p3)); + if (p5 < len) { + this._val += this.decoder.write(data.toString("binary", p5)); } - p3 = len; + p5 = len; } } } @@ -3949,11 +3949,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto6; + var crypto14; try { - crypto6 = require("crypto"); + crypto14 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto6.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto14.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3988,18 +3988,18 @@ var require_util2 = __commonJS({ return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); } function isValidReasonPhrase(statusText) { - for (let i3 = 0; i3 < statusText.length; ++i3) { - const c2 = statusText.charCodeAt(i3); - if (!(c2 === 9 || // HTAB - c2 >= 32 && c2 <= 126 || // SP / VCHAR - c2 >= 128 && c2 <= 255)) { + for (let i5 = 0; i5 < statusText.length; ++i5) { + const c4 = statusText.charCodeAt(i5); + if (!(c4 === 9 || // HTAB + c4 >= 32 && c4 <= 126 || // SP / VCHAR + c4 >= 128 && c4 <= 255)) { return false; } } return true; } - function isTokenCharCode(c2) { - switch (c2) { + function isTokenCharCode(c4) { + switch (c4) { case 34: case 40: case 41: @@ -4019,15 +4019,15 @@ var require_util2 = __commonJS({ case 125: return false; default: - return c2 >= 33 && c2 <= 126; + return c4 >= 33 && c4 <= 126; } } function isValidHTTPToken(characters) { if (characters.length === 0) { return false; } - for (let i3 = 0; i3 < characters.length; ++i3) { - if (!isTokenCharCode(characters.charCodeAt(i3))) { + for (let i5 = 0; i5 < characters.length; ++i5) { + if (!isTokenCharCode(characters.charCodeAt(i5))) { return false; } } @@ -4050,8 +4050,8 @@ var require_util2 = __commonJS({ const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); let policy = ""; if (policyHeader.length > 0) { - for (let i3 = policyHeader.length; i3 !== 0; i3--) { - const token = policyHeader[i3 - 1].trim(); + for (let i5 = policyHeader.length; i5 !== 0; i5--) { + const token = policyHeader[i5 - 1].trim(); if (referrerPolicyTokens.has(token)) { policy = token; break; @@ -4230,7 +4230,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto6 === void 0) { + if (crypto14 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -4245,7 +4245,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto6.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto14.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -4284,8 +4284,8 @@ var require_util2 = __commonJS({ if (algorithm[3] === "5") { return algorithm; } - for (let i3 = 1; i3 < metadataList.length; ++i3) { - const metadata = metadataList[i3]; + for (let i5 = 1; i5 < metadataList.length; ++i5) { + const metadata = metadataList[i5]; if (metadata.algo[3] === "5") { algorithm = "sha512"; break; @@ -4302,9 +4302,9 @@ var require_util2 = __commonJS({ return metadataList; } let pos = 0; - for (let i3 = 0; i3 < metadataList.length; ++i3) { - if (metadataList[i3].algo === algorithm) { - metadataList[pos++] = metadataList[i3]; + for (let i5 = 0; i5 < metadataList.length; ++i5) { + if (metadataList[i5].algo === algorithm) { + metadataList[pos++] = metadataList[i5]; } } metadataList.length = pos; @@ -4314,9 +4314,9 @@ var require_util2 = __commonJS({ if (actualValue.length !== expectedValue.length) { return false; } - for (let i3 = 0; i3 < actualValue.length; ++i3) { - if (actualValue[i3] !== expectedValue[i3]) { - if (actualValue[i3] === "+" && expectedValue[i3] === "-" || actualValue[i3] === "/" && expectedValue[i3] === "_") { + for (let i5 = 0; i5 < actualValue.length; ++i5) { + if (actualValue[i5] !== expectedValue[i5]) { + if (actualValue[i5] === "+" && expectedValue[i5] === "-" || actualValue[i5] === "/" && expectedValue[i5] === "_") { continue; } return false; @@ -4326,11 +4326,11 @@ var require_util2 = __commonJS({ } function tryUpgradeRequestToAPotentiallyTrustworthyURL(request3) { } - function sameOrigin(A3, B2) { - if (A3.origin === B2.origin && A3.origin === "null") { + function sameOrigin(A4, B3) { + if (A4.origin === B3.origin && A4.origin === "null") { return true; } - if (A3.protocol === B2.protocol && A3.hostname === B2.hostname && A3.port === B2.port) { + if (A4.protocol === B3.protocol && A4.hostname === B3.hostname && A4.port === B3.port) { return true; } return false; @@ -4383,9 +4383,9 @@ var require_util2 = __commonJS({ kind: kind3, target: iterator2 }; - const i3 = { + const i5 = { next() { - if (Object.getPrototypeOf(this) !== i3) { + if (Object.getPrototypeOf(this) !== i5) { throw new TypeError( `'next' called on an object that does not implement interface ${name} Iterator.` ); @@ -4404,8 +4404,8 @@ var require_util2 = __commonJS({ // result of concatenating the identifier of the interface and the string " Iterator". [Symbol.toStringTag]: `${name} Iterator` }; - Object.setPrototypeOf(i3, esIteratorPrototype); - return Object.setPrototypeOf({}, i3); + Object.setPrototypeOf(i5, esIteratorPrototype); + return Object.setPrototypeOf({}, i5); } function iteratorResult(pair, kind3) { let result; @@ -4431,15 +4431,15 @@ var require_util2 = __commonJS({ let reader; try { reader = body.stream.getReader(); - } catch (e3) { - errorSteps(e3); + } catch (e5) { + errorSteps(e5); return; } try { const result = await readAllBytes(reader); successSteps(result); - } catch (e3) { - errorSteps(e3); + } catch (e5) { + errorSteps(e5); } } var ReadableStream7 = globalThis.ReadableStream; @@ -4466,8 +4466,8 @@ var require_util2 = __commonJS({ } } function isomorphicEncode(input) { - for (let i3 = 0; i3 < input.length; i3++) { - assert(input.charCodeAt(i3) <= 255); + for (let i5 = 0; i5 < input.length; i5++) { + assert(input.charCodeAt(i5) <= 255); } return input; } @@ -4595,11 +4595,11 @@ var require_webidl = __commonJS({ message: `"${context2.value}" is an invalid ${context2.type}.` }); }; - webidl.brandCheck = function(V4, I2, opts = void 0) { - if (opts?.strict !== false && !(V4 instanceof I2)) { + webidl.brandCheck = function(V4, I3, opts = void 0) { + if (opts?.strict !== false && !(V4 instanceof I3)) { throw new TypeError("Illegal invocation"); } else { - return V4?.[Symbol.toStringTag] === I2.prototype[Symbol.toStringTag]; + return V4?.[Symbol.toStringTag] === I3.prototype[Symbol.toStringTag]; } }; webidl.argumentLengthCheck = function({ length }, min, ctx) { @@ -4656,51 +4656,51 @@ var require_webidl = __commonJS({ lowerBound = Math.pow(-2, bitLength) - 1; upperBound = Math.pow(2, bitLength - 1) - 1; } - let x2 = Number(V4); - if (x2 === 0) { - x2 = 0; + let x4 = Number(V4); + if (x4 === 0) { + x4 = 0; } if (opts.enforceRange === true) { - if (Number.isNaN(x2) || x2 === Number.POSITIVE_INFINITY || x2 === Number.NEGATIVE_INFINITY) { + if (Number.isNaN(x4) || x4 === Number.POSITIVE_INFINITY || x4 === Number.NEGATIVE_INFINITY) { throw webidl.errors.exception({ header: "Integer conversion", message: `Could not convert ${V4} to an integer.` }); } - x2 = webidl.util.IntegerPart(x2); - if (x2 < lowerBound || x2 > upperBound) { + x4 = webidl.util.IntegerPart(x4); + if (x4 < lowerBound || x4 > upperBound) { throw webidl.errors.exception({ header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x2}.` + message: `Value must be between ${lowerBound}-${upperBound}, got ${x4}.` }); } - return x2; + return x4; } - if (!Number.isNaN(x2) && opts.clamp === true) { - x2 = Math.min(Math.max(x2, lowerBound), upperBound); - if (Math.floor(x2) % 2 === 0) { - x2 = Math.floor(x2); + if (!Number.isNaN(x4) && opts.clamp === true) { + x4 = Math.min(Math.max(x4, lowerBound), upperBound); + if (Math.floor(x4) % 2 === 0) { + x4 = Math.floor(x4); } else { - x2 = Math.ceil(x2); + x4 = Math.ceil(x4); } - return x2; + return x4; } - if (Number.isNaN(x2) || x2 === 0 && Object.is(0, x2) || x2 === Number.POSITIVE_INFINITY || x2 === Number.NEGATIVE_INFINITY) { + if (Number.isNaN(x4) || x4 === 0 && Object.is(0, x4) || x4 === Number.POSITIVE_INFINITY || x4 === Number.NEGATIVE_INFINITY) { return 0; } - x2 = webidl.util.IntegerPart(x2); - x2 = x2 % Math.pow(2, bitLength); - if (signedness === "signed" && x2 >= Math.pow(2, bitLength) - 1) { - return x2 - Math.pow(2, bitLength); + x4 = webidl.util.IntegerPart(x4); + x4 = x4 % Math.pow(2, bitLength); + if (signedness === "signed" && x4 >= Math.pow(2, bitLength) - 1) { + return x4 - Math.pow(2, bitLength); } - return x2; + return x4; }; - webidl.util.IntegerPart = function(n2) { - const r3 = Math.floor(Math.abs(n2)); - if (n2 < 0) { - return -1 * r3; + webidl.util.IntegerPart = function(n4) { + const r5 = Math.floor(Math.abs(n4)); + if (n4 < 0) { + return -1 * r5; } - return r3; + return r5; }; webidl.sequenceConverter = function(converter) { return (V4) => { @@ -4758,12 +4758,12 @@ var require_webidl = __commonJS({ return result; }; }; - webidl.interfaceConverter = function(i3) { + webidl.interfaceConverter = function(i5) { return (V4, opts = {}) => { - if (opts.strict !== false && !(V4 instanceof i3)) { + if (opts.strict !== false && !(V4 instanceof i5)) { throw webidl.errors.exception({ - header: i3.name, - message: `Expected ${V4} to be an instance of ${i3.name}.` + header: i5.name, + message: `Expected ${V4} to be an instance of ${i5.name}.` }); } return V4; @@ -4828,39 +4828,39 @@ var require_webidl = __commonJS({ return String(V4); }; webidl.converters.ByteString = function(V4) { - const x2 = webidl.converters.DOMString(V4); - for (let index = 0; index < x2.length; index++) { - if (x2.charCodeAt(index) > 255) { + const x4 = webidl.converters.DOMString(V4); + for (let index = 0; index < x4.length; index++) { + if (x4.charCodeAt(index) > 255) { throw new TypeError( - `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x2.charCodeAt(index)} which is greater than 255.` + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x4.charCodeAt(index)} which is greater than 255.` ); } } - return x2; + return x4; }; webidl.converters.USVString = toUSVString; webidl.converters.boolean = function(V4) { - const x2 = Boolean(V4); - return x2; + const x4 = Boolean(V4); + return x4; }; webidl.converters.any = function(V4) { return V4; }; webidl.converters["long long"] = function(V4) { - const x2 = webidl.util.ConvertToInt(V4, 64, "signed"); - return x2; + const x4 = webidl.util.ConvertToInt(V4, 64, "signed"); + return x4; }; webidl.converters["unsigned long long"] = function(V4) { - const x2 = webidl.util.ConvertToInt(V4, 64, "unsigned"); - return x2; + const x4 = webidl.util.ConvertToInt(V4, 64, "unsigned"); + return x4; }; webidl.converters["unsigned long"] = function(V4) { - const x2 = webidl.util.ConvertToInt(V4, 32, "unsigned"); - return x2; + const x4 = webidl.util.ConvertToInt(V4, 32, "unsigned"); + return x4; }; webidl.converters["unsigned short"] = function(V4, opts) { - const x2 = webidl.util.ConvertToInt(V4, 16, "unsigned", opts); - return x2; + const x4 = webidl.util.ConvertToInt(V4, 16, "unsigned", opts); + return x4; }; webidl.converters.ArrayBuffer = function(V4, opts = {}) { if (webidl.util.Type(V4) !== "Object" || !types.isAnyArrayBuffer(V4)) { @@ -5016,17 +5016,17 @@ var require_dataURL = __commonJS({ } function percentDecode(input) { const output = []; - for (let i3 = 0; i3 < input.length; i3++) { - const byte = input[i3]; + for (let i5 = 0; i5 < input.length; i5++) { + const byte = input[i5]; if (byte !== 37) { output.push(byte); - } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i3 + 1], input[i3 + 2]))) { + } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i5 + 1], input[i5 + 2]))) { output.push(37); } else { - const nextTwoBytes = String.fromCharCode(input[i3 + 1], input[i3 + 2]); + const nextTwoBytes = String.fromCharCode(input[i5 + 1], input[i5 + 2]); const bytePoint = Number.parseInt(nextTwoBytes, 16); output.push(bytePoint); - i3 += 2; + i5 += 2; } } return Uint8Array.from(output); @@ -5240,25 +5240,25 @@ var require_file = __commonJS({ fileBits = webidl.converters["sequence"](fileBits); fileName = webidl.converters.USVString(fileName); options = webidl.converters.FilePropertyBag(options); - const n2 = fileName; - let t2 = options.type; - let d5; + const n4 = fileName; + let t4 = options.type; + let d7; substep: { - if (t2) { - t2 = parseMIMEType(t2); - if (t2 === "failure") { - t2 = ""; + if (t4) { + t4 = parseMIMEType(t4); + if (t4 === "failure") { + t4 = ""; break substep; } - t2 = serializeAMimeType(t2).toLowerCase(); + t4 = serializeAMimeType(t4).toLowerCase(); } - d5 = options.lastModified; + d7 = options.lastModified; } - super(processBlobParts(fileBits, options), { type: t2 }); + super(processBlobParts(fileBits, options), { type: t4 }); this[kState] = { - name: n2, - lastModified: d5, - type: t2 + name: n4, + lastModified: d7, + type: t4 }; } get name() { @@ -5276,14 +5276,14 @@ var require_file = __commonJS({ }; var FileLike = class _FileLike { constructor(blobLike, fileName, options = {}) { - const n2 = fileName; - const t2 = options.type; - const d5 = options.lastModified ?? Date.now(); + const n4 = fileName; + const t4 = options.type; + const d7 = options.lastModified ?? Date.now(); this[kState] = { blobLike, - name: n2, - type: t2, - lastModified: d5 + name: n4, + type: t4, + lastModified: d7 }; } stream(...args) { @@ -5375,11 +5375,11 @@ var require_file = __commonJS({ const bytes = []; for (const element of parts) { if (typeof element === "string") { - let s2 = element; + let s4 = element; if (options.endings === "native") { - s2 = convertLineEndingsNative(s2); + s4 = convertLineEndingsNative(s4); } - bytes.push(encoder.encode(s2)); + bytes.push(encoder.encode(s4)); } else if (types.isAnyArrayBuffer(element) || types.isTypedArray(element)) { if (!element.buffer) { bytes.push(new Uint8Array(element)); @@ -5394,12 +5394,12 @@ var require_file = __commonJS({ } return bytes; } - function convertLineEndingsNative(s2) { + function convertLineEndingsNative(s4) { let nativeLineEnding = "\n"; if (process.platform === "win32") { nativeLineEnding = "\r\n"; } - return s2.replace(/\r?\n/g, nativeLineEnding); + return s4.replace(/\r?\n/g, nativeLineEnding); } function isFileLike4(object) { return NativeFile && object instanceof NativeFile || object instanceof File5 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; @@ -5591,8 +5591,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto6 = require("node:crypto"); - random = (max) => crypto6.randomInt(0, max); + const crypto14 = require("node:crypto"); + random = (max) => crypto14.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5771,8 +5771,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r } } } - function throwIfAborted(state2) { - if (state2.aborted) { + function throwIfAborted(state3) { + if (state3.aborted) { throw new DOMException3("The operation was aborted.", "AbortError"); } } @@ -5898,8 +5898,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); - } catch (e3) { - errorSteps(e3); + } catch (e5) { + errorSteps(e5); } }; if (object[kState].body == null) { @@ -6070,13 +6070,13 @@ var require_request = __commonJS({ if (headers.length % 2 !== 0) { throw new InvalidArgumentError("headers array must be even"); } - for (let i3 = 0; i3 < headers.length; i3 += 2) { - processHeader(this, headers[i3], headers[i3 + 1]); + for (let i5 = 0; i5 < headers.length; i5 += 2) { + processHeader(this, headers[i5], headers[i5 + 1]); } } else if (headers && typeof headers === "object") { const keys = Object.keys(headers); - for (let i3 = 0; i3 < keys.length; i3++) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; i5++) { + const key = keys[i5]; processHeader(this, key, headers[key]); } } else if (headers != null) { @@ -6218,13 +6218,13 @@ var require_request = __commonJS({ if (headers.length % 2 !== 0) { throw new InvalidArgumentError("headers array must be even"); } - for (let i3 = 0; i3 < headers.length; i3 += 2) { - processHeader(request3, headers[i3], headers[i3 + 1], true); + for (let i5 = 0; i5 < headers.length; i5 += 2) { + processHeader(request3, headers[i5], headers[i5 + 1], true); } } else if (headers && typeof headers === "object") { const keys = Object.keys(headers); - for (let i3 = 0; i3 < keys.length; i3++) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; i5++) { + const key = keys[i5]; processHeader(request3, key, headers[key], true); } } else if (headers != null) { @@ -6294,12 +6294,12 @@ var require_request = __commonJS({ throw new InvalidArgumentError("invalid header key"); } else { if (Array.isArray(val)) { - for (let i3 = 0; i3 < val.length; i3++) { + for (let i5 = 0; i5 < val.length; i5++) { if (skipAppend) { - if (request3.headers[key]) request3.headers[key] += `,${processHeaderValue(key, val[i3], skipAppend)}`; - else request3.headers[key] = processHeaderValue(key, val[i3], skipAppend); + if (request3.headers[key]) request3.headers[key] += `,${processHeaderValue(key, val[i5], skipAppend)}`; + else request3.headers[key] = processHeaderValue(key, val[i5], skipAppend); } else { - request3.headers += processHeaderValue(key, val[i3]); + request3.headers += processHeaderValue(key, val[i5]); } } } else { @@ -6367,8 +6367,8 @@ var require_dispatcher_base = __commonJS({ } set interceptors(newInterceptors) { if (newInterceptors) { - for (let i3 = newInterceptors.length - 1; i3 >= 0; i3--) { - const interceptor = this[kInterceptors][i3]; + for (let i5 = newInterceptors.length - 1; i5 >= 0; i5--) { + const interceptor = this[kInterceptors][i5]; if (typeof interceptor !== "function") { throw new InvalidArgumentError("interceptor must be an function"); } @@ -6404,8 +6404,8 @@ var require_dispatcher_base = __commonJS({ const onClosed = () => { const callbacks = this[kOnClosed]; this[kOnClosed] = null; - for (let i3 = 0; i3 < callbacks.length; i3++) { - callbacks[i3](null, null); + for (let i5 = 0; i5 < callbacks.length; i5++) { + callbacks[i5](null, null); } }; this[kClose]().then(() => this.destroy()).then(() => { @@ -6447,8 +6447,8 @@ var require_dispatcher_base = __commonJS({ const onDestroyed = () => { const callbacks = this[kOnDestroyed]; this[kOnDestroyed] = null; - for (let i3 = 0; i3 < callbacks.length; i3++) { - callbacks[i3](null, null); + for (let i5 = 0; i5 < callbacks.length; i5++) { + callbacks[i5](null, null); } }; this[kDestroy](err).then(() => { @@ -6461,8 +6461,8 @@ var require_dispatcher_base = __commonJS({ return this[kDispatch](opts, handler); } let dispatch = this[kDispatch].bind(this); - for (let i3 = this[kInterceptors].length - 1; i3 >= 0; i3--) { - dispatch = this[kInterceptors][i3](dispatch); + for (let i5 = this[kInterceptors].length - 1; i5 >= 0; i5--) { + dispatch = this[kInterceptors][i5](dispatch); } this[kInterceptedDispatch] = dispatch; return dispatch(opts, handler); @@ -6628,11 +6628,11 @@ var require_connect = __commonJS({ }; } let s1 = null; - let s2 = null; + let s22 = null; const timeoutId = setTimeout(() => { s1 = setImmediate(() => { if (process.platform === "win32") { - s2 = setImmediate(() => onConnectTimeout2()); + s22 = setImmediate(() => onConnectTimeout2()); } else { onConnectTimeout2(); } @@ -6641,7 +6641,7 @@ var require_connect = __commonJS({ return () => { clearTimeout(timeoutId); clearImmediate(s1); - clearImmediate(s2); + clearImmediate(s22); }; } function onConnectTimeout(socket) { @@ -6851,9 +6851,9 @@ var require_constants3 = __commonJS({ FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; })(FINISH = exports2.FINISH || (exports2.FINISH = {})); exports2.ALPHA = []; - for (let i3 = "A".charCodeAt(0); i3 <= "Z".charCodeAt(0); i3++) { - exports2.ALPHA.push(String.fromCharCode(i3)); - exports2.ALPHA.push(String.fromCharCode(i3 + 32)); + for (let i5 = "A".charCodeAt(0); i5 <= "Z".charCodeAt(0); i5++) { + exports2.ALPHA.push(String.fromCharCode(i5)); + exports2.ALPHA.push(String.fromCharCode(i5 + 32)); } exports2.NUM_MAP = { 0: 0, @@ -6939,8 +6939,8 @@ var require_constants3 = __commonJS({ "~" ].concat(exports2.ALPHANUM); exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); - for (let i3 = 128; i3 <= 255; i3++) { - exports2.URL_CHAR.push(i3); + for (let i5 = 128; i5 <= 255; i5++) { + exports2.URL_CHAR.push(i5); } exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); exports2.STRICT_TOKEN = [ @@ -6962,12 +6962,12 @@ var require_constants3 = __commonJS({ ].concat(exports2.ALPHANUM); exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); exports2.HEADER_CHARS = [" "]; - for (let i3 = 32; i3 <= 255; i3++) { - if (i3 !== 127) { - exports2.HEADER_CHARS.push(i3); + for (let i5 = 32; i5 <= 255; i5++) { + if (i5 !== 127) { + exports2.HEADER_CHARS.push(i5); } } - exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c2) => c2 !== 44); + exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c4) => c4 !== 44); exports2.MAJOR = exports2.NUM_MAP; exports2.MINOR = exports2.MAJOR; var HEADER_STATE; @@ -7100,9 +7100,9 @@ var require_RedirectHandler = __commonJS({ if (redirectableStatusCodes.indexOf(statusCode) === -1) { return null; } - for (let i3 = 0; i3 < headers.length; i3 += 2) { - if (headers[i3].toString().toLowerCase() === "location") { - return headers[i3 + 1]; + for (let i5 = 0; i5 < headers.length; i5 += 2) { + if (headers[i5].toString().toLowerCase() === "location") { + return headers[i5 + 1]; } } } @@ -7122,9 +7122,9 @@ var require_RedirectHandler = __commonJS({ function cleanRequestHeaders(headers, removeContent, unknownOrigin) { const ret = []; if (Array.isArray(headers)) { - for (let i3 = 0; i3 < headers.length; i3 += 2) { - if (!shouldRemoveHeader(headers[i3], removeContent, unknownOrigin)) { - ret.push(headers[i3], headers[i3 + 1]); + for (let i5 = 0; i5 < headers.length; i5 += 2) { + if (!shouldRemoveHeader(headers[i5], removeContent, unknownOrigin)) { + ret.push(headers[i5], headers[i5 + 1]); } } } else if (headers && typeof headers === "object") { @@ -7494,8 +7494,8 @@ var require_client = __commonJS({ async [kDestroy](err) { return new Promise((resolve) => { const requests = this[kQueue].splice(this[kPendingIdx]); - for (let i3 = 0; i3 < requests.length; i3++) { - const request3 = requests[i3]; + for (let i5 = 0; i5 < requests.length; i5++) { + const request3 = requests[i5]; errorRequest(this, request3, err); } const callback = () => { @@ -7543,8 +7543,8 @@ var require_client = __commonJS({ if (client.destroyed) { assert(this[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i3 = 0; i3 < requests.length; i3++) { - const request3 = requests[i3]; + for (let i5 = 0; i5 < requests.length; i5++) { + const request3 = requests[i5]; errorRequest(this, request3, err); } } else if (client[kRunning] > 0) { @@ -7570,45 +7570,45 @@ var require_client = __commonJS({ let mod; try { mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); - } catch (e3) { + } catch (e5) { mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); } return await WebAssembly.instantiate(mod, { env: { /* eslint-disable camelcase */ - wasm_on_url: (p3, at2, len) => { + wasm_on_url: (p5, at2, len) => { return 0; }, - wasm_on_status: (p3, at2, len) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_status: (p5, at2, len) => { + assert.strictEqual(currentParser.ptr, p5); const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, - wasm_on_message_begin: (p3) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_message_begin: (p5) => { + assert.strictEqual(currentParser.ptr, p5); return currentParser.onMessageBegin() || 0; }, - wasm_on_header_field: (p3, at2, len) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_header_field: (p5, at2, len) => { + assert.strictEqual(currentParser.ptr, p5); const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, - wasm_on_header_value: (p3, at2, len) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_header_value: (p5, at2, len) => { + assert.strictEqual(currentParser.ptr, p5); const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, - wasm_on_headers_complete: (p3, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_headers_complete: (p5, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p5); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; }, - wasm_on_body: (p3, at2, len) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_body: (p5, at2, len) => { + assert.strictEqual(currentParser.ptr, p5); const start = at2 - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, - wasm_on_message_complete: (p3) => { - assert.strictEqual(currentParser.ptr, p3); + wasm_on_message_complete: (p5) => { + assert.strictEqual(currentParser.ptr, p5); return currentParser.onMessageComplete() || 0; } /* eslint-enable camelcase */ @@ -8012,8 +8012,8 @@ var require_client = __commonJS({ 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 i3 = 0; i3 < requests.length; i3++) { - const request3 = requests[i3]; + for (let i5 = 0; i5 < requests.length; i5++) { + const request3 = requests[i5]; errorRequest(client, request3, err); } assert(client[kSize] === 0); @@ -8043,8 +8043,8 @@ var require_client = __commonJS({ if (client.destroyed) { assert(client[kPending] === 0); const requests = client[kQueue].splice(client[kRunningIdx]); - for (let i3 = 0; i3 < requests.length; i3++) { - const request3 = requests[i3]; + for (let i5 = 0; i5 < requests.length; i5++) { + const request3 = requests[i5]; errorRequest(client, request3, err); } } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { @@ -8106,8 +8106,8 @@ var require_client = __commonJS({ } client[kConnecting] = false; assert(socket); - const isH2 = socket.alpnProtocol === "h2"; - if (isH2) { + const isH22 = socket.alpnProtocol === "h2"; + if (isH22) { if (!h2ExperimentalWarned) { h2ExperimentalWarned = true; process.emitWarning("H2 support is experimental, expect them to change at any time.", { @@ -8681,13 +8681,13 @@ upgrade: ${upgrade}\r } async function writeBlob({ h2stream, body, client, request: request3, socket, contentLength, header, expectsPayload }) { assert(contentLength === body.size, "blob body must have content length"); - const isH2 = client[kHTTPConnVersion] === "h2"; + const isH22 = client[kHTTPConnVersion] === "h2"; try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); } const buffer = Buffer.from(await body.arrayBuffer()); - if (isH2) { + if (isH22) { h2stream.cork(); h2stream.write(buffer); h2stream.uncork(); @@ -8706,7 +8706,7 @@ upgrade: ${upgrade}\r } resume(client); } catch (err) { - util4.destroy(isH2 ? h2stream : socket, err); + util4.destroy(isH22 ? h2stream : socket, err); } } async function writeIterable({ h2stream, body, client, request: request3, socket, contentLength, header, expectsPayload }) { @@ -9018,7 +9018,7 @@ var require_pool_base = __commonJS({ pool.emit("drain", origin2, [pool, ...targets]); } if (pool[kClosedResolve] && queue.isEmpty()) { - Promise.all(pool[kClients].map((c2) => c2.close())).then(pool[kClosedResolve]); + Promise.all(pool[kClients].map((c4) => c4.close())).then(pool[kClosedResolve]); } }; this[kOnConnect] = (origin2, targets) => { @@ -9067,7 +9067,7 @@ var require_pool_base = __commonJS({ } async [kClose]() { if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map((c2) => c2.close())); + return Promise.all(this[kClients].map((c4) => c4.close())); } else { return new Promise((resolve) => { this[kClosedResolve] = resolve; @@ -9082,7 +9082,7 @@ var require_pool_base = __commonJS({ } item.handler.onError(err); } - return Promise.all(this[kClients].map((c2) => c2.destroy(err))); + return Promise.all(this[kClients].map((c4) => c4.destroy(err))); } [kDispatch](opts, handler) { const dispatcher = this[kGetDispatcher](); @@ -9246,9 +9246,9 @@ var require_balanced_pool = __commonJS({ var kWeight = Symbol("kWeight"); var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); var kErrorPenalty = Symbol("kErrorPenalty"); - function getGreatestCommonDivisor(a3, b3) { - if (b3 === 0) return a3; - return getGreatestCommonDivisor(b3, a3 % b3); + function getGreatestCommonDivisor(a5, b5) { + if (b5 === 0) return a5; + return getGreatestCommonDivisor(b5, a5 % b5); } function defaultFactory(origin2, opts) { return new Pool(origin2, opts); @@ -9302,7 +9302,7 @@ var require_balanced_pool = __commonJS({ return this; } _updateBalancedPoolStats() { - this[kGreatestCommonDivisor] = this[kClients].map((p3) => p3[kWeight]).reduce(getGreatestCommonDivisor, 0); + this[kGreatestCommonDivisor] = this[kClients].map((p5) => p5[kWeight]).reduce(getGreatestCommonDivisor, 0); } removeUpstream(upstream) { const upstreamOrigin = parseOrigin(upstream).origin; @@ -9313,7 +9313,7 @@ var require_balanced_pool = __commonJS({ return this; } get upstreams() { - return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p3) => p3[kUrl].origin); + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p5) => p5[kUrl].origin); } [kGetDispatcher]() { if (this[kClients].length === 0) { @@ -9323,7 +9323,7 @@ var require_balanced_pool = __commonJS({ if (!dispatcher) { return; } - const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a3, b3) => a3 && b3, true); + const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a5, b5) => a5 && b5, true); if (allClientsBusy) { return; } @@ -9702,11 +9702,11 @@ var require_readable = __commonJS({ if (consume2.body === null) { return; } - const { _readableState: state2 } = consume2.stream; - for (const chunk of state2.buffer) { + const { _readableState: state3 } = consume2.stream; + for (const chunk of state3.buffer) { consumePush(consume2, chunk); } - if (state2.endEmitted) { + if (state3.endEmitted) { consumeEnd(this[kConsume]); } else { consume2.stream.on("end", function() { @@ -9871,7 +9871,7 @@ var require_api_request = __commonJS({ var { getResolveErrorBodyCallback } = require_util3(); var { AsyncResource } = require("async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); - var RequestHandler = class extends AsyncResource { + var RequestHandler3 = class extends AsyncResource { constructor(opts, callback) { if (!opts || typeof opts !== "object") { throw new InvalidArgumentError("invalid opts"); @@ -9998,7 +9998,7 @@ var require_api_request = __commonJS({ }); } try { - this.dispatch(opts, new RequestHandler(opts, callback)); + this.dispatch(opts, new RequestHandler3(opts, callback)); } catch (err) { if (typeof callback !== "function") { throw err; @@ -10008,7 +10008,7 @@ var require_api_request = __commonJS({ } } module2.exports = request3; - module2.exports.RequestHandler = RequestHandler; + module2.exports.RequestHandler = RequestHandler3; } }); @@ -10661,9 +10661,9 @@ var require_mock_utils = __commonJS({ } function getHeaderByName(headers, key) { if (Array.isArray(headers)) { - for (let i3 = 0; i3 < headers.length; i3 += 2) { - if (headers[i3].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i3 + 1]; + for (let i5 = 0; i5 < headers.length; i5 += 2) { + if (headers[i5].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i5 + 1]; } } return void 0; @@ -10732,10 +10732,10 @@ var require_mock_utils = __commonJS({ } function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL2(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)); + const resolvedPath3 = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path2 }) => matchValue(safeUrl(path2), resolvedPath3)); if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath3}'`); } matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); if (matchedMockDispatches.length === 0) { @@ -10783,7 +10783,7 @@ var require_mock_utils = __commonJS({ return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ ...keyValuePairs, Buffer.from(`${key}`), - Array.isArray(value) ? value.map((x2) => Buffer.from(`${x2}`)) : Buffer.from(`${value}`) + Array.isArray(value) ? value.map((x4) => Buffer.from(`${x4}`)) : Buffer.from(`${value}`) ], []); } function getStatusText(statusCode) { @@ -10819,9 +10819,9 @@ var require_mock_utils = __commonJS({ } else { handleReply(this[kDispatches]); } - function handleReply(mockDispatches, _data = data) { + function handleReply(mockDispatches, _data3 = data) { const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; - const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; + const body = typeof _data3 === "function" ? _data3({ ...opts, headers: optsHeaders }) : _data3; if (isPromise(body)) { body.then((newData) => handleReply(mockDispatches, newData)); return; @@ -11382,7 +11382,7 @@ 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: URL3 } = require("url"); + var { URL: URL5 } = require("url"); var Agent3 = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); @@ -11431,7 +11431,7 @@ var require_proxy_agent = __commonJS({ this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL3(opts.uri); + const resolvedUrl = new URL5(opts.uri); const { origin: origin2, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); @@ -11486,7 +11486,7 @@ var require_proxy_agent = __commonJS({ }); } dispatch(opts, handler) { - const { host } = new URL3(opts.origin); + const { host } = new URL5(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( @@ -11512,8 +11512,8 @@ var require_proxy_agent = __commonJS({ function buildHeaders(headers) { if (Array.isArray(headers)) { const headersPair = {}; - for (let i3 = 0; i3 < headers.length; i3 += 2) { - headersPair[headers[i3]] = headers[i3 + 1]; + for (let i5 = 0; i5 < headers.length; i5 += 2) { + headersPair[headers[i5]] = headers[i5 + 1]; } return headersPair; } @@ -11621,7 +11621,7 @@ var require_RetryHandler = __commonJS({ onBodySent(chunk) { if (this.handler.onBodySent) return this.handler.onBodySent(chunk); } - static [kRetryHandlerDefaultRetry](err, { state: state2, opts }, cb) { + static [kRetryHandlerDefaultRetry](err, { state: state3, opts }, cb) { const { statusCode, code, headers } = err; const { method, retryOptions } = opts; const { @@ -11633,7 +11633,7 @@ var require_RetryHandler = __commonJS({ errorCodes, methods } = retryOptions; - let { counter, currentTimeout } = state2; + let { counter, currentTimeout } = state3; currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { cb(err); @@ -11657,7 +11657,7 @@ var require_RetryHandler = __commonJS({ retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; } const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); - state2.currentTimeout = retryTimeout; + state3.currentTimeout = retryTimeout; setTimeout(() => cb(null), retryTimeout); } onHeaders(statusCode, rawHeaders, resume, statusMessage) { @@ -11881,16 +11881,16 @@ var require_headers = __commonJS({ return code === 10 || code === 13 || code === 9 || code === 32; } function headerValueNormalize(potentialValue) { - let i3 = 0; - let j4 = potentialValue.length; - while (j4 > i3 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j4 - 1))) --j4; - while (j4 > i3 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i3))) ++i3; - return i3 === 0 && j4 === potentialValue.length ? potentialValue : potentialValue.substring(i3, j4); + let i5 = 0; + let j6 = potentialValue.length; + while (j6 > i5 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j6 - 1))) --j6; + while (j6 > i5 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i5))) ++i5; + return i5 === 0 && j6 === potentialValue.length ? potentialValue : potentialValue.substring(i5, j6); } function fill(headers, object) { if (Array.isArray(object)) { - for (let i3 = 0; i3 < object.length; ++i3) { - const header = object[i3]; + for (let i5 = 0; i5 < object.length; ++i5) { + const header = object[i5]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", @@ -11901,8 +11901,8 @@ var require_headers = __commonJS({ } } else if (typeof object === "object" && object !== null) { const keys = Object.keys(object); - for (let i3 = 0; i3 < keys.length; ++i3) { - appendHeader(headers, keys[i3], object[keys[i3]]); + for (let i5 = 0; i5 < keys.length; ++i5) { + appendHeader(headers, keys[i5], object[keys[i5]]); } } else { throw webidl.errors.conversionFailed({ @@ -12123,13 +12123,13 @@ var require_headers = __commonJS({ return this[kHeadersList][kHeadersSortedMap]; } const headers = []; - const names = [...this[kHeadersList]].sort((a3, b3) => a3[0] < b3[0] ? -1 : 1); + const names = [...this[kHeadersList]].sort((a5, b5) => a5[0] < b5[0] ? -1 : 1); const cookies = this[kHeadersList].cookies; - for (let i3 = 0; i3 < names.length; ++i3) { - const [name, value] = names[i3]; + for (let i5 = 0; i5 < names.length; ++i5) { + const [name, value] = names[i5]; if (name === "set-cookie") { - for (let j4 = 0; j4 < cookies.length; ++j4) { - headers.push([name, cookies[j4]]); + for (let j6 = 0; j6 < cookies.length; ++j6) { + headers.push([name, cookies[j6]]); } } else { assert(value !== null); @@ -12484,18 +12484,18 @@ var require_response = __commonJS({ aborted: reason && reason.name === "AbortError" }); } - function makeFilteredResponse(response, state2) { - state2 = { + function makeFilteredResponse(response, state3) { + state3 = { internalResponse: response, - ...state2 + ...state3 }; return new Proxy(response, { - get(target, p3) { - return p3 in state2 ? state2[p3] : target[p3]; + get(target, p5) { + return p5 in state3 ? state3[p5] : target[p5]; }, - set(target, p3, value) { - assert(!(p3 in state2)); - target[p3] = value; + set(target, p5, value) { + assert(!(p5 in state3)); + target[p5] = value; return true; } }); @@ -13368,18 +13368,18 @@ var require_fetch = __commonJS({ }; function fetch4(input, init = {}) { webidl.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); - const p3 = createDeferredPromise(); + const p5 = createDeferredPromise(); let requestObject; try { requestObject = new Request6(input, init); - } catch (e3) { - p3.reject(e3); - return p3.promise; + } catch (e5) { + p5.reject(e5); + return p5.promise; } const request3 = requestObject[kState]; if (requestObject.signal.aborted) { - abortFetch(p3, request3, null, requestObject.signal.reason); - return p3.promise; + abortFetch(p5, request3, null, requestObject.signal.reason); + return p5.promise; } const globalObject = request3.client.globalObject; if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { @@ -13395,7 +13395,7 @@ var require_fetch = __commonJS({ locallyAborted = true; assert(controller != null); controller.abort(requestObject.signal.reason); - abortFetch(p3, request3, responseObject, requestObject.signal.reason); + abortFetch(p5, request3, responseObject, requestObject.signal.reason); } ); const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); @@ -13404,11 +13404,11 @@ var require_fetch = __commonJS({ return Promise.resolve(); } if (response.aborted) { - abortFetch(p3, request3, responseObject, controller.serializedAbortReason); + abortFetch(p5, request3, responseObject, controller.serializedAbortReason); return Promise.resolve(); } if (response.type === "error") { - p3.reject( + p5.reject( Object.assign(new TypeError("fetch failed"), { cause: response.error }) ); return Promise.resolve(); @@ -13419,7 +13419,7 @@ var require_fetch = __commonJS({ responseObject[kHeaders][kHeadersList] = response.headersList; responseObject[kHeaders][kGuard] = "immutable"; responseObject[kHeaders][kRealm] = relevantRealm; - p3.resolve(responseObject); + p5.resolve(responseObject); }; controller = fetching({ request: request3, @@ -13428,7 +13428,7 @@ var require_fetch = __commonJS({ dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici }); - return p3.promise; + return p5.promise; } function finalizeAndReportTiming(response, initiatorType = "other") { if (response.type === "error" && response.aborted) { @@ -13467,11 +13467,11 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p3, request3, responseObject, error) { + function abortFetch(p5, request3, responseObject, error) { if (!error) { error = new DOMException3("The operation was aborted.", "AbortError"); } - p3.reject(error); + p5.reject(error); if (request3.body != null && isReadable(request3.body?.stream)) { request3.body.stream.cancel(error).catch((err) => { if (err.code === "ERR_INVALID_STATE") { @@ -14038,14 +14038,14 @@ var require_fetch = __commonJS({ fetchParams.processRequestEndOfBody(); } }; - const processBodyError = (e3) => { + const processBodyError = (e5) => { if (isCancelled(fetchParams)) { return; } - if (e3.name === "AbortError") { + if (e5.name === "AbortError") { fetchParams.controller.abort(); } else { - fetchParams.controller.terminate(e3); + fetchParams.controller.terminate(e5); } }; requestBody = async function* () { @@ -14194,11 +14194,11 @@ var require_fetch = __commonJS({ let location = ""; const headers = new Headers6(); if (Array.isArray(headersList)) { - for (let n2 = 0; n2 < headersList.length; n2 += 2) { - const key = headersList[n2 + 0].toString("latin1"); - const val = headersList[n2 + 1].toString("latin1"); + for (let n4 = 0; n4 < headersList.length; n4 += 2) { + const key = headersList[n4 + 0].toString("latin1"); + const val = headersList[n4 + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x2) => x2.trim()); + codings = val.toLowerCase().split(",").map((x4) => x4.trim()); } else if (key.toLowerCase() === "location") { location = val; } @@ -14209,7 +14209,7 @@ var require_fetch = __commonJS({ for (const key of keys) { const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x2) => x2.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x4) => x4.trim()).reverse(); } else if (key.toLowerCase() === "location") { location = val; } @@ -14278,9 +14278,9 @@ var require_fetch = __commonJS({ return; } const headers = new Headers6(); - for (let n2 = 0; n2 < headersList.length; n2 += 2) { - const key = headersList[n2 + 0].toString("latin1"); - const val = headersList[n2 + 1].toString("latin1"); + for (let n4 = 0; n4 < headersList.length; n4 += 2) { + const key = headersList[n4 + 0].toString("latin1"); + const val = headersList[n4 + 1].toString("latin1"); headers[kHeadersList].append(key, val); } resolve({ @@ -14764,8 +14764,8 @@ var require_util4 = __commonJS({ } })(); } - function fireAProgressEvent(e3, reader) { - const event = new ProgressEvent(e3, { + function fireAProgressEvent(e5, reader) { + const event = new ProgressEvent(e5, { bubbles: false, cancelable: false }); @@ -14830,25 +14830,25 @@ var require_util4 = __commonJS({ return new TextDecoder(encoding).decode(sliced); } function BOMSniffing(ioQueue) { - const [a3, b3, c2] = ioQueue; - if (a3 === 239 && b3 === 187 && c2 === 191) { + const [a5, b5, c4] = ioQueue; + if (a5 === 239 && b5 === 187 && c4 === 191) { return "UTF-8"; - } else if (a3 === 254 && b3 === 255) { + } else if (a5 === 254 && b5 === 255) { return "UTF-16BE"; - } else if (a3 === 255 && b3 === 254) { + } else if (a5 === 255 && b5 === 254) { return "UTF-16LE"; } return null; } function combineByteSequences(sequences) { - const size = sequences.reduce((a3, b3) => { - return a3 + b3.byteLength; + const size = sequences.reduce((a5, b5) => { + return a5 + b5.byteLength; }, 0); let offset = 0; - return sequences.reduce((a3, b3) => { - a3.set(b3, offset); - offset += b3.byteLength; - return a3; + return sequences.reduce((a5, b5) => { + a5.set(b5, offset); + offset += b5.byteLength; + return a5; }, new Uint8Array(size)); } module2.exports = { @@ -14877,7 +14877,7 @@ var require_filereader = __commonJS({ } = require_symbols3(); var { webidl } = require_webidl(); var { kEnumerableProperty } = require_util(); - var FileReader = class _FileReader extends EventTarget { + var FileReader2 = class _FileReader extends EventTarget { constructor() { super(); this[kState] = "empty"; @@ -15079,10 +15079,10 @@ var require_filereader = __commonJS({ } } }; - FileReader.EMPTY = FileReader.prototype.EMPTY = 0; - FileReader.LOADING = FileReader.prototype.LOADING = 1; - FileReader.DONE = FileReader.prototype.DONE = 2; - Object.defineProperties(FileReader.prototype, { + FileReader2.EMPTY = FileReader2.prototype.EMPTY = 0; + FileReader2.LOADING = FileReader2.prototype.LOADING = 1; + FileReader2.DONE = FileReader2.prototype.DONE = 2; + Object.defineProperties(FileReader2.prototype, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors, @@ -15107,13 +15107,13 @@ var require_filereader = __commonJS({ configurable: true } }); - Object.defineProperties(FileReader, { + Object.defineProperties(FileReader2, { EMPTY: staticPropertyDescriptors, LOADING: staticPropertyDescriptors, DONE: staticPropertyDescriptors }); module2.exports = { - FileReader + FileReader: FileReader2 }; } }); @@ -15135,9 +15135,9 @@ var require_util5 = __commonJS({ var assert = require("assert"); var { URLSerializer } = require_dataURL(); var { isValidHeaderName: isValidHeaderName2 } = require_util2(); - function urlEquals(A3, B2, excludeFragment = false) { - const serializedA = URLSerializer(A3, excludeFragment); - const serializedB = URLSerializer(B2, excludeFragment); + function urlEquals(A4, B3, excludeFragment = false) { + const serializedA = URLSerializer(A4, excludeFragment); + const serializedB = URLSerializer(B3, excludeFragment); return serializedA === serializedB; } function fieldValues(header) { @@ -15194,25 +15194,25 @@ var require_cache = __commonJS({ webidl.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); request3 = webidl.converters.RequestInfo(request3); options = webidl.converters.CacheQueryOptions(options); - const p3 = await this.matchAll(request3, options); - if (p3.length === 0) { + const p5 = await this.matchAll(request3, options); + if (p5.length === 0) { return; } - return p3[0]; + return p5[0]; } async matchAll(request3 = void 0, options = {}) { webidl.brandCheck(this, _Cache); if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); options = webidl.converters.CacheQueryOptions(options); - let r3 = null; + let r5 = null; if (request3 !== void 0) { if (request3 instanceof Request6) { - r3 = request3[kState]; - if (r3.method !== "GET" && !options.ignoreMethod) { + r5 = request3[kState]; + if (r5.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request3 === "string") { - r3 = new Request6(request3)[kState]; + r5 = new Request6(request3)[kState]; } } const responses = []; @@ -15221,7 +15221,7 @@ var require_cache = __commonJS({ responses.push(requestResponse[1]); } } else { - const requestResponses = this.#queryCache(r3, options); + const requestResponses = this.#queryCache(r5, options); for (const requestResponse of requestResponses) { responses.push(requestResponse[1]); } @@ -15256,8 +15256,8 @@ var require_cache = __commonJS({ if (typeof request3 === "string") { continue; } - const r3 = request3[kState]; - if (!urlIsHttpHttpsScheme(r3.url) || r3.method !== "GET") { + const r5 = request3[kState]; + if (!urlIsHttpHttpsScheme(r5.url) || r5.method !== "GET") { throw webidl.errors.exception({ header: "Cache.addAll", message: "Expected http/s scheme when method is not GET." @@ -15266,19 +15266,19 @@ var require_cache = __commonJS({ } const fetchControllers = []; for (const request3 of requests) { - const r3 = new Request6(request3)[kState]; - if (!urlIsHttpHttpsScheme(r3.url)) { + const r5 = new Request6(request3)[kState]; + if (!urlIsHttpHttpsScheme(r5.url)) { throw webidl.errors.exception({ header: "Cache.addAll", message: "Expected http/s scheme." }); } - r3.initiator = "fetch"; - r3.destination = "subresource"; - requestList.push(r3); + r5.initiator = "fetch"; + r5.destination = "subresource"; + requestList.push(r5); const responsePromise = createDeferredPromise(); fetchControllers.push(fetching({ - request: r3, + request: r5, dispatcher: getGlobalDispatcher(), processResponse(response) { if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) { @@ -15312,8 +15312,8 @@ var require_cache = __commonJS({ })); responsePromises.push(responsePromise.promise); } - const p3 = Promise.all(responsePromises); - const responses = await p3; + const p5 = Promise.all(responsePromises); + const responses = await p5; const operations = []; let index = 0; for (const response of responses) { @@ -15332,8 +15332,8 @@ var require_cache = __commonJS({ let errorData = null; try { this.#batchCacheOperations(operations); - } catch (e3) { - errorData = e3; + } catch (e5) { + errorData = e5; } queueMicrotask(() => { if (errorData === null) { @@ -15412,8 +15412,8 @@ var require_cache = __commonJS({ let errorData = null; try { this.#batchCacheOperations(operations); - } catch (e3) { - errorData = e3; + } catch (e5) { + errorData = e5; } queueMicrotask(() => { if (errorData === null) { @@ -15429,20 +15429,20 @@ var require_cache = __commonJS({ webidl.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); request3 = webidl.converters.RequestInfo(request3); options = webidl.converters.CacheQueryOptions(options); - let r3 = null; + let r5 = null; if (request3 instanceof Request6) { - r3 = request3[kState]; - if (r3.method !== "GET" && !options.ignoreMethod) { + r5 = request3[kState]; + if (r5.method !== "GET" && !options.ignoreMethod) { return false; } } else { assert(typeof request3 === "string"); - r3 = new Request6(request3)[kState]; + r5 = new Request6(request3)[kState]; } const operations = []; const operation = { type: "delete", - request: r3, + request: r5, options }; operations.push(operation); @@ -15451,8 +15451,8 @@ var require_cache = __commonJS({ let requestResponses; try { requestResponses = this.#batchCacheOperations(operations); - } catch (e3) { - errorData = e3; + } catch (e5) { + errorData = e5; } queueMicrotask(() => { if (errorData === null) { @@ -15473,15 +15473,15 @@ var require_cache = __commonJS({ webidl.brandCheck(this, _Cache); if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3); options = webidl.converters.CacheQueryOptions(options); - let r3 = null; + let r5 = null; if (request3 !== void 0) { if (request3 instanceof Request6) { - r3 = request3[kState]; - if (r3.method !== "GET" && !options.ignoreMethod) { + r5 = request3[kState]; + if (r5.method !== "GET" && !options.ignoreMethod) { return []; } } else if (typeof request3 === "string") { - r3 = new Request6(request3)[kState]; + r5 = new Request6(request3)[kState]; } } const promise = createDeferredPromise(); @@ -15491,7 +15491,7 @@ var require_cache = __commonJS({ requests.push(requestResponse[0]); } } else { - const requestResponses = this.#queryCache(r3, options); + const requestResponses = this.#queryCache(r5, options); for (const requestResponse of requestResponses) { requests.push(requestResponse[0]); } @@ -15516,8 +15516,8 @@ var require_cache = __commonJS({ * @returns {requestResponseList} */ #batchCacheOperations(operations) { - const cache = this.#relevantRequestResponseList; - const backupCache = [...cache]; + const cache3 = this.#relevantRequestResponseList; + const backupCache = [...cache3]; const addedItems = []; const resultList = []; try { @@ -15544,9 +15544,9 @@ var require_cache = __commonJS({ return []; } for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); + const idx = cache3.indexOf(requestResponse); assert(idx !== -1); - cache.splice(idx, 1); + cache3.splice(idx, 1); } } else if (operation.type === "put") { if (operation.response == null) { @@ -15555,14 +15555,14 @@ var require_cache = __commonJS({ message: "put operation should have an associated response" }); } - const r3 = operation.request; - if (!urlIsHttpHttpsScheme(r3.url)) { + const r5 = operation.request; + if (!urlIsHttpHttpsScheme(r5.url)) { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "expected http or https scheme" }); } - if (r3.method !== "GET") { + if (r5.method !== "GET") { throw webidl.errors.exception({ header: "Cache.#batchCacheOperations", message: "not get method" @@ -15576,20 +15576,20 @@ var require_cache = __commonJS({ } requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse); + const idx = cache3.indexOf(requestResponse); assert(idx !== -1); - cache.splice(idx, 1); + cache3.splice(idx, 1); } - cache.push([operation.request, operation.response]); + cache3.push([operation.request, operation.response]); addedItems.push([operation.request, operation.response]); } resultList.push([operation.request, operation.response]); } return resultList; - } catch (e3) { + } catch (e5) { this.#relevantRequestResponseList.length = 0; this.#relevantRequestResponseList = backupCache; - throw e3; + throw e5; } } /** @@ -15720,13 +15720,13 @@ var require_cachestorage = __commonJS({ if (options.cacheName != null) { if (this.#caches.has(options.cacheName)) { const cacheList = this.#caches.get(options.cacheName); - const cache = new Cache(kConstruct, cacheList); - return await cache.match(request3, options); + const cache3 = new Cache(kConstruct, cacheList); + return await cache3.match(request3, options); } } else { for (const cacheList of this.#caches.values()) { - const cache = new Cache(kConstruct, cacheList); - const response = await cache.match(request3, options); + const cache3 = new Cache(kConstruct, cacheList); + const response = await cache3.match(request3, options); if (response !== void 0) { return response; } @@ -15754,12 +15754,12 @@ var require_cachestorage = __commonJS({ webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); cacheName = webidl.converters.DOMString(cacheName); if (this.#caches.has(cacheName)) { - const cache2 = this.#caches.get(cacheName); - return new Cache(kConstruct, cache2); + const cache4 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache4); } - const cache = []; - this.#caches.set(cacheName, cache); - return new Cache(kConstruct, cache); + const cache3 = []; + this.#caches.set(cacheName, cache3); + return new Cache(kConstruct, cache3); } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete @@ -15898,7 +15898,7 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie max-age"); } } - function stringify3(cookie) { + function stringify5(cookie) { if (cookie.name.length === 0) { return null; } @@ -15952,7 +15952,7 @@ var require_util6 = __commonJS({ validateCookiePath, validateCookieValue, toIMFDate, - stringify: stringify3 + stringify: stringify5 }; } }); @@ -16102,7 +16102,7 @@ var require_cookies = __commonJS({ "node_modules/undici/lib/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse(); - var { stringify: stringify3 } = require_util6(); + var { stringify: stringify5 } = require_util6(); var { webidl } = require_webidl(); var { Headers: Headers6 } = require_headers(); function getCookies(headers) { @@ -16144,9 +16144,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers6, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str2 = stringify3(cookie); + const str2 = stringify5(cookie); if (str2) { - headers.append("Set-Cookie", stringify3(cookie)); + headers.append("Set-Cookie", stringify5(cookie)); } } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ @@ -16545,8 +16545,8 @@ var require_util7 = __commonJS({ function isClosed(ws) { return ws[kReadyState] === states.CLOSED; } - function fireEvent(e3, target, eventConstructor = Event, eventInitDict) { - const event = new eventConstructor(e3, eventInitDict); + function fireEvent(e5, target, eventConstructor = Event, eventInitDict) { + const event = new eventConstructor(e5, eventInitDict); target.dispatchEvent(event); } function websocketMessageReceived(ws, type2, data) { @@ -16642,9 +16642,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto6; + var crypto14; try { - crypto6 = require("crypto"); + crypto14 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16663,7 +16663,7 @@ var require_connection = __commonJS({ const headersList = new Headers6(options.headers)[kHeadersList]; request3.headersList = headersList; } - const keyValue = crypto6.randomBytes(16).toString("base64"); + const keyValue = crypto14.randomBytes(16).toString("base64"); request3.headersList.append("sec-websocket-key", keyValue); request3.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16692,7 +16692,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto6.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto14.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16772,9 +16772,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto6; + var crypto14; try { - crypto6 = require("crypto"); + crypto14 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16783,7 +16783,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto6.randomBytes(4); + this.maskKey = crypto14.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -16812,8 +16812,8 @@ var require_frame = __commonJS({ buffer.writeUIntBE(bodyLength, 4, 6); } buffer[1] |= 128; - for (let i3 = 0; i3 < bodyLength; i3++) { - buffer[offset + i3] = this.frameData[i3] ^ this.maskKey[i3 % 4]; + for (let i5 = 0; i5 < bodyLength; i5++) { + buffer[offset + i5] = this.frameData[i5] ^ this.maskKey[i5 % 4]; } return buffer; } @@ -16851,7 +16851,7 @@ var require_receiver = __commonJS({ * @param {Buffer} chunk * @param {() => void} callback */ - _write(chunk, _3, callback) { + _write(chunk, _4, callback) { this.#buffers.push(chunk); this.#byteOffset += chunk.length; this.run(callback); @@ -16995,34 +16995,34 @@ var require_receiver = __commonJS({ * @param {number} n * @returns {Buffer|null} */ - consume(n2) { - if (n2 > this.#byteOffset) { + consume(n4) { + if (n4 > this.#byteOffset) { return null; - } else if (n2 === 0) { + } else if (n4 === 0) { return emptyBuffer; } - if (this.#buffers[0].length === n2) { + if (this.#buffers[0].length === n4) { this.#byteOffset -= this.#buffers[0].length; return this.#buffers.shift(); } - const buffer = Buffer.allocUnsafe(n2); + const buffer = Buffer.allocUnsafe(n4); let offset = 0; - while (offset !== n2) { + while (offset !== n4) { const next = this.#buffers[0]; const { length } = next; - if (length + offset === n2) { + if (length + offset === n4) { buffer.set(this.#buffers.shift(), offset); break; - } else if (length + offset > n2) { - buffer.set(next.subarray(0, n2 - offset), offset); - this.#buffers[0] = next.subarray(n2 - offset); + } else if (length + offset > n4) { + buffer.set(next.subarray(0, n4 - offset), offset); + this.#buffers[0] = next.subarray(n4 - offset); break; } else { buffer.set(this.#buffers.shift(), offset); offset += next.length; } } - this.#byteOffset -= n2; + this.#byteOffset -= n4; return buffer; } parseCloseBody(onlyCode, data) { @@ -17086,7 +17086,7 @@ var require_websocket = __commonJS({ var { getGlobalDispatcher } = require_global2(); var { types } = require("util"); var experimentalWarned = false; - var WebSocket = class _WebSocket extends EventTarget { + var WebSocket2 = class _WebSocket extends EventTarget { #events = { open: null, error: null, @@ -17116,8 +17116,8 @@ var require_websocket = __commonJS({ let urlRecord; try { urlRecord = new URL(url2, baseURL); - } catch (e3) { - throw new DOMException3(e3, "SyntaxError"); + } catch (e5) { + throw new DOMException3(e5, "SyntaxError"); } if (urlRecord.protocol === "http:") { urlRecord.protocol = "ws:"; @@ -17136,10 +17136,10 @@ var require_websocket = __commonJS({ if (typeof protocols === "string") { protocols = [protocols]; } - if (protocols.length !== new Set(protocols.map((p3) => p3.toLowerCase())).size) { + if (protocols.length !== new Set(protocols.map((p5) => p5.toLowerCase())).size) { throw new DOMException3("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } - if (protocols.length > 0 && !protocols.every((p3) => isValidSubprotocol(p3))) { + if (protocols.length > 0 && !protocols.every((p5) => isValidSubprotocol(p5))) { throw new DOMException3("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); } this[kWebSocketURL] = new URL(urlRecord.href); @@ -17379,11 +17379,11 @@ var require_websocket = __commonJS({ 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, { + WebSocket2.CONNECTING = WebSocket2.prototype.CONNECTING = states.CONNECTING; + WebSocket2.OPEN = WebSocket2.prototype.OPEN = states.OPEN; + WebSocket2.CLOSING = WebSocket2.prototype.CLOSING = states.CLOSING; + WebSocket2.CLOSED = WebSocket2.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket2.prototype, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, @@ -17407,7 +17407,7 @@ var require_websocket = __commonJS({ configurable: true } }); - Object.defineProperties(WebSocket, { + Object.defineProperties(WebSocket2, { CONNECTING: staticPropertyDescriptors, OPEN: staticPropertyDescriptors, CLOSING: staticPropertyDescriptors, @@ -17460,7 +17460,7 @@ var require_websocket = __commonJS({ return webidl.converters.USVString(V4); }; module2.exports = { - WebSocket + WebSocket: WebSocket2 }; } }); @@ -17589,8 +17589,8 @@ var require_undici = __commonJS({ module2.exports.serializeAMimeType = serializeAMimeType; } if (util4.nodeMajor >= 18 && hasCrypto) { - const { WebSocket } = require_websocket(); - module2.exports.WebSocket = WebSocket; + const { WebSocket: WebSocket2 } = require_websocket(); + module2.exports.WebSocket = WebSocket2; } module2.exports.request = makeDispatcher(api.request); module2.exports.stream = makeDispatcher(api.stream); @@ -17608,34 +17608,34 @@ var require_undici = __commonJS({ var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -17645,15 +17645,15 @@ var require_lib = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -17664,10 +17664,10 @@ var require_lib = __commonJS({ }; 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 http3 = __importStar(require("http")); - var https3 = __importStar(require("https")); - var pm = __importStar(require_proxy()); - var tunnel = __importStar(require_tunnel2()); + var http3 = __importStar2(require("http")); + var https3 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17742,8 +17742,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + 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]); @@ -17755,8 +17755,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + 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); @@ -17813,42 +17813,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream4, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream4, additionalHeaders); }); } @@ -17857,14 +17857,14 @@ var require_lib = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers6.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers6.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers6.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.ContentType, MediaTypes.ApplicationJson); @@ -17873,7 +17873,7 @@ var require_lib = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers6.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers6.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.ContentType, MediaTypes.ApplicationJson); @@ -17882,7 +17882,7 @@ var require_lib = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers6.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers6.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers6.ContentType, MediaTypes.ApplicationJson); @@ -17896,7 +17896,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17970,7 +17970,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { @@ -18157,15 +18157,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { + 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 __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + 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, @@ -18177,9 +18177,9 @@ var require_lib = __commonJS({ } function dateTimeDeserializer(key, value) { if (typeof value === "string") { - const a3 = new Date(value); - if (!isNaN(a3.valueOf())) { - return a3; + const a5 = new Date(value); + if (!isNaN(a5.valueOf())) { + return a5; } } return value; @@ -18219,7 +18219,7 @@ var require_lib = __commonJS({ } }; exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c2, k4) => (c2[k4.toLowerCase()] = obj[k4], c2), {}); + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c4, k6) => (c4[k6.toLowerCase()] = obj[k6], c4), {}); } }); @@ -18227,7 +18227,7 @@ var require_lib = __commonJS({ var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -18237,15 +18237,15 @@ var require_auth = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -18272,7 +18272,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18295,7 +18295,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18318,7 +18318,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18331,7 +18331,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -18341,15 +18341,15 @@ var require_oidc_utils = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -18386,8 +18386,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a5; - return __awaiter(this, void 0, void 0, function* () { + var _a6; + 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. @@ -18396,7 +18396,7 @@ var require_oidc_utils = __commonJS({ Error Message: ${error.message}`); }); - const id_token = (_a5 = res.result) === null || _a5 === void 0 ? void 0 : _a5.value; + const id_token = (_a6 = res.result) === null || _a6 === void 0 ? void 0 : _a6.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } @@ -18404,7 +18404,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18429,7 +18429,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -18439,15 +18439,15 @@ var require_summary = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -18474,7 +18474,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18484,7 +18484,7 @@ var require_summary = __commonJS({ } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a5) { + } catch (_a6) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; @@ -18515,7 +18515,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter(this, void 0, void 0, function* () { + 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; @@ -18529,7 +18529,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18723,32 +18723,32 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar(require("path")); + var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18768,30 +18768,30 @@ var require_path_utils = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -18801,15 +18801,15 @@ var require_core = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -18823,8 +18823,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os3 = __importStar(require("os")); - var path2 = __importStar(require("path")); + var os3 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -18867,7 +18867,7 @@ var require_core = __commonJS({ } exports2.getInput = getInput; function getMultilineInput(name, options) { - const inputs = getInput(name, options).split("\n").filter((x2) => x2 !== ""); + const inputs = getInput(name, options).split("\n").filter((x4) => x4 !== ""); if (options && options.trimWhitespace === false) { return inputs; } @@ -18937,7 +18937,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.endGroup = endGroup; function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup(name); let result; try { @@ -18962,7 +18962,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.getState = getState; function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } @@ -18992,30 +18992,30 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); var require_io_util = __commonJS({ "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -19025,15 +19025,15 @@ var require_io_util = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -19042,17 +19042,17 @@ var require_io_util = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var _a5; + var _a6; 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 fs4 = __importStar(require("fs")); - var path2 = __importStar(require("path")); - _a5 = fs4.promises, exports2.chmod = _a5.chmod, exports2.copyFile = _a5.copyFile, exports2.lstat = _a5.lstat, exports2.mkdir = _a5.mkdir, exports2.open = _a5.open, exports2.readdir = _a5.readdir, exports2.readlink = _a5.readlink, exports2.rename = _a5.rename, exports2.rm = _a5.rm, exports2.rmdir = _a5.rmdir, exports2.stat = _a5.stat, exports2.symlink = _a5.symlink, exports2.unlink = _a5.unlink; + var fs4 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a6 = fs4.promises, exports2.chmod = _a6.chmod, exports2.copyFile = _a6.copyFile, exports2.lstat = _a6.lstat, exports2.mkdir = _a6.mkdir, exports2.open = _a6.open, exports2.readdir = _a6.readdir, exports2.readlink = _a6.readlink, exports2.rename = _a6.rename, exports2.rm = _a6.rm, exports2.rmdir = _a6.rmdir, exports2.stat = _a6.stat, exports2.symlink = _a6.symlink, exports2.unlink = _a6.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs4.constants.O_RDONLY; function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { yield exports2.stat(fsPath); } catch (err) { @@ -19066,25 +19066,25 @@ var require_io_util = __commonJS({ } exports2.exists = exists; function isDirectory(fsPath, useStat = false) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } exports2.isDirectory = isDirectory; - function isRooted(p3) { - p3 = normalizeSeparators(p3); - if (!p3) { + function isRooted(p5) { + p5 = normalizeSeparators(p5); + if (!p5) { throw new Error('isRooted() parameter "p" cannot be empty'); } if (exports2.IS_WINDOWS) { - return p3.startsWith("\\") || /^[A-Z]:/i.test(p3); + return p5.startsWith("\\") || /^[A-Z]:/i.test(p5); } - return p3.startsWith("/"); + return p5.startsWith("/"); } exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { stats = yield exports2.stat(filePath); @@ -19142,20 +19142,20 @@ var require_io_util = __commonJS({ }); } exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p3) { - p3 = p3 || ""; + function normalizeSeparators(p5) { + p5 = p5 || ""; if (exports2.IS_WINDOWS) { - p3 = p3.replace(/\//g, "\\"); - return p3.replace(/\\\\+/g, "\\"); + p5 = p5.replace(/\//g, "\\"); + return p5.replace(/\\\\+/g, "\\"); } - return p3.replace(/\/\/+/g, "/"); + return p5.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } function getCmdPath() { - var _a6; - return (_a6 = process.env["COMSPEC"]) !== null && _a6 !== void 0 ? _a6 : `cmd.exe`; + var _a7; + return (_a7 = process.env["COMSPEC"]) !== null && _a7 !== void 0 ? _a7 : `cmd.exe`; } exports2.getCmdPath = getCmdPath; } @@ -19165,30 +19165,30 @@ var require_io_util = __commonJS({ var require_io = __commonJS({ "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -19198,15 +19198,15 @@ var require_io = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -19218,10 +19218,10 @@ var require_io = __commonJS({ 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 = __importStar(require("path")); - var ioUtil = __importStar(require_io_util()); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); function cp(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { + 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) { @@ -19248,7 +19248,7 @@ var require_io = __commonJS({ } exports2.cp = cp; function mv(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -19269,7 +19269,7 @@ var require_io = __commonJS({ } exports2.mv = mv; function rmRF(inputPath) { - return __awaiter(this, void 0, void 0, function* () { + 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'); @@ -19289,14 +19289,14 @@ var require_io = __commonJS({ } exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } exports2.mkdirP = mkdirP; function which(tool, check) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -19320,7 +19320,7 @@ var require_io = __commonJS({ } exports2.which = which; function findInPath(tool) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -19344,9 +19344,9 @@ var require_io = __commonJS({ } const directories = []; if (process.env.PATH) { - for (const p3 of process.env.PATH.split(path2.delimiter)) { - if (p3) { - directories.push(p3); + for (const p5 of process.env.PATH.split(path2.delimiter)) { + if (p5) { + directories.push(p5); } } } @@ -19368,7 +19368,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -19388,13 +19388,13 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); yield ioUtil.unlink(destFile); - } catch (e3) { - if (e3.code === "EPERM") { + } catch (e5) { + if (e5.code === "EPERM") { yield ioUtil.chmod(destFile, "0666"); yield ioUtil.unlink(destFile); } @@ -19413,30 +19413,30 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -19446,15 +19446,15 @@ var require_toolrunner = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -19465,12 +19465,12 @@ var require_toolrunner = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.argStringToArray = exports2.ToolRunner = void 0; - var os3 = __importStar(require("os")); - var events = __importStar(require("events")); - var child = __importStar(require("child_process")); - var path2 = __importStar(require("path")); - var io = __importStar(require_io()); - var ioUtil = __importStar(require_io_util()); + var os3 = __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 { @@ -19495,39 +19495,39 @@ var require_toolrunner = __commonJS({ if (IS_WINDOWS) { if (this._isCmdFile()) { cmd += toolPath; - for (const a3 of args) { - cmd += ` ${a3}`; + for (const a5 of args) { + cmd += ` ${a5}`; } } else if (options.windowsVerbatimArguments) { cmd += `"${toolPath}"`; - for (const a3 of args) { - cmd += ` ${a3}`; + for (const a5 of args) { + cmd += ` ${a5}`; } } else { cmd += this._windowsQuoteCmdArg(toolPath); - for (const a3 of args) { - cmd += ` ${this._windowsQuoteCmdArg(a3)}`; + for (const a5 of args) { + cmd += ` ${this._windowsQuoteCmdArg(a5)}`; } } } else { cmd += toolPath; - for (const a3 of args) { - cmd += ` ${a3}`; + for (const a5 of args) { + cmd += ` ${a5}`; } } return cmd; } _processLineBuffer(data, strBuffer, onLine) { try { - let s2 = strBuffer + data.toString(); - let n2 = s2.indexOf(os3.EOL); - while (n2 > -1) { - const line = s2.substring(0, n2); + let s4 = strBuffer + data.toString(); + let n4 = s4.indexOf(os3.EOL); + while (n4 > -1) { + const line = s4.substring(0, n4); onLine(line); - s2 = s2.substring(n2 + os3.EOL.length); - n2 = s2.indexOf(os3.EOL); + s4 = s4.substring(n4 + os3.EOL.length); + n4 = s4.indexOf(os3.EOL); } - return s2; + return s4; } catch (err) { this._debug(`error processing line. Failed with error ${err}`); return ""; @@ -19545,9 +19545,9 @@ var require_toolrunner = __commonJS({ if (IS_WINDOWS) { if (this._isCmdFile()) { let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a3 of this.args) { + for (const a5 of this.args) { argline += " "; - argline += options.windowsVerbatimArguments ? a3 : this._windowsQuoteCmdArg(a3); + argline += options.windowsVerbatimArguments ? a5 : this._windowsQuoteCmdArg(a5); } argline += '"'; return [argline]; @@ -19595,7 +19595,7 @@ var require_toolrunner = __commonJS({ ]; let needsQuotes = false; for (const char of arg) { - if (cmdSpecialChars.some((x2) => x2 === char)) { + if (cmdSpecialChars.some((x4) => x4 === char)) { needsQuotes = true; break; } @@ -19605,11 +19605,11 @@ var require_toolrunner = __commonJS({ } let reverse = '"'; let quoteHit = true; - for (let i3 = arg.length; i3 > 0; i3--) { - reverse += arg[i3 - 1]; - if (quoteHit && arg[i3 - 1] === "\\") { + for (let i5 = arg.length; i5 > 0; i5--) { + reverse += arg[i5 - 1]; + if (quoteHit && arg[i5 - 1] === "\\") { reverse += "\\"; - } else if (arg[i3 - 1] === '"') { + } else if (arg[i5 - 1] === '"') { quoteHit = true; reverse += '"'; } else { @@ -19631,11 +19631,11 @@ var require_toolrunner = __commonJS({ } let reverse = '"'; let quoteHit = true; - for (let i3 = arg.length; i3 > 0; i3--) { - reverse += arg[i3 - 1]; - if (quoteHit && arg[i3 - 1] === "\\") { + for (let i5 = arg.length; i5 > 0; i5--) { + reverse += arg[i5 - 1]; + if (quoteHit && arg[i5 - 1] === "\\") { reverse += "\\"; - } else if (arg[i3 - 1] === '"') { + } else if (arg[i5 - 1] === '"') { quoteHit = true; reverse += "\\"; } else { @@ -19681,12 +19681,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter(this, void 0, void 0, function* () { + 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) => __awaiter(this, void 0, void 0, function* () { + 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) { @@ -19696,8 +19696,8 @@ var require_toolrunner = __commonJS({ if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); } - const state2 = new ExecState(optionsNonNull, this.toolPath); - state2.on("debug", (message) => { + const state3 = new ExecState(optionsNonNull, this.toolPath); + state3.on("debug", (message) => { this._debug(message); }); if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { @@ -19724,13 +19724,13 @@ var require_toolrunner = __commonJS({ let errbuffer = ""; if (cp.stderr) { cp.stderr.on("data", (data) => { - state2.processStderr = true; + state3.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s2 = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s2.write(data); + const s4 = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s4.write(data); } errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { @@ -19740,25 +19740,25 @@ var require_toolrunner = __commonJS({ }); } cp.on("error", (err) => { - state2.processError = err.message; - state2.processExited = true; - state2.processClosed = true; - state2.CheckComplete(); + state3.processError = err.message; + state3.processExited = true; + state3.processClosed = true; + state3.CheckComplete(); }); cp.on("exit", (code) => { - state2.processExitCode = code; - state2.processExited = true; + state3.processExitCode = code; + state3.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state2.CheckComplete(); + state3.CheckComplete(); }); cp.on("close", (code) => { - state2.processExitCode = code; - state2.processExited = true; - state2.processClosed = true; + state3.processExitCode = code; + state3.processExited = true; + state3.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state2.CheckComplete(); + state3.CheckComplete(); }); - state2.on("done", (error, exitCode) => { + state3.on("done", (error, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -19788,39 +19788,39 @@ var require_toolrunner = __commonJS({ let inQuotes = false; let escaped = false; let arg = ""; - function append2(c2) { - if (escaped && c2 !== '"') { + function append2(c4) { + if (escaped && c4 !== '"') { arg += "\\"; } - arg += c2; + arg += c4; escaped = false; } - for (let i3 = 0; i3 < argString.length; i3++) { - const c2 = argString.charAt(i3); - if (c2 === '"') { + for (let i5 = 0; i5 < argString.length; i5++) { + const c4 = argString.charAt(i5); + if (c4 === '"') { if (!escaped) { inQuotes = !inQuotes; } else { - append2(c2); + append2(c4); } continue; } - if (c2 === "\\" && escaped) { - append2(c2); + if (c4 === "\\" && escaped) { + append2(c4); continue; } - if (c2 === "\\" && inQuotes) { + if (c4 === "\\" && inQuotes) { escaped = true; continue; } - if (c2 === " " && !inQuotes) { + if (c4 === " " && !inQuotes) { if (arg.length > 0) { args.push(arg); arg = ""; } continue; } - append2(c2); + append2(c4); } if (arg.length > 0) { args.push(arg.trim()); @@ -19879,15 +19879,15 @@ var require_toolrunner = __commonJS({ this.done = true; this.emit("done", error, this.processExitCode); } - static HandleTimeout(state2) { - if (state2.done) { + static HandleTimeout(state3) { + if (state3.done) { return; } - if (!state2.processClosed && state2.processExited) { - const message = `The STDIO streams did not close within ${state2.delay / 1e3} seconds of the exit event from process '${state2.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state2._debug(message); + if (!state3.processClosed && state3.processExited) { + const message = `The STDIO streams did not close within ${state3.delay / 1e3} seconds of the exit event from process '${state3.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state3._debug(message); } - state2._setResult(); + state3._setResult(); } }; } @@ -19897,30 +19897,30 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -19930,15 +19930,15 @@ var require_exec = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -19950,9 +19950,9 @@ var require_exec = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExecOutput = exports2.exec = void 0; var string_decoder_1 = require("string_decoder"); - var tr2 = __importStar(require_toolrunner()); + var tr2 = __importStar2(require_toolrunner()); function exec2(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr2.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19965,13 +19965,13 @@ var require_exec = __commonJS({ } exports2.exec = exec2; function getExecOutput(commandLine, args, options) { - var _a5, _b2; - return __awaiter(this, void 0, void 0, function* () { + var _a6, _b2; + return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr2 = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a5 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a5 === void 0 ? void 0 : _a5.stdout; + const originalStdoutListener = (_a6 = options === null || options === void 0 ? void 0 : options.listeners) === null || _a6 === void 0 ? void 0 : _a6.stdout; const originalStdErrListener = (_b2 = options === null || options === void 0 ? void 0 : options.listeners) === null || _b2 === void 0 ? void 0 : _b2.stderr; const stdErrListener = (data) => { stderr2 += stderrDecoder.write(data); @@ -20013,7 +20013,7 @@ var require_context = __commonJS({ * Hydrate the context from the environment */ constructor() { - var _a5, _b2, _c2; + var _a6, _b2, _c2; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { @@ -20033,7 +20033,7 @@ var require_context = __commonJS({ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a5 = process.env.GITHUB_API_URL) !== null && _a5 !== void 0 ? _a5 : `https://api.github.com`; + this.apiUrl = (_a6 = process.env.GITHUB_API_URL) !== null && _a6 !== void 0 ? _a6 : `https://api.github.com`; this.serverUrl = (_b2 = process.env.GITHUB_SERVER_URL) !== null && _b2 !== void 0 ? _b2 : `https://github.com`; this.graphqlUrl = (_c2 = process.env.GITHUB_GRAPHQL_URL) !== null && _c2 !== void 0 ? _c2 : `https://api.github.com/graphql`; } @@ -20063,34 +20063,34 @@ var require_context = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -20100,15 +20100,15 @@ var require_utils3 = __commonJS({ function fulfilled(value) { try { step(generator.next(value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function rejected(value) { try { step(generator["throw"](value)); - } catch (e3) { - reject(e3); + } catch (e5) { + reject(e5); } } function step(result) { @@ -20119,7 +20119,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar(require_lib()); + var httpClient = __importStar2(require_lib()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20142,7 +20142,7 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url2, opts) => __awaiter(this, void 0, void 0, function* () { + const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -20177,7 +20177,7 @@ var require_dist_node = __commonJS({ var require_register = __commonJS({ "node_modules/before-after-hook/lib/register.js"(exports2, module2) { module2.exports = register; - function register(state2, name, method, options) { + function register(state3, name, method, options) { if (typeof method !== "function") { throw new Error("method for before hook must be a function"); } @@ -20186,14 +20186,14 @@ var require_register = __commonJS({ } if (Array.isArray(name)) { return name.reverse().reduce(function(callback, name2) { - return register.bind(null, state2, name2, callback, options); + return register.bind(null, state3, name2, callback, options); }, method)(); } return Promise.resolve().then(function() { - if (!state2.registry[name]) { + if (!state3.registry[name]) { return method(options); } - return state2.registry[name].reduce(function(method2, registered) { + return state3.registry[name].reduce(function(method2, registered) { return registered.hook.bind(null, method2, options); }, method)(); }); @@ -20205,10 +20205,10 @@ var require_register = __commonJS({ var require_add = __commonJS({ "node_modules/before-after-hook/lib/add.js"(exports2, module2) { module2.exports = addHook; - function addHook(state2, kind3, name, hook) { + function addHook(state3, kind3, name, hook) { var orig = hook; - if (!state2.registry[name]) { - state2.registry[name] = []; + if (!state3.registry[name]) { + state3.registry[name] = []; } if (kind3 === "before") { hook = function(method, options) { @@ -20233,7 +20233,7 @@ var require_add = __commonJS({ }); }; } - state2.registry[name].push({ + state3.registry[name].push({ hook, orig }); @@ -20245,17 +20245,17 @@ var require_add = __commonJS({ var require_remove = __commonJS({ "node_modules/before-after-hook/lib/remove.js"(exports2, module2) { module2.exports = removeHook; - function removeHook(state2, name, method) { - if (!state2.registry[name]) { + function removeHook(state3, name, method) { + if (!state3.registry[name]) { return; } - var index = state2.registry[name].map(function(registered) { + var index = state3.registry[name].map(function(registered) { return registered.orig; }).indexOf(method); if (index === -1) { return; } - state2.registry[name].splice(index, 1); + state3.registry[name].splice(index, 1); } } }); @@ -20268,15 +20268,15 @@ var require_before_after_hook = __commonJS({ var removeHook = require_remove(); var bind2 = Function.bind; var bindable = bind2.bind(bind2); - function bindApi(hook, state2, name) { + function bindApi(hook, state3, name) { var removeHookRef = bindable(removeHook, null).apply( null, - name ? [state2, name] : [state2] + name ? [state3, name] : [state3] ); hook.api = { remove: removeHookRef }; hook.remove = removeHookRef; ["before", "error", "after", "wrap"].forEach(function(kind3) { - var args = name ? [state2, kind3, name] : [state2, kind3]; + var args = name ? [state3, kind3, name] : [state3, kind3]; hook[kind3] = hook.api[kind3] = bindable(addHook, null).apply(null, args); }); } @@ -20290,11 +20290,11 @@ var require_before_after_hook = __commonJS({ return singularHook; } function HookCollection() { - var state2 = { + var state3 = { registry: {} }; - var hook = register.bind(null, state2); - bindApi(hook, state2); + var hook = register.bind(null, state3); + bindApi(hook, state3); return hook; } var collectionHookDeprecationMessageDisplayed = false; @@ -20441,7 +20441,7 @@ var require_dist_node2 = __commonJS({ if (!matches) { return []; } - return matches.map(removeNonChars).reduce((a3, b3) => a3.concat(b3), []); + return matches.map(removeNonChars).reduce((a5, b5) => a5.concat(b5), []); } function omit(object, keysToOmit) { const result = { __proto__: null }; @@ -20461,8 +20461,8 @@ var require_dist_node2 = __commonJS({ }).join(""); } function encodeUnreserved(str2) { - return encodeURIComponent(str2).replace(/[!'()*]/g, function(c2) { - return "%" + c2.charCodeAt(0).toString(16).toUpperCase(); + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c4) { + return "%" + c4.charCodeAt(0).toString(16).toUpperCase(); }); } function encodeValue(operator, value, key) { @@ -20499,9 +20499,9 @@ var require_dist_node2 = __commonJS({ ); }); } else { - Object.keys(value).forEach(function(k4) { - if (isDefined2(value[k4])) { - result.push(encodeValue(operator, value[k4], k4)); + Object.keys(value).forEach(function(k6) { + if (isDefined2(value[k6])) { + result.push(encodeValue(operator, value[k6], k6)); } }); } @@ -20512,10 +20512,10 @@ var require_dist_node2 = __commonJS({ tmp.push(encodeValue(operator, value2)); }); } else { - Object.keys(value).forEach(function(k4) { - if (isDefined2(value[k4])) { - tmp.push(encodeUnreserved(k4)); - tmp.push(encodeValue(operator, value[k4].toString())); + Object.keys(value).forEach(function(k6) { + if (isDefined2(value[k6])) { + tmp.push(encodeUnreserved(k6)); + tmp.push(encodeValue(operator, value[k6].toString())); } }); } @@ -20539,7 +20539,7 @@ var require_dist_node2 = __commonJS({ } return result; } - function parseUrl(template) { + function parseUrl3(template) { return { expand: expand.bind(null, template) }; @@ -20548,7 +20548,7 @@ var require_dist_node2 = __commonJS({ var operators = ["+", "#", ".", "/", ";", "?", "&"]; template = template.replace( /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_3, expression, literal) { + function(_4, expression, literal) { if (expression) { let operator = ""; const values = []; @@ -20582,7 +20582,7 @@ var require_dist_node2 = __commonJS({ return template.replace(/\/$/, ""); } } - function parse2(options) { + function parse4(options) { let method = options.method.toUpperCase(); let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -20596,7 +20596,7 @@ var require_dist_node2 = __commonJS({ "mediaType" ]); const urlVariableNames = extractUrlVariableNames(url2); - url2 = parseUrl(url2).expand(parameters); + url2 = parseUrl3(url2).expand(parameters); if (!/^http/.test(url2)) { url2 = options.baseUrl + url2; } @@ -20646,7 +20646,7 @@ var require_dist_node2 = __commonJS({ ); } function endpointWithDefaults(defaults2, route, options) { - return parse2(merge2(defaults2, route, options)); + return parse4(merge2(defaults2, route, options)); } function withDefaults(oldDefaults, newDefaults) { const DEFAULTS2 = merge2(oldDefaults, newDefaults); @@ -20655,7 +20655,7 @@ var require_dist_node2 = __commonJS({ DEFAULTS: DEFAULTS2, defaults: withDefaults.bind(null, DEFAULTS2), merge: merge2.bind(null, DEFAULTS2), - parse: parse2 + parse: parse4 }); } var endpoint = withDefaults(null, DEFAULTS); @@ -20688,20 +20688,20 @@ var require_wrappy = __commonJS({ if (fn && cb) return wrappy(fn)(cb); if (typeof fn !== "function") throw new TypeError("need wrapper function"); - Object.keys(fn).forEach(function(k4) { - wrapper[k4] = fn[k4]; + Object.keys(fn).forEach(function(k6) { + wrapper[k6] = fn[k6]; }); return wrapper; function wrapper() { var args = new Array(arguments.length); - for (var i3 = 0; i3 < args.length; i3++) { - args[i3] = arguments[i3]; + for (var i5 = 0; i5 < args.length; i5++) { + args[i5] = arguments[i5]; } var ret = fn.apply(this, args); var cb2 = args[args.length - 1]; if (typeof ret === "function" && ret !== cb2) { - Object.keys(cb2).forEach(function(k4) { - ret[k4] = cb2[k4]; + Object.keys(cb2).forEach(function(k6) { + ret[k6] = cb2[k6]; }); } return ret; @@ -20731,25 +20731,25 @@ var require_once = __commonJS({ }); }); function once(fn) { - var f4 = function() { - if (f4.called) return f4.value; - f4.called = true; - return f4.value = fn.apply(this, arguments); + var f6 = function() { + if (f6.called) return f6.value; + f6.called = true; + return f6.value = fn.apply(this, arguments); }; - f4.called = false; - return f4; + f6.called = false; + return f6; } function onceStrict(fn) { - var f4 = function() { - if (f4.called) - throw new Error(f4.onceError); - f4.called = true; - return f4.value = fn.apply(this, arguments); + var f6 = function() { + if (f6.called) + throw new Error(f6.onceError); + f6.called = true; + return f6.value = fn.apply(this, arguments); }; var name = fn.name || "Function wrapped with `once`"; - f4.onceError = name + " shouldn't be called more than once"; - f4.called = false; - return f4; + f6.onceError = name + " shouldn't be called more than once"; + f6.called = false; + return f6; } } }); @@ -20891,9 +20891,9 @@ var require_dist_node5 = __commonJS({ return response.arrayBuffer(); } function fetchWrapper(requestOptions) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const log2 = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a5 = requestOptions.request) == null ? void 0 : _a5.parseSuccessResponseBody) !== false; + const parseSuccessResponseBody = ((_a6 = requestOptions.request) == null ? void 0 : _a6.parseSuccessResponseBody) !== false; if (isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); } @@ -21091,7 +21091,7 @@ var require_dist_node6 = __commonJS({ var import_request = require_dist_node5(); function _buildMessageForResponseErrors(data) { return `Request failed due to following response errors: -` + data.errors.map((e3) => ` - ${e3.message}`).join("\n"); +` + data.errors.map((e5) => ` - ${e5.message}`).join("\n"); } var GraphqlResponseError = class extends Error { constructor(request22, headers, response) { @@ -21415,8 +21415,8 @@ var require_dist_node8 = __commonJS({ this.auth = auth; } const classConstructor = this.constructor; - for (let i3 = 0; i3 < classConstructor.plugins.length; ++i3) { - Object.assign(this, classConstructor.plugins[i3](this, options)); + for (let i5 = 0; i5 < classConstructor.plugins.length; ++i5) { + Object.assign(this, classConstructor.plugins[i5](this, options)); } } }; @@ -23490,9 +23490,9 @@ var require_dist_node9 = __commonJS({ set(target, methodName, value) { return target.cache[methodName] = value; }, - get({ octokit: octokit2, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; + get({ octokit: octokit2, scope, cache: cache3 }, methodName) { + if (cache3[methodName]) { + return cache3[methodName]; } const method = endpointMethodsMap.get(scope).get(methodName); if (!method) { @@ -23500,7 +23500,7 @@ var require_dist_node9 = __commonJS({ } const { endpointDefaults, decorations } = method; if (decorations) { - cache[methodName] = decorate( + cache3[methodName] = decorate( octokit2, scope, methodName, @@ -23508,9 +23508,9 @@ var require_dist_node9 = __commonJS({ decorations ); } else { - cache[methodName] = octokit2.request.defaults(endpointDefaults); + cache3[methodName] = octokit2.request.defaults(endpointDefaults); } - return cache[methodName]; + return cache3[methodName]; } }; function endpointsToMethods(octokit2) { @@ -23962,37 +23962,37 @@ var require_dist_node10 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar(require_context()); - var Utils = __importStar(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node8(); var plugin_rest_endpoint_methods_1 = require_dist_node9(); var plugin_paginate_rest_1 = require_dist_node10(); @@ -24022,36 +24022,36 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -24070,16 +24070,16 @@ var require_src = __commonJS({ var CSI = `${ESC}[`; var beep = "\x07"; var cursor = { - to(x2, y4) { - if (!y4) return `${CSI}${x2 + 1}G`; - return `${CSI}${y4 + 1};${x2 + 1}H`; + to(x4, y5) { + if (!y5) return `${CSI}${x4 + 1}G`; + return `${CSI}${y5 + 1};${x4 + 1}H`; }, - move(x2, y4) { + move(x4, y5) { let ret = ""; - if (x2 < 0) ret += `${CSI}${-x2}D`; - else if (x2 > 0) ret += `${CSI}${x2}C`; - if (y4 < 0) ret += `${CSI}${-y4}A`; - else if (y4 > 0) ret += `${CSI}${y4}B`; + if (x4 < 0) ret += `${CSI}${-x4}D`; + else if (x4 > 0) ret += `${CSI}${x4}C`; + if (y5 < 0) ret += `${CSI}${-y5}A`; + else if (y5 > 0) ret += `${CSI}${y5}B`; return ret; }, up: (count = 1) => `${CSI}${count}A`, @@ -24107,8 +24107,8 @@ var require_src = __commonJS({ lineStart: `${CSI}1K`, lines(count) { let clear = ""; - for (let i3 = 0; i3 < count; i3++) - clear += this.line + (i3 < count - 1 ? cursor.up() : ""); + for (let i5 = 0; i5 < count; i5++) + clear += this.line + (i5 < count - 1 ? cursor.up() : ""); if (count) clear += cursor.left; return clear; @@ -24121,10 +24121,10 @@ var require_src = __commonJS({ // node_modules/picocolors/picocolors.js var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports2, module2) { - var p3 = process || {}; - var argv = p3.argv || []; - var env2 = p3.env || {}; - var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p3.platform === "win32" || (p3.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI); + var p5 = process || {}; + var argv = p5.argv || []; + var env2 = p5.env || {}; + var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p5.platform === "win32" || (p5.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI); var formatter = (open, close, replace = open) => (input) => { let string = "" + input, index = string.indexOf(close, open.length); return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; @@ -24139,50 +24139,50 @@ var require_picocolors = __commonJS({ return result + string.substring(cursor); }; var createColors = (enabled2 = isColorSupported) => { - let f4 = enabled2 ? formatter : () => String; + let f6 = enabled2 ? formatter : () => String; return { isColorSupported: enabled2, - reset: f4("\x1B[0m", "\x1B[0m"), - bold: f4("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), - dim: f4("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), - italic: f4("\x1B[3m", "\x1B[23m"), - underline: f4("\x1B[4m", "\x1B[24m"), - inverse: f4("\x1B[7m", "\x1B[27m"), - hidden: f4("\x1B[8m", "\x1B[28m"), - strikethrough: f4("\x1B[9m", "\x1B[29m"), - black: f4("\x1B[30m", "\x1B[39m"), - red: f4("\x1B[31m", "\x1B[39m"), - green: f4("\x1B[32m", "\x1B[39m"), - yellow: f4("\x1B[33m", "\x1B[39m"), - blue: f4("\x1B[34m", "\x1B[39m"), - magenta: f4("\x1B[35m", "\x1B[39m"), - cyan: f4("\x1B[36m", "\x1B[39m"), - white: f4("\x1B[37m", "\x1B[39m"), - gray: f4("\x1B[90m", "\x1B[39m"), - bgBlack: f4("\x1B[40m", "\x1B[49m"), - bgRed: f4("\x1B[41m", "\x1B[49m"), - bgGreen: f4("\x1B[42m", "\x1B[49m"), - bgYellow: f4("\x1B[43m", "\x1B[49m"), - bgBlue: f4("\x1B[44m", "\x1B[49m"), - bgMagenta: f4("\x1B[45m", "\x1B[49m"), - bgCyan: f4("\x1B[46m", "\x1B[49m"), - bgWhite: f4("\x1B[47m", "\x1B[49m"), - blackBright: f4("\x1B[90m", "\x1B[39m"), - redBright: f4("\x1B[91m", "\x1B[39m"), - greenBright: f4("\x1B[92m", "\x1B[39m"), - yellowBright: f4("\x1B[93m", "\x1B[39m"), - blueBright: f4("\x1B[94m", "\x1B[39m"), - magentaBright: f4("\x1B[95m", "\x1B[39m"), - cyanBright: f4("\x1B[96m", "\x1B[39m"), - whiteBright: f4("\x1B[97m", "\x1B[39m"), - bgBlackBright: f4("\x1B[100m", "\x1B[49m"), - bgRedBright: f4("\x1B[101m", "\x1B[49m"), - bgGreenBright: f4("\x1B[102m", "\x1B[49m"), - bgYellowBright: f4("\x1B[103m", "\x1B[49m"), - bgBlueBright: f4("\x1B[104m", "\x1B[49m"), - bgMagentaBright: f4("\x1B[105m", "\x1B[49m"), - bgCyanBright: f4("\x1B[106m", "\x1B[49m"), - bgWhiteBright: f4("\x1B[107m", "\x1B[49m") + reset: f6("\x1B[0m", "\x1B[0m"), + bold: f6("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), + dim: f6("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), + italic: f6("\x1B[3m", "\x1B[23m"), + underline: f6("\x1B[4m", "\x1B[24m"), + inverse: f6("\x1B[7m", "\x1B[27m"), + hidden: f6("\x1B[8m", "\x1B[28m"), + strikethrough: f6("\x1B[9m", "\x1B[29m"), + black: f6("\x1B[30m", "\x1B[39m"), + red: f6("\x1B[31m", "\x1B[39m"), + green: f6("\x1B[32m", "\x1B[39m"), + yellow: f6("\x1B[33m", "\x1B[39m"), + blue: f6("\x1B[34m", "\x1B[39m"), + magenta: f6("\x1B[35m", "\x1B[39m"), + cyan: f6("\x1B[36m", "\x1B[39m"), + white: f6("\x1B[37m", "\x1B[39m"), + gray: f6("\x1B[90m", "\x1B[39m"), + bgBlack: f6("\x1B[40m", "\x1B[49m"), + bgRed: f6("\x1B[41m", "\x1B[49m"), + bgGreen: f6("\x1B[42m", "\x1B[49m"), + bgYellow: f6("\x1B[43m", "\x1B[49m"), + bgBlue: f6("\x1B[44m", "\x1B[49m"), + bgMagenta: f6("\x1B[45m", "\x1B[49m"), + bgCyan: f6("\x1B[46m", "\x1B[49m"), + bgWhite: f6("\x1B[47m", "\x1B[49m"), + blackBright: f6("\x1B[90m", "\x1B[39m"), + redBright: f6("\x1B[91m", "\x1B[39m"), + greenBright: f6("\x1B[92m", "\x1B[39m"), + yellowBright: f6("\x1B[93m", "\x1B[39m"), + blueBright: f6("\x1B[94m", "\x1B[39m"), + magentaBright: f6("\x1B[95m", "\x1B[39m"), + cyanBright: f6("\x1B[96m", "\x1B[39m"), + whiteBright: f6("\x1B[97m", "\x1B[39m"), + bgBlackBright: f6("\x1B[100m", "\x1B[49m"), + bgRedBright: f6("\x1B[101m", "\x1B[49m"), + bgGreenBright: f6("\x1B[102m", "\x1B[49m"), + bgYellowBright: f6("\x1B[103m", "\x1B[49m"), + bgBlueBright: f6("\x1B[104m", "\x1B[49m"), + bgMagentaBright: f6("\x1B[105m", "\x1B[49m"), + bgCyanBright: f6("\x1B[106m", "\x1B[49m"), + bgWhiteBright: f6("\x1B[107m", "\x1B[49m") }; }; module2.exports = createColors(); @@ -24267,11 +24267,11 @@ var require_main2 = __commonJS({ var fs4 = require("fs"); var path2 = require("path"); var os3 = require("os"); - var crypto6 = require("crypto"); + var crypto14 = require("crypto"); var packageJson = require_package(); - var version2 = packageJson.version; + var version4 = packageJson.version; var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; - function parse2(src) { + function parse4(src) { const obj = {}; let lines = src.toString(); lines = lines.replace(/\r\n?/mg, "\n"); @@ -24301,14 +24301,14 @@ var require_main2 = __commonJS({ const keys = _dotenvKey(options).split(","); const length = keys.length; let decrypted; - for (let i3 = 0; i3 < length; i3++) { + for (let i5 = 0; i5 < length; i5++) { try { - const key = keys[i3].trim(); + const key = keys[i5].trim(); const attrs = _instructions(result, key); decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); break; } catch (error) { - if (i3 + 1 >= length) { + if (i5 + 1 >= length) { throw error; } } @@ -24316,13 +24316,13 @@ var require_main2 = __commonJS({ return DotenvModule.parse(decrypted); } function _log(message) { - console.log(`[dotenv@${version2}][INFO] ${message}`); + console.log(`[dotenv@${version4}][INFO] ${message}`); } function _warn(message) { - console.log(`[dotenv@${version2}][WARN] ${message}`); + console.log(`[dotenv@${version4}][WARN] ${message}`); } function _debug(message) { - console.log(`[dotenv@${version2}][DEBUG] ${message}`); + console.log(`[dotenv@${version4}][DEBUG] ${message}`); } function _dotenvKey(options) { if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { @@ -24427,11 +24427,11 @@ var require_main2 = __commonJS({ try { const parsed = DotenvModule.parse(fs4.readFileSync(path3, { encoding })); DotenvModule.populate(parsedAll, parsed, options); - } catch (e3) { + } catch (e5) { if (debug3) { - _debug(`Failed to load ${path3} ${e3.message}`); + _debug(`Failed to load ${path3} ${e5.message}`); } - lastError = e3; + lastError = e5; } } let processEnv = process.env; @@ -24463,7 +24463,7 @@ var require_main2 = __commonJS({ const authTag = ciphertext.subarray(-16); ciphertext = ciphertext.subarray(12, -16); try { - const aesgcm = crypto6.createDecipheriv("aes-256-gcm", key, nonce); + const aesgcm = crypto14.createDecipheriv("aes-256-gcm", key, nonce); aesgcm.setAuthTag(authTag); return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; } catch (error) { @@ -24514,7 +24514,7 @@ var require_main2 = __commonJS({ _parseVault, config: config6, decrypt, - parse: parse2, + parse: parse4, populate }; module2.exports.configDotenv = DotenvModule.configDotenv; @@ -24546,26 +24546,26 @@ var require_ini = __commonJS({ opt.whitespace = opt.whitespace === true; } const separator = opt.whitespace ? " = " : "="; - for (const k4 of Object.keys(obj)) { - const val = obj[k4]; + for (const k6 of Object.keys(obj)) { + const val = obj[k6]; if (val && Array.isArray(val)) { for (const item of val) { - out += safe(k4 + "[]") + separator + safe(item) + eol; + out += safe(k6 + "[]") + separator + safe(item) + eol; } } else if (val && typeof val === "object") { - children.push(k4); + children.push(k6); } else { - out += safe(k4) + separator + safe(val) + eol; + out += safe(k6) + separator + safe(val) + eol; } } if (opt.section && out.length) { out = "[" + safe(opt.section) + "]" + eol + out; } - for (const k4 of children) { - const nk = dotSplit(k4).join("\\."); + for (const k6 of children) { + const nk = dotSplit(k6).join("\\."); const section = (opt.section ? opt.section + "." : "") + nk; const { whitespace } = opt; - const child = encode3(obj[k4], { + const child = encode3(obj[k6], { section, whitespace }); @@ -24579,7 +24579,7 @@ var require_ini = __commonJS({ var dotSplit = (str2) => str2.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "")); var decode = (str2) => { const out = /* @__PURE__ */ Object.create(null); - let p3 = out; + let p5 = out; let section = null; const re2 = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; const lines = str2.split(/[\r\n]+/g); @@ -24594,10 +24594,10 @@ var require_ini = __commonJS({ if (match[1] !== void 0) { section = unsafe(match[1]); if (section === "__proto__") { - p3 = /* @__PURE__ */ Object.create(null); + p5 = /* @__PURE__ */ Object.create(null); continue; } - p3 = out[section] = out[section] || /* @__PURE__ */ Object.create(null); + p5 = out[section] = out[section] || /* @__PURE__ */ Object.create(null); continue; } const keyRaw = unsafe(match[2]); @@ -24609,41 +24609,41 @@ var require_ini = __commonJS({ const valueRaw = match[3] ? unsafe(match[4]) : true; const value = valueRaw === "true" || valueRaw === "false" || valueRaw === "null" ? JSON.parse(valueRaw) : valueRaw; if (isArray2) { - if (!hasOwnProperty2.call(p3, key)) { - p3[key] = []; - } else if (!Array.isArray(p3[key])) { - p3[key] = [p3[key]]; + if (!hasOwnProperty2.call(p5, key)) { + p5[key] = []; + } else if (!Array.isArray(p5[key])) { + p5[key] = [p5[key]]; } } - if (Array.isArray(p3[key])) { - p3[key].push(value); + if (Array.isArray(p5[key])) { + p5[key].push(value); } else { - p3[key] = value; + p5[key] = value; } } const remove = []; - for (const k4 of Object.keys(out)) { - if (!hasOwnProperty2.call(out, k4) || typeof out[k4] !== "object" || Array.isArray(out[k4])) { + for (const k6 of Object.keys(out)) { + if (!hasOwnProperty2.call(out, k6) || typeof out[k6] !== "object" || Array.isArray(out[k6])) { continue; } - const parts = dotSplit(k4); - p3 = out; - const l3 = parts.pop(); - const nl = l3.replace(/\\\./g, "."); + const parts = dotSplit(k6); + p5 = out; + const l5 = parts.pop(); + const nl = l5.replace(/\\\./g, "."); for (const part of parts) { if (part === "__proto__") { continue; } - if (!hasOwnProperty2.call(p3, part) || typeof p3[part] !== "object") { - p3[part] = /* @__PURE__ */ Object.create(null); + if (!hasOwnProperty2.call(p5, part) || typeof p5[part] !== "object") { + p5[part] = /* @__PURE__ */ Object.create(null); } - p3 = p3[part]; + p5 = p5[part]; } - if (p3 === out && nl === l3) { + if (p5 === out && nl === l5) { continue; } - p3[nl] = out[k4]; - remove.push(k4); + p5[nl] = out[k6]; + remove.push(k6); } for (const del of remove) { delete out[del]; @@ -24672,21 +24672,21 @@ var require_ini = __commonJS({ } else { let esc = false; let unesc = ""; - for (let i3 = 0, l3 = val.length; i3 < l3; i3++) { - const c2 = val.charAt(i3); + for (let i5 = 0, l5 = val.length; i5 < l5; i5++) { + const c4 = val.charAt(i5); if (esc) { - if ("\\;#".indexOf(c2) !== -1) { - unesc += c2; + if ("\\;#".indexOf(c4) !== -1) { + unesc += c4; } else { - unesc += "\\" + c2; + unesc += "\\" + c4; } esc = false; - } else if (";#".indexOf(c2) !== -1) { + } else if (";#".indexOf(c4) !== -1) { break; - } else if (c2 === "\\") { + } else if (c4 === "\\") { esc = true; } else { - unesc += c2; + unesc += c4; } } if (esc) { @@ -24717,7 +24717,7 @@ var require_lib2 = __commonJS({ } return new ErrorType(`${options.context ? options.context : "Value"} ${message}.`); } - function toNumber(value, options) { + function toNumber2(value, options) { if (typeof value === "bigint") { throw makeException(TypeError, "is a BigInt which cannot be converted to a number", options); } @@ -24726,27 +24726,27 @@ var require_lib2 = __commonJS({ } return options.globals.Number(value); } - function evenRound(x2) { - if (x2 > 0 && x2 % 1 === 0.5 && (x2 & 1) === 0 || x2 < 0 && x2 % 1 === -0.5 && (x2 & 1) === 1) { - return censorNegativeZero(Math.floor(x2)); + function evenRound(x4) { + if (x4 > 0 && x4 % 1 === 0.5 && (x4 & 1) === 0 || x4 < 0 && x4 % 1 === -0.5 && (x4 & 1) === 1) { + return censorNegativeZero(Math.floor(x4)); } - return censorNegativeZero(Math.round(x2)); + return censorNegativeZero(Math.round(x4)); } - function integerPart(n2) { - return censorNegativeZero(Math.trunc(n2)); + function integerPart(n4) { + return censorNegativeZero(Math.trunc(n4)); } - function sign(x2) { - return x2 < 0 ? -1 : 1; + function sign(x4) { + return x4 < 0 ? -1 : 1; } - function modulo(x2, y4) { - const signMightNotMatch = x2 % y4; - if (sign(y4) !== sign(signMightNotMatch)) { - return signMightNotMatch + y4; + function modulo(x4, y5) { + const signMightNotMatch = x4 % y5; + if (sign(y5) !== sign(signMightNotMatch)) { + return signMightNotMatch + y5; } return signMightNotMatch; } - function censorNegativeZero(x2) { - return x2 === 0 ? 0 : x2; + function censorNegativeZero(x4) { + return x4 === 0 ? 0 : x4; } function createIntegerConversion(bitLength, { unsigned }) { let lowerBound, upperBound; @@ -24760,39 +24760,39 @@ var require_lib2 = __commonJS({ const twoToTheBitLength = 2 ** bitLength; const twoToOneLessThanTheBitLength = 2 ** (bitLength - 1); return (value, options = {}) => { - let x2 = toNumber(value, options); - x2 = censorNegativeZero(x2); + let x4 = toNumber2(value, options); + x4 = censorNegativeZero(x4); if (options.enforceRange) { - if (!Number.isFinite(x2)) { + if (!Number.isFinite(x4)) { throw makeException(TypeError, "is not a finite number", options); } - x2 = integerPart(x2); - if (x2 < lowerBound || x2 > upperBound) { + x4 = integerPart(x4); + if (x4 < lowerBound || x4 > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, options ); } - return x2; + return x4; } - if (!Number.isNaN(x2) && options.clamp) { - x2 = Math.min(Math.max(x2, lowerBound), upperBound); - x2 = evenRound(x2); - return x2; + if (!Number.isNaN(x4) && options.clamp) { + x4 = Math.min(Math.max(x4, lowerBound), upperBound); + x4 = evenRound(x4); + return x4; } - if (!Number.isFinite(x2) || x2 === 0) { + if (!Number.isFinite(x4) || x4 === 0) { return 0; } - x2 = integerPart(x2); - if (x2 >= lowerBound && x2 <= upperBound) { - return x2; + x4 = integerPart(x4); + if (x4 >= lowerBound && x4 <= upperBound) { + return x4; } - x2 = modulo(x2, twoToTheBitLength); - if (!unsigned && x2 >= twoToOneLessThanTheBitLength) { - return x2 - twoToTheBitLength; + x4 = modulo(x4, twoToTheBitLength); + if (!unsigned && x4 >= twoToOneLessThanTheBitLength) { + return x4 - twoToTheBitLength; } - return x2; + return x4; }; } function createLongLongConversion(bitLength, { unsigned }) { @@ -24800,31 +24800,31 @@ var require_lib2 = __commonJS({ const lowerBound = unsigned ? 0 : Number.MIN_SAFE_INTEGER; const asBigIntN = unsigned ? BigInt.asUintN : BigInt.asIntN; return (value, options = {}) => { - let x2 = toNumber(value, options); - x2 = censorNegativeZero(x2); + let x4 = toNumber2(value, options); + x4 = censorNegativeZero(x4); if (options.enforceRange) { - if (!Number.isFinite(x2)) { + if (!Number.isFinite(x4)) { throw makeException(TypeError, "is not a finite number", options); } - x2 = integerPart(x2); - if (x2 < lowerBound || x2 > upperBound) { + x4 = integerPart(x4); + if (x4 < lowerBound || x4 > upperBound) { throw makeException( TypeError, `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`, options ); } - return x2; + return x4; } - if (!Number.isNaN(x2) && options.clamp) { - x2 = Math.min(Math.max(x2, lowerBound), upperBound); - x2 = evenRound(x2); - return x2; + if (!Number.isNaN(x4) && options.clamp) { + x4 = Math.min(Math.max(x4, lowerBound), upperBound); + x4 = evenRound(x4); + return x4; } - if (!Number.isFinite(x2) || x2 === 0) { + if (!Number.isFinite(x4) || x4 === 0) { return 0; } - let xBigInt = BigInt(integerPart(x2)); + let xBigInt = BigInt(integerPart(x4)); xBigInt = asBigIntN(bitLength, xBigInt); return Number(xBigInt); }; @@ -24847,39 +24847,39 @@ var require_lib2 = __commonJS({ exports2["long long"] = createLongLongConversion(64, { unsigned: false }); exports2["unsigned long long"] = createLongLongConversion(64, { unsigned: true }); exports2.double = (value, options = {}) => { - const x2 = toNumber(value, options); - if (!Number.isFinite(x2)) { + const x4 = toNumber2(value, options); + if (!Number.isFinite(x4)) { throw makeException(TypeError, "is not a finite floating-point value", options); } - return x2; + return x4; }; exports2["unrestricted double"] = (value, options = {}) => { - const x2 = toNumber(value, options); - return x2; + const x4 = toNumber2(value, options); + return x4; }; exports2.float = (value, options = {}) => { - const x2 = toNumber(value, options); - if (!Number.isFinite(x2)) { + const x4 = toNumber2(value, options); + if (!Number.isFinite(x4)) { throw makeException(TypeError, "is not a finite floating-point value", options); } - if (Object.is(x2, -0)) { - return x2; + if (Object.is(x4, -0)) { + return x4; } - const y4 = Math.fround(x2); - if (!Number.isFinite(y4)) { + const y5 = Math.fround(x4); + if (!Number.isFinite(y5)) { throw makeException(TypeError, "is outside the range of a single-precision floating-point value", options); } - return y4; + return y5; }; exports2["unrestricted float"] = (value, options = {}) => { - const x2 = toNumber(value, options); - if (isNaN(x2)) { - return x2; + const x4 = toNumber2(value, options); + if (isNaN(x4)) { + return x4; } - if (Object.is(x2, -0)) { - return x2; + if (Object.is(x4, -0)) { + return x4; } - return Math.fround(x2); + return Math.fround(x4); }; exports2.DOMString = (value, options = {}) => { if (options.treatNullAsEmptyString && value === null) { @@ -24892,34 +24892,34 @@ var require_lib2 = __commonJS({ return StringCtor(value); }; exports2.ByteString = (value, options = {}) => { - const x2 = exports2.DOMString(value, options); - let c2; - for (let i3 = 0; (c2 = x2.codePointAt(i3)) !== void 0; ++i3) { - if (c2 > 255) { + const x4 = exports2.DOMString(value, options); + let c4; + for (let i5 = 0; (c4 = x4.codePointAt(i5)) !== void 0; ++i5) { + if (c4 > 255) { throw makeException(TypeError, "is not a valid ByteString", options); } } - return x2; + return x4; }; exports2.USVString = (value, options = {}) => { const S3 = exports2.DOMString(value, options); - const n2 = S3.length; + const n4 = S3.length; const U5 = []; - for (let i3 = 0; i3 < n2; ++i3) { - const c2 = S3.charCodeAt(i3); - if (c2 < 55296 || c2 > 57343) { - U5.push(String.fromCodePoint(c2)); - } else if (56320 <= c2 && c2 <= 57343) { + for (let i5 = 0; i5 < n4; ++i5) { + const c4 = S3.charCodeAt(i5); + if (c4 < 55296 || c4 > 57343) { + U5.push(String.fromCodePoint(c4)); + } else if (56320 <= c4 && c4 <= 57343) { U5.push(String.fromCodePoint(65533)); - } else if (i3 === n2 - 1) { + } else if (i5 === n4 - 1) { U5.push(String.fromCodePoint(65533)); } else { - const d5 = S3.charCodeAt(i3 + 1); - if (56320 <= d5 && d5 <= 57343) { - const a3 = c2 & 1023; - const b3 = d5 & 1023; - U5.push(String.fromCodePoint((2 << 15) + (2 << 9) * a3 + b3)); - ++i3; + const d7 = S3.charCodeAt(i5 + 1); + if (56320 <= d7 && d7 <= 57343) { + const a5 = c4 & 1023; + const b5 = d7 & 1023; + U5.push(String.fromCodePoint((2 << 15) + (2 << 9) * a5 + b5)); + ++i5; } else { U5.push(String.fromCodePoint(65533)); } @@ -24975,7 +24975,7 @@ var require_lib2 = __commonJS({ exports2.DataView = (value, options = {}) => { try { dvByteLengthGetter.call(value); - } catch (e3) { + } catch (e5) { throw makeException(TypeError, "is not a DataView", options); } if (!options.allowShared && isSharedArrayBuffer(value.buffer)) { @@ -25132,12 +25132,12 @@ var require_utils5 = __commonJS({ if (typeof P3 !== "string") { return false; } - const i3 = P3 >>> 0; - if (i3 === 2 ** 32 - 1) { + const i5 = P3 >>> 0; + if (i5 === 2 ** 32 - 1) { return false; } - const s2 = `${i3}`; - if (P3 !== s2) { + const s4 = `${i5}`; + if (P3 !== s4) { return false; } return true; @@ -25147,7 +25147,7 @@ var require_utils5 = __commonJS({ try { byteLengthGetter.call(value); return true; - } catch (e3) { + } catch (e5) { return false; } } @@ -25245,7 +25245,7 @@ var require_punycode = __commonJS({ function error(type2) { throw new RangeError(errors[type2]); } - function map(array, callback) { + function map2(array, callback) { const result = []; let length = array.length; while (length--) { @@ -25262,7 +25262,7 @@ var require_punycode = __commonJS({ } domain = domain.replace(regexSeparators, "."); const labels = domain.split("."); - const encoded = map(labels, callback).join("."); + const encoded = map2(labels, callback).join("."); return result + encoded; } function ucs2decode(string) { @@ -25302,33 +25302,33 @@ var require_punycode = __commonJS({ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); }; var adapt = function(delta, numPoints, firstTime) { - let k4 = 0; + let k6 = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k4 += base) { + for (; delta > baseMinusTMin * tMax >> 1; k6 += base) { delta = floor(delta / baseMinusTMin); } - return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew)); + return floor(k6 + (baseMinusTMin + 1) * delta / (delta + skew)); }; var decode = function(input) { const output = []; const inputLength = input.length; - let i3 = 0; - let n2 = initialN; + let i5 = 0; + let n4 = initialN; let bias = initialBias; let basic = input.lastIndexOf(delimiter); if (basic < 0) { basic = 0; } - for (let j4 = 0; j4 < basic; ++j4) { - if (input.charCodeAt(j4) >= 128) { + for (let j6 = 0; j6 < basic; ++j6) { + if (input.charCodeAt(j6) >= 128) { error("not-basic"); } - output.push(input.charCodeAt(j4)); + output.push(input.charCodeAt(j6)); } for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - const oldi = i3; - for (let w4 = 1, k4 = base; ; k4 += base) { + const oldi = i5; + for (let w6 = 1, k6 = base; ; k6 += base) { if (index >= inputLength) { error("invalid-input"); } @@ -25336,28 +25336,28 @@ var require_punycode = __commonJS({ if (digit >= base) { error("invalid-input"); } - if (digit > floor((maxInt - i3) / w4)) { + if (digit > floor((maxInt - i5) / w6)) { error("overflow"); } - i3 += digit * w4; - const t2 = k4 <= bias ? tMin : k4 >= bias + tMax ? tMax : k4 - bias; - if (digit < t2) { + i5 += digit * w6; + const t4 = k6 <= bias ? tMin : k6 >= bias + tMax ? tMax : k6 - bias; + if (digit < t4) { break; } - const baseMinusT = base - t2; - if (w4 > floor(maxInt / baseMinusT)) { + const baseMinusT = base - t4; + if (w6 > floor(maxInt / baseMinusT)) { error("overflow"); } - w4 *= baseMinusT; + w6 *= baseMinusT; } const out = output.length + 1; - bias = adapt(i3 - oldi, out, oldi == 0); - if (floor(i3 / out) > maxInt - n2) { + bias = adapt(i5 - oldi, out, oldi == 0); + if (floor(i5 / out) > maxInt - n4) { error("overflow"); } - n2 += floor(i3 / out); - i3 %= out; - output.splice(i3++, 0, n2); + n4 += floor(i5 / out); + i5 %= out; + output.splice(i5++, 0, n4); } return String.fromCodePoint(...output); }; @@ -25365,7 +25365,7 @@ var require_punycode = __commonJS({ const output = []; input = ucs2decode(input); const inputLength = input.length; - let n2 = initialN; + let n4 = initialN; let delta = 0; let bias = initialBias; for (const currentValue of input) { @@ -25379,44 +25379,44 @@ var require_punycode = __commonJS({ output.push(delimiter); } while (handledCPCount < inputLength) { - let m4 = maxInt; + let m6 = maxInt; for (const currentValue of input) { - if (currentValue >= n2 && currentValue < m4) { - m4 = currentValue; + if (currentValue >= n4 && currentValue < m6) { + m6 = currentValue; } } const handledCPCountPlusOne = handledCPCount + 1; - if (m4 - n2 > floor((maxInt - delta) / handledCPCountPlusOne)) { + if (m6 - n4 > floor((maxInt - delta) / handledCPCountPlusOne)) { error("overflow"); } - delta += (m4 - n2) * handledCPCountPlusOne; - n2 = m4; + delta += (m6 - n4) * handledCPCountPlusOne; + n4 = m6; for (const currentValue of input) { - if (currentValue < n2 && ++delta > maxInt) { + if (currentValue < n4 && ++delta > maxInt) { error("overflow"); } - if (currentValue === n2) { - let q3 = delta; - for (let k4 = base; ; k4 += base) { - const t2 = k4 <= bias ? tMin : k4 >= bias + tMax ? tMax : k4 - bias; - if (q3 < t2) { + if (currentValue === n4) { + let q5 = delta; + for (let k6 = base; ; k6 += base) { + const t4 = k6 <= bias ? tMin : k6 >= bias + tMax ? tMax : k6 - bias; + if (q5 < t4) { break; } - const qMinusT = q3 - t2; - const baseMinusT = base - t2; + const qMinusT = q5 - t4; + const baseMinusT = base - t4; output.push( - stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)) + stringFromCharCode(digitToBasic(t4 + qMinusT % baseMinusT, 0)) ); - q3 = floor(qMinusT / baseMinusT); + q5 = floor(qMinusT / baseMinusT); } - output.push(stringFromCharCode(digitToBasic(q3, 0))); + output.push(stringFromCharCode(digitToBasic(q5, 0))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); delta = 0; ++handledCPCount; } } ++delta; - ++n2; + ++n4; } return output.join(""); }; @@ -25620,17 +25620,17 @@ var require_tr46 = __commonJS({ } if (checkJoiners) { let last = 0; - for (const [i3, ch] of codePoints.entries()) { + for (const [i5, ch] of codePoints.entries()) { if (ch === "\u200C" || ch === "\u200D") { - if (i3 > 0) { - if (regexes.combiningClassVirama.test(codePoints[i3 - 1])) { + if (i5 > 0) { + if (regexes.combiningClassVirama.test(codePoints[i5 - 1])) { continue; } if (ch === "\u200C") { - const next = codePoints.indexOf("\u200C", i3 + 1); + const next = codePoints.indexOf("\u200C", i5 + 1); const test2 = next < 0 ? codePoints.slice(last) : codePoints.slice(last, next); if (regexes.validZWNJ.test(test2.join(""))) { - last = i3 + 1; + last = i5 + 1; continue; } } @@ -25677,7 +25677,7 @@ var require_tr46 = __commonJS({ const labels = string.split("."); const isBidi = isBidiDomain(labels); let error = false; - for (const [i3, origLabel] of labels.entries()) { + for (const [i5, origLabel] of labels.entries()) { let label = origLabel; let transitionalProcessingForThisLabel = options.transitionalProcessing; if (label.startsWith("xn--")) { @@ -25693,7 +25693,7 @@ var require_tr46 = __commonJS({ continue; } } - labels[i3] = label; + labels[i5] = label; if (label === "" || !containsNonASCII(label)) { error = true; } @@ -25734,23 +25734,23 @@ var require_tr46 = __commonJS({ ignoreInvalidPunycode }); let labels = result.string.split("."); - labels = labels.map((l3) => { - if (containsNonASCII(l3)) { + labels = labels.map((l5) => { + if (containsNonASCII(l5)) { try { - return `xn--${punycode.encode(l3)}`; + return `xn--${punycode.encode(l5)}`; } catch { result.error = true; } } - return l3; + return l5; }); if (verifyDNSLength) { const total = labels.join(".").length; if (total > 253 || total === 0) { result.error = true; } - for (let i3 = 0; i3 < labels.length; ++i3) { - if (labels[i3].length > 63 || labels[i3].length === 0) { + for (let i5 = 0; i5 < labels.length; ++i5) { + if (labels[i5].length > 63 || labels[i5].length === 0) { result.error = true; break; } @@ -25793,17 +25793,17 @@ var require_tr46 = __commonJS({ var require_infra = __commonJS({ "node_modules/whatwg-url/lib/infra.js"(exports2, module2) { "use strict"; - function isASCIIDigit(c2) { - return c2 >= 48 && c2 <= 57; + function isASCIIDigit(c4) { + return c4 >= 48 && c4 <= 57; } - function isASCIIAlpha(c2) { - return c2 >= 65 && c2 <= 90 || c2 >= 97 && c2 <= 122; + function isASCIIAlpha(c4) { + return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 122; } - function isASCIIAlphanumeric(c2) { - return isASCIIAlpha(c2) || isASCIIDigit(c2); + function isASCIIAlphanumeric(c4) { + return isASCIIAlpha(c4) || isASCIIDigit(c4); } - function isASCIIHex(c2) { - return isASCIIDigit(c2) || c2 >= 65 && c2 <= 70 || c2 >= 97 && c2 <= 102; + function isASCIIHex(c4) { + return isASCIIDigit(c4) || c4 >= 65 && c4 <= 70 || c4 >= 97 && c4 <= 102; } module2.exports = { isASCIIDigit, @@ -25839,11 +25839,11 @@ var require_percent_encoding = __commonJS({ "use strict"; var { isASCIIHex } = require_infra(); var { utf8Encode } = require_encoding2(); - function p3(char) { + function p5(char) { return char.codePointAt(0); } - function percentEncode(c2) { - let hex = c2.toString(16).toUpperCase(); + function percentEncode(c4) { + let hex = c4.toString(16).toUpperCase(); if (hex.length === 1) { hex = `0${hex}`; } @@ -25852,16 +25852,16 @@ var require_percent_encoding = __commonJS({ function percentDecodeBytes(input) { const output = new Uint8Array(input.byteLength); let outputIndex = 0; - for (let i3 = 0; i3 < input.byteLength; ++i3) { - const byte = input[i3]; + for (let i5 = 0; i5 < input.byteLength; ++i5) { + const byte = input[i5]; if (byte !== 37) { output[outputIndex++] = byte; - } else if (byte === 37 && (!isASCIIHex(input[i3 + 1]) || !isASCIIHex(input[i3 + 2]))) { + } else if (byte === 37 && (!isASCIIHex(input[i5 + 1]) || !isASCIIHex(input[i5 + 2]))) { output[outputIndex++] = byte; } else { - const bytePoint = parseInt(String.fromCodePoint(input[i3 + 1], input[i3 + 2]), 16); + const bytePoint = parseInt(String.fromCodePoint(input[i5 + 1], input[i5 + 2]), 16); output[outputIndex++] = bytePoint; - i3 += 2; + i5 += 2; } } return output.slice(0, outputIndex); @@ -25870,35 +25870,35 @@ var require_percent_encoding = __commonJS({ const bytes = utf8Encode(input); return percentDecodeBytes(bytes); } - function isC0ControlPercentEncode(c2) { - return c2 <= 31 || c2 > 126; + function isC0ControlPercentEncode(c4) { + return c4 <= 31 || c4 > 126; } - var extraFragmentPercentEncodeSet = /* @__PURE__ */ new Set([p3(" "), p3('"'), p3("<"), p3(">"), p3("`")]); - function isFragmentPercentEncode(c2) { - return isC0ControlPercentEncode(c2) || extraFragmentPercentEncodeSet.has(c2); + var extraFragmentPercentEncodeSet = /* @__PURE__ */ new Set([p5(" "), p5('"'), p5("<"), p5(">"), p5("`")]); + function isFragmentPercentEncode(c4) { + return isC0ControlPercentEncode(c4) || extraFragmentPercentEncodeSet.has(c4); } - var extraQueryPercentEncodeSet = /* @__PURE__ */ new Set([p3(" "), p3('"'), p3("#"), p3("<"), p3(">")]); - function isQueryPercentEncode(c2) { - return isC0ControlPercentEncode(c2) || extraQueryPercentEncodeSet.has(c2); + var extraQueryPercentEncodeSet = /* @__PURE__ */ new Set([p5(" "), p5('"'), p5("#"), p5("<"), p5(">")]); + function isQueryPercentEncode(c4) { + return isC0ControlPercentEncode(c4) || extraQueryPercentEncodeSet.has(c4); } - function isSpecialQueryPercentEncode(c2) { - return isQueryPercentEncode(c2) || c2 === p3("'"); + function isSpecialQueryPercentEncode(c4) { + return isQueryPercentEncode(c4) || c4 === p5("'"); } - var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([p3("?"), p3("`"), p3("{"), p3("}"), p3("^")]); - function isPathPercentEncode(c2) { - return isQueryPercentEncode(c2) || extraPathPercentEncodeSet.has(c2); + var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([p5("?"), p5("`"), p5("{"), p5("}"), p5("^")]); + function isPathPercentEncode(c4) { + return isQueryPercentEncode(c4) || extraPathPercentEncodeSet.has(c4); } - var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([p3("/"), p3(":"), p3(";"), p3("="), p3("@"), p3("["), p3("\\"), p3("]"), p3("|")]); - function isUserinfoPercentEncode(c2) { - return isPathPercentEncode(c2) || extraUserinfoPercentEncodeSet.has(c2); + var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([p5("/"), p5(":"), p5(";"), p5("="), p5("@"), p5("["), p5("\\"), p5("]"), p5("|")]); + function isUserinfoPercentEncode(c4) { + return isPathPercentEncode(c4) || extraUserinfoPercentEncodeSet.has(c4); } - var extraComponentPercentEncodeSet = /* @__PURE__ */ new Set([p3("$"), p3("%"), p3("&"), p3("+"), p3(",")]); - function isComponentPercentEncode(c2) { - return isUserinfoPercentEncode(c2) || extraComponentPercentEncodeSet.has(c2); + var extraComponentPercentEncodeSet = /* @__PURE__ */ new Set([p5("$"), p5("%"), p5("&"), p5("+"), p5(",")]); + function isComponentPercentEncode(c4) { + return isUserinfoPercentEncode(c4) || extraComponentPercentEncodeSet.has(c4); } - var extraURLEncodedPercentEncodeSet = /* @__PURE__ */ new Set([p3("!"), p3("'"), p3("("), p3(")"), p3("~")]); - function isURLEncodedPercentEncode(c2) { - return isComponentPercentEncode(c2) || extraURLEncodedPercentEncodeSet.has(c2); + var extraURLEncodedPercentEncodeSet = /* @__PURE__ */ new Set([p5("!"), p5("'"), p5("("), p5(")"), p5("~")]); + function isURLEncodedPercentEncode(c4) { + return isComponentPercentEncode(c4) || extraURLEncodedPercentEncodeSet.has(c4); } function utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) { const bytes = utf8Encode(codePoint); @@ -25960,7 +25960,7 @@ var require_url_state_machine = __commonJS({ isPathPercentEncode, isUserinfoPercentEncode } = require_percent_encoding(); - function p3(char) { + function p5(char) { return char.codePointAt(0); } var specialSchemes = { @@ -25976,8 +25976,8 @@ var require_url_state_machine = __commonJS({ return [...str2].length; } function at2(input, idx) { - const c2 = input[idx]; - return isNaN(c2) ? void 0 : String.fromCodePoint(c2); + const c4 = input[idx]; + return isNaN(c4) ? void 0 : String.fromCodePoint(c4); } function isSingleDot(buffer) { return buffer === "." || buffer.toLowerCase() === "%2e"; @@ -25987,7 +25987,7 @@ var require_url_state_machine = __commonJS({ return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; } function isWindowsDriveLetterCodePoints(cp1, cp2) { - return infra.isASCIIAlpha(cp1) && (cp2 === p3(":") || cp2 === p3("|")); + return infra.isASCIIAlpha(cp1) && (cp2 === p5(":") || cp2 === p5("|")); } function isWindowsDriveLetterString(string) { return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); @@ -26052,14 +26052,14 @@ var require_url_state_machine = __commonJS({ } const numbers = []; for (const part of parts) { - const n2 = parseIPv4Number(part); - if (n2 === failure) { + const n4 = parseIPv4Number(part); + if (n4 === failure) { return failure; } - numbers.push(n2); + numbers.push(n4); } - for (let i3 = 0; i3 < numbers.length - 1; ++i3) { - if (numbers[i3] > 255) { + for (let i5 = 0; i5 < numbers.length - 1; ++i5) { + if (numbers[i5] > 255) { return failure; } } @@ -26068,49 +26068,49 @@ var require_url_state_machine = __commonJS({ } let ipv4 = numbers.pop(); let counter = 0; - for (const n2 of numbers) { - ipv4 += n2 * 256 ** (3 - counter); + for (const n4 of numbers) { + ipv4 += n4 * 256 ** (3 - counter); ++counter; } return ipv4; } function serializeIPv4(address) { let output = ""; - let n2 = address; - for (let i3 = 1; i3 <= 4; ++i3) { - output = String(n2 % 256) + output; - if (i3 !== 4) { + let n4 = address; + for (let i5 = 1; i5 <= 4; ++i5) { + output = String(n4 % 256) + output; + if (i5 !== 4) { output = `.${output}`; } - n2 = Math.floor(n2 / 256); + n4 = Math.floor(n4 / 256); } return output; } function parseIPv6(input) { const address = [0, 0, 0, 0, 0, 0, 0, 0]; let pieceIndex = 0; - let compress = null; + let compress2 = null; let pointer = 0; - input = Array.from(input, (c2) => c2.codePointAt(0)); - if (input[pointer] === p3(":")) { - if (input[pointer + 1] !== p3(":")) { + input = Array.from(input, (c4) => c4.codePointAt(0)); + if (input[pointer] === p5(":")) { + if (input[pointer + 1] !== p5(":")) { return failure; } pointer += 2; ++pieceIndex; - compress = pieceIndex; + compress2 = pieceIndex; } while (pointer < input.length) { if (pieceIndex === 8) { return failure; } - if (input[pointer] === p3(":")) { - if (compress !== null) { + if (input[pointer] === p5(":")) { + if (compress2 !== null) { return failure; } ++pointer; ++pieceIndex; - compress = pieceIndex; + compress2 = pieceIndex; continue; } let value = 0; @@ -26120,7 +26120,7 @@ var require_url_state_machine = __commonJS({ ++pointer; ++length; } - if (input[pointer] === p3(".")) { + if (input[pointer] === p5(".")) { if (length === 0) { return failure; } @@ -26132,7 +26132,7 @@ var require_url_state_machine = __commonJS({ while (input[pointer] !== void 0) { let ipv4Piece = null; if (numbersSeen > 0) { - if (input[pointer] === p3(".") && numbersSeen < 4) { + if (input[pointer] === p5(".") && numbersSeen < 4) { ++pointer; } else { return failure; @@ -26165,7 +26165,7 @@ var require_url_state_machine = __commonJS({ return failure; } break; - } else if (input[pointer] === p3(":")) { + } else if (input[pointer] === p5(":")) { ++pointer; if (input[pointer] === void 0) { return failure; @@ -26176,24 +26176,24 @@ var require_url_state_machine = __commonJS({ address[pieceIndex] = value; ++pieceIndex; } - if (compress !== null) { - let swaps = pieceIndex - compress; + if (compress2 !== null) { + let swaps = pieceIndex - compress2; pieceIndex = 7; while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; + const temp = address[compress2 + swaps - 1]; + address[compress2 + swaps - 1] = address[pieceIndex]; address[pieceIndex] = temp; --pieceIndex; --swaps; } - } else if (compress === null && pieceIndex !== 8) { + } else if (compress2 === null && pieceIndex !== 8) { return failure; } return address; } function serializeIPv6(address) { let output = ""; - const compress = findTheIPv6AddressCompressedPieceIndex(address); + const compress2 = findTheIPv6AddressCompressedPieceIndex(address); let ignore0 = false; for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { if (ignore0 && address[pieceIndex] === 0) { @@ -26201,7 +26201,7 @@ var require_url_state_machine = __commonJS({ } else if (ignore0) { ignore0 = false; } - if (compress === pieceIndex) { + if (compress2 === pieceIndex) { const separator = pieceIndex === 0 ? "::" : ":"; output += separator; ignore0 = true; @@ -26390,11 +26390,11 @@ var require_url_state_machine = __commonJS({ this.atFlag = false; this.arrFlag = false; this.passwordTokenSeenFlag = false; - this.input = Array.from(this.input, (c2) => c2.codePointAt(0)); + this.input = Array.from(this.input, (c4) => c4.codePointAt(0)); for (; this.pointer <= this.input.length; ++this.pointer) { - const c2 = this.input[this.pointer]; - const cStr = isNaN(c2) ? void 0 : String.fromCodePoint(c2); - const ret = this[`parse ${this.state}`](c2, cStr); + const c4 = this.input[this.pointer]; + const cStr = isNaN(c4) ? void 0 : String.fromCodePoint(c4); + const ret = this[`parse ${this.state}`](c4, cStr); if (!ret) { break; } else if (ret === failure) { @@ -26403,8 +26403,8 @@ var require_url_state_machine = __commonJS({ } } } - URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c2, cStr) { - if (infra.isASCIIAlpha(c2)) { + URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c4, cStr) { + if (infra.isASCIIAlpha(c4)) { this.buffer += cStr.toLowerCase(); this.state = "scheme"; } else if (!this.stateOverride) { @@ -26416,10 +26416,10 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse scheme"] = function parseScheme(c2, cStr) { - if (infra.isASCIIAlphanumeric(c2) || c2 === p3("+") || c2 === p3("-") || c2 === p3(".")) { + URLStateMachine.prototype["parse scheme"] = function parseScheme(c4, cStr) { + if (infra.isASCIIAlphanumeric(c4) || c4 === p5("+") || c4 === p5("-") || c4 === p5(".")) { this.buffer += cStr.toLowerCase(); - } else if (c2 === p3(":")) { + } else if (c4 === p5(":")) { if (this.stateOverride) { if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { return false; @@ -26443,7 +26443,7 @@ var require_url_state_machine = __commonJS({ } this.buffer = ""; if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== p3("/") || this.input[this.pointer + 2] !== p3("/")) { + if (this.input[this.pointer + 1] !== p5("/") || this.input[this.pointer + 2] !== p5("/")) { this.parseError = true; } this.state = "file"; @@ -26451,7 +26451,7 @@ var require_url_state_machine = __commonJS({ this.state = "special relative or authority"; } else if (isSpecial(this.url)) { this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === p3("/")) { + } else if (this.input[this.pointer + 1] === p5("/")) { this.state = "path or authority"; ++this.pointer; } else { @@ -26468,10 +26468,10 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c2) { - if (this.base === null || hasAnOpaquePath(this.base) && c2 !== p3("#")) { + URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c4) { + if (this.base === null || hasAnOpaquePath(this.base) && c4 !== p5("#")) { return failure; - } else if (hasAnOpaquePath(this.base) && c2 === p3("#")) { + } else if (hasAnOpaquePath(this.base) && c4 === p5("#")) { this.url.scheme = this.base.scheme; this.url.path = this.base.path; this.url.query = this.base.query; @@ -26486,8 +26486,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c2) { - if (c2 === p3("/") && this.input[this.pointer + 1] === p3("/")) { + URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c4) { + if (c4 === p5("/") && this.input[this.pointer + 1] === p5("/")) { this.state = "special authority ignore slashes"; ++this.pointer; } else { @@ -26497,8 +26497,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c2) { - if (c2 === p3("/")) { + URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c4) { + if (c4 === p5("/")) { this.state = "authority"; } else { this.state = "path"; @@ -26506,11 +26506,11 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse relative"] = function parseRelative(c2) { + URLStateMachine.prototype["parse relative"] = function parseRelative(c4) { this.url.scheme = this.base.scheme; - if (c2 === p3("/")) { + if (c4 === p5("/")) { this.state = "relative slash"; - } else if (isSpecial(this.url) && c2 === p3("\\")) { + } else if (isSpecial(this.url) && c4 === p5("\\")) { this.parseError = true; this.state = "relative slash"; } else { @@ -26520,13 +26520,13 @@ var require_url_state_machine = __commonJS({ this.url.port = this.base.port; this.url.path = this.base.path.slice(); this.url.query = this.base.query; - if (c2 === p3("?")) { + if (c4 === p5("?")) { this.url.query = ""; this.state = "query"; - } else if (c2 === p3("#")) { + } else if (c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (!isNaN(c2)) { + } else if (!isNaN(c4)) { this.url.query = null; this.url.path.pop(); this.state = "path"; @@ -26535,13 +26535,13 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c2) { - if (isSpecial(this.url) && (c2 === p3("/") || c2 === p3("\\"))) { - if (c2 === p3("\\")) { + URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c4) { + if (isSpecial(this.url) && (c4 === p5("/") || c4 === p5("\\"))) { + if (c4 === p5("\\")) { this.parseError = true; } this.state = "special authority ignore slashes"; - } else if (c2 === p3("/")) { + } else if (c4 === p5("/")) { this.state = "authority"; } else { this.url.username = this.base.username; @@ -26553,8 +26553,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c2) { - if (c2 === p3("/") && this.input[this.pointer + 1] === p3("/")) { + URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c4) { + if (c4 === p5("/") && this.input[this.pointer + 1] === p5("/")) { this.state = "special authority ignore slashes"; ++this.pointer; } else { @@ -26564,8 +26564,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c2) { - if (c2 !== p3("/") && c2 !== p3("\\")) { + URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c4) { + if (c4 !== p5("/") && c4 !== p5("\\")) { this.state = "authority"; --this.pointer; } else { @@ -26573,8 +26573,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse authority"] = function parseAuthority(c2, cStr) { - if (c2 === p3("@")) { + URLStateMachine.prototype["parse authority"] = function parseAuthority(c4, cStr) { + if (c4 === p5("@")) { this.parseError = true; if (this.atFlag) { this.buffer = `%40${this.buffer}`; @@ -26583,7 +26583,7 @@ var require_url_state_machine = __commonJS({ const len = countSymbols(this.buffer); for (let pointer = 0; pointer < len; ++pointer) { const codePoint = this.buffer.codePointAt(pointer); - if (codePoint === p3(":") && !this.passwordTokenSeenFlag) { + if (codePoint === p5(":") && !this.passwordTokenSeenFlag) { this.passwordTokenSeenFlag = true; continue; } @@ -26595,7 +26595,7 @@ var require_url_state_machine = __commonJS({ } } this.buffer = ""; - } else if (isNaN(c2) || c2 === p3("/") || c2 === p3("?") || c2 === p3("#") || isSpecial(this.url) && c2 === p3("\\")) { + } else if (isNaN(c4) || c4 === p5("/") || c4 === p5("?") || c4 === p5("#") || isSpecial(this.url) && c4 === p5("\\")) { if (this.atFlag && this.buffer === "") { this.parseError = true; return failure; @@ -26608,11 +26608,11 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c2, cStr) { + URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c4, cStr) { if (this.stateOverride && this.url.scheme === "file") { --this.pointer; this.state = "file host"; - } else if (c2 === p3(":") && !this.arrFlag) { + } else if (c4 === p5(":") && !this.arrFlag) { if (this.buffer === "") { this.parseError = true; return failure; @@ -26627,7 +26627,7 @@ var require_url_state_machine = __commonJS({ this.url.host = host; this.buffer = ""; this.state = "port"; - } else if (isNaN(c2) || c2 === p3("/") || c2 === p3("?") || c2 === p3("#") || isSpecial(this.url) && c2 === p3("\\")) { + } else if (isNaN(c4) || c4 === p5("/") || c4 === p5("?") || c4 === p5("#") || isSpecial(this.url) && c4 === p5("\\")) { --this.pointer; if (isSpecial(this.url) && this.buffer === "") { this.parseError = true; @@ -26647,19 +26647,19 @@ var require_url_state_machine = __commonJS({ return false; } } else { - if (c2 === p3("[")) { + if (c4 === p5("[")) { this.arrFlag = true; - } else if (c2 === p3("]")) { + } else if (c4 === p5("]")) { this.arrFlag = false; } this.buffer += cStr; } return true; }; - URLStateMachine.prototype["parse port"] = function parsePort(c2, cStr) { - if (infra.isASCIIDigit(c2)) { + URLStateMachine.prototype["parse port"] = function parsePort(c4, cStr) { + if (infra.isASCIIDigit(c4)) { this.buffer += cStr; - } else if (isNaN(c2) || c2 === p3("/") || c2 === p3("?") || c2 === p3("#") || isSpecial(this.url) && c2 === p3("\\") || this.stateOverride) { + } else if (isNaN(c4) || c4 === p5("/") || c4 === p5("?") || c4 === p5("#") || isSpecial(this.url) && c4 === p5("\\") || this.stateOverride) { if (this.buffer !== "") { const port = parseInt(this.buffer); if (port > 2 ** 16 - 1) { @@ -26680,16 +26680,16 @@ var require_url_state_machine = __commonJS({ } return true; }; - var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([p3("/"), p3("\\"), p3("?"), p3("#")]); + var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([p5("/"), p5("\\"), p5("?"), p5("#")]); function startsWithWindowsDriveLetter(input, pointer) { const length = input.length - pointer; return length >= 2 && isWindowsDriveLetterCodePoints(input[pointer], input[pointer + 1]) && (length === 2 || fileOtherwiseCodePoints.has(input[pointer + 2])); } - URLStateMachine.prototype["parse file"] = function parseFile(c2) { + URLStateMachine.prototype["parse file"] = function parseFile(c4) { this.url.scheme = "file"; this.url.host = ""; - if (c2 === p3("/") || c2 === p3("\\")) { - if (c2 === p3("\\")) { + if (c4 === p5("/") || c4 === p5("\\")) { + if (c4 === p5("\\")) { this.parseError = true; } this.state = "file slash"; @@ -26697,13 +26697,13 @@ var require_url_state_machine = __commonJS({ this.url.host = this.base.host; this.url.path = this.base.path.slice(); this.url.query = this.base.query; - if (c2 === p3("?")) { + if (c4 === p5("?")) { this.url.query = ""; this.state = "query"; - } else if (c2 === p3("#")) { + } else if (c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (!isNaN(c2)) { + } else if (!isNaN(c4)) { this.url.query = null; if (!startsWithWindowsDriveLetter(this.input, this.pointer)) { shortenPath(this.url); @@ -26720,9 +26720,9 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c2) { - if (c2 === p3("/") || c2 === p3("\\")) { - if (c2 === p3("\\")) { + URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c4) { + if (c4 === p5("/") || c4 === p5("\\")) { + if (c4 === p5("\\")) { this.parseError = true; } this.state = "file host"; @@ -26738,8 +26738,8 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse file host"] = function parseFileHost(c2, cStr) { - if (isNaN(c2) || c2 === p3("/") || c2 === p3("\\") || c2 === p3("?") || c2 === p3("#")) { + URLStateMachine.prototype["parse file host"] = function parseFileHost(c4, cStr) { + if (isNaN(c4) || c4 === p5("/") || c4 === p5("\\") || c4 === p5("?") || c4 === p5("#")) { --this.pointer; if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { this.parseError = true; @@ -26770,24 +26770,24 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path start"] = function parsePathStart(c2) { + URLStateMachine.prototype["parse path start"] = function parsePathStart(c4) { if (isSpecial(this.url)) { - if (c2 === p3("\\")) { + if (c4 === p5("\\")) { this.parseError = true; } this.state = "path"; - if (c2 !== p3("/") && c2 !== p3("\\")) { + if (c4 !== p5("/") && c4 !== p5("\\")) { --this.pointer; } - } else if (!this.stateOverride && c2 === p3("?")) { + } else if (!this.stateOverride && c4 === p5("?")) { this.url.query = ""; this.state = "query"; - } else if (!this.stateOverride && c2 === p3("#")) { + } else if (!this.stateOverride && c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (c2 !== void 0) { + } else if (c4 !== void 0) { this.state = "path"; - if (c2 !== p3("/")) { + if (c4 !== p5("/")) { --this.pointer; } } else if (this.stateOverride && this.url.host === null) { @@ -26795,17 +26795,17 @@ var require_url_state_machine = __commonJS({ } return true; }; - URLStateMachine.prototype["parse path"] = function parsePath(c2) { - if (isNaN(c2) || c2 === p3("/") || isSpecial(this.url) && c2 === p3("\\") || !this.stateOverride && (c2 === p3("?") || c2 === p3("#"))) { - if (isSpecial(this.url) && c2 === p3("\\")) { + URLStateMachine.prototype["parse path"] = function parsePath(c4) { + if (isNaN(c4) || c4 === p5("/") || isSpecial(this.url) && c4 === p5("\\") || !this.stateOverride && (c4 === p5("?") || c4 === p5("#"))) { + if (isSpecial(this.url) && c4 === p5("\\")) { this.parseError = true; } if (isDoubleDot(this.buffer)) { shortenPath(this.url); - if (c2 !== p3("/") && !(isSpecial(this.url) && c2 === p3("\\"))) { + if (c4 !== p5("/") && !(isSpecial(this.url) && c4 === p5("\\"))) { this.url.path.push(""); } - } else if (isSingleDot(this.buffer) && c2 !== p3("/") && !(isSpecial(this.url) && c2 === p3("\\"))) { + } else if (isSingleDot(this.buffer) && c4 !== p5("/") && !(isSpecial(this.url) && c4 === p5("\\"))) { this.url.path.push(""); } else if (!isSingleDot(this.buffer)) { if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { @@ -26814,75 +26814,75 @@ var require_url_state_machine = __commonJS({ this.url.path.push(this.buffer); } this.buffer = ""; - if (c2 === p3("?")) { + if (c4 === p5("?")) { this.url.query = ""; this.state = "query"; } - if (c2 === p3("#")) { + if (c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; } } else { - if (c2 === p3("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + if (c4 === p5("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - this.buffer += utf8PercentEncodeCodePoint(c2, isPathPercentEncode); + this.buffer += utf8PercentEncodeCodePoint(c4, isPathPercentEncode); } return true; }; - URLStateMachine.prototype["parse opaque path"] = function parseOpaquePath(c2) { - if (c2 === p3("?")) { + URLStateMachine.prototype["parse opaque path"] = function parseOpaquePath(c4) { + if (c4 === p5("?")) { this.url.query = ""; this.state = "query"; - } else if (c2 === p3("#")) { + } else if (c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; - } else if (c2 === p3(" ")) { + } else if (c4 === p5(" ")) { const remaining = this.input[this.pointer + 1]; - if (remaining === p3("?") || remaining === p3("#")) { + if (remaining === p5("?") || remaining === p5("#")) { this.url.path += "%20"; } else { this.url.path += " "; } } else { - if (!isNaN(c2) && c2 !== p3("%")) { + if (!isNaN(c4) && c4 !== p5("%")) { this.parseError = true; } - if (c2 === p3("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + if (c4 === p5("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - if (!isNaN(c2)) { - this.url.path += utf8PercentEncodeCodePoint(c2, isC0ControlPercentEncode); + if (!isNaN(c4)) { + this.url.path += utf8PercentEncodeCodePoint(c4, isC0ControlPercentEncode); } } return true; }; - URLStateMachine.prototype["parse query"] = function parseQuery(c2, cStr) { + URLStateMachine.prototype["parse query"] = function parseQuery(c4, cStr) { if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { this.encodingOverride = "utf-8"; } - if (!this.stateOverride && c2 === p3("#") || isNaN(c2)) { + if (!this.stateOverride && c4 === p5("#") || isNaN(c4)) { const queryPercentEncodePredicate = isSpecial(this.url) ? isSpecialQueryPercentEncode : isQueryPercentEncode; this.url.query += utf8PercentEncodeString(this.buffer, queryPercentEncodePredicate); this.buffer = ""; - if (c2 === p3("#")) { + if (c4 === p5("#")) { this.url.fragment = ""; this.state = "fragment"; } - } else if (!isNaN(c2)) { - if (c2 === p3("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + } else if (!isNaN(c4)) { + if (c4 === p5("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } this.buffer += cStr; } return true; }; - URLStateMachine.prototype["parse fragment"] = function parseFragment(c2) { - if (!isNaN(c2)) { - if (c2 === p3("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { + URLStateMachine.prototype["parse fragment"] = function parseFragment(c4) { + if (!isNaN(c4)) { + if (c4 === p5("%") && (!infra.isASCIIHex(this.input[this.pointer + 1]) || !infra.isASCIIHex(this.input[this.pointer + 2]))) { this.parseError = true; } - this.url.fragment += utf8PercentEncodeCodePoint(c2, isFragmentPercentEncode); + this.url.fragment += utf8PercentEncodeCodePoint(c4, isFragmentPercentEncode); } return true; }; @@ -26999,18 +26999,18 @@ var require_urlencoded2 = __commonJS({ "use strict"; var { utf8Encode, utf8DecodeWithoutBOM } = require_encoding2(); var { percentDecodeBytes, utf8PercentEncodeString, isURLEncodedPercentEncode } = require_percent_encoding(); - function p3(char) { + function p5(char) { return char.codePointAt(0); } function parseUrlencoded(input) { - const sequences = strictlySplitByteSequence(input, p3("&")); + const sequences = strictlySplitByteSequence(input, p5("&")); const output = []; for (const bytes of sequences) { if (bytes.length === 0) { continue; } let name, value; - const indexOfEqual = bytes.indexOf(p3("=")); + const indexOfEqual = bytes.indexOf(p5("=")); if (indexOfEqual >= 0) { name = bytes.slice(0, indexOfEqual); value = bytes.slice(indexOfEqual + 1); @@ -27031,10 +27031,10 @@ var require_urlencoded2 = __commonJS({ } function serializeUrlencoded(tuples) { let output = ""; - for (const [i3, tuple] of tuples.entries()) { + for (const [i5, tuple] of tuples.entries()) { const name = utf8PercentEncodeString(tuple[0], isURLEncodedPercentEncode, true); const value = utf8PercentEncodeString(tuple[1], isURLEncodedPercentEncode, true); - if (i3 !== 0) { + if (i5 !== 0) { output += "&"; } output += `${name}=${value}`; @@ -27044,11 +27044,11 @@ var require_urlencoded2 = __commonJS({ function strictlySplitByteSequence(buf, cp) { const list = []; let last = 0; - let i3 = buf.indexOf(cp); - while (i3 >= 0) { - list.push(buf.slice(last, i3)); - last = i3 + 1; - i3 = buf.indexOf(cp, last); + let i5 = buf.indexOf(cp); + while (i5 >= 0) { + list.push(buf.slice(last, i5)); + last = i5 + 1; + i5 = buf.indexOf(cp, last); } if (last !== buf.length) { list.push(buf.slice(last)); @@ -27056,10 +27056,10 @@ var require_urlencoded2 = __commonJS({ return list; } function replaceByteInByteSequence(buf, from, to) { - let i3 = buf.indexOf(from); - while (i3 >= 0) { - buf[i3] = to; - i3 = buf.indexOf(from, i3 + 1); + let i5 = buf.indexOf(from); + while (i5 >= 0) { + buf[i5] = to; + i5 = buf.indexOf(from, i5 + 1); } return buf; } @@ -27083,16 +27083,16 @@ var require_Function = __commonJS({ function invokeTheCallbackFunction(...args) { const thisArg = utils.tryWrapperForImpl(this); let callResult; - for (let i3 = 0; i3 < args.length; i3++) { - args[i3] = utils.tryWrapperForImpl(args[i3]); + for (let i5 = 0; i5 < args.length; i5++) { + args[i5] = utils.tryWrapperForImpl(args[i5]); } callResult = Reflect.apply(value, thisArg, args); callResult = conversions["any"](callResult, { context: context2, globals: globalObject }); return callResult; } invokeTheCallbackFunction.construct = (...args) => { - for (let i3 = 0; i3 < args.length; i3++) { - args[i3] = utils.tryWrapperForImpl(args[i3]); + for (let i5 = 0; i5 < args.length; i5++) { + args[i5] = utils.tryWrapperForImpl(args[i5]); } let callResult = Reflect.construct(value, args); callResult = conversions["any"](callResult, { context: context2, globals: globalObject }); @@ -27151,12 +27151,12 @@ var require_URLSearchParams_impl = __commonJS({ this._updateSteps(); } delete(name, value) { - let i3 = 0; - while (i3 < this._list.length) { - if (this._list[i3][0] === name && (value === void 0 || this._list[i3][1] === value)) { - this._list.splice(i3, 1); + let i5 = 0; + while (i5 < this._list.length) { + if (this._list[i5][0] === name && (value === void 0 || this._list[i5][1] === value)) { + this._list.splice(i5, 1); } else { - i3++; + i5++; } } this._updateSteps(); @@ -27188,18 +27188,18 @@ var require_URLSearchParams_impl = __commonJS({ } set(name, value) { let found = false; - let i3 = 0; - while (i3 < this._list.length) { - if (this._list[i3][0] === name) { + let i5 = 0; + while (i5 < this._list.length) { + if (this._list[i5][0] === name) { if (found) { - this._list.splice(i3, 1); + this._list.splice(i5, 1); } else { found = true; - this._list[i3][1] = value; - i3++; + this._list[i5][1] = value; + i5++; } } else { - i3++; + i5++; } } if (!found) { @@ -27208,11 +27208,11 @@ var require_URLSearchParams_impl = __commonJS({ this._updateSteps(); } sort() { - this._list.sort((a3, b3) => { - if (a3[0] < b3[0]) { + this._list.sort((a5, b5) => { + if (a5[0] < b5[0]) { return -1; } - if (a3[0] > b3[0]) { + if (a5[0] > b5[0]) { return 1; } return 0; @@ -27611,12 +27611,12 @@ var require_URLSearchParams = __commonJS({ }); const thisArg = arguments[1]; let pairs = Array.from(this[implSymbol]); - let i3 = 0; - while (i3 < pairs.length) { - const [key, value] = pairs[i3].map(utils.tryWrapperForImpl); + let i5 = 0; + while (i5 < pairs.length) { + const [key, value] = pairs[i5].map(utils.tryWrapperForImpl); callback.call(thisArg, value, key, this); pairs = Array.from(this[implSymbol]); - i3++; + i5++; } } get size() { @@ -27731,10 +27731,10 @@ var require_URL_impl = __commonJS({ get href() { return usm.serializeURL(this._url); } - set href(v2) { - const parsedURL = usm.basicURLParse(v2); + set href(v7) { + const parsedURL = usm.basicURLParse(v7); if (parsedURL === null) { - throw new TypeError(`Invalid URL: ${v2}`); + throw new TypeError(`Invalid URL: ${v7}`); } this._url = parsedURL; this._query._list.splice(0); @@ -27749,26 +27749,26 @@ var require_URL_impl = __commonJS({ get protocol() { return `${this._url.scheme}:`; } - set protocol(v2) { - usm.basicURLParse(`${v2}:`, { url: this._url, stateOverride: "scheme start" }); + set protocol(v7) { + usm.basicURLParse(`${v7}:`, { url: this._url, stateOverride: "scheme start" }); } get username() { return this._url.username; } - set username(v2) { + set username(v7) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - usm.setTheUsername(this._url, v2); + usm.setTheUsername(this._url, v7); } get password() { return this._url.password; } - set password(v2) { + set password(v7) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - usm.setThePassword(this._url, v2); + usm.setThePassword(this._url, v7); } get host() { const url2 = this._url; @@ -27780,11 +27780,11 @@ var require_URL_impl = __commonJS({ } return `${usm.serializeHost(url2.host)}:${usm.serializeInteger(url2.port)}`; } - set host(v2) { + set host(v7) { if (usm.hasAnOpaquePath(this._url)) { return; } - usm.basicURLParse(v2, { url: this._url, stateOverride: "host" }); + usm.basicURLParse(v7, { url: this._url, stateOverride: "host" }); } get hostname() { if (this._url.host === null) { @@ -27792,11 +27792,11 @@ var require_URL_impl = __commonJS({ } return usm.serializeHost(this._url.host); } - set hostname(v2) { + set hostname(v7) { if (usm.hasAnOpaquePath(this._url)) { return; } - usm.basicURLParse(v2, { url: this._url, stateOverride: "hostname" }); + usm.basicURLParse(v7, { url: this._url, stateOverride: "hostname" }); } get port() { if (this._url.port === null) { @@ -27804,25 +27804,25 @@ var require_URL_impl = __commonJS({ } return usm.serializeInteger(this._url.port); } - set port(v2) { + set port(v7) { if (usm.cannotHaveAUsernamePasswordPort(this._url)) { return; } - if (v2 === "") { + if (v7 === "") { this._url.port = null; } else { - usm.basicURLParse(v2, { url: this._url, stateOverride: "port" }); + usm.basicURLParse(v7, { url: this._url, stateOverride: "port" }); } } get pathname() { return usm.serializePath(this._url); } - set pathname(v2) { + set pathname(v7) { if (usm.hasAnOpaquePath(this._url)) { return; } this._url.path = []; - usm.basicURLParse(v2, { url: this._url, stateOverride: "path start" }); + usm.basicURLParse(v7, { url: this._url, stateOverride: "path start" }); } get search() { if (this._url.query === null || this._url.query === "") { @@ -27830,14 +27830,14 @@ var require_URL_impl = __commonJS({ } return `?${this._url.query}`; } - set search(v2) { + set search(v7) { const url2 = this._url; - if (v2 === "") { + if (v7 === "") { url2.query = null; this._query._list = []; return; } - const input = v2[0] === "?" ? v2.substring(1) : v2; + const input = v7[0] === "?" ? v7.substring(1) : v7; url2.query = ""; usm.basicURLParse(input, { url: url2, stateOverride: "query" }); this._query._list = urlencoded.parseUrlencodedString(input); @@ -27851,12 +27851,12 @@ var require_URL_impl = __commonJS({ } return `#${this._url.fragment}`; } - set hash(v2) { - if (v2 === "") { + set hash(v7) { + if (v7 === "") { this._url.fragment = null; return; } - const input = v2[0] === "#" ? v2.substring(1) : v2; + const input = v7[0] === "#" ? v7.substring(1) : v7; this._url.fragment = ""; usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); } @@ -27940,7 +27940,7 @@ var require_URL = __commonJS({ return; } const ctorRegistry = utils.initCtorRegistry(globalObject); - class URL3 { + class URL5 { constructor(url2) { if (arguments.length < 1) { throw new globalObject.TypeError( @@ -28233,7 +28233,7 @@ var require_URL = __commonJS({ return Impl.implementation.canParse(...args); } } - Object.defineProperties(URL3.prototype, { + Object.defineProperties(URL5.prototype, { toJSON: { enumerable: true }, href: { enumerable: true }, toString: { enumerable: true }, @@ -28250,18 +28250,18 @@ var require_URL = __commonJS({ hash: { enumerable: true }, [Symbol.toStringTag]: { value: "URL", configurable: true } }); - Object.defineProperties(URL3, { parse: { enumerable: true }, canParse: { enumerable: true } }); - ctorRegistry[interfaceName] = URL3; + Object.defineProperties(URL5, { parse: { enumerable: true }, canParse: { enumerable: true } }); + ctorRegistry[interfaceName] = URL5; Object.defineProperty(globalObject, interfaceName, { configurable: true, writable: true, - value: URL3 + value: URL5 }); if (globalNames.includes("Window")) { Object.defineProperty(globalObject, "webkitURL", { configurable: true, writable: true, - value: URL3 + value: URL5 }); } }; @@ -28273,9 +28273,9 @@ var require_URL = __commonJS({ var require_webidl2js_wrapper = __commonJS({ "node_modules/whatwg-url/webidl2js-wrapper.js"(exports2) { "use strict"; - var URL3 = require_URL(); + var URL5 = require_URL(); var URLSearchParams2 = require_URLSearchParams(); - exports2.URL = URL3; + exports2.URL = URL5; exports2.URLSearchParams = URLSearchParams2; } }); @@ -28284,11 +28284,11 @@ var require_webidl2js_wrapper = __commonJS({ var require_whatwg_url = __commonJS({ "node_modules/whatwg-url/index.js"(exports2) { "use strict"; - var { URL: URL3, URLSearchParams: URLSearchParams2 } = require_webidl2js_wrapper(); + var { URL: URL5, URLSearchParams: URLSearchParams2 } = require_webidl2js_wrapper(); var urlStateMachine = require_url_state_machine(); var percentEncoding = require_percent_encoding(); var sharedGlobalObject = { Array, Object, Promise, String, TypeError }; - URL3.install(sharedGlobalObject, ["Window"]); + URL5.install(sharedGlobalObject, ["Window"]); URLSearchParams2.install(sharedGlobalObject, ["Window"]); exports2.URL = sharedGlobalObject.URL; exports2.URLSearchParams = sharedGlobalObject.URLSearchParams; @@ -28333,10 +28333,10 @@ var require_lib3 = __commonJS({ const buffers = []; let size = 0; if (blobParts) { - const a3 = blobParts; - const length = Number(a3.length); - for (let i3 = 0; i3 < length; i3++) { - const element = a3[i3]; + const a5 = blobParts; + const length = Number(a5.length); + for (let i5 = 0; i5 < length; i5++) { + const element = a5[i5]; let buffer; if (element instanceof Buffer) { buffer = element; @@ -28437,7 +28437,7 @@ var require_lib3 = __commonJS({ var convert; try { convert = require("encoding").convert; - } catch (e3) { + } catch (e5) { } var INTERNALS = Symbol("Body internals"); var PassThrough = Stream3.PassThrough; @@ -28451,7 +28451,7 @@ var require_lib3 = __commonJS({ body = null; } else if (isURLSearchParams2(body)) { body = Buffer.from(body.toString()); - } else if (isBlob4(body)) ; + } else if (isBlob5(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") { body = Buffer.from(body); @@ -28586,7 +28586,7 @@ var require_lib3 = __commonJS({ if (body === null) { return Body.Promise.resolve(Buffer.alloc(0)); } - if (isBlob4(body)) { + if (isBlob5(body)) { body = body.stream(); } if (Buffer.isBuffer(body)) { @@ -28682,7 +28682,7 @@ var require_lib3 = __commonJS({ } return obj.constructor.name === "URLSearchParams" || Object.prototype.toString.call(obj) === "[object URLSearchParams]" || typeof obj.sort === "function"; } - function isBlob4(obj) { + function isBlob5(obj) { return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); } function clone(instance) { @@ -28708,7 +28708,7 @@ var require_lib3 = __commonJS({ return "text/plain;charset=UTF-8"; } else if (isURLSearchParams2(body)) { return "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { return body.type || null; } else if (Buffer.isBuffer(body)) { return null; @@ -28728,7 +28728,7 @@ var require_lib3 = __commonJS({ const body = instance.body; if (body === null) { return 0; - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { return body.size; } else if (Buffer.isBuffer(body)) { return body.length; @@ -28746,7 +28746,7 @@ var require_lib3 = __commonJS({ const body = instance.body; if (body === null) { dest.end(); - } else if (isBlob4(body)) { + } else if (isBlob5(body)) { body.stream().pipe(dest); } else if (Buffer.isBuffer(body)) { dest.write(body); @@ -28770,9 +28770,9 @@ var require_lib3 = __commonJS({ throw new TypeError(`${value} is not a legal HTTP header value`); } } - function find(map, name) { + function find(map2, name) { name = name.toLowerCase(); - for (const key in map) { + for (const key in map2) { if (key.toLowerCase() === name) { return key; } @@ -28855,13 +28855,13 @@ var require_lib3 = __commonJS({ forEach(callback) { let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0; let pairs = getHeaders2(this); - let i3 = 0; - while (i3 < pairs.length) { - var _pairs$i = pairs[i3]; + let i5 = 0; + while (i5 < pairs.length) { + var _pairs$i = pairs[i5]; const name = _pairs$i[0], value = _pairs$i[1]; callback.call(thisArg, value, name, this); pairs = getHeaders2(this); - i3++; + i5++; } } /** @@ -28979,12 +28979,12 @@ var require_lib3 = __commonJS({ function getHeaders2(headers) { let kind3 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value"; const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind3 === "key" ? function(k4) { - return k4.toLowerCase(); - } : kind3 === "value" ? function(k4) { - return headers[MAP][k4].join(", "); - } : function(k4) { - return [k4.toLowerCase(), headers[MAP][k4].join(", ")]; + return keys.map(kind3 === "key" ? function(k6) { + return k6.toLowerCase(); + } : kind3 === "value" ? function(k6) { + return headers[MAP][k6].join(", "); + } : function(k6) { + return [k6.toLowerCase(), headers[MAP][k6].join(", ")]; }); } var INTERNAL = Symbol("internal"); @@ -29133,12 +29133,12 @@ var require_lib3 = __commonJS({ configurable: true }); var INTERNALS$2 = Symbol("Request internals"); - var URL3 = Url.URL || whatwgUrl.URL; + var URL5 = Url.URL || whatwgUrl.URL; var parse_url = Url.parse; var format_url = Url.format; function parseURL(urlStr) { if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL3(urlStr).toString(); + urlStr = new URL5(urlStr).toString(); } return parse_url(urlStr); } @@ -29364,9 +29364,9 @@ var require_lib3 = __commonJS({ } }); if (parseInt(process.version.substring(1)) < 14) { - req.on("socket", function(s2) { - s2.addListener("close", function(hadError) { - const hasDataListener = s2.listenerCount("data") > 0; + req.on("socket", function(s4) { + s4.addListener("close", function(hadError) { + const hasDataListener = s4.listenerCount("data") > 0; if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { const err = new Error("Premature close"); err.code = "ERR_STREAM_PREMATURE_CLOSE"; @@ -29507,8 +29507,8 @@ var require_lib3 = __commonJS({ } function fixResponseChunkedTransferBadEnding(request3, errorCallback) { let socket; - request3.on("socket", function(s2) { - socket = s2; + request3.on("socket", function(s4) { + socket = s4; }); request3.on("response", function(response) { const headers = response.headers; @@ -29550,1001 +29550,1001 @@ var require_lib3 = __commonJS({ // node_modules/formdata-node/node_modules/web-streams-polyfill/dist/ponyfill.mjs function t() { } -function r2(e3) { - return "object" == typeof e3 && null !== e3 || "function" == typeof e3; +function r2(e5) { + return "object" == typeof e5 && null !== e5 || "function" == typeof e5; } -function n(e3, t2) { +function n(e5, t4) { try { - Object.defineProperty(e3, "name", { value: t2, configurable: true }); - } catch (e4) { + Object.defineProperty(e5, "name", { value: t4, configurable: true }); + } catch (e6) { } } -function u2(e3) { - return new a2(e3); +function u2(e5) { + return new a2(e5); } -function c(e3) { - return l2(e3); +function c(e5) { + return l2(e5); } -function d4(e3) { - return s(e3); +function d4(e5) { + return s(e5); } -function f3(e3, t2, r3) { - return i2.call(e3, t2, r3); +function f3(e5, t4, r5) { + return i2.call(e5, t4, r5); } -function b2(e3, t2, r3) { - f3(f3(e3, t2, r3), void 0, o2); +function b2(e5, t4, r5) { + f3(f3(e5, t4, r5), void 0, o2); } -function h2(e3, t2) { - b2(e3, t2); +function h2(e5, t4) { + b2(e5, t4); } -function _2(e3, t2) { - b2(e3, void 0, t2); +function _2(e5, t4) { + b2(e5, void 0, t4); } -function p2(e3, t2, r3) { - return f3(e3, t2, r3); +function p2(e5, t4, r5) { + return f3(e5, t4, r5); } -function m3(e3) { - f3(e3, void 0, o2); +function m3(e5) { + f3(e5, void 0, o2); } -function g(e3, t2, r3) { - if ("function" != typeof e3) throw new TypeError("Argument is not a function"); - return Function.prototype.apply.call(e3, t2, r3); +function g(e5, t4, r5) { + if ("function" != typeof e5) throw new TypeError("Argument is not a function"); + return Function.prototype.apply.call(e5, t4, r5); } -function w3(e3, t2, r3) { +function w3(e5, t4, r5) { try { - return c(g(e3, t2, r3)); - } catch (e4) { - return d4(e4); + return c(g(e5, t4, r5)); + } catch (e6) { + return d4(e6); } } -function E2(e3, t2) { - e3._ownerReadableStream = t2, t2._reader = e3, "readable" === t2._state ? O2(e3) : "closed" === t2._state ? function(e4) { - O2(e4), j3(e4); - }(e3) : B(e3, t2._storedError); +function E2(e5, t4) { + e5._ownerReadableStream = t4, t4._reader = e5, "readable" === t4._state ? O2(e5) : "closed" === t4._state ? function(e6) { + O2(e6), j3(e6); + }(e5) : B(e5, t4._storedError); } -function P2(e3, t2) { - return Gt(e3._ownerReadableStream, t2); +function P2(e5, t4) { + return Gt(e5._ownerReadableStream, t4); } -function W3(e3) { - const t2 = e3._ownerReadableStream; - "readable" === t2._state ? A2(e3, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : function(e4, t3) { - B(e4, t3); - }(e3, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), t2._readableStreamController[C2](), t2._reader = void 0, e3._ownerReadableStream = void 0; +function W3(e5) { + const t4 = e5._ownerReadableStream; + "readable" === t4._state ? A2(e5, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")) : function(e6, t5) { + B(e6, t5); + }(e5, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")), t4._readableStreamController[C2](), t4._reader = void 0, e5._ownerReadableStream = void 0; } -function k3(e3) { - return new TypeError("Cannot " + e3 + " a stream using a released reader"); +function k3(e5) { + return new TypeError("Cannot " + e5 + " a stream using a released reader"); } -function O2(e3) { - e3._closedPromise = u2((t2, r3) => { - e3._closedPromise_resolve = t2, e3._closedPromise_reject = r3; +function O2(e5) { + e5._closedPromise = u2((t4, r5) => { + e5._closedPromise_resolve = t4, e5._closedPromise_reject = r5; }); } -function B(e3, t2) { - O2(e3), A2(e3, t2); +function B(e5, t4) { + O2(e5), A2(e5, t4); } -function A2(e3, t2) { - void 0 !== e3._closedPromise_reject && (m3(e3._closedPromise), e3._closedPromise_reject(t2), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0); +function A2(e5, t4) { + void 0 !== e5._closedPromise_reject && (m3(e5._closedPromise), e5._closedPromise_reject(t4), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0); } -function j3(e3) { - void 0 !== e3._closedPromise_resolve && (e3._closedPromise_resolve(void 0), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0); +function j3(e5) { + void 0 !== e5._closedPromise_resolve && (e5._closedPromise_resolve(void 0), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0); } -function F2(e3, t2) { - if (void 0 !== e3 && ("object" != typeof (r3 = e3) && "function" != typeof r3)) throw new TypeError(`${t2} is not an object.`); - var r3; +function F2(e5, t4) { + if (void 0 !== e5 && ("object" != typeof (r5 = e5) && "function" != typeof r5)) throw new TypeError(`${t4} is not an object.`); + var r5; } -function I(e3, t2) { - if ("function" != typeof e3) throw new TypeError(`${t2} is not a function.`); +function I(e5, t4) { + if ("function" != typeof e5) throw new TypeError(`${t4} is not a function.`); } -function D3(e3, t2) { - if (!/* @__PURE__ */ function(e4) { - return "object" == typeof e4 && null !== e4 || "function" == typeof e4; - }(e3)) throw new TypeError(`${t2} is not an object.`); +function D3(e5, t4) { + if (!/* @__PURE__ */ function(e6) { + return "object" == typeof e6 && null !== e6 || "function" == typeof e6; + }(e5)) throw new TypeError(`${t4} is not an object.`); } -function $3(e3, t2, r3) { - if (void 0 === e3) throw new TypeError(`Parameter ${t2} is required in '${r3}'.`); +function $3(e5, t4, r5) { + if (void 0 === e5) throw new TypeError(`Parameter ${t4} is required in '${r5}'.`); } -function M3(e3, t2, r3) { - if (void 0 === e3) throw new TypeError(`${t2} is required in '${r3}'.`); +function M3(e5, t4, r5) { + if (void 0 === e5) throw new TypeError(`${t4} is required in '${r5}'.`); } -function Y2(e3) { - return Number(e3); +function Y2(e5) { + return Number(e5); } -function Q2(e3) { - return 0 === e3 ? 0 : e3; +function Q2(e5) { + return 0 === e5 ? 0 : e5; } -function N3(e3, t2) { - const r3 = Number.MAX_SAFE_INTEGER; - let o3 = Number(e3); - if (o3 = Q2(o3), !z2(o3)) throw new TypeError(`${t2} is not a finite number`); - if (o3 = function(e4) { - return Q2(L3(e4)); - }(o3), o3 < 0 || o3 > r3) throw new TypeError(`${t2} is outside the accepted range of 0 to ${r3}, inclusive`); - return z2(o3) && 0 !== o3 ? o3 : 0; +function N3(e5, t4) { + const r5 = Number.MAX_SAFE_INTEGER; + let o5 = Number(e5); + if (o5 = Q2(o5), !z2(o5)) throw new TypeError(`${t4} is not a finite number`); + if (o5 = function(e6) { + return Q2(L3(e6)); + }(o5), o5 < 0 || o5 > r5) throw new TypeError(`${t4} is outside the accepted range of 0 to ${r5}, inclusive`); + return z2(o5) && 0 !== o5 ? o5 : 0; } -function H2(e3) { - if (!r2(e3)) return false; - if ("function" != typeof e3.getReader) return false; +function H2(e5) { + if (!r2(e5)) return false; + if ("function" != typeof e5.getReader) return false; try { - return "boolean" == typeof e3.locked; - } catch (e4) { + return "boolean" == typeof e5.locked; + } catch (e6) { return false; } } -function x(e3) { - if (!r2(e3)) return false; - if ("function" != typeof e3.getWriter) return false; +function x(e5) { + if (!r2(e5)) return false; + if ("function" != typeof e5.getWriter) return false; try { - return "boolean" == typeof e3.locked; - } catch (e4) { + return "boolean" == typeof e5.locked; + } catch (e6) { return false; } } -function V3(e3, t2) { - if (!Vt(e3)) throw new TypeError(`${t2} is not a ReadableStream.`); +function V3(e5, t4) { + if (!Vt(e5)) throw new TypeError(`${t4} is not a ReadableStream.`); } -function U4(e3, t2) { - e3._reader._readRequests.push(t2); +function U4(e5, t4) { + e5._reader._readRequests.push(t4); } -function G3(e3, t2, r3) { - const o3 = e3._reader._readRequests.shift(); - r3 ? o3._closeSteps() : o3._chunkSteps(t2); +function G3(e5, t4, r5) { + const o5 = e5._reader._readRequests.shift(); + r5 ? o5._closeSteps() : o5._chunkSteps(t4); } -function X3(e3) { - return e3._reader._readRequests.length; +function X3(e5) { + return e5._reader._readRequests.length; } -function J3(e3) { - const t2 = e3._reader; - return void 0 !== t2 && !!K2(t2); +function J3(e5) { + const t4 = e5._reader; + return void 0 !== t4 && !!K2(t4); } -function K2(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readRequests") && e3 instanceof ReadableStreamDefaultReader); +function K2(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readRequests") && e5 instanceof ReadableStreamDefaultReader); } -function Z2(e3, t2) { - const r3 = e3._readRequests; - e3._readRequests = new S2(), r3.forEach((e4) => { - e4._errorSteps(t2); +function Z2(e5, t4) { + const r5 = e5._readRequests; + e5._readRequests = new S2(), r5.forEach((e6) => { + e6._errorSteps(t4); }); } -function ee(e3) { - return new TypeError(`ReadableStreamDefaultReader.prototype.${e3} can only be used on a ReadableStreamDefaultReader`); +function ee(e5) { + return new TypeError(`ReadableStreamDefaultReader.prototype.${e5} can only be used on a ReadableStreamDefaultReader`); } -function oe(e3) { - if (!r2(e3)) return false; - if (!Object.prototype.hasOwnProperty.call(e3, "_asyncIteratorImpl")) return false; +function oe(e5) { + if (!r2(e5)) return false; + if (!Object.prototype.hasOwnProperty.call(e5, "_asyncIteratorImpl")) return false; try { - return e3._asyncIteratorImpl instanceof te; - } catch (e4) { + return e5._asyncIteratorImpl instanceof te; + } catch (e6) { return false; } } -function ne(e3) { - return new TypeError(`ReadableStreamAsyncIterator.${e3} can only be used on a ReadableSteamAsyncIterator`); +function ne(e5) { + return new TypeError(`ReadableStreamAsyncIterator.${e5} can only be used on a ReadableSteamAsyncIterator`); } -function ie2(e3, t2, r3, o3, n2) { - new Uint8Array(e3).set(new Uint8Array(r3, o3, n2), t2); +function ie2(e5, t4, r5, o5, n4) { + new Uint8Array(e5).set(new Uint8Array(r5, o5, n4), t4); } -function le2(e3) { - const t2 = function(e4, t3, r3) { - if (e4.slice) return e4.slice(t3, r3); - const o3 = r3 - t3, n2 = new ArrayBuffer(o3); - return ie2(n2, 0, e4, t3, o3), n2; - }(e3.buffer, e3.byteOffset, e3.byteOffset + e3.byteLength); - return new Uint8Array(t2); +function le2(e5) { + const t4 = function(e6, t5, r5) { + if (e6.slice) return e6.slice(t5, r5); + const o5 = r5 - t5, n4 = new ArrayBuffer(o5); + return ie2(n4, 0, e6, t5, o5), n4; + }(e5.buffer, e5.byteOffset, e5.byteOffset + e5.byteLength); + return new Uint8Array(t4); } -function se(e3) { - const t2 = e3._queue.shift(); - return e3._queueTotalSize -= t2.size, e3._queueTotalSize < 0 && (e3._queueTotalSize = 0), t2.value; +function se(e5) { + const t4 = e5._queue.shift(); + return e5._queueTotalSize -= t4.size, e5._queueTotalSize < 0 && (e5._queueTotalSize = 0), t4.value; } -function ue2(e3, t2, r3) { - if ("number" != typeof (o3 = r3) || ae2(o3) || o3 < 0 || r3 === 1 / 0) throw new RangeError("Size must be a finite, non-NaN, non-negative number."); - var o3; - e3._queue.push({ value: t2, size: r3 }), e3._queueTotalSize += r3; +function ue2(e5, t4, r5) { + if ("number" != typeof (o5 = r5) || ae2(o5) || o5 < 0 || r5 === 1 / 0) throw new RangeError("Size must be a finite, non-NaN, non-negative number."); + var o5; + e5._queue.push({ value: t4, size: r5 }), e5._queueTotalSize += r5; } -function ce2(e3) { - e3._queue = new S2(), e3._queueTotalSize = 0; +function ce2(e5) { + e5._queue = new S2(), e5._queueTotalSize = 0; } -function de(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledReadableByteStream") && e3 instanceof ReadableByteStreamController); +function de(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledReadableByteStream") && e5 instanceof ReadableByteStreamController); } -function fe(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_associatedReadableByteStreamController") && e3 instanceof ReadableStreamBYOBRequest); +function fe(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_associatedReadableByteStreamController") && e5 instanceof ReadableStreamBYOBRequest); } -function be(e3) { - const t2 = function(e4) { - const t3 = e4._controlledReadableByteStream; - if ("readable" !== t3._state) return false; - if (e4._closeRequested) return false; - if (!e4._started) return false; - if (J3(t3) && X3(t3) > 0) return true; - if (Le(t3) && ze(t3) > 0) return true; - if (ke(e4) > 0) return true; +function be(e5) { + const t4 = function(e6) { + const t5 = e6._controlledReadableByteStream; + if ("readable" !== t5._state) return false; + if (e6._closeRequested) return false; + if (!e6._started) return false; + if (J3(t5) && X3(t5) > 0) return true; + if (Le(t5) && ze(t5) > 0) return true; + if (ke(e6) > 0) return true; return false; - }(e3); - if (!t2) return; - if (e3._pulling) return void (e3._pullAgain = true); - e3._pulling = true; - b2(e3._pullAlgorithm(), () => (e3._pulling = false, e3._pullAgain && (e3._pullAgain = false, be(e3)), null), (t3) => (Pe(e3, t3), null)); -} -function he(e3) { - Re(e3), e3._pendingPullIntos = new S2(); -} -function _e(e3, t2) { - let r3 = false; - "closed" === e3._state && (r3 = true); - const o3 = pe(t2); - "default" === t2.readerType ? G3(e3, o3, r3) : function(e4, t3, r4) { - const o4 = e4._reader._readIntoRequests.shift(); - r4 ? o4._closeSteps(t3) : o4._chunkSteps(t3); - }(e3, o3, r3); -} -function pe(e3) { - const t2 = e3.bytesFilled, r3 = e3.elementSize; - return new e3.viewConstructor(e3.buffer, e3.byteOffset, t2 / r3); -} -function me(e3, t2, r3, o3) { - e3._queue.push({ buffer: t2, byteOffset: r3, byteLength: o3 }), e3._queueTotalSize += o3; -} -function ye(e3, t2, r3, o3) { - let n2; + }(e5); + if (!t4) return; + if (e5._pulling) return void (e5._pullAgain = true); + e5._pulling = true; + b2(e5._pullAlgorithm(), () => (e5._pulling = false, e5._pullAgain && (e5._pullAgain = false, be(e5)), null), (t5) => (Pe(e5, t5), null)); +} +function he(e5) { + Re(e5), e5._pendingPullIntos = new S2(); +} +function _e(e5, t4) { + let r5 = false; + "closed" === e5._state && (r5 = true); + const o5 = pe(t4); + "default" === t4.readerType ? G3(e5, o5, r5) : function(e6, t5, r6) { + const o6 = e6._reader._readIntoRequests.shift(); + r6 ? o6._closeSteps(t5) : o6._chunkSteps(t5); + }(e5, o5, r5); +} +function pe(e5) { + const t4 = e5.bytesFilled, r5 = e5.elementSize; + return new e5.viewConstructor(e5.buffer, e5.byteOffset, t4 / r5); +} +function me(e5, t4, r5, o5) { + e5._queue.push({ buffer: t4, byteOffset: r5, byteLength: o5 }), e5._queueTotalSize += o5; +} +function ye(e5, t4, r5, o5) { + let n4; try { - n2 = t2.slice(r3, r3 + o3); - } catch (t3) { - throw Pe(e3, t3), t3; - } - me(e3, n2, 0, o3); -} -function ge(e3, t2) { - t2.bytesFilled > 0 && ye(e3, t2.buffer, t2.byteOffset, t2.bytesFilled), Ce(e3); -} -function we(e3, t2) { - const r3 = t2.elementSize, o3 = t2.bytesFilled - t2.bytesFilled % r3, n2 = Math.min(e3._queueTotalSize, t2.byteLength - t2.bytesFilled), a3 = t2.bytesFilled + n2, i3 = a3 - a3 % r3; - let l3 = n2, s2 = false; - i3 > o3 && (l3 = i3 - t2.bytesFilled, s2 = true); - const u3 = e3._queue; - for (; l3 > 0; ) { - const r4 = u3.peek(), o4 = Math.min(l3, r4.byteLength), n3 = t2.byteOffset + t2.bytesFilled; - ie2(t2.buffer, n3, r4.buffer, r4.byteOffset, o4), r4.byteLength === o4 ? u3.shift() : (r4.byteOffset += o4, r4.byteLength -= o4), e3._queueTotalSize -= o4, Se(e3, o4, t2), l3 -= o4; - } - return s2; -} -function Se(e3, t2, r3) { - r3.bytesFilled += t2; -} -function ve(e3) { - 0 === e3._queueTotalSize && e3._closeRequested ? (Ee(e3), Xt(e3._controlledReadableByteStream)) : be(e3); -} -function Re(e3) { - null !== e3._byobRequest && (e3._byobRequest._associatedReadableByteStreamController = void 0, e3._byobRequest._view = null, e3._byobRequest = null); -} -function Te(e3) { - for (; e3._pendingPullIntos.length > 0; ) { - if (0 === e3._queueTotalSize) return; - const t2 = e3._pendingPullIntos.peek(); - we(e3, t2) && (Ce(e3), _e(e3._controlledReadableByteStream, t2)); - } -} -function qe(e3, t2) { - const r3 = e3._pendingPullIntos.peek(); - Re(e3); - "closed" === e3._controlledReadableByteStream._state ? function(e4, t3) { - "none" === t3.readerType && Ce(e4); - const r4 = e4._controlledReadableByteStream; - if (Le(r4)) for (; ze(r4) > 0; ) _e(r4, Ce(e4)); - }(e3, r3) : function(e4, t3, r4) { - if (Se(0, t3, r4), "none" === r4.readerType) return ge(e4, r4), void Te(e4); - if (r4.bytesFilled < r4.elementSize) return; - Ce(e4); - const o3 = r4.bytesFilled % r4.elementSize; - if (o3 > 0) { - const t4 = r4.byteOffset + r4.bytesFilled; - ye(e4, r4.buffer, t4 - o3, o3); - } - r4.bytesFilled -= o3, _e(e4._controlledReadableByteStream, r4), Te(e4); - }(e3, t2, r3), be(e3); -} -function Ce(e3) { - return e3._pendingPullIntos.shift(); -} -function Ee(e3) { - e3._pullAlgorithm = void 0, e3._cancelAlgorithm = void 0; -} -function Pe(e3, t2) { - const r3 = e3._controlledReadableByteStream; - "readable" === r3._state && (he(e3), ce2(e3), Ee(e3), Jt(r3, t2)); -} -function We(e3, t2) { - const r3 = e3._queue.shift(); - e3._queueTotalSize -= r3.byteLength, ve(e3); - const o3 = new Uint8Array(r3.buffer, r3.byteOffset, r3.byteLength); - t2._chunkSteps(o3); -} -function ke(e3) { - const t2 = e3._controlledReadableByteStream._state; - return "errored" === t2 ? null : "closed" === t2 ? 0 : e3._strategyHWM - e3._queueTotalSize; -} -function Oe(e3, t2, r3) { - const o3 = Object.create(ReadableByteStreamController.prototype); - let n2, a3, i3; - n2 = void 0 !== t2.start ? () => t2.start(o3) : () => { - }, a3 = void 0 !== t2.pull ? () => t2.pull(o3) : () => c(void 0), i3 = void 0 !== t2.cancel ? (e4) => t2.cancel(e4) : () => c(void 0); - const l3 = t2.autoAllocateChunkSize; - if (0 === l3) throw new TypeError("autoAllocateChunkSize must be greater than 0"); - !function(e4, t3, r4, o4, n3, a4, i4) { - t3._controlledReadableByteStream = e4, t3._pullAgain = false, t3._pulling = false, t3._byobRequest = null, t3._queue = t3._queueTotalSize = void 0, ce2(t3), t3._closeRequested = false, t3._started = false, t3._strategyHWM = a4, t3._pullAlgorithm = o4, t3._cancelAlgorithm = n3, t3._autoAllocateChunkSize = i4, t3._pendingPullIntos = new S2(), e4._readableStreamController = t3, b2(c(r4()), () => (t3._started = true, be(t3), null), (e5) => (Pe(t3, e5), null)); - }(e3, o3, n2, a3, i3, r3, l3); -} -function Be(e3) { - return new TypeError(`ReadableStreamBYOBRequest.prototype.${e3} can only be used on a ReadableStreamBYOBRequest`); -} -function Ae(e3) { - return new TypeError(`ReadableByteStreamController.prototype.${e3} can only be used on a ReadableByteStreamController`); -} -function je(e3, t2) { - e3._reader._readIntoRequests.push(t2); -} -function ze(e3) { - return e3._reader._readIntoRequests.length; -} -function Le(e3) { - const t2 = e3._reader; - return void 0 !== t2 && !!Fe(t2); -} -function Fe(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readIntoRequests") && e3 instanceof ReadableStreamBYOBReader); -} -function Ie(e3, t2) { - const r3 = e3._readIntoRequests; - e3._readIntoRequests = new S2(), r3.forEach((e4) => { - e4._errorSteps(t2); + n4 = t4.slice(r5, r5 + o5); + } catch (t5) { + throw Pe(e5, t5), t5; + } + me(e5, n4, 0, o5); +} +function ge(e5, t4) { + t4.bytesFilled > 0 && ye(e5, t4.buffer, t4.byteOffset, t4.bytesFilled), Ce(e5); +} +function we(e5, t4) { + const r5 = t4.elementSize, o5 = t4.bytesFilled - t4.bytesFilled % r5, n4 = Math.min(e5._queueTotalSize, t4.byteLength - t4.bytesFilled), a5 = t4.bytesFilled + n4, i5 = a5 - a5 % r5; + let l5 = n4, s4 = false; + i5 > o5 && (l5 = i5 - t4.bytesFilled, s4 = true); + const u5 = e5._queue; + for (; l5 > 0; ) { + const r6 = u5.peek(), o6 = Math.min(l5, r6.byteLength), n5 = t4.byteOffset + t4.bytesFilled; + ie2(t4.buffer, n5, r6.buffer, r6.byteOffset, o6), r6.byteLength === o6 ? u5.shift() : (r6.byteOffset += o6, r6.byteLength -= o6), e5._queueTotalSize -= o6, Se(e5, o6, t4), l5 -= o6; + } + return s4; +} +function Se(e5, t4, r5) { + r5.bytesFilled += t4; +} +function ve(e5) { + 0 === e5._queueTotalSize && e5._closeRequested ? (Ee(e5), Xt(e5._controlledReadableByteStream)) : be(e5); +} +function Re(e5) { + null !== e5._byobRequest && (e5._byobRequest._associatedReadableByteStreamController = void 0, e5._byobRequest._view = null, e5._byobRequest = null); +} +function Te(e5) { + for (; e5._pendingPullIntos.length > 0; ) { + if (0 === e5._queueTotalSize) return; + const t4 = e5._pendingPullIntos.peek(); + we(e5, t4) && (Ce(e5), _e(e5._controlledReadableByteStream, t4)); + } +} +function qe(e5, t4) { + const r5 = e5._pendingPullIntos.peek(); + Re(e5); + "closed" === e5._controlledReadableByteStream._state ? function(e6, t5) { + "none" === t5.readerType && Ce(e6); + const r6 = e6._controlledReadableByteStream; + if (Le(r6)) for (; ze(r6) > 0; ) _e(r6, Ce(e6)); + }(e5, r5) : function(e6, t5, r6) { + if (Se(0, t5, r6), "none" === r6.readerType) return ge(e6, r6), void Te(e6); + if (r6.bytesFilled < r6.elementSize) return; + Ce(e6); + const o5 = r6.bytesFilled % r6.elementSize; + if (o5 > 0) { + const t6 = r6.byteOffset + r6.bytesFilled; + ye(e6, r6.buffer, t6 - o5, o5); + } + r6.bytesFilled -= o5, _e(e6._controlledReadableByteStream, r6), Te(e6); + }(e5, t4, r5), be(e5); +} +function Ce(e5) { + return e5._pendingPullIntos.shift(); +} +function Ee(e5) { + e5._pullAlgorithm = void 0, e5._cancelAlgorithm = void 0; +} +function Pe(e5, t4) { + const r5 = e5._controlledReadableByteStream; + "readable" === r5._state && (he(e5), ce2(e5), Ee(e5), Jt(r5, t4)); +} +function We(e5, t4) { + const r5 = e5._queue.shift(); + e5._queueTotalSize -= r5.byteLength, ve(e5); + const o5 = new Uint8Array(r5.buffer, r5.byteOffset, r5.byteLength); + t4._chunkSteps(o5); +} +function ke(e5) { + const t4 = e5._controlledReadableByteStream._state; + return "errored" === t4 ? null : "closed" === t4 ? 0 : e5._strategyHWM - e5._queueTotalSize; +} +function Oe(e5, t4, r5) { + const o5 = Object.create(ReadableByteStreamController.prototype); + let n4, a5, i5; + n4 = void 0 !== t4.start ? () => t4.start(o5) : () => { + }, a5 = void 0 !== t4.pull ? () => t4.pull(o5) : () => c(void 0), i5 = void 0 !== t4.cancel ? (e6) => t4.cancel(e6) : () => c(void 0); + const l5 = t4.autoAllocateChunkSize; + if (0 === l5) throw new TypeError("autoAllocateChunkSize must be greater than 0"); + !function(e6, t5, r6, o6, n5, a6, i6) { + t5._controlledReadableByteStream = e6, t5._pullAgain = false, t5._pulling = false, t5._byobRequest = null, t5._queue = t5._queueTotalSize = void 0, ce2(t5), t5._closeRequested = false, t5._started = false, t5._strategyHWM = a6, t5._pullAlgorithm = o6, t5._cancelAlgorithm = n5, t5._autoAllocateChunkSize = i6, t5._pendingPullIntos = new S2(), e6._readableStreamController = t5, b2(c(r6()), () => (t5._started = true, be(t5), null), (e7) => (Pe(t5, e7), null)); + }(e5, o5, n4, a5, i5, r5, l5); +} +function Be(e5) { + return new TypeError(`ReadableStreamBYOBRequest.prototype.${e5} can only be used on a ReadableStreamBYOBRequest`); +} +function Ae(e5) { + return new TypeError(`ReadableByteStreamController.prototype.${e5} can only be used on a ReadableByteStreamController`); +} +function je(e5, t4) { + e5._reader._readIntoRequests.push(t4); +} +function ze(e5) { + return e5._reader._readIntoRequests.length; +} +function Le(e5) { + const t4 = e5._reader; + return void 0 !== t4 && !!Fe(t4); +} +function Fe(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readIntoRequests") && e5 instanceof ReadableStreamBYOBReader); +} +function Ie(e5, t4) { + const r5 = e5._readIntoRequests; + e5._readIntoRequests = new S2(), r5.forEach((e6) => { + e6._errorSteps(t4); }); } -function De(e3) { - return new TypeError(`ReadableStreamBYOBReader.prototype.${e3} can only be used on a ReadableStreamBYOBReader`); +function De(e5) { + return new TypeError(`ReadableStreamBYOBReader.prototype.${e5} can only be used on a ReadableStreamBYOBReader`); } -function $e(e3, t2) { - const { highWaterMark: r3 } = e3; - if (void 0 === r3) return t2; - if (ae2(r3) || r3 < 0) throw new RangeError("Invalid highWaterMark"); - return r3; +function $e(e5, t4) { + const { highWaterMark: r5 } = e5; + if (void 0 === r5) return t4; + if (ae2(r5) || r5 < 0) throw new RangeError("Invalid highWaterMark"); + return r5; } -function Me(e3) { - const { size: t2 } = e3; - return t2 || (() => 1); +function Me(e5) { + const { size: t4 } = e5; + return t4 || (() => 1); } -function Ye(e3, t2) { - F2(e3, t2); - const r3 = null == e3 ? void 0 : e3.highWaterMark, o3 = null == e3 ? void 0 : e3.size; - return { highWaterMark: void 0 === r3 ? void 0 : Y2(r3), size: void 0 === o3 ? void 0 : Qe(o3, `${t2} has member 'size' that`) }; +function Ye(e5, t4) { + F2(e5, t4); + const r5 = null == e5 ? void 0 : e5.highWaterMark, o5 = null == e5 ? void 0 : e5.size; + return { highWaterMark: void 0 === r5 ? void 0 : Y2(r5), size: void 0 === o5 ? void 0 : Qe(o5, `${t4} has member 'size' that`) }; } -function Qe(e3, t2) { - return I(e3, t2), (t3) => Y2(e3(t3)); +function Qe(e5, t4) { + return I(e5, t4), (t5) => Y2(e5(t5)); } -function Ne(e3, t2, r3) { - return I(e3, r3), (r4) => w3(e3, t2, [r4]); +function Ne(e5, t4, r5) { + return I(e5, r5), (r6) => w3(e5, t4, [r6]); } -function He(e3, t2, r3) { - return I(e3, r3), () => w3(e3, t2, []); +function He(e5, t4, r5) { + return I(e5, r5), () => w3(e5, t4, []); } -function xe(e3, t2, r3) { - return I(e3, r3), (r4) => g(e3, t2, [r4]); +function xe(e5, t4, r5) { + return I(e5, r5), (r6) => g(e5, t4, [r6]); } -function Ve(e3, t2, r3) { - return I(e3, r3), (r4, o3) => w3(e3, t2, [r4, o3]); +function Ve(e5, t4, r5) { + return I(e5, r5), (r6, o5) => w3(e5, t4, [r6, o5]); } -function Ge(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_writableStreamController") && e3 instanceof WritableStream); +function Ge(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_writableStreamController") && e5 instanceof WritableStream); } -function Xe(e3) { - return void 0 !== e3._writer; +function Xe(e5) { + return void 0 !== e5._writer; } -function Je(e3, t2) { - var r3; - if ("closed" === e3._state || "errored" === e3._state) return c(void 0); - e3._writableStreamController._abortReason = t2, null === (r3 = e3._writableStreamController._abortController) || void 0 === r3 || r3.abort(t2); - const o3 = e3._state; - if ("closed" === o3 || "errored" === o3) return c(void 0); - if (void 0 !== e3._pendingAbortRequest) return e3._pendingAbortRequest._promise; - let n2 = false; - "erroring" === o3 && (n2 = true, t2 = void 0); - const a3 = u2((r4, o4) => { - e3._pendingAbortRequest = { _promise: void 0, _resolve: r4, _reject: o4, _reason: t2, _wasAlreadyErroring: n2 }; +function Je(e5, t4) { + var r5; + if ("closed" === e5._state || "errored" === e5._state) return c(void 0); + e5._writableStreamController._abortReason = t4, null === (r5 = e5._writableStreamController._abortController) || void 0 === r5 || r5.abort(t4); + const o5 = e5._state; + if ("closed" === o5 || "errored" === o5) return c(void 0); + if (void 0 !== e5._pendingAbortRequest) return e5._pendingAbortRequest._promise; + let n4 = false; + "erroring" === o5 && (n4 = true, t4 = void 0); + const a5 = u2((r6, o6) => { + e5._pendingAbortRequest = { _promise: void 0, _resolve: r6, _reject: o6, _reason: t4, _wasAlreadyErroring: n4 }; }); - return e3._pendingAbortRequest._promise = a3, n2 || et(e3, t2), a3; -} -function Ke(e3) { - const t2 = e3._state; - if ("closed" === t2 || "errored" === t2) return d4(new TypeError(`The stream (in ${t2} state) is not in the writable state and cannot be closed`)); - const r3 = u2((t3, r4) => { - const o4 = { _resolve: t3, _reject: r4 }; - e3._closeRequest = o4; - }), o3 = e3._writer; - var n2; - return void 0 !== o3 && e3._backpressure && "writable" === t2 && Et(o3), ue2(n2 = e3._writableStreamController, lt, 0), dt(n2), r3; -} -function Ze(e3, t2) { - "writable" !== e3._state ? tt(e3) : et(e3, t2); -} -function et(e3, t2) { - const r3 = e3._writableStreamController; - e3._state = "erroring", e3._storedError = t2; - const o3 = e3._writer; - void 0 !== o3 && it(o3, t2), !function(e4) { - if (void 0 === e4._inFlightWriteRequest && void 0 === e4._inFlightCloseRequest) return false; + return e5._pendingAbortRequest._promise = a5, n4 || et(e5, t4), a5; +} +function Ke(e5) { + const t4 = e5._state; + if ("closed" === t4 || "errored" === t4) return d4(new TypeError(`The stream (in ${t4} state) is not in the writable state and cannot be closed`)); + const r5 = u2((t5, r6) => { + const o6 = { _resolve: t5, _reject: r6 }; + e5._closeRequest = o6; + }), o5 = e5._writer; + var n4; + return void 0 !== o5 && e5._backpressure && "writable" === t4 && Et(o5), ue2(n4 = e5._writableStreamController, lt, 0), dt(n4), r5; +} +function Ze(e5, t4) { + "writable" !== e5._state ? tt(e5) : et(e5, t4); +} +function et(e5, t4) { + const r5 = e5._writableStreamController; + e5._state = "erroring", e5._storedError = t4; + const o5 = e5._writer; + void 0 !== o5 && it(o5, t4), !function(e6) { + if (void 0 === e6._inFlightWriteRequest && void 0 === e6._inFlightCloseRequest) return false; return true; - }(e3) && r3._started && tt(e3); -} -function tt(e3) { - e3._state = "errored", e3._writableStreamController[R2](); - const t2 = e3._storedError; - if (e3._writeRequests.forEach((e4) => { - e4._reject(t2); - }), e3._writeRequests = new S2(), void 0 === e3._pendingAbortRequest) return void ot(e3); - const r3 = e3._pendingAbortRequest; - if (e3._pendingAbortRequest = void 0, r3._wasAlreadyErroring) return r3._reject(t2), void ot(e3); - b2(e3._writableStreamController[v](r3._reason), () => (r3._resolve(), ot(e3), null), (t3) => (r3._reject(t3), ot(e3), null)); -} -function rt(e3) { - return void 0 !== e3._closeRequest || void 0 !== e3._inFlightCloseRequest; -} -function ot(e3) { - void 0 !== e3._closeRequest && (e3._closeRequest._reject(e3._storedError), e3._closeRequest = void 0); - const t2 = e3._writer; - void 0 !== t2 && St(t2, e3._storedError); -} -function nt(e3, t2) { - const r3 = e3._writer; - void 0 !== r3 && t2 !== e3._backpressure && (t2 ? function(e4) { - Rt(e4); - }(r3) : Et(r3)), e3._backpressure = t2; -} -function at(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_ownerWritableStream") && e3 instanceof WritableStreamDefaultWriter); -} -function it(e3, t2) { - "pending" === e3._readyPromiseState ? Ct(e3, t2) : function(e4, t3) { - Tt(e4, t3); - }(e3, t2); -} -function st(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledWritableStream") && e3 instanceof WritableStreamDefaultController); -} -function ut(e3) { - e3._writeAlgorithm = void 0, e3._closeAlgorithm = void 0, e3._abortAlgorithm = void 0, e3._strategySizeAlgorithm = void 0; -} -function ct(e3) { - return e3._strategyHWM - e3._queueTotalSize; -} -function dt(e3) { - const t2 = e3._controlledWritableStream; - if (!e3._started) return; - if (void 0 !== t2._inFlightWriteRequest) return; - if ("erroring" === t2._state) return void tt(t2); - if (0 === e3._queue.length) return; - const r3 = e3._queue.peek().value; - r3 === lt ? function(e4) { - const t3 = e4._controlledWritableStream; - (function(e5) { - e5._inFlightCloseRequest = e5._closeRequest, e5._closeRequest = void 0; - })(t3), se(e4); - const r4 = e4._closeAlgorithm(); - ut(e4), b2(r4, () => (function(e5) { - e5._inFlightCloseRequest._resolve(void 0), e5._inFlightCloseRequest = void 0, "erroring" === e5._state && (e5._storedError = void 0, void 0 !== e5._pendingAbortRequest && (e5._pendingAbortRequest._resolve(), e5._pendingAbortRequest = void 0)), e5._state = "closed"; - const t4 = e5._writer; - void 0 !== t4 && vt(t4); - }(t3), null), (e5) => (function(e6, t4) { - e6._inFlightCloseRequest._reject(t4), e6._inFlightCloseRequest = void 0, void 0 !== e6._pendingAbortRequest && (e6._pendingAbortRequest._reject(t4), e6._pendingAbortRequest = void 0), Ze(e6, t4); - }(t3, e5), null)); - }(e3) : function(e4, t3) { - const r4 = e4._controlledWritableStream; - !function(e5) { - e5._inFlightWriteRequest = e5._writeRequests.shift(); - }(r4); - b2(e4._writeAlgorithm(t3), () => { - !function(e5) { - e5._inFlightWriteRequest._resolve(void 0), e5._inFlightWriteRequest = void 0; - }(r4); - const t4 = r4._state; - if (se(e4), !rt(r4) && "writable" === t4) { - const t5 = bt(e4); - nt(r4, t5); - } - return dt(e4), null; - }, (t4) => ("writable" === r4._state && ut(e4), function(e5, t5) { - e5._inFlightWriteRequest._reject(t5), e5._inFlightWriteRequest = void 0, Ze(e5, t5); - }(r4, t4), null)); - }(e3, r3); -} -function ft(e3, t2) { - "writable" === e3._controlledWritableStream._state && ht(e3, t2); -} -function bt(e3) { - return ct(e3) <= 0; -} -function ht(e3, t2) { - const r3 = e3._controlledWritableStream; - ut(e3), et(r3, t2); -} -function _t(e3) { - return new TypeError(`WritableStream.prototype.${e3} can only be used on a WritableStream`); -} -function pt(e3) { - return new TypeError(`WritableStreamDefaultController.prototype.${e3} can only be used on a WritableStreamDefaultController`); -} -function mt(e3) { - return new TypeError(`WritableStreamDefaultWriter.prototype.${e3} can only be used on a WritableStreamDefaultWriter`); -} -function yt(e3) { - return new TypeError("Cannot " + e3 + " a stream using a released writer"); -} -function gt(e3) { - e3._closedPromise = u2((t2, r3) => { - e3._closedPromise_resolve = t2, e3._closedPromise_reject = r3, e3._closedPromiseState = "pending"; + }(e5) && r5._started && tt(e5); +} +function tt(e5) { + e5._state = "errored", e5._writableStreamController[R2](); + const t4 = e5._storedError; + if (e5._writeRequests.forEach((e6) => { + e6._reject(t4); + }), e5._writeRequests = new S2(), void 0 === e5._pendingAbortRequest) return void ot(e5); + const r5 = e5._pendingAbortRequest; + if (e5._pendingAbortRequest = void 0, r5._wasAlreadyErroring) return r5._reject(t4), void ot(e5); + b2(e5._writableStreamController[v](r5._reason), () => (r5._resolve(), ot(e5), null), (t5) => (r5._reject(t5), ot(e5), null)); +} +function rt(e5) { + return void 0 !== e5._closeRequest || void 0 !== e5._inFlightCloseRequest; +} +function ot(e5) { + void 0 !== e5._closeRequest && (e5._closeRequest._reject(e5._storedError), e5._closeRequest = void 0); + const t4 = e5._writer; + void 0 !== t4 && St(t4, e5._storedError); +} +function nt(e5, t4) { + const r5 = e5._writer; + void 0 !== r5 && t4 !== e5._backpressure && (t4 ? function(e6) { + Rt(e6); + }(r5) : Et(r5)), e5._backpressure = t4; +} +function at(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_ownerWritableStream") && e5 instanceof WritableStreamDefaultWriter); +} +function it(e5, t4) { + "pending" === e5._readyPromiseState ? Ct(e5, t4) : function(e6, t5) { + Tt(e6, t5); + }(e5, t4); +} +function st(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledWritableStream") && e5 instanceof WritableStreamDefaultController); +} +function ut(e5) { + e5._writeAlgorithm = void 0, e5._closeAlgorithm = void 0, e5._abortAlgorithm = void 0, e5._strategySizeAlgorithm = void 0; +} +function ct(e5) { + return e5._strategyHWM - e5._queueTotalSize; +} +function dt(e5) { + const t4 = e5._controlledWritableStream; + if (!e5._started) return; + if (void 0 !== t4._inFlightWriteRequest) return; + if ("erroring" === t4._state) return void tt(t4); + if (0 === e5._queue.length) return; + const r5 = e5._queue.peek().value; + r5 === lt ? function(e6) { + const t5 = e6._controlledWritableStream; + (function(e7) { + e7._inFlightCloseRequest = e7._closeRequest, e7._closeRequest = void 0; + })(t5), se(e6); + const r6 = e6._closeAlgorithm(); + ut(e6), b2(r6, () => (function(e7) { + e7._inFlightCloseRequest._resolve(void 0), e7._inFlightCloseRequest = void 0, "erroring" === e7._state && (e7._storedError = void 0, void 0 !== e7._pendingAbortRequest && (e7._pendingAbortRequest._resolve(), e7._pendingAbortRequest = void 0)), e7._state = "closed"; + const t6 = e7._writer; + void 0 !== t6 && vt(t6); + }(t5), null), (e7) => (function(e8, t6) { + e8._inFlightCloseRequest._reject(t6), e8._inFlightCloseRequest = void 0, void 0 !== e8._pendingAbortRequest && (e8._pendingAbortRequest._reject(t6), e8._pendingAbortRequest = void 0), Ze(e8, t6); + }(t5, e7), null)); + }(e5) : function(e6, t5) { + const r6 = e6._controlledWritableStream; + !function(e7) { + e7._inFlightWriteRequest = e7._writeRequests.shift(); + }(r6); + b2(e6._writeAlgorithm(t5), () => { + !function(e7) { + e7._inFlightWriteRequest._resolve(void 0), e7._inFlightWriteRequest = void 0; + }(r6); + const t6 = r6._state; + if (se(e6), !rt(r6) && "writable" === t6) { + const t7 = bt(e6); + nt(r6, t7); + } + return dt(e6), null; + }, (t6) => ("writable" === r6._state && ut(e6), function(e7, t7) { + e7._inFlightWriteRequest._reject(t7), e7._inFlightWriteRequest = void 0, Ze(e7, t7); + }(r6, t6), null)); + }(e5, r5); +} +function ft(e5, t4) { + "writable" === e5._controlledWritableStream._state && ht(e5, t4); +} +function bt(e5) { + return ct(e5) <= 0; +} +function ht(e5, t4) { + const r5 = e5._controlledWritableStream; + ut(e5), et(r5, t4); +} +function _t(e5) { + return new TypeError(`WritableStream.prototype.${e5} can only be used on a WritableStream`); +} +function pt(e5) { + return new TypeError(`WritableStreamDefaultController.prototype.${e5} can only be used on a WritableStreamDefaultController`); +} +function mt(e5) { + return new TypeError(`WritableStreamDefaultWriter.prototype.${e5} can only be used on a WritableStreamDefaultWriter`); +} +function yt(e5) { + return new TypeError("Cannot " + e5 + " a stream using a released writer"); +} +function gt(e5) { + e5._closedPromise = u2((t4, r5) => { + e5._closedPromise_resolve = t4, e5._closedPromise_reject = r5, e5._closedPromiseState = "pending"; }); } -function wt(e3, t2) { - gt(e3), St(e3, t2); +function wt(e5, t4) { + gt(e5), St(e5, t4); } -function St(e3, t2) { - void 0 !== e3._closedPromise_reject && (m3(e3._closedPromise), e3._closedPromise_reject(t2), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0, e3._closedPromiseState = "rejected"); +function St(e5, t4) { + void 0 !== e5._closedPromise_reject && (m3(e5._closedPromise), e5._closedPromise_reject(t4), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0, e5._closedPromiseState = "rejected"); } -function vt(e3) { - void 0 !== e3._closedPromise_resolve && (e3._closedPromise_resolve(void 0), e3._closedPromise_resolve = void 0, e3._closedPromise_reject = void 0, e3._closedPromiseState = "resolved"); +function vt(e5) { + void 0 !== e5._closedPromise_resolve && (e5._closedPromise_resolve(void 0), e5._closedPromise_resolve = void 0, e5._closedPromise_reject = void 0, e5._closedPromiseState = "resolved"); } -function Rt(e3) { - e3._readyPromise = u2((t2, r3) => { - e3._readyPromise_resolve = t2, e3._readyPromise_reject = r3; - }), e3._readyPromiseState = "pending"; +function Rt(e5) { + e5._readyPromise = u2((t4, r5) => { + e5._readyPromise_resolve = t4, e5._readyPromise_reject = r5; + }), e5._readyPromiseState = "pending"; } -function Tt(e3, t2) { - Rt(e3), Ct(e3, t2); +function Tt(e5, t4) { + Rt(e5), Ct(e5, t4); } -function qt(e3) { - Rt(e3), Et(e3); +function qt(e5) { + Rt(e5), Et(e5); } -function Ct(e3, t2) { - void 0 !== e3._readyPromise_reject && (m3(e3._readyPromise), e3._readyPromise_reject(t2), e3._readyPromise_resolve = void 0, e3._readyPromise_reject = void 0, e3._readyPromiseState = "rejected"); +function Ct(e5, t4) { + void 0 !== e5._readyPromise_reject && (m3(e5._readyPromise), e5._readyPromise_reject(t4), e5._readyPromise_resolve = void 0, e5._readyPromise_reject = void 0, e5._readyPromiseState = "rejected"); } -function Et(e3) { - void 0 !== e3._readyPromise_resolve && (e3._readyPromise_resolve(void 0), e3._readyPromise_resolve = void 0, e3._readyPromise_reject = void 0, e3._readyPromiseState = "fulfilled"); +function Et(e5) { + void 0 !== e5._readyPromise_resolve && (e5._readyPromise_resolve(void 0), e5._readyPromise_resolve = void 0, e5._readyPromise_reject = void 0, e5._readyPromiseState = "fulfilled"); } -function kt(e3, t2, r3, o3, n2, a3) { - const i3 = e3.getReader(), l3 = t2.getWriter(); - Vt(e3) && (e3._disturbed = true); - let s2, _3, g2, w4 = false, S3 = false, v2 = "readable", R3 = "writable", T3 = false, q3 = false; - const C3 = u2((e4) => { - g2 = e4; +function kt(e5, t4, r5, o5, n4, a5) { + const i5 = e5.getReader(), l5 = t4.getWriter(); + Vt(e5) && (e5._disturbed = true); + let s4, _4, g4, w6 = false, S3 = false, v7 = "readable", R3 = "writable", T3 = false, q5 = false; + const C4 = u2((e6) => { + g4 = e6; }); - let E3 = Promise.resolve(void 0); + let E4 = Promise.resolve(void 0); return u2((P3, W4) => { - let k4; + let k6; function O3() { - if (w4) return; - const e4 = u2((e5, t3) => { - !function r4(o4) { - o4 ? e5() : f3(function() { - if (w4) return c(true); - return f3(l3.ready, () => f3(i3.read(), (e6) => !!e6.done || (E3 = l3.write(e6.value), m3(E3), false))); - }(), r4, t3); + if (w6) return; + const e6 = u2((e7, t5) => { + !function r6(o6) { + o6 ? e7() : f3(function() { + if (w6) return c(true); + return f3(l5.ready, () => f3(i5.read(), (e8) => !!e8.done || (E4 = l5.write(e8.value), m3(E4), false))); + }(), r6, t5); }(false); }); - m3(e4); + m3(e6); } - function B2() { - return v2 = "closed", r3 ? L4() : z3(() => (Ge(t2) && (T3 = rt(t2), R3 = t2._state), T3 || "closed" === R3 ? c(void 0) : "erroring" === R3 || "errored" === R3 ? d4(_3) : (T3 = true, l3.close())), false, void 0), null; + function B3() { + return v7 = "closed", r5 ? L4() : z4(() => (Ge(t4) && (T3 = rt(t4), R3 = t4._state), T3 || "closed" === R3 ? c(void 0) : "erroring" === R3 || "errored" === R3 ? d4(_4) : (T3 = true, l5.close())), false, void 0), null; } - function A3(e4) { - return w4 || (v2 = "errored", s2 = e4, o3 ? L4(true, e4) : z3(() => l3.abort(e4), true, e4)), null; + function A4(e6) { + return w6 || (v7 = "errored", s4 = e6, o5 ? L4(true, e6) : z4(() => l5.abort(e6), true, e6)), null; } - function j4(e4) { - return S3 || (R3 = "errored", _3 = e4, n2 ? L4(true, e4) : z3(() => i3.cancel(e4), true, e4)), null; + function j6(e6) { + return S3 || (R3 = "errored", _4 = e6, n4 ? L4(true, e6) : z4(() => i5.cancel(e6), true, e6)), null; } - if (void 0 !== a3 && (k4 = () => { - const e4 = void 0 !== a3.reason ? a3.reason : new Wt("Aborted", "AbortError"), t3 = []; - o3 || t3.push(() => "writable" === R3 ? l3.abort(e4) : c(void 0)), n2 || t3.push(() => "readable" === v2 ? i3.cancel(e4) : c(void 0)), z3(() => Promise.all(t3.map((e5) => e5())), true, e4); - }, a3.aborted ? k4() : a3.addEventListener("abort", k4)), Vt(e3) && (v2 = e3._state, s2 = e3._storedError), Ge(t2) && (R3 = t2._state, _3 = t2._storedError, T3 = rt(t2)), Vt(e3) && Ge(t2) && (q3 = true, g2()), "errored" === v2) A3(s2); - else if ("erroring" === R3 || "errored" === R3) j4(_3); - else if ("closed" === v2) B2(); + if (void 0 !== a5 && (k6 = () => { + const e6 = void 0 !== a5.reason ? a5.reason : new Wt("Aborted", "AbortError"), t5 = []; + o5 || t5.push(() => "writable" === R3 ? l5.abort(e6) : c(void 0)), n4 || t5.push(() => "readable" === v7 ? i5.cancel(e6) : c(void 0)), z4(() => Promise.all(t5.map((e7) => e7())), true, e6); + }, a5.aborted ? k6() : a5.addEventListener("abort", k6)), Vt(e5) && (v7 = e5._state, s4 = e5._storedError), Ge(t4) && (R3 = t4._state, _4 = t4._storedError, T3 = rt(t4)), Vt(e5) && Ge(t4) && (q5 = true, g4()), "errored" === v7) A4(s4); + else if ("erroring" === R3 || "errored" === R3) j6(_4); + else if ("closed" === v7) B3(); else if (T3 || "closed" === R3) { - const e4 = new TypeError("the destination writable stream closed before all data could be piped to it"); - n2 ? L4(true, e4) : z3(() => i3.cancel(e4), true, e4); - } - function z3(e4, t3, r4) { - function o4() { - return "writable" !== R3 || T3 ? n3() : h2(function() { - let e5; - return c(function t4() { - if (e5 !== E3) return e5 = E3, p2(E3, t4, t4); + const e6 = new TypeError("the destination writable stream closed before all data could be piped to it"); + n4 ? L4(true, e6) : z4(() => i5.cancel(e6), true, e6); + } + function z4(e6, t5, r6) { + function o6() { + return "writable" !== R3 || T3 ? n5() : h2(function() { + let e7; + return c(function t6() { + if (e7 !== E4) return e7 = E4, p2(E4, t6, t6); }()); - }(), n3), null; + }(), n5), null; } - function n3() { - return e4 ? b2(e4(), () => F3(t3, r4), (e5) => F3(true, e5)) : F3(t3, r4), null; + function n5() { + return e6 ? b2(e6(), () => F4(t5, r6), (e7) => F4(true, e7)) : F4(t5, r6), null; } - w4 || (w4 = true, q3 ? o4() : h2(C3, o4)); + w6 || (w6 = true, q5 ? o6() : h2(C4, o6)); } - function L4(e4, t3) { - z3(void 0, e4, t3); + function L4(e6, t5) { + z4(void 0, e6, t5); } - function F3(e4, t3) { - return S3 = true, l3.releaseLock(), i3.releaseLock(), void 0 !== a3 && a3.removeEventListener("abort", k4), e4 ? W4(t3) : P3(void 0), null; + function F4(e6, t5) { + return S3 = true, l5.releaseLock(), i5.releaseLock(), void 0 !== a5 && a5.removeEventListener("abort", k6), e6 ? W4(t5) : P3(void 0), null; } - w4 || (b2(i3.closed, B2, A3), b2(l3.closed, function() { + w6 || (b2(i5.closed, B3, A4), b2(l5.closed, function() { return S3 || (R3 = "closed"), null; - }, j4)), q3 ? O3() : y3(() => { - q3 = true, g2(), O3(); + }, j6)), q5 ? O3() : y3(() => { + q5 = true, g4(), O3(); }); }); } -function Ot(e3, t2) { - return function(e4) { +function Ot(e5, t4) { + return function(e6) { try { - return e4.getReader({ mode: "byob" }).releaseLock(), true; - } catch (e5) { + return e6.getReader({ mode: "byob" }).releaseLock(), true; + } catch (e7) { return false; } - }(e3) ? function(e4) { - let t3, r3, o3, n2, a3, i3 = e4.getReader(), l3 = false, s2 = false, d5 = false, f4 = false, h3 = false, p3 = false; - const m4 = u2((e5) => { - a3 = e5; - }); - function y4(e5) { - _2(e5.closed, (t4) => (e5 !== i3 || (o3.error(t4), n2.error(t4), h3 && p3 || a3(void 0)), null)); - } - function g2() { - l3 && (i3.releaseLock(), i3 = e4.getReader(), y4(i3), l3 = false), b2(i3.read(), (e5) => { - var t4, r4; - if (d5 = false, f4 = false, e5.done) return h3 || o3.close(), p3 || n2.close(), null === (t4 = o3.byobRequest) || void 0 === t4 || t4.respond(0), null === (r4 = n2.byobRequest) || void 0 === r4 || r4.respond(0), h3 && p3 || a3(void 0), null; - const l4 = e5.value, u3 = l4; - let c2 = l4; - if (!h3 && !p3) try { - c2 = le2(l4); - } catch (e6) { - return o3.error(e6), n2.error(e6), a3(i3.cancel(e6)), null; - } - return h3 || o3.enqueue(u3), p3 || n2.enqueue(c2), s2 = false, d5 ? S3() : f4 && v2(), null; - }, () => (s2 = false, null)); - } - function w4(t4, r4) { - l3 || (i3.releaseLock(), i3 = e4.getReader({ mode: "byob" }), y4(i3), l3 = true); - const u3 = r4 ? n2 : o3, c2 = r4 ? o3 : n2; - b2(i3.read(t4), (e5) => { - var t5; - d5 = false, f4 = false; - const o4 = r4 ? p3 : h3, n3 = r4 ? h3 : p3; - if (e5.done) { - o4 || u3.close(), n3 || c2.close(); - const r5 = e5.value; - return void 0 !== r5 && (o4 || u3.byobRequest.respondWithNewView(r5), n3 || null === (t5 = c2.byobRequest) || void 0 === t5 || t5.respond(0)), o4 && n3 || a3(void 0), null; - } - const l4 = e5.value; - if (n3) o4 || u3.byobRequest.respondWithNewView(l4); + }(e5) ? function(e6) { + let t5, r5, o5, n4, a5, i5 = e6.getReader(), l5 = false, s4 = false, d7 = false, f6 = false, h5 = false, p5 = false; + const m6 = u2((e7) => { + a5 = e7; + }); + function y5(e7) { + _2(e7.closed, (t6) => (e7 !== i5 || (o5.error(t6), n4.error(t6), h5 && p5 || a5(void 0)), null)); + } + function g4() { + l5 && (i5.releaseLock(), i5 = e6.getReader(), y5(i5), l5 = false), b2(i5.read(), (e7) => { + var t6, r6; + if (d7 = false, f6 = false, e7.done) return h5 || o5.close(), p5 || n4.close(), null === (t6 = o5.byobRequest) || void 0 === t6 || t6.respond(0), null === (r6 = n4.byobRequest) || void 0 === r6 || r6.respond(0), h5 && p5 || a5(void 0), null; + const l6 = e7.value, u5 = l6; + let c4 = l6; + if (!h5 && !p5) try { + c4 = le2(l6); + } catch (e8) { + return o5.error(e8), n4.error(e8), a5(i5.cancel(e8)), null; + } + return h5 || o5.enqueue(u5), p5 || n4.enqueue(c4), s4 = false, d7 ? S3() : f6 && v7(), null; + }, () => (s4 = false, null)); + } + function w6(t6, r6) { + l5 || (i5.releaseLock(), i5 = e6.getReader({ mode: "byob" }), y5(i5), l5 = true); + const u5 = r6 ? n4 : o5, c4 = r6 ? o5 : n4; + b2(i5.read(t6), (e7) => { + var t7; + d7 = false, f6 = false; + const o6 = r6 ? p5 : h5, n5 = r6 ? h5 : p5; + if (e7.done) { + o6 || u5.close(), n5 || c4.close(); + const r7 = e7.value; + return void 0 !== r7 && (o6 || u5.byobRequest.respondWithNewView(r7), n5 || null === (t7 = c4.byobRequest) || void 0 === t7 || t7.respond(0)), o6 && n5 || a5(void 0), null; + } + const l6 = e7.value; + if (n5) o6 || u5.byobRequest.respondWithNewView(l6); else { - let e6; + let e8; try { - e6 = le2(l4); - } catch (e7) { - return u3.error(e7), c2.error(e7), a3(i3.cancel(e7)), null; + e8 = le2(l6); + } catch (e9) { + return u5.error(e9), c4.error(e9), a5(i5.cancel(e9)), null; } - o4 || u3.byobRequest.respondWithNewView(l4), c2.enqueue(e6); + o6 || u5.byobRequest.respondWithNewView(l6), c4.enqueue(e8); } - return s2 = false, d5 ? S3() : f4 && v2(), null; - }, () => (s2 = false, null)); + return s4 = false, d7 ? S3() : f6 && v7(), null; + }, () => (s4 = false, null)); } function S3() { - if (s2) return d5 = true, c(void 0); - s2 = true; - const e5 = o3.byobRequest; - return null === e5 ? g2() : w4(e5.view, false), c(void 0); - } - function v2() { - if (s2) return f4 = true, c(void 0); - s2 = true; - const e5 = n2.byobRequest; - return null === e5 ? g2() : w4(e5.view, true), c(void 0); - } - function R3(e5) { - if (h3 = true, t3 = e5, p3) { - const e6 = [t3, r3], o4 = i3.cancel(e6); - a3(o4); - } - return m4; - } - function T3(e5) { - if (p3 = true, r3 = e5, h3) { - const e6 = [t3, r3], o4 = i3.cancel(e6); - a3(o4); - } - return m4; - } - const q3 = new ReadableStream3({ type: "bytes", start(e5) { - o3 = e5; - }, pull: S3, cancel: R3 }), C3 = new ReadableStream3({ type: "bytes", start(e5) { - n2 = e5; - }, pull: v2, cancel: T3 }); - return y4(i3), [q3, C3]; - }(e3) : function(e4, t3) { - const r3 = e4.getReader(); - let o3, n2, a3, i3, l3, s2 = false, d5 = false, f4 = false, h3 = false; - const p3 = u2((e5) => { - l3 = e5; - }); - function m4() { - return s2 ? (d5 = true, c(void 0)) : (s2 = true, b2(r3.read(), (e5) => { - if (d5 = false, e5.done) return f4 || a3.close(), h3 || i3.close(), f4 && h3 || l3(void 0), null; - const t4 = e5.value, r4 = t4, o4 = t4; - return f4 || a3.enqueue(r4), h3 || i3.enqueue(o4), s2 = false, d5 && m4(), null; - }, () => (s2 = false, null)), c(void 0)); - } - function y4(e5) { - if (f4 = true, o3 = e5, h3) { - const e6 = [o3, n2], t4 = r3.cancel(e6); - l3(t4); - } - return p3; - } - function g2(e5) { - if (h3 = true, n2 = e5, f4) { - const e6 = [o3, n2], t4 = r3.cancel(e6); - l3(t4); - } - return p3; - } - const w4 = new ReadableStream3({ start(e5) { - a3 = e5; - }, pull: m4, cancel: y4 }), S3 = new ReadableStream3({ start(e5) { - i3 = e5; - }, pull: m4, cancel: g2 }); - return _2(r3.closed, (e5) => (a3.error(e5), i3.error(e5), f4 && h3 || l3(void 0), null)), [w4, S3]; - }(e3); -} -function Bt(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledReadableStream") && e3 instanceof ReadableStreamDefaultController); -} -function At(e3) { - const t2 = function(e4) { - const t3 = e4._controlledReadableStream; - if (!Ft(e4)) return false; - if (!e4._started) return false; - if (Ut(t3) && X3(t3) > 0) return true; - if (Lt(e4) > 0) return true; + if (s4) return d7 = true, c(void 0); + s4 = true; + const e7 = o5.byobRequest; + return null === e7 ? g4() : w6(e7.view, false), c(void 0); + } + function v7() { + if (s4) return f6 = true, c(void 0); + s4 = true; + const e7 = n4.byobRequest; + return null === e7 ? g4() : w6(e7.view, true), c(void 0); + } + function R3(e7) { + if (h5 = true, t5 = e7, p5) { + const e8 = [t5, r5], o6 = i5.cancel(e8); + a5(o6); + } + return m6; + } + function T3(e7) { + if (p5 = true, r5 = e7, h5) { + const e8 = [t5, r5], o6 = i5.cancel(e8); + a5(o6); + } + return m6; + } + const q5 = new ReadableStream3({ type: "bytes", start(e7) { + o5 = e7; + }, pull: S3, cancel: R3 }), C4 = new ReadableStream3({ type: "bytes", start(e7) { + n4 = e7; + }, pull: v7, cancel: T3 }); + return y5(i5), [q5, C4]; + }(e5) : function(e6, t5) { + const r5 = e6.getReader(); + let o5, n4, a5, i5, l5, s4 = false, d7 = false, f6 = false, h5 = false; + const p5 = u2((e7) => { + l5 = e7; + }); + function m6() { + return s4 ? (d7 = true, c(void 0)) : (s4 = true, b2(r5.read(), (e7) => { + if (d7 = false, e7.done) return f6 || a5.close(), h5 || i5.close(), f6 && h5 || l5(void 0), null; + const t6 = e7.value, r6 = t6, o6 = t6; + return f6 || a5.enqueue(r6), h5 || i5.enqueue(o6), s4 = false, d7 && m6(), null; + }, () => (s4 = false, null)), c(void 0)); + } + function y5(e7) { + if (f6 = true, o5 = e7, h5) { + const e8 = [o5, n4], t6 = r5.cancel(e8); + l5(t6); + } + return p5; + } + function g4(e7) { + if (h5 = true, n4 = e7, f6) { + const e8 = [o5, n4], t6 = r5.cancel(e8); + l5(t6); + } + return p5; + } + const w6 = new ReadableStream3({ start(e7) { + a5 = e7; + }, pull: m6, cancel: y5 }), S3 = new ReadableStream3({ start(e7) { + i5 = e7; + }, pull: m6, cancel: g4 }); + return _2(r5.closed, (e7) => (a5.error(e7), i5.error(e7), f6 && h5 || l5(void 0), null)), [w6, S3]; + }(e5); +} +function Bt(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledReadableStream") && e5 instanceof ReadableStreamDefaultController); +} +function At(e5) { + const t4 = function(e6) { + const t5 = e6._controlledReadableStream; + if (!Ft(e6)) return false; + if (!e6._started) return false; + if (Ut(t5) && X3(t5) > 0) return true; + if (Lt(e6) > 0) return true; return false; - }(e3); - if (!t2) return; - if (e3._pulling) return void (e3._pullAgain = true); - e3._pulling = true; - b2(e3._pullAlgorithm(), () => (e3._pulling = false, e3._pullAgain && (e3._pullAgain = false, At(e3)), null), (t3) => (zt(e3, t3), null)); -} -function jt(e3) { - e3._pullAlgorithm = void 0, e3._cancelAlgorithm = void 0, e3._strategySizeAlgorithm = void 0; -} -function zt(e3, t2) { - const r3 = e3._controlledReadableStream; - "readable" === r3._state && (ce2(e3), jt(e3), Jt(r3, t2)); -} -function Lt(e3) { - const t2 = e3._controlledReadableStream._state; - return "errored" === t2 ? null : "closed" === t2 ? 0 : e3._strategyHWM - e3._queueTotalSize; -} -function Ft(e3) { - return !e3._closeRequested && "readable" === e3._controlledReadableStream._state; -} -function It(e3, t2, r3, o3) { - const n2 = Object.create(ReadableStreamDefaultController.prototype); - let a3, i3, l3; - a3 = void 0 !== t2.start ? () => t2.start(n2) : () => { - }, i3 = void 0 !== t2.pull ? () => t2.pull(n2) : () => c(void 0), l3 = void 0 !== t2.cancel ? (e4) => t2.cancel(e4) : () => c(void 0), function(e4, t3, r4, o4, n3, a4, i4) { - t3._controlledReadableStream = e4, t3._queue = void 0, t3._queueTotalSize = void 0, ce2(t3), t3._started = false, t3._closeRequested = false, t3._pullAgain = false, t3._pulling = false, t3._strategySizeAlgorithm = i4, t3._strategyHWM = a4, t3._pullAlgorithm = o4, t3._cancelAlgorithm = n3, e4._readableStreamController = t3, b2(c(r4()), () => (t3._started = true, At(t3), null), (e5) => (zt(t3, e5), null)); - }(e3, n2, a3, i3, l3, r3, o3); -} -function Dt(e3) { - return new TypeError(`ReadableStreamDefaultController.prototype.${e3} can only be used on a ReadableStreamDefaultController`); -} -function $t(e3, t2, r3) { - return I(e3, r3), (r4) => w3(e3, t2, [r4]); -} -function Mt(e3, t2, r3) { - return I(e3, r3), (r4) => w3(e3, t2, [r4]); -} -function Yt(e3, t2, r3) { - return I(e3, r3), (r4) => g(e3, t2, [r4]); -} -function Qt(e3, t2) { - if ("bytes" !== (e3 = `${e3}`)) throw new TypeError(`${t2} '${e3}' is not a valid enumeration value for ReadableStreamType`); - return e3; -} -function Nt(e3, t2) { - if ("byob" !== (e3 = `${e3}`)) throw new TypeError(`${t2} '${e3}' is not a valid enumeration value for ReadableStreamReaderMode`); - return e3; -} -function Ht(e3, t2) { - F2(e3, t2); - const r3 = null == e3 ? void 0 : e3.preventAbort, o3 = null == e3 ? void 0 : e3.preventCancel, n2 = null == e3 ? void 0 : e3.preventClose, a3 = null == e3 ? void 0 : e3.signal; - return void 0 !== a3 && function(e4, t3) { - if (!function(e5) { - if ("object" != typeof e5 || null === e5) return false; + }(e5); + if (!t4) return; + if (e5._pulling) return void (e5._pullAgain = true); + e5._pulling = true; + b2(e5._pullAlgorithm(), () => (e5._pulling = false, e5._pullAgain && (e5._pullAgain = false, At(e5)), null), (t5) => (zt(e5, t5), null)); +} +function jt(e5) { + e5._pullAlgorithm = void 0, e5._cancelAlgorithm = void 0, e5._strategySizeAlgorithm = void 0; +} +function zt(e5, t4) { + const r5 = e5._controlledReadableStream; + "readable" === r5._state && (ce2(e5), jt(e5), Jt(r5, t4)); +} +function Lt(e5) { + const t4 = e5._controlledReadableStream._state; + return "errored" === t4 ? null : "closed" === t4 ? 0 : e5._strategyHWM - e5._queueTotalSize; +} +function Ft(e5) { + return !e5._closeRequested && "readable" === e5._controlledReadableStream._state; +} +function It(e5, t4, r5, o5) { + const n4 = Object.create(ReadableStreamDefaultController.prototype); + let a5, i5, l5; + a5 = void 0 !== t4.start ? () => t4.start(n4) : () => { + }, i5 = void 0 !== t4.pull ? () => t4.pull(n4) : () => c(void 0), l5 = void 0 !== t4.cancel ? (e6) => t4.cancel(e6) : () => c(void 0), function(e6, t5, r6, o6, n5, a6, i6) { + t5._controlledReadableStream = e6, t5._queue = void 0, t5._queueTotalSize = void 0, ce2(t5), t5._started = false, t5._closeRequested = false, t5._pullAgain = false, t5._pulling = false, t5._strategySizeAlgorithm = i6, t5._strategyHWM = a6, t5._pullAlgorithm = o6, t5._cancelAlgorithm = n5, e6._readableStreamController = t5, b2(c(r6()), () => (t5._started = true, At(t5), null), (e7) => (zt(t5, e7), null)); + }(e5, n4, a5, i5, l5, r5, o5); +} +function Dt(e5) { + return new TypeError(`ReadableStreamDefaultController.prototype.${e5} can only be used on a ReadableStreamDefaultController`); +} +function $t(e5, t4, r5) { + return I(e5, r5), (r6) => w3(e5, t4, [r6]); +} +function Mt(e5, t4, r5) { + return I(e5, r5), (r6) => w3(e5, t4, [r6]); +} +function Yt(e5, t4, r5) { + return I(e5, r5), (r6) => g(e5, t4, [r6]); +} +function Qt(e5, t4) { + if ("bytes" !== (e5 = `${e5}`)) throw new TypeError(`${t4} '${e5}' is not a valid enumeration value for ReadableStreamType`); + return e5; +} +function Nt(e5, t4) { + if ("byob" !== (e5 = `${e5}`)) throw new TypeError(`${t4} '${e5}' is not a valid enumeration value for ReadableStreamReaderMode`); + return e5; +} +function Ht(e5, t4) { + F2(e5, t4); + const r5 = null == e5 ? void 0 : e5.preventAbort, o5 = null == e5 ? void 0 : e5.preventCancel, n4 = null == e5 ? void 0 : e5.preventClose, a5 = null == e5 ? void 0 : e5.signal; + return void 0 !== a5 && function(e6, t5) { + if (!function(e7) { + if ("object" != typeof e7 || null === e7) return false; try { - return "boolean" == typeof e5.aborted; - } catch (e6) { + return "boolean" == typeof e7.aborted; + } catch (e8) { return false; } - }(e4)) throw new TypeError(`${t3} is not an AbortSignal.`); - }(a3, `${t2} has member 'signal' that`), { preventAbort: Boolean(r3), preventCancel: Boolean(o3), preventClose: Boolean(n2), signal: a3 }; + }(e6)) throw new TypeError(`${t5} is not an AbortSignal.`); + }(a5, `${t4} has member 'signal' that`), { preventAbort: Boolean(r5), preventCancel: Boolean(o5), preventClose: Boolean(n4), signal: a5 }; } -function xt(e3, t2) { - F2(e3, t2); - const r3 = null == e3 ? void 0 : e3.readable; - M3(r3, "readable", "ReadableWritablePair"), function(e4, t3) { - if (!H2(e4)) throw new TypeError(`${t3} is not a ReadableStream.`); - }(r3, `${t2} has member 'readable' that`); - const o3 = null == e3 ? void 0 : e3.writable; - return M3(o3, "writable", "ReadableWritablePair"), function(e4, t3) { - if (!x(e4)) throw new TypeError(`${t3} is not a WritableStream.`); - }(o3, `${t2} has member 'writable' that`), { readable: r3, writable: o3 }; +function xt(e5, t4) { + F2(e5, t4); + const r5 = null == e5 ? void 0 : e5.readable; + M3(r5, "readable", "ReadableWritablePair"), function(e6, t5) { + if (!H2(e6)) throw new TypeError(`${t5} is not a ReadableStream.`); + }(r5, `${t4} has member 'readable' that`); + const o5 = null == e5 ? void 0 : e5.writable; + return M3(o5, "writable", "ReadableWritablePair"), function(e6, t5) { + if (!x(e6)) throw new TypeError(`${t5} is not a WritableStream.`); + }(o5, `${t4} has member 'writable' that`), { readable: r5, writable: o5 }; } -function Vt(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_readableStreamController") && e3 instanceof ReadableStream3); +function Vt(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_readableStreamController") && e5 instanceof ReadableStream3); } -function Ut(e3) { - return void 0 !== e3._reader; +function Ut(e5) { + return void 0 !== e5._reader; } -function Gt(e3, r3) { - if (e3._disturbed = true, "closed" === e3._state) return c(void 0); - if ("errored" === e3._state) return d4(e3._storedError); - Xt(e3); - const o3 = e3._reader; - if (void 0 !== o3 && Fe(o3)) { - const e4 = o3._readIntoRequests; - o3._readIntoRequests = new S2(), e4.forEach((e5) => { - e5._closeSteps(void 0); +function Gt(e5, r5) { + if (e5._disturbed = true, "closed" === e5._state) return c(void 0); + if ("errored" === e5._state) return d4(e5._storedError); + Xt(e5); + const o5 = e5._reader; + if (void 0 !== o5 && Fe(o5)) { + const e6 = o5._readIntoRequests; + o5._readIntoRequests = new S2(), e6.forEach((e7) => { + e7._closeSteps(void 0); }); } - return p2(e3._readableStreamController[T2](r3), t); + return p2(e5._readableStreamController[T2](r5), t); } -function Xt(e3) { - e3._state = "closed"; - const t2 = e3._reader; - if (void 0 !== t2 && (j3(t2), K2(t2))) { - const e4 = t2._readRequests; - t2._readRequests = new S2(), e4.forEach((e5) => { - e5._closeSteps(); +function Xt(e5) { + e5._state = "closed"; + const t4 = e5._reader; + if (void 0 !== t4 && (j3(t4), K2(t4))) { + const e6 = t4._readRequests; + t4._readRequests = new S2(), e6.forEach((e7) => { + e7._closeSteps(); }); } } -function Jt(e3, t2) { - e3._state = "errored", e3._storedError = t2; - const r3 = e3._reader; - void 0 !== r3 && (A2(r3, t2), K2(r3) ? Z2(r3, t2) : Ie(r3, t2)); +function Jt(e5, t4) { + e5._state = "errored", e5._storedError = t4; + const r5 = e5._reader; + void 0 !== r5 && (A2(r5, t4), K2(r5) ? Z2(r5, t4) : Ie(r5, t4)); } -function Kt(e3) { - return new TypeError(`ReadableStream.prototype.${e3} can only be used on a ReadableStream`); +function Kt(e5) { + return new TypeError(`ReadableStream.prototype.${e5} can only be used on a ReadableStream`); } -function Zt(e3, t2) { - F2(e3, t2); - const r3 = null == e3 ? void 0 : e3.highWaterMark; - return M3(r3, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: Y2(r3) }; +function Zt(e5, t4) { + F2(e5, t4); + const r5 = null == e5 ? void 0 : e5.highWaterMark; + return M3(r5, "highWaterMark", "QueuingStrategyInit"), { highWaterMark: Y2(r5) }; } -function tr(e3) { - return new TypeError(`ByteLengthQueuingStrategy.prototype.${e3} can only be used on a ByteLengthQueuingStrategy`); +function tr(e5) { + return new TypeError(`ByteLengthQueuingStrategy.prototype.${e5} can only be used on a ByteLengthQueuingStrategy`); } -function rr(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_byteLengthQueuingStrategyHighWaterMark") && e3 instanceof ByteLengthQueuingStrategy); +function rr(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_byteLengthQueuingStrategyHighWaterMark") && e5 instanceof ByteLengthQueuingStrategy); } -function nr(e3) { - return new TypeError(`CountQueuingStrategy.prototype.${e3} can only be used on a CountQueuingStrategy`); +function nr(e5) { + return new TypeError(`CountQueuingStrategy.prototype.${e5} can only be used on a CountQueuingStrategy`); } -function ar(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_countQueuingStrategyHighWaterMark") && e3 instanceof CountQueuingStrategy); +function ar(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_countQueuingStrategyHighWaterMark") && e5 instanceof CountQueuingStrategy); } -function ir(e3, t2, r3) { - return I(e3, r3), (r4) => w3(e3, t2, [r4]); +function ir(e5, t4, r5) { + return I(e5, r5), (r6) => w3(e5, t4, [r6]); } -function lr(e3, t2, r3) { - return I(e3, r3), (r4) => g(e3, t2, [r4]); +function lr(e5, t4, r5) { + return I(e5, r5), (r6) => g(e5, t4, [r6]); } -function sr(e3, t2, r3) { - return I(e3, r3), (r4, o3) => w3(e3, t2, [r4, o3]); +function sr(e5, t4, r5) { + return I(e5, r5), (r6, o5) => w3(e5, t4, [r6, o5]); } -function ur(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_transformStreamController") && e3 instanceof TransformStream2); +function ur(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_transformStreamController") && e5 instanceof TransformStream2); } -function cr(e3, t2) { - Sr(e3, t2), dr(e3, t2); +function cr(e5, t4) { + Sr(e5, t4), dr(e5, t4); } -function dr(e3, t2) { - hr(e3._transformStreamController), function(e4, t3) { - e4._writableController.error(t3); - "writable" === e4._writableState && Tr(e4, t3); - }(e3, t2), e3._backpressure && fr(e3, false); +function dr(e5, t4) { + hr(e5._transformStreamController), function(e6, t5) { + e6._writableController.error(t5); + "writable" === e6._writableState && Tr(e6, t5); + }(e5, t4), e5._backpressure && fr(e5, false); } -function fr(e3, t2) { - void 0 !== e3._backpressureChangePromise && e3._backpressureChangePromise_resolve(), e3._backpressureChangePromise = u2((t3) => { - e3._backpressureChangePromise_resolve = t3; - }), e3._backpressure = t2; +function fr(e5, t4) { + void 0 !== e5._backpressureChangePromise && e5._backpressureChangePromise_resolve(), e5._backpressureChangePromise = u2((t5) => { + e5._backpressureChangePromise_resolve = t5; + }), e5._backpressure = t4; } -function br(e3) { - return !!r2(e3) && (!!Object.prototype.hasOwnProperty.call(e3, "_controlledTransformStream") && e3 instanceof TransformStreamDefaultController); +function br(e5) { + return !!r2(e5) && (!!Object.prototype.hasOwnProperty.call(e5, "_controlledTransformStream") && e5 instanceof TransformStreamDefaultController); } -function hr(e3) { - e3._transformAlgorithm = void 0, e3._flushAlgorithm = void 0; +function hr(e5) { + e5._transformAlgorithm = void 0, e5._flushAlgorithm = void 0; } -function _r(e3, t2) { - const r3 = e3._controlledTransformStream; - if (!gr(r3)) throw new TypeError("Readable side is not in a state that permits enqueue"); +function _r(e5, t4) { + const r5 = e5._controlledTransformStream; + if (!gr(r5)) throw new TypeError("Readable side is not in a state that permits enqueue"); try { - !function(e4, t3) { - e4._readablePulling = false; + !function(e6, t5) { + e6._readablePulling = false; try { - e4._readableController.enqueue(t3); - } catch (t4) { - throw Sr(e4, t4), t4; - } - }(r3, t2); - } catch (e4) { - throw dr(r3, e4), r3._readableStoredError; - } - const o3 = function(e4) { - return !function(e5) { - if (!gr(e5)) return false; - if (e5._readablePulling) return true; - if (vr(e5) > 0) return true; + e6._readableController.enqueue(t5); + } catch (t6) { + throw Sr(e6, t6), t6; + } + }(r5, t4); + } catch (e6) { + throw dr(r5, e6), r5._readableStoredError; + } + const o5 = function(e6) { + return !function(e7) { + if (!gr(e7)) return false; + if (e7._readablePulling) return true; + if (vr(e7) > 0) return true; return false; - }(e4); - }(r3); - o3 !== r3._backpressure && fr(r3, true); + }(e6); + }(r5); + o5 !== r5._backpressure && fr(r5, true); } -function pr(e3, t2) { - return p2(e3._transformAlgorithm(t2), void 0, (t3) => { - throw cr(e3._controlledTransformStream, t3), t3; +function pr(e5, t4) { + return p2(e5._transformAlgorithm(t4), void 0, (t5) => { + throw cr(e5._controlledTransformStream, t5), t5; }); } -function mr(e3) { - return new TypeError(`TransformStreamDefaultController.prototype.${e3} can only be used on a TransformStreamDefaultController`); +function mr(e5) { + return new TypeError(`TransformStreamDefaultController.prototype.${e5} can only be used on a TransformStreamDefaultController`); } -function yr(e3) { - return new TypeError(`TransformStream.prototype.${e3} can only be used on a TransformStream`); +function yr(e5) { + return new TypeError(`TransformStream.prototype.${e5} can only be used on a TransformStream`); } -function gr(e3) { - return !e3._readableCloseRequested && "readable" === e3._readableState; +function gr(e5) { + return !e5._readableCloseRequested && "readable" === e5._readableState; } -function wr(e3) { - e3._readableState = "closed", e3._readableCloseRequested = true, e3._readableController.close(); +function wr(e5) { + e5._readableState = "closed", e5._readableCloseRequested = true, e5._readableController.close(); } -function Sr(e3, t2) { - "readable" === e3._readableState && (e3._readableState = "errored", e3._readableStoredError = t2), e3._readableController.error(t2); +function Sr(e5, t4) { + "readable" === e5._readableState && (e5._readableState = "errored", e5._readableStoredError = t4), e5._readableController.error(t4); } -function vr(e3) { - return e3._readableController.desiredSize; +function vr(e5) { + return e5._readableController.desiredSize; } -function Rr(e3, t2) { - "writable" !== e3._writableState ? qr(e3) : Tr(e3, t2); +function Rr(e5, t4) { + "writable" !== e5._writableState ? qr(e5) : Tr(e5, t4); } -function Tr(e3, t2) { - e3._writableState = "erroring", e3._writableStoredError = t2, !function(e4) { - return e4._writableHasInFlightOperation; - }(e3) && e3._writableStarted && qr(e3); +function Tr(e5, t4) { + e5._writableState = "erroring", e5._writableStoredError = t4, !function(e6) { + return e6._writableHasInFlightOperation; + }(e5) && e5._writableStarted && qr(e5); } -function qr(e3) { - e3._writableState = "errored"; +function qr(e5) { + e5._writableState = "errored"; } -function Cr(e3) { - "erroring" === e3._writableState && qr(e3); +function Cr(e5) { + "erroring" === e5._writableState && qr(e5); } var e2, o2, a2, i2, l2, s, y3, S2, v, R2, T2, q2, C2, z2, L3, ReadableStreamDefaultReader, te, re, ae2, ReadableStreamBYOBRequest, ReadableByteStreamController, ReadableStreamBYOBReader, Ue, WritableStream, WritableStreamDefaultWriter, lt, WritableStreamDefaultController, Pt, Wt, ReadableStreamDefaultController, ReadableStream3, er, ByteLengthQueuingStrategy, or, CountQueuingStrategy, TransformStream2, TransformStreamDefaultController; var init_ponyfill = __esm({ "node_modules/formdata-node/node_modules/web-streams-polyfill/dist/ponyfill.mjs"() { - e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol : (e3) => `Symbol(${e3})`; + e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? Symbol : (e5) => `Symbol(${e5})`; o2 = t; a2 = Promise; i2 = Promise.prototype.then; l2 = Promise.resolve.bind(a2); s = Promise.reject.bind(a2); - y3 = (e3) => { + y3 = (e5) => { if ("function" == typeof queueMicrotask) y3 = queueMicrotask; else { - const e4 = c(void 0); - y3 = (t2) => f3(e4, t2); + const e6 = c(void 0); + y3 = (t4) => f3(e6, t4); } - return y3(e3); + return y3(e5); }; S2 = class { constructor() { @@ -30553,26 +30553,26 @@ var init_ponyfill = __esm({ get length() { return this._size; } - push(e3) { - const t2 = this._back; - let r3 = t2; - 16383 === t2._elements.length && (r3 = { _elements: [], _next: void 0 }), t2._elements.push(e3), r3 !== t2 && (this._back = r3, t2._next = r3), ++this._size; + push(e5) { + const t4 = this._back; + let r5 = t4; + 16383 === t4._elements.length && (r5 = { _elements: [], _next: void 0 }), t4._elements.push(e5), r5 !== t4 && (this._back = r5, t4._next = r5), ++this._size; } shift() { - const e3 = this._front; - let t2 = e3; - const r3 = this._cursor; - let o3 = r3 + 1; - const n2 = e3._elements, a3 = n2[r3]; - return 16384 === o3 && (t2 = e3._next, o3 = 0), --this._size, this._cursor = o3, e3 !== t2 && (this._front = t2), n2[r3] = void 0, a3; + const e5 = this._front; + let t4 = e5; + const r5 = this._cursor; + let o5 = r5 + 1; + const n4 = e5._elements, a5 = n4[r5]; + return 16384 === o5 && (t4 = e5._next, o5 = 0), --this._size, this._cursor = o5, e5 !== t4 && (this._front = t4), n4[r5] = void 0, a5; } - forEach(e3) { - let t2 = this._cursor, r3 = this._front, o3 = r3._elements; - for (; !(t2 === o3.length && void 0 === r3._next || t2 === o3.length && (r3 = r3._next, o3 = r3._elements, t2 = 0, 0 === o3.length)); ) e3(o3[t2]), ++t2; + forEach(e5) { + let t4 = this._cursor, r5 = this._front, o5 = r5._elements; + for (; !(t4 === o5.length && void 0 === r5._next || t4 === o5.length && (r5 = r5._next, o5 = r5._elements, t4 = 0, 0 === o5.length)); ) e5(o5[t4]), ++t4; } peek() { - const e3 = this._front, t2 = this._cursor; - return e3._elements[t2]; + const e5 = this._front, t4 = this._cursor; + return e5._elements[t4]; } }; v = e2("[[AbortSteps]]"); @@ -30580,90 +30580,90 @@ var init_ponyfill = __esm({ T2 = e2("[[CancelSteps]]"); q2 = e2("[[PullSteps]]"); C2 = e2("[[ReleaseSteps]]"); - z2 = Number.isFinite || function(e3) { - return "number" == typeof e3 && isFinite(e3); + z2 = Number.isFinite || function(e5) { + return "number" == typeof e5 && isFinite(e5); }; - L3 = Math.trunc || function(e3) { - return e3 < 0 ? Math.ceil(e3) : Math.floor(e3); + L3 = Math.trunc || function(e5) { + return e5 < 0 ? Math.ceil(e5) : Math.floor(e5); }; ReadableStreamDefaultReader = class { - constructor(e3) { - if ($3(e3, 1, "ReadableStreamDefaultReader"), V3(e3, "First parameter"), Ut(e3)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); - E2(this, e3), this._readRequests = new S2(); + constructor(e5) { + if ($3(e5, 1, "ReadableStreamDefaultReader"), V3(e5, "First parameter"), Ut(e5)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + E2(this, e5), this._readRequests = new S2(); } get closed() { return K2(this) ? this._closedPromise : d4(ee("closed")); } - cancel(e3) { - return K2(this) ? void 0 === this._ownerReadableStream ? d4(k3("cancel")) : P2(this, e3) : d4(ee("cancel")); + cancel(e5) { + return K2(this) ? void 0 === this._ownerReadableStream ? d4(k3("cancel")) : P2(this, e5) : d4(ee("cancel")); } read() { if (!K2(this)) return d4(ee("read")); if (void 0 === this._ownerReadableStream) return d4(k3("read from")); - let e3, t2; - const r3 = u2((r4, o3) => { - e3 = r4, t2 = o3; + let e5, t4; + const r5 = u2((r6, o5) => { + e5 = r6, t4 = o5; }); - return function(e4, t3) { - const r4 = e4._ownerReadableStream; - r4._disturbed = true, "closed" === r4._state ? t3._closeSteps() : "errored" === r4._state ? t3._errorSteps(r4._storedError) : r4._readableStreamController[q2](t3); - }(this, { _chunkSteps: (t3) => e3({ value: t3, done: false }), _closeSteps: () => e3({ value: void 0, done: true }), _errorSteps: (e4) => t2(e4) }), r3; + return function(e6, t5) { + const r6 = e6._ownerReadableStream; + r6._disturbed = true, "closed" === r6._state ? t5._closeSteps() : "errored" === r6._state ? t5._errorSteps(r6._storedError) : r6._readableStreamController[q2](t5); + }(this, { _chunkSteps: (t5) => e5({ value: t5, done: false }), _closeSteps: () => e5({ value: void 0, done: true }), _errorSteps: (e6) => t4(e6) }), r5; } releaseLock() { if (!K2(this)) throw ee("releaseLock"); - void 0 !== this._ownerReadableStream && function(e3) { - W3(e3); - const t2 = new TypeError("Reader was released"); - Z2(e3, t2); + void 0 !== this._ownerReadableStream && function(e5) { + W3(e5); + const t4 = new TypeError("Reader was released"); + Z2(e5, t4); }(this); } }; Object.defineProperties(ReadableStreamDefaultReader.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), n(ReadableStreamDefaultReader.prototype.cancel, "cancel"), n(ReadableStreamDefaultReader.prototype.read, "read"), n(ReadableStreamDefaultReader.prototype.releaseLock, "releaseLock"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamDefaultReader.prototype, e2.toStringTag, { value: "ReadableStreamDefaultReader", configurable: true }); te = class { - constructor(e3, t2) { - this._ongoingPromise = void 0, this._isFinished = false, this._reader = e3, this._preventCancel = t2; + constructor(e5, t4) { + this._ongoingPromise = void 0, this._isFinished = false, this._reader = e5, this._preventCancel = t4; } next() { - const e3 = () => this._nextSteps(); - return this._ongoingPromise = this._ongoingPromise ? p2(this._ongoingPromise, e3, e3) : e3(), this._ongoingPromise; + const e5 = () => this._nextSteps(); + return this._ongoingPromise = this._ongoingPromise ? p2(this._ongoingPromise, e5, e5) : e5(), this._ongoingPromise; } - return(e3) { - const t2 = () => this._returnSteps(e3); - return this._ongoingPromise ? p2(this._ongoingPromise, t2, t2) : t2(); + return(e5) { + const t4 = () => this._returnSteps(e5); + return this._ongoingPromise ? p2(this._ongoingPromise, t4, t4) : t4(); } _nextSteps() { if (this._isFinished) return Promise.resolve({ value: void 0, done: true }); - const e3 = this._reader; - return void 0 === e3 ? d4(k3("iterate")) : f3(e3.read(), (e4) => { - var t2; - return this._ongoingPromise = void 0, e4.done && (this._isFinished = true, null === (t2 = this._reader) || void 0 === t2 || t2.releaseLock(), this._reader = void 0), e4; - }, (e4) => { - var t2; - throw this._ongoingPromise = void 0, this._isFinished = true, null === (t2 = this._reader) || void 0 === t2 || t2.releaseLock(), this._reader = void 0, e4; + const e5 = this._reader; + return void 0 === e5 ? d4(k3("iterate")) : f3(e5.read(), (e6) => { + var t4; + return this._ongoingPromise = void 0, e6.done && (this._isFinished = true, null === (t4 = this._reader) || void 0 === t4 || t4.releaseLock(), this._reader = void 0), e6; + }, (e6) => { + var t4; + throw this._ongoingPromise = void 0, this._isFinished = true, null === (t4 = this._reader) || void 0 === t4 || t4.releaseLock(), this._reader = void 0, e6; }); } - _returnSteps(e3) { - if (this._isFinished) return Promise.resolve({ value: e3, done: true }); + _returnSteps(e5) { + if (this._isFinished) return Promise.resolve({ value: e5, done: true }); this._isFinished = true; - const t2 = this._reader; - if (void 0 === t2) return d4(k3("finish iterating")); + const t4 = this._reader; + if (void 0 === t4) return d4(k3("finish iterating")); if (this._reader = void 0, !this._preventCancel) { - const r3 = t2.cancel(e3); - return t2.releaseLock(), p2(r3, () => ({ value: e3, done: true })); + const r5 = t4.cancel(e5); + return t4.releaseLock(), p2(r5, () => ({ value: e5, done: true })); } - return t2.releaseLock(), c({ value: e3, done: true }); + return t4.releaseLock(), c({ value: e5, done: true }); } }; re = { next() { return oe(this) ? this._asyncIteratorImpl.next() : d4(ne("next")); - }, return(e3) { - return oe(this) ? this._asyncIteratorImpl.return(e3) : d4(ne("return")); + }, return(e5) { + return oe(this) ? this._asyncIteratorImpl.return(e5) : d4(ne("return")); } }; "symbol" == typeof e2.asyncIterator && Object.defineProperty(re, e2.asyncIterator, { value() { return this; }, writable: true, configurable: true }); - ae2 = Number.isNaN || function(e3) { - return e3 != e3; + ae2 = Number.isNaN || function(e5) { + return e5 != e5; }; ReadableStreamBYOBRequest = class { constructor() { @@ -30673,35 +30673,35 @@ var init_ponyfill = __esm({ if (!fe(this)) throw Be("view"); return this._view; } - respond(e3) { + respond(e5) { if (!fe(this)) throw Be("respond"); - if ($3(e3, 1, "respond"), e3 = N3(e3, "First parameter"), void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); - this._view.buffer, function(e4, t2) { - const r3 = e4._pendingPullIntos.peek(); - if ("closed" === e4._controlledReadableByteStream._state) { - if (0 !== t2) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); + if ($3(e5, 1, "respond"), e5 = N3(e5, "First parameter"), void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); + this._view.buffer, function(e6, t4) { + const r5 = e6._pendingPullIntos.peek(); + if ("closed" === e6._controlledReadableByteStream._state) { + if (0 !== t4) throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); } else { - if (0 === t2) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream"); - if (r3.bytesFilled + t2 > r3.byteLength) throw new RangeError("bytesWritten out of range"); + if (0 === t4) throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream"); + if (r5.bytesFilled + t4 > r5.byteLength) throw new RangeError("bytesWritten out of range"); } - r3.buffer = r3.buffer, qe(e4, t2); - }(this._associatedReadableByteStreamController, e3); + r5.buffer = r5.buffer, qe(e6, t4); + }(this._associatedReadableByteStreamController, e5); } - respondWithNewView(e3) { + respondWithNewView(e5) { if (!fe(this)) throw Be("respondWithNewView"); - if ($3(e3, 1, "respondWithNewView"), !ArrayBuffer.isView(e3)) throw new TypeError("You can only respond with array buffer views"); + if ($3(e5, 1, "respondWithNewView"), !ArrayBuffer.isView(e5)) throw new TypeError("You can only respond with array buffer views"); if (void 0 === this._associatedReadableByteStreamController) throw new TypeError("This BYOB request has been invalidated"); - e3.buffer, function(e4, t2) { - const r3 = e4._pendingPullIntos.peek(); - if ("closed" === e4._controlledReadableByteStream._state) { - if (0 !== t2.byteLength) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); - } else if (0 === t2.byteLength) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); - if (r3.byteOffset + r3.bytesFilled !== t2.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); - if (r3.bufferByteLength !== t2.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); - if (r3.bytesFilled + t2.byteLength > r3.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); - const o3 = t2.byteLength; - r3.buffer = t2.buffer, qe(e4, o3); - }(this._associatedReadableByteStreamController, e3); + e5.buffer, function(e6, t4) { + const r5 = e6._pendingPullIntos.peek(); + if ("closed" === e6._controlledReadableByteStream._state) { + if (0 !== t4.byteLength) throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); + } else if (0 === t4.byteLength) throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream"); + if (r5.byteOffset + r5.bytesFilled !== t4.byteOffset) throw new RangeError("The region specified by view does not match byobRequest"); + if (r5.bufferByteLength !== t4.buffer.byteLength) throw new RangeError("The buffer of view has different capacity than byobRequest"); + if (r5.bytesFilled + t4.byteLength > r5.byteLength) throw new RangeError("The region specified by view is larger than byobRequest"); + const o5 = t4.byteLength; + r5.buffer = t4.buffer, qe(e6, o5); + }(this._associatedReadableByteStreamController, e5); } }; Object.defineProperties(ReadableStreamBYOBRequest.prototype, { respond: { enumerable: true }, respondWithNewView: { enumerable: true }, view: { enumerable: true } }), n(ReadableStreamBYOBRequest.prototype.respond, "respond"), n(ReadableStreamBYOBRequest.prototype.respondWithNewView, "respondWithNewView"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamBYOBRequest.prototype, e2.toStringTag, { value: "ReadableStreamBYOBRequest", configurable: true }); @@ -30711,14 +30711,14 @@ var init_ponyfill = __esm({ } get byobRequest() { if (!de(this)) throw Ae("byobRequest"); - return function(e3) { - if (null === e3._byobRequest && e3._pendingPullIntos.length > 0) { - const t2 = e3._pendingPullIntos.peek(), r3 = new Uint8Array(t2.buffer, t2.byteOffset + t2.bytesFilled, t2.byteLength - t2.bytesFilled), o3 = Object.create(ReadableStreamBYOBRequest.prototype); - !function(e4, t3, r4) { - e4._associatedReadableByteStreamController = t3, e4._view = r4; - }(o3, e3, r3), e3._byobRequest = o3; - } - return e3._byobRequest; + return function(e5) { + if (null === e5._byobRequest && e5._pendingPullIntos.length > 0) { + const t4 = e5._pendingPullIntos.peek(), r5 = new Uint8Array(t4.buffer, t4.byteOffset + t4.bytesFilled, t4.byteLength - t4.bytesFilled), o5 = Object.create(ReadableStreamBYOBRequest.prototype); + !function(e6, t5, r6) { + e6._associatedReadableByteStreamController = t5, e6._view = r6; + }(o5, e5, r5), e5._byobRequest = o5; + } + return e5._byobRequest; }(this); } get desiredSize() { @@ -30728,182 +30728,182 @@ var init_ponyfill = __esm({ close() { if (!de(this)) throw Ae("close"); if (this._closeRequested) throw new TypeError("The stream has already been closed; do not close it again!"); - const e3 = this._controlledReadableByteStream._state; - if ("readable" !== e3) throw new TypeError(`The stream (in ${e3} state) is not in the readable state and cannot be closed`); - !function(e4) { - const t2 = e4._controlledReadableByteStream; - if (e4._closeRequested || "readable" !== t2._state) return; - if (e4._queueTotalSize > 0) return void (e4._closeRequested = true); - if (e4._pendingPullIntos.length > 0) { - if (e4._pendingPullIntos.peek().bytesFilled > 0) { - const t3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - throw Pe(e4, t3), t3; + const e5 = this._controlledReadableByteStream._state; + if ("readable" !== e5) throw new TypeError(`The stream (in ${e5} state) is not in the readable state and cannot be closed`); + !function(e6) { + const t4 = e6._controlledReadableByteStream; + if (e6._closeRequested || "readable" !== t4._state) return; + if (e6._queueTotalSize > 0) return void (e6._closeRequested = true); + if (e6._pendingPullIntos.length > 0) { + if (e6._pendingPullIntos.peek().bytesFilled > 0) { + const t5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + throw Pe(e6, t5), t5; } } - Ee(e4), Xt(t2); + Ee(e6), Xt(t4); }(this); } - enqueue(e3) { + enqueue(e5) { if (!de(this)) throw Ae("enqueue"); - if ($3(e3, 1, "enqueue"), !ArrayBuffer.isView(e3)) throw new TypeError("chunk must be an array buffer view"); - if (0 === e3.byteLength) throw new TypeError("chunk must have non-zero byteLength"); - if (0 === e3.buffer.byteLength) throw new TypeError("chunk's buffer must have non-zero byteLength"); + if ($3(e5, 1, "enqueue"), !ArrayBuffer.isView(e5)) throw new TypeError("chunk must be an array buffer view"); + if (0 === e5.byteLength) throw new TypeError("chunk must have non-zero byteLength"); + if (0 === e5.buffer.byteLength) throw new TypeError("chunk's buffer must have non-zero byteLength"); if (this._closeRequested) throw new TypeError("stream is closed or draining"); - const t2 = this._controlledReadableByteStream._state; - if ("readable" !== t2) throw new TypeError(`The stream (in ${t2} state) is not in the readable state and cannot be enqueued to`); - !function(e4, t3) { - const r3 = e4._controlledReadableByteStream; - if (e4._closeRequested || "readable" !== r3._state) return; - const o3 = t3.buffer, n2 = t3.byteOffset, a3 = t3.byteLength, i3 = o3; - if (e4._pendingPullIntos.length > 0) { - const t4 = e4._pendingPullIntos.peek(); - t4.buffer, 0, Re(e4), t4.buffer = t4.buffer, "none" === t4.readerType && ge(e4, t4); - } - if (J3(r3)) if (function(e5) { - const t4 = e5._controlledReadableByteStream._reader; - for (; t4._readRequests.length > 0; ) { - if (0 === e5._queueTotalSize) return; - We(e5, t4._readRequests.shift()); + const t4 = this._controlledReadableByteStream._state; + if ("readable" !== t4) throw new TypeError(`The stream (in ${t4} state) is not in the readable state and cannot be enqueued to`); + !function(e6, t5) { + const r5 = e6._controlledReadableByteStream; + if (e6._closeRequested || "readable" !== r5._state) return; + const o5 = t5.buffer, n4 = t5.byteOffset, a5 = t5.byteLength, i5 = o5; + if (e6._pendingPullIntos.length > 0) { + const t6 = e6._pendingPullIntos.peek(); + t6.buffer, 0, Re(e6), t6.buffer = t6.buffer, "none" === t6.readerType && ge(e6, t6); + } + if (J3(r5)) if (function(e7) { + const t6 = e7._controlledReadableByteStream._reader; + for (; t6._readRequests.length > 0; ) { + if (0 === e7._queueTotalSize) return; + We(e7, t6._readRequests.shift()); } - }(e4), 0 === X3(r3)) me(e4, i3, n2, a3); + }(e6), 0 === X3(r5)) me(e6, i5, n4, a5); else { - e4._pendingPullIntos.length > 0 && Ce(e4); - G3(r3, new Uint8Array(i3, n2, a3), false); + e6._pendingPullIntos.length > 0 && Ce(e6); + G3(r5, new Uint8Array(i5, n4, a5), false); } - else Le(r3) ? (me(e4, i3, n2, a3), Te(e4)) : me(e4, i3, n2, a3); - be(e4); - }(this, e3); + else Le(r5) ? (me(e6, i5, n4, a5), Te(e6)) : me(e6, i5, n4, a5); + be(e6); + }(this, e5); } - error(e3) { + error(e5) { if (!de(this)) throw Ae("error"); - Pe(this, e3); + Pe(this, e5); } - [T2](e3) { + [T2](e5) { he(this), ce2(this); - const t2 = this._cancelAlgorithm(e3); - return Ee(this), t2; - } - [q2](e3) { - const t2 = this._controlledReadableByteStream; - if (this._queueTotalSize > 0) return void We(this, e3); - const r3 = this._autoAllocateChunkSize; - if (void 0 !== r3) { - let t3; + const t4 = this._cancelAlgorithm(e5); + return Ee(this), t4; + } + [q2](e5) { + const t4 = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) return void We(this, e5); + const r5 = this._autoAllocateChunkSize; + if (void 0 !== r5) { + let t5; try { - t3 = new ArrayBuffer(r3); - } catch (t4) { - return void e3._errorSteps(t4); + t5 = new ArrayBuffer(r5); + } catch (t6) { + return void e5._errorSteps(t6); } - const o3 = { buffer: t3, bufferByteLength: r3, byteOffset: 0, byteLength: r3, bytesFilled: 0, elementSize: 1, viewConstructor: Uint8Array, readerType: "default" }; - this._pendingPullIntos.push(o3); + const o5 = { buffer: t5, bufferByteLength: r5, byteOffset: 0, byteLength: r5, bytesFilled: 0, elementSize: 1, viewConstructor: Uint8Array, readerType: "default" }; + this._pendingPullIntos.push(o5); } - U4(t2, e3), be(this); + U4(t4, e5), be(this); } [C2]() { if (this._pendingPullIntos.length > 0) { - const e3 = this._pendingPullIntos.peek(); - e3.readerType = "none", this._pendingPullIntos = new S2(), this._pendingPullIntos.push(e3); + const e5 = this._pendingPullIntos.peek(); + e5.readerType = "none", this._pendingPullIntos = new S2(), this._pendingPullIntos.push(e5); } } }; Object.defineProperties(ReadableByteStreamController.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, byobRequest: { enumerable: true }, desiredSize: { enumerable: true } }), n(ReadableByteStreamController.prototype.close, "close"), n(ReadableByteStreamController.prototype.enqueue, "enqueue"), n(ReadableByteStreamController.prototype.error, "error"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableByteStreamController.prototype, e2.toStringTag, { value: "ReadableByteStreamController", configurable: true }); ReadableStreamBYOBReader = class { - constructor(e3) { - if ($3(e3, 1, "ReadableStreamBYOBReader"), V3(e3, "First parameter"), Ut(e3)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); - if (!de(e3._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source"); - E2(this, e3), this._readIntoRequests = new S2(); + constructor(e5) { + if ($3(e5, 1, "ReadableStreamBYOBReader"), V3(e5, "First parameter"), Ut(e5)) throw new TypeError("This stream has already been locked for exclusive reading by another reader"); + if (!de(e5._readableStreamController)) throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source"); + E2(this, e5), this._readIntoRequests = new S2(); } get closed() { return Fe(this) ? this._closedPromise : d4(De("closed")); } - cancel(e3) { - return Fe(this) ? void 0 === this._ownerReadableStream ? d4(k3("cancel")) : P2(this, e3) : d4(De("cancel")); + cancel(e5) { + return Fe(this) ? void 0 === this._ownerReadableStream ? d4(k3("cancel")) : P2(this, e5) : d4(De("cancel")); } - read(e3) { + read(e5) { if (!Fe(this)) return d4(De("read")); - if (!ArrayBuffer.isView(e3)) return d4(new TypeError("view must be an array buffer view")); - if (0 === e3.byteLength) return d4(new TypeError("view must have non-zero byteLength")); - if (0 === e3.buffer.byteLength) return d4(new TypeError("view's buffer must have non-zero byteLength")); - if (e3.buffer, void 0 === this._ownerReadableStream) return d4(k3("read from")); - let t2, r3; - const o3 = u2((e4, o4) => { - t2 = e4, r3 = o4; + if (!ArrayBuffer.isView(e5)) return d4(new TypeError("view must be an array buffer view")); + if (0 === e5.byteLength) return d4(new TypeError("view must have non-zero byteLength")); + if (0 === e5.buffer.byteLength) return d4(new TypeError("view's buffer must have non-zero byteLength")); + if (e5.buffer, void 0 === this._ownerReadableStream) return d4(k3("read from")); + let t4, r5; + const o5 = u2((e6, o6) => { + t4 = e6, r5 = o6; }); - return function(e4, t3, r4) { - const o4 = e4._ownerReadableStream; - o4._disturbed = true, "errored" === o4._state ? r4._errorSteps(o4._storedError) : function(e5, t4, r5) { - const o5 = e5._controlledReadableByteStream; - let n2 = 1; - t4.constructor !== DataView && (n2 = t4.constructor.BYTES_PER_ELEMENT); - const a3 = t4.constructor, i3 = t4.buffer, l3 = { buffer: i3, bufferByteLength: i3.byteLength, byteOffset: t4.byteOffset, byteLength: t4.byteLength, bytesFilled: 0, elementSize: n2, viewConstructor: a3, readerType: "byob" }; - if (e5._pendingPullIntos.length > 0) return e5._pendingPullIntos.push(l3), void je(o5, r5); - if ("closed" !== o5._state) { - if (e5._queueTotalSize > 0) { - if (we(e5, l3)) { - const t5 = pe(l3); - return ve(e5), void r5._chunkSteps(t5); + return function(e6, t5, r6) { + const o6 = e6._ownerReadableStream; + o6._disturbed = true, "errored" === o6._state ? r6._errorSteps(o6._storedError) : function(e7, t6, r7) { + const o7 = e7._controlledReadableByteStream; + let n4 = 1; + t6.constructor !== DataView && (n4 = t6.constructor.BYTES_PER_ELEMENT); + const a5 = t6.constructor, i5 = t6.buffer, l5 = { buffer: i5, bufferByteLength: i5.byteLength, byteOffset: t6.byteOffset, byteLength: t6.byteLength, bytesFilled: 0, elementSize: n4, viewConstructor: a5, readerType: "byob" }; + if (e7._pendingPullIntos.length > 0) return e7._pendingPullIntos.push(l5), void je(o7, r7); + if ("closed" !== o7._state) { + if (e7._queueTotalSize > 0) { + if (we(e7, l5)) { + const t7 = pe(l5); + return ve(e7), void r7._chunkSteps(t7); } - if (e5._closeRequested) { - const t5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - return Pe(e5, t5), void r5._errorSteps(t5); + if (e7._closeRequested) { + const t7 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + return Pe(e7, t7), void r7._errorSteps(t7); } } - e5._pendingPullIntos.push(l3), je(o5, r5), be(e5); + e7._pendingPullIntos.push(l5), je(o7, r7), be(e7); } else { - const e6 = new a3(l3.buffer, l3.byteOffset, 0); - r5._closeSteps(e6); + const e8 = new a5(l5.buffer, l5.byteOffset, 0); + r7._closeSteps(e8); } - }(o4._readableStreamController, t3, r4); - }(this, e3, { _chunkSteps: (e4) => t2({ value: e4, done: false }), _closeSteps: (e4) => t2({ value: e4, done: true }), _errorSteps: (e4) => r3(e4) }), o3; + }(o6._readableStreamController, t5, r6); + }(this, e5, { _chunkSteps: (e6) => t4({ value: e6, done: false }), _closeSteps: (e6) => t4({ value: e6, done: true }), _errorSteps: (e6) => r5(e6) }), o5; } releaseLock() { if (!Fe(this)) throw De("releaseLock"); - void 0 !== this._ownerReadableStream && function(e3) { - W3(e3); - const t2 = new TypeError("Reader was released"); - Ie(e3, t2); + void 0 !== this._ownerReadableStream && function(e5) { + W3(e5); + const t4 = new TypeError("Reader was released"); + Ie(e5, t4); }(this); } }; Object.defineProperties(ReadableStreamBYOBReader.prototype, { cancel: { enumerable: true }, read: { enumerable: true }, releaseLock: { enumerable: true }, closed: { enumerable: true } }), n(ReadableStreamBYOBReader.prototype.cancel, "cancel"), n(ReadableStreamBYOBReader.prototype.read, "read"), n(ReadableStreamBYOBReader.prototype.releaseLock, "releaseLock"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamBYOBReader.prototype, e2.toStringTag, { value: "ReadableStreamBYOBReader", configurable: true }); Ue = "function" == typeof AbortController; WritableStream = class { - constructor(e3 = {}, t2 = {}) { - void 0 === e3 ? e3 = null : D3(e3, "First parameter"); - const r3 = Ye(t2, "Second parameter"), o3 = function(e4, t3) { - F2(e4, t3); - const r4 = null == e4 ? void 0 : e4.abort, o4 = null == e4 ? void 0 : e4.close, n3 = null == e4 ? void 0 : e4.start, a4 = null == e4 ? void 0 : e4.type, i3 = null == e4 ? void 0 : e4.write; - return { abort: void 0 === r4 ? void 0 : Ne(r4, e4, `${t3} has member 'abort' that`), close: void 0 === o4 ? void 0 : He(o4, e4, `${t3} has member 'close' that`), start: void 0 === n3 ? void 0 : xe(n3, e4, `${t3} has member 'start' that`), write: void 0 === i3 ? void 0 : Ve(i3, e4, `${t3} has member 'write' that`), type: a4 }; - }(e3, "First parameter"); - var n2; - (n2 = this)._state = "writable", n2._storedError = void 0, n2._writer = void 0, n2._writableStreamController = void 0, n2._writeRequests = new S2(), n2._inFlightWriteRequest = void 0, n2._closeRequest = void 0, n2._inFlightCloseRequest = void 0, n2._pendingAbortRequest = void 0, n2._backpressure = false; - if (void 0 !== o3.type) throw new RangeError("Invalid type is specified"); - const a3 = Me(r3); - !function(e4, t3, r4, o4) { - const n3 = Object.create(WritableStreamDefaultController.prototype); - let a4, i3, l3, s2; - a4 = void 0 !== t3.start ? () => t3.start(n3) : () => { + constructor(e5 = {}, t4 = {}) { + void 0 === e5 ? e5 = null : D3(e5, "First parameter"); + const r5 = Ye(t4, "Second parameter"), o5 = function(e6, t5) { + F2(e6, t5); + const r6 = null == e6 ? void 0 : e6.abort, o6 = null == e6 ? void 0 : e6.close, n5 = null == e6 ? void 0 : e6.start, a6 = null == e6 ? void 0 : e6.type, i5 = null == e6 ? void 0 : e6.write; + return { abort: void 0 === r6 ? void 0 : Ne(r6, e6, `${t5} has member 'abort' that`), close: void 0 === o6 ? void 0 : He(o6, e6, `${t5} has member 'close' that`), start: void 0 === n5 ? void 0 : xe(n5, e6, `${t5} has member 'start' that`), write: void 0 === i5 ? void 0 : Ve(i5, e6, `${t5} has member 'write' that`), type: a6 }; + }(e5, "First parameter"); + var n4; + (n4 = this)._state = "writable", n4._storedError = void 0, n4._writer = void 0, n4._writableStreamController = void 0, n4._writeRequests = new S2(), n4._inFlightWriteRequest = void 0, n4._closeRequest = void 0, n4._inFlightCloseRequest = void 0, n4._pendingAbortRequest = void 0, n4._backpressure = false; + if (void 0 !== o5.type) throw new RangeError("Invalid type is specified"); + const a5 = Me(r5); + !function(e6, t5, r6, o6) { + const n5 = Object.create(WritableStreamDefaultController.prototype); + let a6, i5, l5, s4; + a6 = void 0 !== t5.start ? () => t5.start(n5) : () => { }; - i3 = void 0 !== t3.write ? (e5) => t3.write(e5, n3) : () => c(void 0); - l3 = void 0 !== t3.close ? () => t3.close() : () => c(void 0); - s2 = void 0 !== t3.abort ? (e5) => t3.abort(e5) : () => c(void 0); - !function(e5, t4, r5, o5, n4, a5, i4, l4) { - t4._controlledWritableStream = e5, e5._writableStreamController = t4, t4._queue = void 0, t4._queueTotalSize = void 0, ce2(t4), t4._abortReason = void 0, t4._abortController = function() { + i5 = void 0 !== t5.write ? (e7) => t5.write(e7, n5) : () => c(void 0); + l5 = void 0 !== t5.close ? () => t5.close() : () => c(void 0); + s4 = void 0 !== t5.abort ? (e7) => t5.abort(e7) : () => c(void 0); + !function(e7, t6, r7, o7, n6, a7, i6, l6) { + t6._controlledWritableStream = e7, e7._writableStreamController = t6, t6._queue = void 0, t6._queueTotalSize = void 0, ce2(t6), t6._abortReason = void 0, t6._abortController = function() { if (Ue) return new AbortController(); - }(), t4._started = false, t4._strategySizeAlgorithm = l4, t4._strategyHWM = i4, t4._writeAlgorithm = o5, t4._closeAlgorithm = n4, t4._abortAlgorithm = a5; - const s3 = bt(t4); - nt(e5, s3); - const u3 = r5(); - b2(c(u3), () => (t4._started = true, dt(t4), null), (r6) => (t4._started = true, Ze(e5, r6), null)); - }(e4, n3, a4, i3, l3, s2, r4, o4); - }(this, o3, $e(r3, 1), a3); + }(), t6._started = false, t6._strategySizeAlgorithm = l6, t6._strategyHWM = i6, t6._writeAlgorithm = o7, t6._closeAlgorithm = n6, t6._abortAlgorithm = a7; + const s5 = bt(t6); + nt(e7, s5); + const u5 = r7(); + b2(c(u5), () => (t6._started = true, dt(t6), null), (r8) => (t6._started = true, Ze(e7, r8), null)); + }(e6, n5, a6, i5, l5, s4, r6, o6); + }(this, o5, $e(r5, 1), a5); } get locked() { if (!Ge(this)) throw _t("locked"); return Xe(this); } - abort(e3) { - return Ge(this) ? Xe(this) ? d4(new TypeError("Cannot abort a stream that already has a writer")) : Je(this, e3) : d4(_t("abort")); + abort(e5) { + return Ge(this) ? Xe(this) ? d4(new TypeError("Cannot abort a stream that already has a writer")) : Je(this, e5) : d4(_t("abort")); } close() { return Ge(this) ? Xe(this) ? d4(new TypeError("Cannot close a stream that already has a writer")) : rt(this) ? d4(new TypeError("Cannot close an already-closing stream")) : Ke(this) : d4(_t("close")); @@ -30915,20 +30915,20 @@ var init_ponyfill = __esm({ }; Object.defineProperties(WritableStream.prototype, { abort: { enumerable: true }, close: { enumerable: true }, getWriter: { enumerable: true }, locked: { enumerable: true } }), n(WritableStream.prototype.abort, "abort"), n(WritableStream.prototype.close, "close"), n(WritableStream.prototype.getWriter, "getWriter"), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStream.prototype, e2.toStringTag, { value: "WritableStream", configurable: true }); WritableStreamDefaultWriter = class { - constructor(e3) { - if ($3(e3, 1, "WritableStreamDefaultWriter"), function(e4, t3) { - if (!Ge(e4)) throw new TypeError(`${t3} is not a WritableStream.`); - }(e3, "First parameter"), Xe(e3)) throw new TypeError("This stream has already been locked for exclusive writing by another writer"); - this._ownerWritableStream = e3, e3._writer = this; - const t2 = e3._state; - if ("writable" === t2) !rt(e3) && e3._backpressure ? Rt(this) : qt(this), gt(this); - else if ("erroring" === t2) Tt(this, e3._storedError), gt(this); - else if ("closed" === t2) qt(this), gt(r3 = this), vt(r3); + constructor(e5) { + if ($3(e5, 1, "WritableStreamDefaultWriter"), function(e6, t5) { + if (!Ge(e6)) throw new TypeError(`${t5} is not a WritableStream.`); + }(e5, "First parameter"), Xe(e5)) throw new TypeError("This stream has already been locked for exclusive writing by another writer"); + this._ownerWritableStream = e5, e5._writer = this; + const t4 = e5._state; + if ("writable" === t4) !rt(e5) && e5._backpressure ? Rt(this) : qt(this), gt(this); + else if ("erroring" === t4) Tt(this, e5._storedError), gt(this); + else if ("closed" === t4) qt(this), gt(r5 = this), vt(r5); else { - const t3 = e3._storedError; - Tt(this, t3), wt(this, t3); + const t5 = e5._storedError; + Tt(this, t5), wt(this, t5); } - var r3; + var r5; } get closed() { return at(this) ? this._closedPromise : d4(mt("closed")); @@ -30936,70 +30936,70 @@ var init_ponyfill = __esm({ get desiredSize() { if (!at(this)) throw mt("desiredSize"); if (void 0 === this._ownerWritableStream) throw yt("desiredSize"); - return function(e3) { - const t2 = e3._ownerWritableStream, r3 = t2._state; - if ("errored" === r3 || "erroring" === r3) return null; - if ("closed" === r3) return 0; - return ct(t2._writableStreamController); + return function(e5) { + const t4 = e5._ownerWritableStream, r5 = t4._state; + if ("errored" === r5 || "erroring" === r5) return null; + if ("closed" === r5) return 0; + return ct(t4._writableStreamController); }(this); } get ready() { return at(this) ? this._readyPromise : d4(mt("ready")); } - abort(e3) { - return at(this) ? void 0 === this._ownerWritableStream ? d4(yt("abort")) : function(e4, t2) { - return Je(e4._ownerWritableStream, t2); - }(this, e3) : d4(mt("abort")); + abort(e5) { + return at(this) ? void 0 === this._ownerWritableStream ? d4(yt("abort")) : function(e6, t4) { + return Je(e6._ownerWritableStream, t4); + }(this, e5) : d4(mt("abort")); } close() { if (!at(this)) return d4(mt("close")); - const e3 = this._ownerWritableStream; - return void 0 === e3 ? d4(yt("close")) : rt(e3) ? d4(new TypeError("Cannot close an already-closing stream")) : Ke(this._ownerWritableStream); + const e5 = this._ownerWritableStream; + return void 0 === e5 ? d4(yt("close")) : rt(e5) ? d4(new TypeError("Cannot close an already-closing stream")) : Ke(this._ownerWritableStream); } releaseLock() { if (!at(this)) throw mt("releaseLock"); - void 0 !== this._ownerWritableStream && function(e3) { - const t2 = e3._ownerWritableStream, r3 = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); - it(e3, r3), function(e4, t3) { - "pending" === e4._closedPromiseState ? St(e4, t3) : function(e5, t4) { - wt(e5, t4); - }(e4, t3); - }(e3, r3), t2._writer = void 0, e3._ownerWritableStream = void 0; + void 0 !== this._ownerWritableStream && function(e5) { + const t4 = e5._ownerWritableStream, r5 = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); + it(e5, r5), function(e6, t5) { + "pending" === e6._closedPromiseState ? St(e6, t5) : function(e7, t6) { + wt(e7, t6); + }(e6, t5); + }(e5, r5), t4._writer = void 0, e5._ownerWritableStream = void 0; }(this); } - write(e3) { - return at(this) ? void 0 === this._ownerWritableStream ? d4(yt("write to")) : function(e4, t2) { - const r3 = e4._ownerWritableStream, o3 = r3._writableStreamController, n2 = function(e5, t3) { + write(e5) { + return at(this) ? void 0 === this._ownerWritableStream ? d4(yt("write to")) : function(e6, t4) { + const r5 = e6._ownerWritableStream, o5 = r5._writableStreamController, n4 = function(e7, t5) { try { - return e5._strategySizeAlgorithm(t3); - } catch (t4) { - return ft(e5, t4), 1; + return e7._strategySizeAlgorithm(t5); + } catch (t6) { + return ft(e7, t6), 1; } - }(o3, t2); - if (r3 !== e4._ownerWritableStream) return d4(yt("write to")); - const a3 = r3._state; - if ("errored" === a3) return d4(r3._storedError); - if (rt(r3) || "closed" === a3) return d4(new TypeError("The stream is closing or closed and cannot be written to")); - if ("erroring" === a3) return d4(r3._storedError); - const i3 = function(e5) { - return u2((t3, r4) => { - const o4 = { _resolve: t3, _reject: r4 }; - e5._writeRequests.push(o4); + }(o5, t4); + if (r5 !== e6._ownerWritableStream) return d4(yt("write to")); + const a5 = r5._state; + if ("errored" === a5) return d4(r5._storedError); + if (rt(r5) || "closed" === a5) return d4(new TypeError("The stream is closing or closed and cannot be written to")); + if ("erroring" === a5) return d4(r5._storedError); + const i5 = function(e7) { + return u2((t5, r6) => { + const o6 = { _resolve: t5, _reject: r6 }; + e7._writeRequests.push(o6); }); - }(r3); - return function(e5, t3, r4) { + }(r5); + return function(e7, t5, r6) { try { - ue2(e5, t3, r4); - } catch (t4) { - return void ft(e5, t4); + ue2(e7, t5, r6); + } catch (t6) { + return void ft(e7, t6); } - const o4 = e5._controlledWritableStream; - if (!rt(o4) && "writable" === o4._state) { - nt(o4, bt(e5)); + const o6 = e7._controlledWritableStream; + if (!rt(o6) && "writable" === o6._state) { + nt(o6, bt(e7)); } - dt(e5); - }(o3, t2, n2), i3; - }(this, e3) : d4(mt("write")); + dt(e7); + }(o5, t4, n4), i5; + }(this, e5) : d4(mt("write")); } }; Object.defineProperties(WritableStreamDefaultWriter.prototype, { abort: { enumerable: true }, close: { enumerable: true }, releaseLock: { enumerable: true }, write: { enumerable: true }, closed: { enumerable: true }, desiredSize: { enumerable: true }, ready: { enumerable: true } }), n(WritableStreamDefaultWriter.prototype.abort, "abort"), n(WritableStreamDefaultWriter.prototype.close, "close"), n(WritableStreamDefaultWriter.prototype.releaseLock, "releaseLock"), n(WritableStreamDefaultWriter.prototype.write, "write"), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStreamDefaultWriter.prototype, e2.toStringTag, { value: "WritableStreamDefaultWriter", configurable: true }); @@ -31017,13 +31017,13 @@ var init_ponyfill = __esm({ if (void 0 === this._abortController) throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported"); return this._abortController.signal; } - error(e3) { + error(e5) { if (!st(this)) throw pt("error"); - "writable" === this._controlledWritableStream._state && ht(this, e3); + "writable" === this._controlledWritableStream._state && ht(this, e5); } - [v](e3) { - const t2 = this._abortAlgorithm(e3); - return ut(this), t2; + [v](e5) { + const t4 = this._abortAlgorithm(e5); + return ut(this), t4; } [R2]() { ce2(this); @@ -31031,18 +31031,18 @@ var init_ponyfill = __esm({ }; Object.defineProperties(WritableStreamDefaultController.prototype, { abortReason: { enumerable: true }, signal: { enumerable: true }, error: { enumerable: true } }), "symbol" == typeof e2.toStringTag && Object.defineProperty(WritableStreamDefaultController.prototype, e2.toStringTag, { value: "WritableStreamDefaultController", configurable: true }); Pt = "undefined" != typeof DOMException ? DOMException : void 0; - Wt = function(e3) { - if ("function" != typeof e3 && "object" != typeof e3) return false; + Wt = function(e5) { + if ("function" != typeof e5 && "object" != typeof e5) return false; try { - return new e3(), true; - } catch (e4) { + return new e5(), true; + } catch (e6) { return false; } }(Pt) ? Pt : function() { - const e3 = function(e4, t2) { - this.message = e4 || "", this.name = t2 || "Error", Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); + const e5 = function(e6, t4) { + this.message = e6 || "", this.name = t4 || "Error", Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); }; - return e3.prototype = Object.create(Error.prototype), Object.defineProperty(e3.prototype, "constructor", { value: e3, writable: true, configurable: true }), e3; + return e5.prototype = Object.create(Error.prototype), Object.defineProperty(e5.prototype, "constructor", { value: e5, writable: true, configurable: true }), e5; }(); ReadableStreamDefaultController = class { constructor() { @@ -31055,132 +31055,132 @@ var init_ponyfill = __esm({ close() { if (!Bt(this)) throw Dt("close"); if (!Ft(this)) throw new TypeError("The stream is not in a state that permits close"); - !function(e3) { - if (!Ft(e3)) return; - const t2 = e3._controlledReadableStream; - e3._closeRequested = true, 0 === e3._queue.length && (jt(e3), Xt(t2)); + !function(e5) { + if (!Ft(e5)) return; + const t4 = e5._controlledReadableStream; + e5._closeRequested = true, 0 === e5._queue.length && (jt(e5), Xt(t4)); }(this); } - enqueue(e3) { + enqueue(e5) { if (!Bt(this)) throw Dt("enqueue"); if (!Ft(this)) throw new TypeError("The stream is not in a state that permits enqueue"); - return function(e4, t2) { - if (!Ft(e4)) return; - const r3 = e4._controlledReadableStream; - if (Ut(r3) && X3(r3) > 0) G3(r3, t2, false); + return function(e6, t4) { + if (!Ft(e6)) return; + const r5 = e6._controlledReadableStream; + if (Ut(r5) && X3(r5) > 0) G3(r5, t4, false); else { - let r4; + let r6; try { - r4 = e4._strategySizeAlgorithm(t2); - } catch (t3) { - throw zt(e4, t3), t3; + r6 = e6._strategySizeAlgorithm(t4); + } catch (t5) { + throw zt(e6, t5), t5; } try { - ue2(e4, t2, r4); - } catch (t3) { - throw zt(e4, t3), t3; + ue2(e6, t4, r6); + } catch (t5) { + throw zt(e6, t5), t5; } } - At(e4); - }(this, e3); + At(e6); + }(this, e5); } - error(e3) { + error(e5) { if (!Bt(this)) throw Dt("error"); - zt(this, e3); + zt(this, e5); } - [T2](e3) { + [T2](e5) { ce2(this); - const t2 = this._cancelAlgorithm(e3); - return jt(this), t2; + const t4 = this._cancelAlgorithm(e5); + return jt(this), t4; } - [q2](e3) { - const t2 = this._controlledReadableStream; + [q2](e5) { + const t4 = this._controlledReadableStream; if (this._queue.length > 0) { - const r3 = se(this); - this._closeRequested && 0 === this._queue.length ? (jt(this), Xt(t2)) : At(this), e3._chunkSteps(r3); - } else U4(t2, e3), At(this); + const r5 = se(this); + this._closeRequested && 0 === this._queue.length ? (jt(this), Xt(t4)) : At(this), e5._chunkSteps(r5); + } else U4(t4, e5), At(this); } [C2]() { } }; Object.defineProperties(ReadableStreamDefaultController.prototype, { close: { enumerable: true }, enqueue: { enumerable: true }, error: { enumerable: true }, desiredSize: { enumerable: true } }), n(ReadableStreamDefaultController.prototype.close, "close"), n(ReadableStreamDefaultController.prototype.enqueue, "enqueue"), n(ReadableStreamDefaultController.prototype.error, "error"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStreamDefaultController.prototype, e2.toStringTag, { value: "ReadableStreamDefaultController", configurable: true }); ReadableStream3 = class { - constructor(e3 = {}, t2 = {}) { - void 0 === e3 ? e3 = null : D3(e3, "First parameter"); - const r3 = Ye(t2, "Second parameter"), o3 = function(e4, t3) { - F2(e4, t3); - const r4 = e4, o4 = null == r4 ? void 0 : r4.autoAllocateChunkSize, n3 = null == r4 ? void 0 : r4.cancel, a3 = null == r4 ? void 0 : r4.pull, i3 = null == r4 ? void 0 : r4.start, l3 = null == r4 ? void 0 : r4.type; - return { autoAllocateChunkSize: void 0 === o4 ? void 0 : N3(o4, `${t3} has member 'autoAllocateChunkSize' that`), cancel: void 0 === n3 ? void 0 : $t(n3, r4, `${t3} has member 'cancel' that`), pull: void 0 === a3 ? void 0 : Mt(a3, r4, `${t3} has member 'pull' that`), start: void 0 === i3 ? void 0 : Yt(i3, r4, `${t3} has member 'start' that`), type: void 0 === l3 ? void 0 : Qt(l3, `${t3} has member 'type' that`) }; - }(e3, "First parameter"); - var n2; - if ((n2 = this)._state = "readable", n2._reader = void 0, n2._storedError = void 0, n2._disturbed = false, "bytes" === o3.type) { - if (void 0 !== r3.size) throw new RangeError("The strategy for a byte stream cannot have a size function"); - Oe(this, o3, $e(r3, 0)); + constructor(e5 = {}, t4 = {}) { + void 0 === e5 ? e5 = null : D3(e5, "First parameter"); + const r5 = Ye(t4, "Second parameter"), o5 = function(e6, t5) { + F2(e6, t5); + const r6 = e6, o6 = null == r6 ? void 0 : r6.autoAllocateChunkSize, n5 = null == r6 ? void 0 : r6.cancel, a5 = null == r6 ? void 0 : r6.pull, i5 = null == r6 ? void 0 : r6.start, l5 = null == r6 ? void 0 : r6.type; + return { autoAllocateChunkSize: void 0 === o6 ? void 0 : N3(o6, `${t5} has member 'autoAllocateChunkSize' that`), cancel: void 0 === n5 ? void 0 : $t(n5, r6, `${t5} has member 'cancel' that`), pull: void 0 === a5 ? void 0 : Mt(a5, r6, `${t5} has member 'pull' that`), start: void 0 === i5 ? void 0 : Yt(i5, r6, `${t5} has member 'start' that`), type: void 0 === l5 ? void 0 : Qt(l5, `${t5} has member 'type' that`) }; + }(e5, "First parameter"); + var n4; + if ((n4 = this)._state = "readable", n4._reader = void 0, n4._storedError = void 0, n4._disturbed = false, "bytes" === o5.type) { + if (void 0 !== r5.size) throw new RangeError("The strategy for a byte stream cannot have a size function"); + Oe(this, o5, $e(r5, 0)); } else { - const e4 = Me(r3); - It(this, o3, $e(r3, 1), e4); + const e6 = Me(r5); + It(this, o5, $e(r5, 1), e6); } } get locked() { if (!Vt(this)) throw Kt("locked"); return Ut(this); } - cancel(e3) { - return Vt(this) ? Ut(this) ? d4(new TypeError("Cannot cancel a stream that already has a reader")) : Gt(this, e3) : d4(Kt("cancel")); + cancel(e5) { + return Vt(this) ? Ut(this) ? d4(new TypeError("Cannot cancel a stream that already has a reader")) : Gt(this, e5) : d4(Kt("cancel")); } - getReader(e3) { + getReader(e5) { if (!Vt(this)) throw Kt("getReader"); - return void 0 === function(e4, t2) { - F2(e4, t2); - const r3 = null == e4 ? void 0 : e4.mode; - return { mode: void 0 === r3 ? void 0 : Nt(r3, `${t2} has member 'mode' that`) }; - }(e3, "First parameter").mode ? new ReadableStreamDefaultReader(this) : function(e4) { - return new ReadableStreamBYOBReader(e4); + return void 0 === function(e6, t4) { + F2(e6, t4); + const r5 = null == e6 ? void 0 : e6.mode; + return { mode: void 0 === r5 ? void 0 : Nt(r5, `${t4} has member 'mode' that`) }; + }(e5, "First parameter").mode ? new ReadableStreamDefaultReader(this) : function(e6) { + return new ReadableStreamBYOBReader(e6); }(this); } - pipeThrough(e3, t2 = {}) { + pipeThrough(e5, t4 = {}) { if (!H2(this)) throw Kt("pipeThrough"); - $3(e3, 1, "pipeThrough"); - const r3 = xt(e3, "First parameter"), o3 = Ht(t2, "Second parameter"); + $3(e5, 1, "pipeThrough"); + const r5 = xt(e5, "First parameter"), o5 = Ht(t4, "Second parameter"); if (this.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream"); - if (r3.writable.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream"); - return m3(kt(this, r3.writable, o3.preventClose, o3.preventAbort, o3.preventCancel, o3.signal)), r3.readable; + if (r5.writable.locked) throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream"); + return m3(kt(this, r5.writable, o5.preventClose, o5.preventAbort, o5.preventCancel, o5.signal)), r5.readable; } - pipeTo(e3, t2 = {}) { + pipeTo(e5, t4 = {}) { if (!H2(this)) return d4(Kt("pipeTo")); - if (void 0 === e3) return d4("Parameter 1 is required in 'pipeTo'."); - if (!x(e3)) return d4(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); - let r3; + if (void 0 === e5) return d4("Parameter 1 is required in 'pipeTo'."); + if (!x(e5)) return d4(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); + let r5; try { - r3 = Ht(t2, "Second parameter"); - } catch (e4) { - return d4(e4); + r5 = Ht(t4, "Second parameter"); + } catch (e6) { + return d4(e6); } - return this.locked ? d4(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : e3.locked ? d4(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : kt(this, e3, r3.preventClose, r3.preventAbort, r3.preventCancel, r3.signal); + return this.locked ? d4(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")) : e5.locked ? d4(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")) : kt(this, e5, r5.preventClose, r5.preventAbort, r5.preventCancel, r5.signal); } tee() { if (!H2(this)) throw Kt("tee"); if (this.locked) throw new TypeError("Cannot tee a stream that already has a reader"); return Ot(this); } - values(e3) { + values(e5) { if (!H2(this)) throw Kt("values"); - return function(e4, t2) { - const r3 = e4.getReader(), o3 = new te(r3, t2), n2 = Object.create(re); - return n2._asyncIteratorImpl = o3, n2; - }(this, function(e4, t2) { - F2(e4, t2); - const r3 = null == e4 ? void 0 : e4.preventCancel; - return { preventCancel: Boolean(r3) }; - }(e3, "First parameter").preventCancel); + return function(e6, t4) { + const r5 = e6.getReader(), o5 = new te(r5, t4), n4 = Object.create(re); + return n4._asyncIteratorImpl = o5, n4; + }(this, function(e6, t4) { + F2(e6, t4); + const r5 = null == e6 ? void 0 : e6.preventCancel; + return { preventCancel: Boolean(r5) }; + }(e5, "First parameter").preventCancel); } }; Object.defineProperties(ReadableStream3.prototype, { cancel: { enumerable: true }, getReader: { enumerable: true }, pipeThrough: { enumerable: true }, pipeTo: { enumerable: true }, tee: { enumerable: true }, values: { enumerable: true }, locked: { enumerable: true } }), n(ReadableStream3.prototype.cancel, "cancel"), n(ReadableStream3.prototype.getReader, "getReader"), n(ReadableStream3.prototype.pipeThrough, "pipeThrough"), n(ReadableStream3.prototype.pipeTo, "pipeTo"), n(ReadableStream3.prototype.tee, "tee"), n(ReadableStream3.prototype.values, "values"), "symbol" == typeof e2.toStringTag && Object.defineProperty(ReadableStream3.prototype, e2.toStringTag, { value: "ReadableStream", configurable: true }), "symbol" == typeof e2.asyncIterator && Object.defineProperty(ReadableStream3.prototype, e2.asyncIterator, { value: ReadableStream3.prototype.values, writable: true, configurable: true }); - er = (e3) => e3.byteLength; + er = (e5) => e5.byteLength; n(er, "size"); ByteLengthQueuingStrategy = class { - constructor(e3) { - $3(e3, 1, "ByteLengthQueuingStrategy"), e3 = Zt(e3, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = e3.highWaterMark; + constructor(e5) { + $3(e5, 1, "ByteLengthQueuingStrategy"), e5 = Zt(e5, "First parameter"), this._byteLengthQueuingStrategyHighWaterMark = e5.highWaterMark; } get highWaterMark() { if (!rr(this)) throw tr("highWaterMark"); @@ -31195,8 +31195,8 @@ var init_ponyfill = __esm({ or = () => 1; n(or, "size"); CountQueuingStrategy = class { - constructor(e3) { - $3(e3, 1, "CountQueuingStrategy"), e3 = Zt(e3, "First parameter"), this._countQueuingStrategyHighWaterMark = e3.highWaterMark; + constructor(e5) { + $3(e5, 1, "CountQueuingStrategy"), e5 = Zt(e5, "First parameter"), this._countQueuingStrategyHighWaterMark = e5.highWaterMark; } get highWaterMark() { if (!ar(this)) throw nr("highWaterMark"); @@ -31209,113 +31209,113 @@ var init_ponyfill = __esm({ }; Object.defineProperties(CountQueuingStrategy.prototype, { highWaterMark: { enumerable: true }, size: { enumerable: true } }), "symbol" == typeof e2.toStringTag && Object.defineProperty(CountQueuingStrategy.prototype, e2.toStringTag, { value: "CountQueuingStrategy", configurable: true }); TransformStream2 = class { - constructor(e3 = {}, t2 = {}, r3 = {}) { - void 0 === e3 && (e3 = null); - const o3 = Ye(t2, "Second parameter"), n2 = Ye(r3, "Third parameter"), a3 = function(e4, t3) { - F2(e4, t3); - const r4 = null == e4 ? void 0 : e4.flush, o4 = null == e4 ? void 0 : e4.readableType, n3 = null == e4 ? void 0 : e4.start, a4 = null == e4 ? void 0 : e4.transform, i4 = null == e4 ? void 0 : e4.writableType; - return { flush: void 0 === r4 ? void 0 : ir(r4, e4, `${t3} has member 'flush' that`), readableType: o4, start: void 0 === n3 ? void 0 : lr(n3, e4, `${t3} has member 'start' that`), transform: void 0 === a4 ? void 0 : sr(a4, e4, `${t3} has member 'transform' that`), writableType: i4 }; - }(e3, "First parameter"); - if (void 0 !== a3.readableType) throw new RangeError("Invalid readableType specified"); - if (void 0 !== a3.writableType) throw new RangeError("Invalid writableType specified"); - const i3 = $e(n2, 0), l3 = Me(n2), s2 = $e(o3, 1), f4 = Me(o3); - let b3; - !function(e4, t3, r4, o4, n3, a4) { - function i4() { - return t3; - } - function l4(t4) { - return function(e5, t5) { - const r5 = e5._transformStreamController; - if (e5._backpressure) { - return p2(e5._backpressureChangePromise, () => { - if ("erroring" === (Ge(e5._writable) ? e5._writable._state : e5._writableState)) throw Ge(e5._writable) ? e5._writable._storedError : e5._writableStoredError; - return pr(r5, t5); + constructor(e5 = {}, t4 = {}, r5 = {}) { + void 0 === e5 && (e5 = null); + const o5 = Ye(t4, "Second parameter"), n4 = Ye(r5, "Third parameter"), a5 = function(e6, t5) { + F2(e6, t5); + const r6 = null == e6 ? void 0 : e6.flush, o6 = null == e6 ? void 0 : e6.readableType, n5 = null == e6 ? void 0 : e6.start, a6 = null == e6 ? void 0 : e6.transform, i6 = null == e6 ? void 0 : e6.writableType; + return { flush: void 0 === r6 ? void 0 : ir(r6, e6, `${t5} has member 'flush' that`), readableType: o6, start: void 0 === n5 ? void 0 : lr(n5, e6, `${t5} has member 'start' that`), transform: void 0 === a6 ? void 0 : sr(a6, e6, `${t5} has member 'transform' that`), writableType: i6 }; + }(e5, "First parameter"); + if (void 0 !== a5.readableType) throw new RangeError("Invalid readableType specified"); + if (void 0 !== a5.writableType) throw new RangeError("Invalid writableType specified"); + const i5 = $e(n4, 0), l5 = Me(n4), s4 = $e(o5, 1), f6 = Me(o5); + let b5; + !function(e6, t5, r6, o6, n5, a6) { + function i6() { + return t5; + } + function l6(t6) { + return function(e7, t7) { + const r7 = e7._transformStreamController; + if (e7._backpressure) { + return p2(e7._backpressureChangePromise, () => { + if ("erroring" === (Ge(e7._writable) ? e7._writable._state : e7._writableState)) throw Ge(e7._writable) ? e7._writable._storedError : e7._writableStoredError; + return pr(r7, t7); }); } - return pr(r5, t5); - }(e4, t4); - } - function s3(t4) { - return function(e5, t5) { - return cr(e5, t5), c(void 0); - }(e4, t4); - } - function u3() { - return function(e5) { - const t4 = e5._transformStreamController, r5 = t4._flushAlgorithm(); - return hr(t4), p2(r5, () => { - if ("errored" === e5._readableState) throw e5._readableStoredError; - gr(e5) && wr(e5); - }, (t5) => { - throw cr(e5, t5), e5._readableStoredError; + return pr(r7, t7); + }(e6, t6); + } + function s5(t6) { + return function(e7, t7) { + return cr(e7, t7), c(void 0); + }(e6, t6); + } + function u5() { + return function(e7) { + const t6 = e7._transformStreamController, r7 = t6._flushAlgorithm(); + return hr(t6), p2(r7, () => { + if ("errored" === e7._readableState) throw e7._readableStoredError; + gr(e7) && wr(e7); + }, (t7) => { + throw cr(e7, t7), e7._readableStoredError; }); - }(e4); + }(e6); } - function d5() { - return function(e5) { - return fr(e5, false), e5._backpressureChangePromise; - }(e4); + function d7() { + return function(e7) { + return fr(e7, false), e7._backpressureChangePromise; + }(e6); } - function f5(t4) { - return dr(e4, t4), c(void 0); + function f7(t6) { + return dr(e6, t6), c(void 0); } - e4._writableState = "writable", e4._writableStoredError = void 0, e4._writableHasInFlightOperation = false, e4._writableStarted = false, e4._writable = function(e5, t4, r5, o5, n4, a5, i5) { - return new WritableStream({ start(r6) { - e5._writableController = r6; + e6._writableState = "writable", e6._writableStoredError = void 0, e6._writableHasInFlightOperation = false, e6._writableStarted = false, e6._writable = function(e7, t6, r7, o7, n6, a7, i7) { + return new WritableStream({ start(r8) { + e7._writableController = r8; try { - const t5 = r6.signal; - void 0 !== t5 && t5.addEventListener("abort", () => { - "writable" === e5._writableState && (e5._writableState = "erroring", t5.reason && (e5._writableStoredError = t5.reason)); + const t7 = r8.signal; + void 0 !== t7 && t7.addEventListener("abort", () => { + "writable" === e7._writableState && (e7._writableState = "erroring", t7.reason && (e7._writableStoredError = t7.reason)); }); - } catch (e6) { + } catch (e8) { } - return p2(t4(), () => (e5._writableStarted = true, Cr(e5), null), (t5) => { - throw e5._writableStarted = true, Rr(e5, t5), t5; + return p2(t6(), () => (e7._writableStarted = true, Cr(e7), null), (t7) => { + throw e7._writableStarted = true, Rr(e7, t7), t7; }); - }, write: (t5) => (function(e6) { - e6._writableHasInFlightOperation = true; - }(e5), p2(r5(t5), () => (function(e6) { - e6._writableHasInFlightOperation = false; - }(e5), Cr(e5), null), (t6) => { - throw function(e6, t7) { - e6._writableHasInFlightOperation = false, Rr(e6, t7); - }(e5, t6), t6; - })), close: () => (function(e6) { - e6._writableHasInFlightOperation = true; - }(e5), p2(o5(), () => (function(e6) { - e6._writableHasInFlightOperation = false; - "erroring" === e6._writableState && (e6._writableStoredError = void 0); - e6._writableState = "closed"; - }(e5), null), (t5) => { - throw function(e6, t6) { - e6._writableHasInFlightOperation = false, e6._writableState, Rr(e6, t6); - }(e5, t5), t5; - })), abort: (t5) => (e5._writableState = "errored", e5._writableStoredError = t5, n4(t5)) }, { highWaterMark: a5, size: i5 }); - }(e4, i4, l4, u3, s3, r4, o4), e4._readableState = "readable", e4._readableStoredError = void 0, e4._readableCloseRequested = false, e4._readablePulling = false, e4._readable = function(e5, t4, r5, o5, n4, a5) { - return new ReadableStream3({ start: (r6) => (e5._readableController = r6, t4().catch((t5) => { - Sr(e5, t5); - })), pull: () => (e5._readablePulling = true, r5().catch((t5) => { - Sr(e5, t5); - })), cancel: (t5) => (e5._readableState = "closed", o5(t5)) }, { highWaterMark: n4, size: a5 }); - }(e4, i4, d5, f5, n3, a4), e4._backpressure = void 0, e4._backpressureChangePromise = void 0, e4._backpressureChangePromise_resolve = void 0, fr(e4, true), e4._transformStreamController = void 0; - }(this, u2((e4) => { - b3 = e4; - }), s2, f4, i3, l3), function(e4, t3) { - const r4 = Object.create(TransformStreamDefaultController.prototype); - let o4, n3; - o4 = void 0 !== t3.transform ? (e5) => t3.transform(e5, r4) : (e5) => { + }, write: (t7) => (function(e8) { + e8._writableHasInFlightOperation = true; + }(e7), p2(r7(t7), () => (function(e8) { + e8._writableHasInFlightOperation = false; + }(e7), Cr(e7), null), (t8) => { + throw function(e8, t9) { + e8._writableHasInFlightOperation = false, Rr(e8, t9); + }(e7, t8), t8; + })), close: () => (function(e8) { + e8._writableHasInFlightOperation = true; + }(e7), p2(o7(), () => (function(e8) { + e8._writableHasInFlightOperation = false; + "erroring" === e8._writableState && (e8._writableStoredError = void 0); + e8._writableState = "closed"; + }(e7), null), (t7) => { + throw function(e8, t8) { + e8._writableHasInFlightOperation = false, e8._writableState, Rr(e8, t8); + }(e7, t7), t7; + })), abort: (t7) => (e7._writableState = "errored", e7._writableStoredError = t7, n6(t7)) }, { highWaterMark: a7, size: i7 }); + }(e6, i6, l6, u5, s5, r6, o6), e6._readableState = "readable", e6._readableStoredError = void 0, e6._readableCloseRequested = false, e6._readablePulling = false, e6._readable = function(e7, t6, r7, o7, n6, a7) { + return new ReadableStream3({ start: (r8) => (e7._readableController = r8, t6().catch((t7) => { + Sr(e7, t7); + })), pull: () => (e7._readablePulling = true, r7().catch((t7) => { + Sr(e7, t7); + })), cancel: (t7) => (e7._readableState = "closed", o7(t7)) }, { highWaterMark: n6, size: a7 }); + }(e6, i6, d7, f7, n5, a6), e6._backpressure = void 0, e6._backpressureChangePromise = void 0, e6._backpressureChangePromise_resolve = void 0, fr(e6, true), e6._transformStreamController = void 0; + }(this, u2((e6) => { + b5 = e6; + }), s4, f6, i5, l5), function(e6, t5) { + const r6 = Object.create(TransformStreamDefaultController.prototype); + let o6, n5; + o6 = void 0 !== t5.transform ? (e7) => t5.transform(e7, r6) : (e7) => { try { - return _r(r4, e5), c(void 0); - } catch (e6) { - return d4(e6); + return _r(r6, e7), c(void 0); + } catch (e8) { + return d4(e8); } }; - n3 = void 0 !== t3.flush ? () => t3.flush(r4) : () => c(void 0); - !function(e5, t4, r5, o5) { - t4._controlledTransformStream = e5, e5._transformStreamController = t4, t4._transformAlgorithm = r5, t4._flushAlgorithm = o5; - }(e4, r4, o4, n3); - }(this, a3), void 0 !== a3.start ? b3(a3.start(this._transformStreamController)) : b3(void 0); + n5 = void 0 !== t5.flush ? () => t5.flush(r6) : () => c(void 0); + !function(e7, t6, r7, o7) { + t6._controlledTransformStream = e7, e7._transformStreamController = t6, t6._transformAlgorithm = r7, t6._flushAlgorithm = o7; + }(e6, r6, o6, n5); + }(this, a5), void 0 !== a5.start ? b5(a5.start(this._transformStreamController)) : b5(void 0); } get readable() { if (!ur(this)) throw yr("readable"); @@ -31335,22 +31335,22 @@ var init_ponyfill = __esm({ if (!br(this)) throw mr("desiredSize"); return vr(this._controlledTransformStream); } - enqueue(e3) { + enqueue(e5) { if (!br(this)) throw mr("enqueue"); - _r(this, e3); + _r(this, e5); } - error(e3) { + error(e5) { if (!br(this)) throw mr("error"); - var t2; - t2 = e3, cr(this._controlledTransformStream, t2); + var t4; + t4 = e5, cr(this._controlledTransformStream, t4); } terminate() { if (!br(this)) throw mr("terminate"); - !function(e3) { - const t2 = e3._controlledTransformStream; - gr(t2) && wr(t2); - const r3 = new TypeError("TransformStream terminated"); - dr(t2, r3); + !function(e5) { + const t4 = e5._controlledTransformStream; + gr(t4) && wr(t4); + const r5 = new TypeError("TransformStream terminated"); + dr(t4, r5); }(this); } }; @@ -31445,16 +31445,16 @@ var init_Blob = __esm({ init_ponyfill(); init_isFunction(); init_blobHelpers(); - __classPrivateFieldGet = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; - __classPrivateFieldSet = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; Blob3 = class _Blob { constructor(blobParts = [], options = {}) { @@ -31556,16 +31556,16 @@ var __classPrivateFieldSet2, __classPrivateFieldGet2, _File_name, _File_lastModi var init_File = __esm({ "node_modules/formdata-node/lib/esm/File.js"() { init_Blob(); - __classPrivateFieldSet2 = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet2 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - __classPrivateFieldGet2 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet2 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; File3 = class extends Blob3 { constructor(fileBits, name, options = {}) { @@ -31612,17 +31612,17 @@ var init_isFile = __esm({ // node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/ms/index.js"(exports2, module2) { - var s2 = 1e3; - var m4 = s2 * 60; - var h3 = m4 * 60; - var d5 = h3 * 24; - var w4 = d5 * 7; - var y4 = d5 * 365.25; + var s4 = 1e3; + var m6 = s4 * 60; + var h5 = m6 * 60; + var d7 = h5 * 24; + var w6 = d7 * 7; + var y5 = d7 * 365.25; module2.exports = function(val, options) { options = options || {}; var type2 = typeof val; if (type2 === "string" && val.length > 0) { - return parse2(val); + return parse4(val); } else if (type2 === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } @@ -31630,7 +31630,7 @@ var require_ms = __commonJS({ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse2(str2) { + function parse4(str2) { str2 = String(str2); if (str2.length > 100) { return; @@ -31641,7 +31641,7 @@ var require_ms = __commonJS({ if (!match) { return; } - var n2 = parseFloat(match[1]); + var n4 = parseFloat(match[1]); var type2 = (match[2] || "ms").toLowerCase(); switch (type2) { case "years": @@ -31649,78 +31649,78 @@ var require_ms = __commonJS({ case "yrs": case "yr": case "y": - return n2 * y4; + return n4 * y5; case "weeks": case "week": case "w": - return n2 * w4; + return n4 * w6; case "days": case "day": case "d": - return n2 * d5; + return n4 * d7; case "hours": case "hour": case "hrs": case "hr": case "h": - return n2 * h3; + return n4 * h5; case "minutes": case "minute": case "mins": case "min": case "m": - return n2 * m4; + return n4 * m6; case "seconds": case "second": case "secs": case "sec": case "s": - return n2 * s2; + return n4 * s4; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": - return n2; + return n4; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); - if (msAbs >= d5) { - return Math.round(ms / d5) + "d"; + if (msAbs >= d7) { + return Math.round(ms / d7) + "d"; } - if (msAbs >= h3) { - return Math.round(ms / h3) + "h"; + if (msAbs >= h5) { + return Math.round(ms / h5) + "h"; } - if (msAbs >= m4) { - return Math.round(ms / m4) + "m"; + if (msAbs >= m6) { + return Math.round(ms / m6) + "m"; } - if (msAbs >= s2) { - return Math.round(ms / s2) + "s"; + if (msAbs >= s4) { + return Math.round(ms / s4) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); - if (msAbs >= d5) { - return plural(ms, msAbs, d5, "day"); + if (msAbs >= d7) { + return plural(ms, msAbs, d7, "day"); } - if (msAbs >= h3) { - return plural(ms, msAbs, h3, "hour"); + if (msAbs >= h5) { + return plural(ms, msAbs, h5, "hour"); } - if (msAbs >= m4) { - return plural(ms, msAbs, m4, "minute"); + if (msAbs >= m6) { + return plural(ms, msAbs, m6, "minute"); } - if (msAbs >= s2) { - return plural(ms, msAbs, s2, "second"); + if (msAbs >= s4) { + return plural(ms, msAbs, s4, "second"); } return ms + " ms"; } - function plural(ms, msAbs, n2, name) { - var isPlural = msAbs >= n2 * 1.5; - return Math.round(ms / n2) + " " + name + (isPlural ? "s" : ""); + function plural(ms, msAbs, n4, name) { + var isPlural = msAbs >= n4 * 1.5; + return Math.round(ms / n4) + " " + name + (isPlural ? "s" : ""); } } }); @@ -31731,14 +31731,14 @@ var require_humanize_ms = __commonJS({ "use strict"; var util4 = require("util"); var ms = require_ms(); - module2.exports = function(t2) { - if (typeof t2 === "number") return t2; - var r3 = ms(t2); - if (r3 === void 0) { - var err = new Error(util4.format("humanize-ms(%j) result undefined", t2)); + module2.exports = function(t4) { + if (typeof t4 === "number") return t4; + var r5 = ms(t4); + if (r5 === void 0) { + var err = new Error(util4.format("humanize-ms(%j) result undefined", t4)); console.warn(err.stack); } - return r3; + return r5; }; } }); @@ -32025,7 +32025,7 @@ var require_agent2 = __commonJS({ reqTimeoutListenerCount ); if (debug3.enabled) { - debug3("timeout listeners: %s", socket.listeners("timeout").map((f4) => f4.name).join(", ")); + debug3("timeout listeners: %s", socket.listeners("timeout").map((f6) => f6.name).join(", ")); } agent.timeoutSocketCount++; const name = agent.getName(options); @@ -32193,8 +32193,8 @@ var require_event_target_shim = __commonJS({ }); Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); const keys = Object.keys(event); - for (let i3 = 0; i3 < keys.length; ++i3) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; ++i5) { + const key = keys[i5]; if (!(key in this)) { Object.defineProperty(this, key, defineRedirectDescriptor(key)); } @@ -32423,8 +32423,8 @@ var require_event_target_shim = __commonJS({ CustomEvent.prototype = Object.create(BaseEvent.prototype, { constructor: { value: CustomEvent, configurable: true, writable: true } }); - for (let i3 = 0; i3 < keys.length; ++i3) { - const key = keys[i3]; + for (let i5 = 0; i5 < keys.length; ++i5) { + const key = keys[i5]; if (!(key in BaseEvent.prototype)) { const descriptor = Object.getOwnPropertyDescriptor(proto2, key); const isFunc = typeof descriptor.value === "function"; @@ -32468,8 +32468,8 @@ var require_event_target_shim = __commonJS({ var CAPTURE = 1; var BUBBLE = 2; var ATTRIBUTE = 3; - function isObject3(x2) { - return x2 !== null && typeof x2 === "object"; + function isObject3(x4) { + return x4 !== null && typeof x4 === "object"; } function getListeners(eventTarget) { const listeners = listenersMap.get(eventTarget); @@ -32551,8 +32551,8 @@ var require_event_target_shim = __commonJS({ writable: true } }); - for (let i3 = 0; i3 < eventNames.length; ++i3) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i3]); + for (let i5 = 0; i5 < eventNames.length; ++i5) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i5]); } return CustomEventTarget; } @@ -32566,8 +32566,8 @@ var require_event_target_shim = __commonJS({ } if (arguments.length > 0) { const types = new Array(arguments.length); - for (let i3 = 0; i3 < arguments.length; ++i3) { - types[i3] = arguments[i3]; + for (let i5 = 0; i5 < arguments.length; ++i5) { + types[i5] = arguments[i5]; } return defineCustomEventTarget(types); } @@ -32823,8 +32823,8 @@ var require_ponyfill_es2018 = __commonJS({ function noop2() { return void 0; } - function typeIsObject(x2) { - return typeof x2 === "object" && x2 !== null || typeof x2 === "function"; + function typeIsObject(x4) { + return typeof x4 === "object" && x4 !== null || typeof x4 === "function"; } const rethrowAssertionErrorRejection = noop2; function setFunctionName(fn, name) { @@ -32833,7 +32833,7 @@ var require_ponyfill_es2018 = __commonJS({ value: name, configurable: true }); - } catch (_a6) { + } catch (_a7) { } } const originalPromise = Promise; @@ -32875,15 +32875,15 @@ var require_ponyfill_es2018 = __commonJS({ } return _queueMicrotask(callback); }; - function reflectCall(F3, V4, args) { - if (typeof F3 !== "function") { + function reflectCall(F4, V4, args) { + if (typeof F4 !== "function") { throw new TypeError("Argument is not a function"); } - return Function.prototype.apply.call(F3, V4, args); + return Function.prototype.apply.call(F4, V4, args); } - function promiseCall(F3, V4, args) { + function promiseCall(F4, V4, args) { try { - return promiseResolvedWith(reflectCall(F3, V4, args)); + return promiseResolvedWith(reflectCall(F4, V4, args)); } catch (value) { return promiseRejectedWith(value); } @@ -32954,20 +32954,20 @@ var require_ponyfill_es2018 = __commonJS({ // with undefined values until we either "catch up" with elements that still // exist or reach the back of the queue. forEach(callback) { - let i3 = this._cursor; + let i5 = this._cursor; let node = this._front; let elements = node._elements; - while (i3 !== elements.length || node._next !== void 0) { - if (i3 === elements.length) { + while (i5 !== elements.length || node._next !== void 0) { + if (i5 === elements.length) { node = node._next; elements = node._elements; - i3 = 0; + i5 = 0; if (elements.length === 0) { break; } } - callback(elements[i3]); - ++i3; + callback(elements[i5]); + ++i5; } } // Return the element that would be returned if shift() was called now, @@ -33046,71 +33046,71 @@ var require_ponyfill_es2018 = __commonJS({ reader._closedPromise_resolve = void 0; reader._closedPromise_reject = void 0; } - const NumberIsFinite = Number.isFinite || function(x2) { - return typeof x2 === "number" && isFinite(x2); + const NumberIsFinite = Number.isFinite || function(x4) { + return typeof x4 === "number" && isFinite(x4); }; - const MathTrunc = Math.trunc || function(v2) { - return v2 < 0 ? Math.ceil(v2) : Math.floor(v2); + const MathTrunc = Math.trunc || function(v7) { + return v7 < 0 ? Math.ceil(v7) : Math.floor(v7); }; - function isDictionary(x2) { - return typeof x2 === "object" || typeof x2 === "function"; + function isDictionary(x4) { + return typeof x4 === "object" || typeof x4 === "function"; } function assertDictionary(obj, context2) { if (obj !== void 0 && !isDictionary(obj)) { throw new TypeError(`${context2} is not an object.`); } } - function assertFunction(x2, context2) { - if (typeof x2 !== "function") { + function assertFunction(x4, context2) { + if (typeof x4 !== "function") { throw new TypeError(`${context2} is not a function.`); } } - function isObject3(x2) { - return typeof x2 === "object" && x2 !== null || typeof x2 === "function"; + function isObject3(x4) { + return typeof x4 === "object" && x4 !== null || typeof x4 === "function"; } - function assertObject(x2, context2) { - if (!isObject3(x2)) { + function assertObject(x4, context2) { + if (!isObject3(x4)) { throw new TypeError(`${context2} is not an object.`); } } - function assertRequiredArgument(x2, position, context2) { - if (x2 === void 0) { + function assertRequiredArgument(x4, position, context2) { + if (x4 === void 0) { throw new TypeError(`Parameter ${position} is required in '${context2}'.`); } } - function assertRequiredField(x2, field, context2) { - if (x2 === void 0) { + function assertRequiredField(x4, field, context2) { + if (x4 === void 0) { throw new TypeError(`${field} is required in '${context2}'.`); } } function convertUnrestrictedDouble(value) { return Number(value); } - function censorNegativeZero(x2) { - return x2 === 0 ? 0 : x2; + function censorNegativeZero(x4) { + return x4 === 0 ? 0 : x4; } - function integerPart(x2) { - return censorNegativeZero(MathTrunc(x2)); + function integerPart(x4) { + return censorNegativeZero(MathTrunc(x4)); } function convertUnsignedLongLongWithEnforceRange(value, context2) { const lowerBound = 0; const upperBound = Number.MAX_SAFE_INTEGER; - let x2 = Number(value); - x2 = censorNegativeZero(x2); - if (!NumberIsFinite(x2)) { + let x4 = Number(value); + x4 = censorNegativeZero(x4); + if (!NumberIsFinite(x4)) { throw new TypeError(`${context2} is not a finite number`); } - x2 = integerPart(x2); - if (x2 < lowerBound || x2 > upperBound) { + x4 = integerPart(x4); + if (x4 < lowerBound || x4 > upperBound) { throw new TypeError(`${context2} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`); } - if (!NumberIsFinite(x2) || x2 === 0) { + if (!NumberIsFinite(x4) || x4 === 0) { return 0; } - return x2; + return x4; } - function assertReadableStream(x2, context2) { - if (!IsReadableStream(x2)) { + function assertReadableStream(x4, context2) { + if (!IsReadableStream(x4)) { throw new TypeError(`${context2} is not a ReadableStream.`); } } @@ -33195,7 +33195,7 @@ var require_ponyfill_es2018 = __commonJS({ const readRequest = { _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }), _closeSteps: () => resolvePromise({ value: void 0, done: true }), - _errorSteps: (e3) => rejectPromise(e3) + _errorSteps: (e5) => rejectPromise(e5) }; ReadableStreamDefaultReaderRead(this, readRequest); return promise; @@ -33234,14 +33234,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamDefaultReader(x2) { - if (!typeIsObject(x2)) { + function IsReadableStreamDefaultReader(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_readRequests")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_readRequests")) { return false; } - return x2 instanceof ReadableStreamDefaultReader2; + return x4 instanceof ReadableStreamDefaultReader2; } function ReadableStreamDefaultReaderRead(reader, readRequest) { const stream4 = reader._ownerReadableStream; @@ -33256,14 +33256,14 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableStreamDefaultReaderRelease(reader) { ReadableStreamReaderGenericRelease(reader); - const e3 = new TypeError("Reader was released"); - ReadableStreamDefaultReaderErrorReadRequests(reader, e3); + const e5 = new TypeError("Reader was released"); + ReadableStreamDefaultReaderErrorReadRequests(reader, e5); } - function ReadableStreamDefaultReaderErrorReadRequests(reader, e3) { + function ReadableStreamDefaultReaderErrorReadRequests(reader, e5) { const readRequests = reader._readRequests; reader._readRequests = new SimpleQueue(); readRequests.forEach((readRequest) => { - readRequest._errorSteps(e3); + readRequest._errorSteps(e5); }); } function defaultReaderBrandCheckException(name) { @@ -33356,31 +33356,31 @@ var require_ponyfill_es2018 = __commonJS({ iterator2._asyncIteratorImpl = impl; return iterator2; } - function IsReadableStreamAsyncIterator(x2) { - if (!typeIsObject(x2)) { + function IsReadableStreamAsyncIterator(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_asyncIteratorImpl")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_asyncIteratorImpl")) { return false; } try { - return x2._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl; - } catch (_a6) { + return x4._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl; + } catch (_a7) { return false; } } function streamAsyncIteratorBrandCheckException(name) { return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`); } - const NumberIsNaN = Number.isNaN || function(x2) { - return x2 !== x2; + const NumberIsNaN = Number.isNaN || function(x4) { + return x4 !== x4; }; - var _a5, _b2, _c2; + var _a6, _b2, _c2; function CreateArrayFromList(elements) { return elements.slice(); } - function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n2) { - new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n2), destOffset); + function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n4) { + new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n4), destOffset); } let TransferArrayBuffer = (O3) => { if (typeof O3.transfer === "function") { @@ -33429,7 +33429,7 @@ var require_ponyfill_es2018 = __commonJS({ const nextMethod = asyncIterator2.next; return { iterator: asyncIterator2, nextMethod, done: false }; } - const SymbolAsyncIterator = (_c2 = (_a5 = Symbol.asyncIterator) !== null && _a5 !== void 0 ? _a5 : (_b2 = Symbol.for) === null || _b2 === void 0 ? void 0 : _b2.call(Symbol, "Symbol.asyncIterator")) !== null && _c2 !== void 0 ? _c2 : "@@asyncIterator"; + const SymbolAsyncIterator = (_c2 = (_a6 = Symbol.asyncIterator) !== null && _a6 !== void 0 ? _a6 : (_b2 = Symbol.for) === null || _b2 === void 0 ? void 0 : _b2.call(Symbol, "Symbol.asyncIterator")) !== null && _c2 !== void 0 ? _c2 : "@@asyncIterator"; function GetIterator(obj, hint = "sync", method) { if (method === void 0) { if (hint === "async") { @@ -33466,14 +33466,14 @@ var require_ponyfill_es2018 = __commonJS({ function IteratorValue(iterResult) { return iterResult.value; } - function IsNonNegativeNumber(v2) { - if (typeof v2 !== "number") { + function IsNonNegativeNumber(v7) { + if (typeof v7 !== "number") { return false; } - if (NumberIsNaN(v2)) { + if (NumberIsNaN(v7)) { return false; } - if (v2 < 0) { + if (v7 < 0) { return false; } return true; @@ -33608,9 +33608,9 @@ var require_ponyfill_es2018 = __commonJS({ if (this._closeRequested) { throw new TypeError("The stream has already been closed; do not close it again!"); } - const state2 = this._controlledReadableByteStream._state; - if (state2 !== "readable") { - throw new TypeError(`The stream (in ${state2} state) is not in the readable state and cannot be closed`); + const state3 = this._controlledReadableByteStream._state; + if (state3 !== "readable") { + throw new TypeError(`The stream (in ${state3} state) is not in the readable state and cannot be closed`); } ReadableByteStreamControllerClose(this); } @@ -33631,20 +33631,20 @@ var require_ponyfill_es2018 = __commonJS({ if (this._closeRequested) { throw new TypeError("stream is closed or draining"); } - const state2 = this._controlledReadableByteStream._state; - if (state2 !== "readable") { - throw new TypeError(`The stream (in ${state2} state) is not in the readable state and cannot be enqueued to`); + const state3 = this._controlledReadableByteStream._state; + if (state3 !== "readable") { + throw new TypeError(`The stream (in ${state3} state) is not in the readable state and cannot be enqueued to`); } ReadableByteStreamControllerEnqueue(this, chunk); } /** * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsReadableByteStreamController(this)) { throw byteStreamControllerBrandCheckException("error"); } - ReadableByteStreamControllerError(this, e3); + ReadableByteStreamControllerError(this, e5); } /** @internal */ [CancelSteps](reason) { @@ -33712,23 +33712,23 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableByteStreamController(x2) { - if (!typeIsObject(x2)) { + function IsReadableByteStreamController(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_controlledReadableByteStream")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_controlledReadableByteStream")) { return false; } - return x2 instanceof ReadableByteStreamController2; + return x4 instanceof ReadableByteStreamController2; } - function IsReadableStreamBYOBRequest(x2) { - if (!typeIsObject(x2)) { + function IsReadableStreamBYOBRequest(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_associatedReadableByteStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_associatedReadableByteStreamController")) { return false; } - return x2 instanceof ReadableStreamBYOBRequest2; + return x4 instanceof ReadableStreamBYOBRequest2; } function ReadableByteStreamControllerCallPullIfNeeded(controller) { const shouldPull = ReadableByteStreamControllerShouldCallPull(controller); @@ -33748,8 +33748,8 @@ var require_ponyfill_es2018 = __commonJS({ ReadableByteStreamControllerCallPullIfNeeded(controller); } return null; - }, (e3) => { - ReadableByteStreamControllerError(controller, e3); + }, (e5) => { + ReadableByteStreamControllerError(controller, e5); return null; }); } @@ -33873,8 +33873,8 @@ var require_ponyfill_es2018 = __commonJS({ let buffer; try { buffer = TransferArrayBuffer(view.buffer); - } catch (e3) { - readIntoRequest._errorSteps(e3); + } catch (e5) { + readIntoRequest._errorSteps(e5); return; } const pullIntoDescriptor = { @@ -33906,9 +33906,9 @@ var require_ponyfill_es2018 = __commonJS({ return; } if (controller._closeRequested) { - const e3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - ReadableByteStreamControllerError(controller, e3); - readIntoRequest._errorSteps(e3); + const e5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + ReadableByteStreamControllerError(controller, e5); + readIntoRequest._errorSteps(e5); return; } } @@ -33951,8 +33951,8 @@ var require_ponyfill_es2018 = __commonJS({ function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { const firstDescriptor = controller._pendingPullIntos.peek(); ReadableByteStreamControllerInvalidateBYOBRequest(controller); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor); } else { ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); @@ -34002,9 +34002,9 @@ var require_ponyfill_es2018 = __commonJS({ if (controller._pendingPullIntos.length > 0) { const firstPendingPullInto = controller._pendingPullIntos.peek(); if (firstPendingPullInto.bytesFilled % firstPendingPullInto.elementSize !== 0) { - const e3 = new TypeError("Insufficient bytes to fill elements in the given buffer"); - ReadableByteStreamControllerError(controller, e3); - throw e3; + const e5 = new TypeError("Insufficient bytes to fill elements in the given buffer"); + ReadableByteStreamControllerError(controller, e5); + throw e5; } } ReadableByteStreamControllerClearAlgorithms(controller); @@ -34050,7 +34050,7 @@ var require_ponyfill_es2018 = __commonJS({ } ReadableByteStreamControllerCallPullIfNeeded(controller); } - function ReadableByteStreamControllerError(controller, e3) { + function ReadableByteStreamControllerError(controller, e5) { const stream4 = controller._controlledReadableByteStream; if (stream4._state !== "readable") { return; @@ -34058,7 +34058,7 @@ var require_ponyfill_es2018 = __commonJS({ ReadableByteStreamControllerClearPendingPullIntos(controller); ResetQueue(controller); ReadableByteStreamControllerClearAlgorithms(controller); - ReadableStreamError(stream4, e3); + ReadableStreamError(stream4, e5); } function ReadableByteStreamControllerFillReadRequestFromQueue(controller, readRequest) { const entry = controller._queue.shift(); @@ -34078,19 +34078,19 @@ var require_ponyfill_es2018 = __commonJS({ return controller._byobRequest; } function ReadableByteStreamControllerGetDesiredSize(controller) { - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "errored") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "errored") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return controller._strategyHWM - controller._queueTotalSize; } function ReadableByteStreamControllerRespond(controller, bytesWritten) { const firstDescriptor = controller._pendingPullIntos.peek(); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { if (bytesWritten !== 0) { throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream"); } @@ -34107,8 +34107,8 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableByteStreamControllerRespondWithNewView(controller, view) { const firstDescriptor = controller._pendingPullIntos.peek(); - const state2 = controller._controlledReadableByteStream._state; - if (state2 === "closed") { + const state3 = controller._controlledReadableByteStream._state; + if (state3 === "closed") { if (view.byteLength !== 0) { throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream"); } @@ -34150,8 +34150,8 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; ReadableByteStreamControllerCallPullIfNeeded(controller); return null; - }, (r3) => { - ReadableByteStreamControllerError(controller, r3); + }, (r5) => { + ReadableByteStreamControllerError(controller, r5); return null; }); } @@ -34206,9 +34206,9 @@ var require_ponyfill_es2018 = __commonJS({ return mode; } function convertByobReadOptions(options, context2) { - var _a6; + var _a7; assertDictionary(options, context2); - const min = (_a6 = options === null || options === void 0 ? void 0 : options.min) !== null && _a6 !== void 0 ? _a6 : 1; + const min = (_a7 = options === null || options === void 0 ? void 0 : options.min) !== null && _a7 !== void 0 ? _a7 : 1; return { min: convertUnsignedLongLongWithEnforceRange(min, `${context2} has member 'min' that`) }; @@ -34295,8 +34295,8 @@ var require_ponyfill_es2018 = __commonJS({ let options; try { options = convertByobReadOptions(rawOptions, "options"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const min = options.min; if (min === 0) { @@ -34321,7 +34321,7 @@ var require_ponyfill_es2018 = __commonJS({ const readIntoRequest = { _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }), _closeSteps: (chunk) => resolvePromise({ value: chunk, done: true }), - _errorSteps: (e3) => rejectPromise(e3) + _errorSteps: (e5) => rejectPromise(e5) }; ReadableStreamBYOBReaderRead(this, view, min, readIntoRequest); return promise; @@ -34360,14 +34360,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamBYOBReader(x2) { - if (!typeIsObject(x2)) { + function IsReadableStreamBYOBReader(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_readIntoRequests")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_readIntoRequests")) { return false; } - return x2 instanceof ReadableStreamBYOBReader2; + return x4 instanceof ReadableStreamBYOBReader2; } function ReadableStreamBYOBReaderRead(reader, view, min, readIntoRequest) { const stream4 = reader._ownerReadableStream; @@ -34380,14 +34380,14 @@ var require_ponyfill_es2018 = __commonJS({ } function ReadableStreamBYOBReaderRelease(reader) { ReadableStreamReaderGenericRelease(reader); - const e3 = new TypeError("Reader was released"); - ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3); + const e5 = new TypeError("Reader was released"); + ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5); } - function ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3) { + function ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5) { const readIntoRequests = reader._readIntoRequests; reader._readIntoRequests = new SimpleQueue(); readIntoRequests.forEach((readIntoRequest) => { - readIntoRequest._errorSteps(e3); + readIntoRequest._errorSteps(e5); }); } function byobReaderBrandCheckException(name) { @@ -34454,8 +34454,8 @@ var require_ponyfill_es2018 = __commonJS({ assertFunction(fn, context2); return (chunk, controller) => promiseCall(fn, original, [chunk, controller]); } - function assertWritableStream(x2, context2) { - if (!IsWritableStream(x2)) { + function assertWritableStream(x4, context2) { + if (!IsWritableStream(x4)) { throw new TypeError(`${context2} is not a WritableStream.`); } } @@ -34465,7 +34465,7 @@ var require_ponyfill_es2018 = __commonJS({ } try { return typeof value.aborted === "boolean"; - } catch (_a6) { + } catch (_a7) { return false; } } @@ -34593,14 +34593,14 @@ var require_ponyfill_es2018 = __commonJS({ stream4._pendingAbortRequest = void 0; stream4._backpressure = false; } - function IsWritableStream(x2) { - if (!typeIsObject(x2)) { + function IsWritableStream(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_writableStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_writableStreamController")) { return false; } - return x2 instanceof WritableStream2; + return x4 instanceof WritableStream2; } function IsWritableStreamLocked(stream4) { if (stream4._writer === void 0) { @@ -34609,21 +34609,21 @@ var require_ponyfill_es2018 = __commonJS({ return true; } function WritableStreamAbort(stream4, reason) { - var _a6; + var _a7; if (stream4._state === "closed" || stream4._state === "errored") { return promiseResolvedWith(void 0); } stream4._writableStreamController._abortReason = reason; - (_a6 = stream4._writableStreamController._abortController) === null || _a6 === void 0 ? void 0 : _a6.abort(reason); - const state2 = stream4._state; - if (state2 === "closed" || state2 === "errored") { + (_a7 = stream4._writableStreamController._abortController) === null || _a7 === void 0 ? void 0 : _a7.abort(reason); + const state3 = stream4._state; + if (state3 === "closed" || state3 === "errored") { return promiseResolvedWith(void 0); } if (stream4._pendingAbortRequest !== void 0) { return stream4._pendingAbortRequest._promise; } let wasAlreadyErroring = false; - if (state2 === "erroring") { + if (state3 === "erroring") { wasAlreadyErroring = true; reason = void 0; } @@ -34643,9 +34643,9 @@ var require_ponyfill_es2018 = __commonJS({ return promise; } function WritableStreamClose(stream4) { - const state2 = stream4._state; - if (state2 === "closed" || state2 === "errored") { - return promiseRejectedWith(new TypeError(`The stream (in ${state2} state) is not in the writable state and cannot be closed`)); + const state3 = stream4._state; + if (state3 === "closed" || state3 === "errored") { + return promiseRejectedWith(new TypeError(`The stream (in ${state3} state) is not in the writable state and cannot be closed`)); } const promise = newPromise((resolve, reject) => { const closeRequest = { @@ -34655,7 +34655,7 @@ var require_ponyfill_es2018 = __commonJS({ stream4._closeRequest = closeRequest; }); const writer = stream4._writer; - if (writer !== void 0 && stream4._backpressure && state2 === "writable") { + if (writer !== void 0 && stream4._backpressure && state3 === "writable") { defaultWriterReadyPromiseResolve(writer); } WritableStreamDefaultControllerClose(stream4._writableStreamController); @@ -34672,8 +34672,8 @@ var require_ponyfill_es2018 = __commonJS({ return promise; } function WritableStreamDealWithRejection(stream4, error) { - const state2 = stream4._state; - if (state2 === "writable") { + const state3 = stream4._state; + if (state3 === "writable") { WritableStreamStartErroring(stream4, error); return; } @@ -34733,8 +34733,8 @@ var require_ponyfill_es2018 = __commonJS({ function WritableStreamFinishInFlightClose(stream4) { stream4._inFlightCloseRequest._resolve(void 0); stream4._inFlightCloseRequest = void 0; - const state2 = stream4._state; - if (state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "erroring") { stream4._storedError = void 0; if (stream4._pendingAbortRequest !== void 0) { stream4._pendingAbortRequest._resolve(); @@ -34805,18 +34805,18 @@ var require_ponyfill_es2018 = __commonJS({ } this._ownerWritableStream = stream4; stream4._writer = this; - const state2 = stream4._state; - if (state2 === "writable") { + const state3 = stream4._state; + if (state3 === "writable") { if (!WritableStreamCloseQueuedOrInFlight(stream4) && stream4._backpressure) { defaultWriterReadyPromiseInitialize(this); } else { defaultWriterReadyPromiseInitializeAsResolved(this); } defaultWriterClosedPromiseInitialize(this); - } else if (state2 === "erroring") { + } else if (state3 === "erroring") { defaultWriterReadyPromiseInitializeAsRejected(this, stream4._storedError); defaultWriterClosedPromiseInitialize(this); - } else if (state2 === "closed") { + } else if (state3 === "closed") { defaultWriterReadyPromiseInitializeAsResolved(this); defaultWriterClosedPromiseInitializeAsResolved(this); } else { @@ -34943,14 +34943,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsWritableStreamDefaultWriter(x2) { - if (!typeIsObject(x2)) { + function IsWritableStreamDefaultWriter(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_ownerWritableStream")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_ownerWritableStream")) { return false; } - return x2 instanceof WritableStreamDefaultWriter2; + return x4 instanceof WritableStreamDefaultWriter2; } function WritableStreamDefaultWriterAbort(writer, reason) { const stream4 = writer._ownerWritableStream; @@ -34962,11 +34962,11 @@ var require_ponyfill_es2018 = __commonJS({ } function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { const stream4 = writer._ownerWritableStream; - const state2 = stream4._state; - if (WritableStreamCloseQueuedOrInFlight(stream4) || state2 === "closed") { + const state3 = stream4._state; + if (WritableStreamCloseQueuedOrInFlight(stream4) || state3 === "closed") { return promiseResolvedWith(void 0); } - if (state2 === "errored") { + if (state3 === "errored") { return promiseRejectedWith(stream4._storedError); } return WritableStreamDefaultWriterClose(writer); @@ -34987,11 +34987,11 @@ var require_ponyfill_es2018 = __commonJS({ } function WritableStreamDefaultWriterGetDesiredSize(writer) { const stream4 = writer._ownerWritableStream; - const state2 = stream4._state; - if (state2 === "errored" || state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "errored" || state3 === "erroring") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return WritableStreamDefaultControllerGetDesiredSize(stream4._writableStreamController); @@ -35011,14 +35011,14 @@ var require_ponyfill_es2018 = __commonJS({ if (stream4 !== writer._ownerWritableStream) { return promiseRejectedWith(defaultWriterLockException("write to")); } - const state2 = stream4._state; - if (state2 === "errored") { + const state3 = stream4._state; + if (state3 === "errored") { return promiseRejectedWith(stream4._storedError); } - if (WritableStreamCloseQueuedOrInFlight(stream4) || state2 === "closed") { + if (WritableStreamCloseQueuedOrInFlight(stream4) || state3 === "closed") { return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to")); } - if (state2 === "erroring") { + if (state3 === "erroring") { return promiseRejectedWith(stream4._storedError); } const promise = WritableStreamAddWriteRequest(stream4); @@ -35062,15 +35062,15 @@ var require_ponyfill_es2018 = __commonJS({ * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the * normal lifecycle of interactions with the underlying sink. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsWritableStreamDefaultController(this)) { throw defaultControllerBrandCheckException$2("error"); } - const state2 = this._controlledWritableStream._state; - if (state2 !== "writable") { + const state3 = this._controlledWritableStream._state; + if (state3 !== "writable") { return; } - WritableStreamDefaultControllerError(this, e3); + WritableStreamDefaultControllerError(this, e5); } /** @internal */ [AbortSteps](reason) { @@ -35094,14 +35094,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsWritableStreamDefaultController(x2) { - if (!typeIsObject(x2)) { + function IsWritableStreamDefaultController(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_controlledWritableStream")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_controlledWritableStream")) { return false; } - return x2 instanceof WritableStreamDefaultController2; + return x4 instanceof WritableStreamDefaultController2; } function SetUpWritableStreamDefaultController(stream4, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { controller._controlledWritableStream = stream4; @@ -35125,9 +35125,9 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); return null; - }, (r3) => { + }, (r5) => { controller._started = true; - WritableStreamDealWithRejection(stream4, r3); + WritableStreamDealWithRejection(stream4, r5); return null; }); } @@ -35202,8 +35202,8 @@ var require_ponyfill_es2018 = __commonJS({ if (stream4._inFlightWriteRequest !== void 0) { return; } - const state2 = stream4._state; - if (state2 === "erroring") { + const state3 = stream4._state; + if (state3 === "erroring") { WritableStreamFinishErroring(stream4); return; } @@ -35242,9 +35242,9 @@ var require_ponyfill_es2018 = __commonJS({ const sinkWritePromise = controller._writeAlgorithm(chunk); uponPromise(sinkWritePromise, () => { WritableStreamFinishInFlightWrite(stream4); - const state2 = stream4._state; + const state3 = stream4._state; DequeueValue(controller); - if (!WritableStreamCloseQueuedOrInFlight(stream4) && state2 === "writable") { + if (!WritableStreamCloseQueuedOrInFlight(stream4) && state3 === "writable") { const backpressure = WritableStreamDefaultControllerGetBackpressure(controller); WritableStreamUpdateBackpressure(stream4, backpressure); } @@ -35377,7 +35377,7 @@ var require_ponyfill_es2018 = __commonJS({ try { new ctor(); return true; - } catch (_a6) { + } catch (_a7) { return false; } } @@ -35595,11 +35595,11 @@ var require_ponyfill_es2018 = __commonJS({ /** * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. */ - error(e3 = void 0) { + error(e5 = void 0) { if (!IsReadableStreamDefaultController(this)) { throw defaultControllerBrandCheckException$1("error"); } - ReadableStreamDefaultControllerError(this, e3); + ReadableStreamDefaultControllerError(this, e5); } /** @internal */ [CancelSteps](reason) { @@ -35644,14 +35644,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsReadableStreamDefaultController(x2) { - if (!typeIsObject(x2)) { + function IsReadableStreamDefaultController(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_controlledReadableStream")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_controlledReadableStream")) { return false; } - return x2 instanceof ReadableStreamDefaultController2; + return x4 instanceof ReadableStreamDefaultController2; } function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); @@ -35671,8 +35671,8 @@ var require_ponyfill_es2018 = __commonJS({ ReadableStreamDefaultControllerCallPullIfNeeded(controller); } return null; - }, (e3) => { - ReadableStreamDefaultControllerError(controller, e3); + }, (e5) => { + ReadableStreamDefaultControllerError(controller, e5); return null; }); } @@ -35733,21 +35733,21 @@ var require_ponyfill_es2018 = __commonJS({ } ReadableStreamDefaultControllerCallPullIfNeeded(controller); } - function ReadableStreamDefaultControllerError(controller, e3) { + function ReadableStreamDefaultControllerError(controller, e5) { const stream4 = controller._controlledReadableStream; if (stream4._state !== "readable") { return; } ResetQueue(controller); ReadableStreamDefaultControllerClearAlgorithms(controller); - ReadableStreamError(stream4, e3); + ReadableStreamError(stream4, e5); } function ReadableStreamDefaultControllerGetDesiredSize(controller) { - const state2 = controller._controlledReadableStream._state; - if (state2 === "errored") { + const state3 = controller._controlledReadableStream._state; + if (state3 === "errored") { return null; } - if (state2 === "closed") { + if (state3 === "closed") { return 0; } return controller._strategyHWM - controller._queueTotalSize; @@ -35759,8 +35759,8 @@ var require_ponyfill_es2018 = __commonJS({ return true; } function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { - const state2 = controller._controlledReadableStream._state; - if (!controller._closeRequested && state2 === "readable") { + const state3 = controller._controlledReadableStream._state; + if (!controller._closeRequested && state3 === "readable") { return true; } return false; @@ -35784,8 +35784,8 @@ var require_ponyfill_es2018 = __commonJS({ controller._started = true; ReadableStreamDefaultControllerCallPullIfNeeded(controller); return null; - }, (r3) => { - ReadableStreamDefaultControllerError(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(controller, r5); return null; }); } @@ -35901,9 +35901,9 @@ var require_ponyfill_es2018 = __commonJS({ } branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); - uponRejection(reader._closedPromise, (r3) => { - ReadableStreamDefaultControllerError(branch1._readableStreamController, r3); - ReadableStreamDefaultControllerError(branch2._readableStreamController, r3); + uponRejection(reader._closedPromise, (r5) => { + ReadableStreamDefaultControllerError(branch1._readableStreamController, r5); + ReadableStreamDefaultControllerError(branch2._readableStreamController, r5); if (!canceled1 || !canceled2) { resolveCancelPromise(void 0); } @@ -35927,12 +35927,12 @@ var require_ponyfill_es2018 = __commonJS({ resolveCancelPromise = resolve; }); function forwardReaderError(thisReader) { - uponRejection(thisReader._closedPromise, (r3) => { + uponRejection(thisReader._closedPromise, (r5) => { if (thisReader !== reader) { return null; } - ReadableByteStreamControllerError(branch1._readableStreamController, r3); - ReadableByteStreamControllerError(branch2._readableStreamController, r3); + ReadableByteStreamControllerError(branch1._readableStreamController, r5); + ReadableByteStreamControllerError(branch2._readableStreamController, r5); if (!canceled1 || !canceled2) { resolveCancelPromise(void 0); } @@ -36141,8 +36141,8 @@ var require_ponyfill_es2018 = __commonJS({ let nextResult; try { nextResult = IteratorNext(iteratorRecord); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const nextPromise = promiseResolvedWith(nextResult); return transformPromiseWith(nextPromise, (iterResult) => { @@ -36163,8 +36163,8 @@ var require_ponyfill_es2018 = __commonJS({ let returnMethod; try { returnMethod = GetMethod(iterator2, "return"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } if (returnMethod === void 0) { return promiseResolvedWith(void 0); @@ -36172,8 +36172,8 @@ var require_ponyfill_es2018 = __commonJS({ let returnResult; try { returnResult = reflectCall(returnMethod, iterator2, [reason]); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } const returnPromise = promiseResolvedWith(returnResult); return transformPromiseWith(returnPromise, (iterResult) => { @@ -36193,8 +36193,8 @@ var require_ponyfill_es2018 = __commonJS({ let readPromise; try { readPromise = reader.read(); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } return transformPromiseWith(readPromise, (readResult) => { if (!typeIsObject(readResult)) { @@ -36211,8 +36211,8 @@ var require_ponyfill_es2018 = __commonJS({ function cancelAlgorithm(reason) { try { return promiseResolvedWith(reader.cancel(reason)); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } } stream4 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, 0); @@ -36375,8 +36375,8 @@ var require_ponyfill_es2018 = __commonJS({ let options; try { options = convertPipeOptions(rawOptions, "Second parameter"); - } catch (e3) { - return promiseRejectedWith(e3); + } catch (e5) { + return promiseRejectedWith(e5); } if (IsReadableStreamLocked(this)) { return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")); @@ -36474,14 +36474,14 @@ var require_ponyfill_es2018 = __commonJS({ stream4._storedError = void 0; stream4._disturbed = false; } - function IsReadableStream(x2) { - if (!typeIsObject(x2)) { + function IsReadableStream(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_readableStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_readableStreamController")) { return false; } - return x2 instanceof ReadableStream7; + return x4 instanceof ReadableStream7; } function IsReadableStreamLocked(stream4) { if (stream4._reader === void 0) { @@ -36524,18 +36524,18 @@ var require_ponyfill_es2018 = __commonJS({ }); } } - function ReadableStreamError(stream4, e3) { + function ReadableStreamError(stream4, e5) { stream4._state = "errored"; - stream4._storedError = e3; + stream4._storedError = e5; const reader = stream4._reader; if (reader === void 0) { return; } - defaultReaderClosedPromiseReject(reader, e3); + defaultReaderClosedPromiseReject(reader, e5); if (IsReadableStreamDefaultReader(reader)) { - ReadableStreamDefaultReaderErrorReadRequests(reader, e3); + ReadableStreamDefaultReaderErrorReadRequests(reader, e5); } else { - ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e3); + ReadableStreamBYOBReaderErrorReadIntoRequests(reader, e5); } } function streamBrandCheckException$1(name) { @@ -36591,14 +36591,14 @@ var require_ponyfill_es2018 = __commonJS({ function byteLengthBrandCheckException(name) { return new TypeError(`ByteLengthQueuingStrategy.prototype.${name} can only be used on a ByteLengthQueuingStrategy`); } - function IsByteLengthQueuingStrategy(x2) { - if (!typeIsObject(x2)) { + function IsByteLengthQueuingStrategy(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_byteLengthQueuingStrategyHighWaterMark")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_byteLengthQueuingStrategyHighWaterMark")) { return false; } - return x2 instanceof ByteLengthQueuingStrategy2; + return x4 instanceof ByteLengthQueuingStrategy2; } const countSizeFunction = () => { return 1; @@ -36643,14 +36643,14 @@ var require_ponyfill_es2018 = __commonJS({ function countBrandCheckException(name) { return new TypeError(`CountQueuingStrategy.prototype.${name} can only be used on a CountQueuingStrategy`); } - function IsCountQueuingStrategy(x2) { - if (!typeIsObject(x2)) { + function IsCountQueuingStrategy(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_countQueuingStrategyHighWaterMark")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_countQueuingStrategyHighWaterMark")) { return false; } - return x2 instanceof CountQueuingStrategy2; + return x4 instanceof CountQueuingStrategy2; } function convertTransformer(original, context2) { assertDictionary(original, context2); @@ -36771,22 +36771,22 @@ var require_ponyfill_es2018 = __commonJS({ TransformStreamSetBackpressure(stream4, true); stream4._transformStreamController = void 0; } - function IsTransformStream(x2) { - if (!typeIsObject(x2)) { + function IsTransformStream(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_transformStreamController")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_transformStreamController")) { return false; } - return x2 instanceof TransformStream3; + return x4 instanceof TransformStream3; } - function TransformStreamError(stream4, e3) { - ReadableStreamDefaultControllerError(stream4._readable._readableStreamController, e3); - TransformStreamErrorWritableAndUnblockWrite(stream4, e3); + function TransformStreamError(stream4, e5) { + ReadableStreamDefaultControllerError(stream4._readable._readableStreamController, e5); + TransformStreamErrorWritableAndUnblockWrite(stream4, e5); } - function TransformStreamErrorWritableAndUnblockWrite(stream4, e3) { + function TransformStreamErrorWritableAndUnblockWrite(stream4, e5) { TransformStreamDefaultControllerClearAlgorithms(stream4._transformStreamController); - WritableStreamDefaultControllerErrorIfNeeded(stream4._writable._writableStreamController, e3); + WritableStreamDefaultControllerErrorIfNeeded(stream4._writable._writableStreamController, e5); TransformStreamUnblockWrite(stream4); } function TransformStreamUnblockWrite(stream4) { @@ -36859,14 +36859,14 @@ var require_ponyfill_es2018 = __commonJS({ configurable: true }); } - function IsTransformStreamDefaultController(x2) { - if (!typeIsObject(x2)) { + function IsTransformStreamDefaultController(x4) { + if (!typeIsObject(x4)) { return false; } - if (!Object.prototype.hasOwnProperty.call(x2, "_controlledTransformStream")) { + if (!Object.prototype.hasOwnProperty.call(x4, "_controlledTransformStream")) { return false; } - return x2 instanceof TransformStreamDefaultController2; + return x4 instanceof TransformStreamDefaultController2; } function SetUpTransformStreamDefaultController(stream4, controller, transformAlgorithm, flushAlgorithm, cancelAlgorithm) { controller._controlledTransformStream = stream4; @@ -36920,8 +36920,8 @@ var require_ponyfill_es2018 = __commonJS({ } try { ReadableStreamDefaultControllerEnqueue(readableController, chunk); - } catch (e3) { - TransformStreamErrorWritableAndUnblockWrite(stream4, e3); + } catch (e5) { + TransformStreamErrorWritableAndUnblockWrite(stream4, e5); throw stream4._readable._storedError; } const backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); @@ -36929,14 +36929,14 @@ var require_ponyfill_es2018 = __commonJS({ TransformStreamSetBackpressure(stream4, true); } } - function TransformStreamDefaultControllerError(controller, e3) { - TransformStreamError(controller._controlledTransformStream, e3); + function TransformStreamDefaultControllerError(controller, e5) { + TransformStreamError(controller._controlledTransformStream, e5); } function TransformStreamDefaultControllerPerformTransform(controller, chunk) { const transformPromise = controller._transformAlgorithm(chunk); - return transformPromiseWith(transformPromise, void 0, (r3) => { - TransformStreamError(controller._controlledTransformStream, r3); - throw r3; + return transformPromiseWith(transformPromise, void 0, (r5) => { + TransformStreamError(controller._controlledTransformStream, r5); + throw r5; }); } function TransformStreamDefaultControllerTerminate(controller) { @@ -36952,8 +36952,8 @@ var require_ponyfill_es2018 = __commonJS({ const backpressureChangePromise = stream4._backpressureChangePromise; return transformPromiseWith(backpressureChangePromise, () => { const writable = stream4._writable; - const state2 = writable._state; - if (state2 === "erroring") { + const state3 = writable._state; + if (state3 === "erroring") { throw writable._storedError; } return TransformStreamDefaultControllerPerformTransform(controller, chunk); @@ -36981,9 +36981,9 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - ReadableStreamDefaultControllerError(readable._readableStreamController, r3); - defaultControllerFinishPromiseReject(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(readable._readableStreamController, r5); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -37008,9 +37008,9 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - ReadableStreamDefaultControllerError(readable._readableStreamController, r3); - defaultControllerFinishPromiseReject(controller, r3); + }, (r5) => { + ReadableStreamDefaultControllerError(readable._readableStreamController, r5); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -37040,10 +37040,10 @@ var require_ponyfill_es2018 = __commonJS({ defaultControllerFinishPromiseResolve(controller); } return null; - }, (r3) => { - WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, r3); + }, (r5) => { + WritableStreamDefaultControllerErrorIfNeeded(writable._writableStreamController, r5); TransformStreamUnblockWrite(stream4); - defaultControllerFinishPromiseReject(controller, r3); + defaultControllerFinishPromiseReject(controller, r5); return null; }); return controller._finishPromise; @@ -37163,16 +37163,16 @@ var init_fileFromPath = __esm({ init_File(); init_isPlainObject(); init_isFile(); - __classPrivateFieldSet4 = function(receiver, state2, value, kind3, f4) { + __classPrivateFieldSet4 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - __classPrivateFieldGet5 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + __classPrivateFieldGet5 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; MESSAGE = "The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired."; FileFromPath = class _FileFromPath { @@ -37274,9 +37274,9 @@ var require_delayed_stream = __commonJS({ this._bufferedEvents = []; }; DelayedStream.prototype.pipe = function() { - var r3 = Stream3.prototype.pipe.apply(this, arguments); + var r5 = Stream3.prototype.pipe.apply(this, arguments); this.resume(); - return r3; + return r5; }; DelayedStream.prototype._handleEmit = function(args) { if (this._released) { @@ -46078,8 +46078,8 @@ var require_mime_types = __commonJS({ return; } extensions[type2] = exts; - for (var i3 = 0; i3 < exts.length; i3++) { - var extension2 = exts[i3]; + for (var i5 = 0; i5 < exts.length; i5++) { + var extension2 = exts[i5]; if (types[extension2]) { var from = preference.indexOf(db[types[extension2]].source); var to = preference.indexOf(mime.source); @@ -46136,9 +46136,9 @@ var require_async = __commonJS({ var require_abort = __commonJS({ "node_modules/asynckit/lib/abort.js"(exports2, module2) { module2.exports = abort; - function abort(state2) { - Object.keys(state2.jobs).forEach(clean.bind(state2)); - state2.jobs = {}; + function abort(state3) { + Object.keys(state3.jobs).forEach(clean.bind(state3)); + state3.jobs = {}; } function clean(key) { if (typeof this.jobs[key] == "function") { @@ -46154,19 +46154,19 @@ var require_iterate = __commonJS({ var async = require_async(); var abort = require_abort(); module2.exports = iterate; - function iterate(list, iterator2, state2, callback) { - var key = state2["keyedList"] ? state2["keyedList"][state2.index] : state2.index; - state2.jobs[key] = runJob(iterator2, key, list[key], function(error, output) { - if (!(key in state2.jobs)) { + function iterate(list, iterator2, state3, callback) { + var key = state3["keyedList"] ? state3["keyedList"][state3.index] : state3.index; + state3.jobs[key] = runJob(iterator2, key, list[key], function(error, output) { + if (!(key in state3.jobs)) { return; } - delete state2.jobs[key]; + delete state3.jobs[key]; if (error) { - abort(state2); + abort(state3); } else { - state2.results[key] = output; + state3.results[key] = output; } - callback(error, state2.results); + callback(error, state3.results); }); } function runJob(iterator2, key, item, callback) { @@ -46184,8 +46184,8 @@ var require_iterate = __commonJS({ // node_modules/asynckit/lib/state.js var require_state = __commonJS({ "node_modules/asynckit/lib/state.js"(exports2, module2) { - module2.exports = state2; - function state2(list, sortMethod) { + module2.exports = state3; + function state3(list, sortMethod) { var isNamedList = !Array.isArray(list), initState = { index: 0, keyedList: isNamedList || sortMethod ? Object.keys(list) : null, @@ -46194,8 +46194,8 @@ var require_state = __commonJS({ size: isNamedList ? Object.keys(list).length : list.length }; if (sortMethod) { - initState.keyedList.sort(isNamedList ? sortMethod : function(a3, b3) { - return sortMethod(list[a3], list[b3]); + initState.keyedList.sort(isNamedList ? sortMethod : function(a5, b5) { + return sortMethod(list[a5], list[b5]); }); } return initState; @@ -46228,21 +46228,21 @@ var require_parallel = __commonJS({ var terminator = require_terminator(); module2.exports = parallel; function parallel(list, iterator2, callback) { - var state2 = initState(list); - while (state2.index < (state2["keyedList"] || list).length) { - iterate(list, iterator2, state2, function(error, result) { + var state3 = initState(list); + while (state3.index < (state3["keyedList"] || list).length) { + iterate(list, iterator2, state3, function(error, result) { if (error) { callback(error, result); return; } - if (Object.keys(state2.jobs).length === 0) { - callback(null, state2.results); + if (Object.keys(state3.jobs).length === 0) { + callback(null, state3.results); return; } }); - state2.index++; + state3.index++; } - return terminator.bind(state2, callback); + return terminator.bind(state3, callback); } } }); @@ -46257,26 +46257,26 @@ var require_serialOrdered = __commonJS({ module2.exports.ascending = ascending; module2.exports.descending = descending; function serialOrdered(list, iterator2, sortMethod, callback) { - var state2 = initState(list, sortMethod); - iterate(list, iterator2, state2, function iteratorHandler(error, result) { + var state3 = initState(list, sortMethod); + iterate(list, iterator2, state3, function iteratorHandler(error, result) { if (error) { callback(error, result); return; } - state2.index++; - if (state2.index < (state2["keyedList"] || list).length) { - iterate(list, iterator2, state2, iteratorHandler); + state3.index++; + if (state3.index < (state3["keyedList"] || list).length) { + iterate(list, iterator2, state3, iteratorHandler); return; } - callback(null, state2.results); + callback(null, state3.results); }); - return terminator.bind(state2, callback); + return terminator.bind(state3, callback); } - function ascending(a3, b3) { - return a3 < b3 ? -1 : a3 > b3 ? 1 : 0; + function ascending(a5, b5) { + return a5 < b5 ? -1 : a5 > b5 ? 1 : 0; } - function descending(a3, b3) { - return -1 * ascending(a3, b3); + function descending(a5, b5) { + return -1 * ascending(a5, b5); } } }); @@ -46323,7 +46323,7 @@ var require_form_data = __commonJS({ var path2 = require("path"); var http3 = require("http"); var https3 = require("https"); - var parseUrl = require("url").parse; + var parseUrl3 = require("url").parse; var fs4 = require("fs"); var Stream3 = require("stream").Stream; var mime = require_mime_types(); @@ -46513,14 +46513,14 @@ var require_form_data = __commonJS({ FormData6.prototype.getBuffer = function() { var dataBuffer = new Buffer.alloc(0); var boundary = this.getBoundary(); - for (var i3 = 0, len = this._streams.length; i3 < len; i3++) { - if (typeof this._streams[i3] !== "function") { - if (Buffer.isBuffer(this._streams[i3])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i3]]); + for (var i5 = 0, len = this._streams.length; i5 < len; i5++) { + if (typeof this._streams[i5] !== "function") { + if (Buffer.isBuffer(this._streams[i5])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i5]]); } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i3])]); + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i5])]); } - if (typeof this._streams[i3] !== "string" || this._streams[i3].substring(2, boundary.length + 2) !== boundary) { + if (typeof this._streams[i5] !== "string" || this._streams[i5].substring(2, boundary.length + 2) !== boundary) { dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData6.LINE_BREAK)]); } } @@ -46529,7 +46529,7 @@ var require_form_data = __commonJS({ }; FormData6.prototype._generateBoundary = function() { var boundary = "--------------------------"; - for (var i3 = 0; i3 < 24; i3++) { + for (var i5 = 0; i5 < 24; i5++) { boundary += Math.floor(Math.random() * 10).toString(16); } this._boundary = boundary; @@ -46574,7 +46574,7 @@ var require_form_data = __commonJS({ FormData6.prototype.submit = function(params, cb) { var request3, options, defaults2 = { method: "post" }; if (typeof params == "string") { - params = parseUrl(params); + params = parseUrl3(params); options = populate({ port: params.port, path: params.pathname, @@ -46633,7 +46633,7 @@ var require_form_data = __commonJS({ var require_proxy_from_env = __commonJS({ "node_modules/proxy-from-env/index.js"(exports2) { "use strict"; - var parseUrl = require("url").parse; + var parseUrl3 = require("url").parse; var DEFAULT_PORTS = { ftp: 21, gopher: 70, @@ -46642,11 +46642,11 @@ var require_proxy_from_env = __commonJS({ ws: 80, wss: 443 }; - var stringEndsWith = String.prototype.endsWith || function(s2) { - return s2.length <= this.length && this.indexOf(s2, this.length - s2.length) !== -1; + var stringEndsWith = String.prototype.endsWith || function(s4) { + return s4.length <= this.length && this.indexOf(s4, this.length - s4.length) !== -1; }; function getProxyForUrl(url2) { - var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {}; + var parsedUrl = typeof url2 === "string" ? parseUrl3(url2) : url2 || {}; var proto2 = parsedUrl.protocol; var hostname = parsedUrl.host; var port = parsedUrl.port; @@ -46719,8 +46719,8 @@ var require_common = __commonJS({ createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; - for (let i3 = 0; i3 < namespace.length; i3++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i3); + for (let i5 = 0; i5 < namespace.length; i5++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i5); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; @@ -46783,8 +46783,8 @@ var require_common = __commonJS({ } return enabledCache; }, - set: (v2) => { - enableOverride = v2; + set: (v7) => { + enableOverride = v7; } }); if (typeof createDebug.init === "function") { @@ -46802,14 +46802,14 @@ var require_common = __commonJS({ createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; - let i3; + let i5; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; - for (i3 = 0; i3 < len; i3++) { - if (!split[i3]) { + for (i5 = 0; i5 < len; i5++) { + if (!split[i5]) { continue; } - namespaces = split[i3].replace(/\*/g, ".*?"); + namespaces = split[i5].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { @@ -46829,15 +46829,15 @@ var require_common = __commonJS({ if (name[name.length - 1] === "*") { return true; } - let i3; + let i5; let len; - for (i3 = 0, len = createDebug.skips.length; i3 < len; i3++) { - if (createDebug.skips[i3].test(name)) { + for (i5 = 0, len = createDebug.skips.length; i5 < len; i5++) { + if (createDebug.skips[i5].test(name)) { return false; } } - for (i3 = 0, len = createDebug.names.length; i3 < len; i3++) { - if (createDebug.names[i3].test(name)) { + for (i5 = 0, len = createDebug.names.length; i5 < len; i5++) { + if (createDebug.names[i5].test(name)) { return true; } } @@ -46975,8 +46975,8 @@ var require_browser = __commonJS({ if (!this.useColors) { return; } - const c2 = "color: " + this.color; - args.splice(1, 0, c2, "color: inherit"); + const c4 = "color: " + this.color; + args.splice(1, 0, c4, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { @@ -46988,7 +46988,7 @@ var require_browser = __commonJS({ lastC = index; } }); - args.splice(lastC, 0, c2); + args.splice(lastC, 0, c4); } exports2.log = console.debug || console.log || (() => { }); @@ -47003,15 +47003,15 @@ var require_browser = __commonJS({ } } function load() { - let r3; + let r5; try { - r3 = exports2.storage.getItem("debug"); + r5 = exports2.storage.getItem("debug"); } catch (error) { } - if (!r3 && typeof process !== "undefined" && "env" in process) { - r3 = process.env.DEBUG; + if (!r5 && typeof process !== "undefined" && "env" in process) { + r5 = process.env.DEBUG; } - return r3; + return r5; } function localstorage() { try { @@ -47021,9 +47021,9 @@ var require_browser = __commonJS({ } module2.exports = require_common()(exports2); var { formatters } = module2.exports; - formatters.j = function(v2) { + formatters.j = function(v7) { try { - return JSON.stringify(v2); + return JSON.stringify(v7); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } @@ -47115,10 +47115,10 @@ var require_supports_color = __commonJS({ return 3; } if ("TERM_PROGRAM" in env2) { - const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + const version4 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env2.TERM_PROGRAM) { case "iTerm.app": - return version2 >= 3 ? 3 : 2; + return version4 >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } @@ -47250,8 +47250,8 @@ var require_node = __commonJS({ 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, (_3, k4) => { - return k4.toUpperCase(); + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_4, k6) => { + return k6.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { @@ -47272,8 +47272,8 @@ var require_node = __commonJS({ function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { - const c2 = this.color; - const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2); + const c4 = this.color; + const colorCode = "\x1B[3" + (c4 < 8 ? c4 : "8;5;" + c4); 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"); @@ -47303,19 +47303,19 @@ var require_node = __commonJS({ function init(debug3) { debug3.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); - for (let i3 = 0; i3 < keys.length; i3++) { - debug3.inspectOpts[keys[i3]] = exports2.inspectOpts[keys[i3]]; + for (let i5 = 0; i5 < keys.length; i5++) { + debug3.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]]; } } module2.exports = require_common()(exports2); var { formatters } = module2.exports; - formatters.o = function(v2) { + formatters.o = function(v7) { this.inspectOpts.colors = this.useColors; - return util4.inspect(v2, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + return util4.inspect(v7, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); }; - formatters.O = function(v2) { + formatters.O = function(v7) { this.inspectOpts.colors = this.useColors; - return util4.inspect(v2, this.inspectOpts); + return util4.inspect(v7, this.inspectOpts); }; } }); @@ -47355,7 +47355,7 @@ var require_debug = __commonJS({ var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { var url2 = require("url"); - var URL3 = url2.URL; + var URL5 = url2.URL; var http3 = require("http"); var https3 = require("https"); var Writable = require("stream").Writable; @@ -47363,7 +47363,7 @@ var require_follow_redirects = __commonJS({ var debug3 = require_debug(); var useNativeURL = false; try { - assert(new URL3()); + assert(new URL5()); } catch (error) { useNativeURL = error.code === "ERR_INVALID_URL"; } @@ -47553,8 +47553,8 @@ var require_follow_redirects = __commonJS({ "setNoDelay", "setSocketKeepAlive" ].forEach(function(method) { - RedirectableRequest.prototype[method] = function(a3, b3) { - return this._currentRequest[method](a3, b3); + RedirectableRequest.prototype[method] = function(a5, b5) { + return this._currentRequest[method](a5, b5); }; }); ["aborted", "connection", "socket"].forEach(function(property) { @@ -47605,15 +47605,15 @@ var require_follow_redirects = __commonJS({ this._options.path ); if (this._isRedirect) { - var i3 = 0; + var i5 = 0; var self2 = this; var buffers = this._requestBodyBuffers; (function writeNext(error) { if (request3 === self2._currentRequest) { if (error) { self2.emit("error", error); - } else if (i3 < buffers.length) { - var buffer = buffers[i3++]; + } else if (i5 < buffers.length) { + var buffer = buffers[i5++]; if (!request3.finished) { request3.write(buffer.data, buffer.encoding, writeNext); } @@ -47665,7 +47665,7 @@ var require_follow_redirects = __commonJS({ removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = parseUrl(this._currentUrl); + var currentUrlParts = parseUrl3(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); @@ -47704,7 +47704,7 @@ var require_follow_redirects = __commonJS({ if (isURL(input)) { input = spreadUrlObject(input); } else if (isString2(input)) { - input = spreadUrlObject(parseUrl(input)); + input = spreadUrlObject(parseUrl3(input)); } else { callback = options; options = validateUrl(input); @@ -47726,24 +47726,24 @@ var require_follow_redirects = __commonJS({ debug3("options", options); return new RedirectableRequest(options, callback); } - function get(input, options, callback) { + function get2(input, options, callback) { var wrappedRequest = wrappedProtocol.request(input, options, callback); wrappedRequest.end(); return wrappedRequest; } Object.defineProperties(wrappedProtocol, { request: { value: request3, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true } + get: { value: get2, configurable: true, enumerable: true, writable: true } }); }); return exports3; } function noop2() { } - function parseUrl(input) { + function parseUrl3(input) { var parsed; if (useNativeURL) { - parsed = new URL3(input); + parsed = new URL5(input); } else { parsed = validateUrl(url2.parse(input)); if (!isString2(parsed.protocol)) { @@ -47753,7 +47753,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative, base) { - return useNativeURL ? new URL3(relative, base) : parseUrl(url2.resolve(base, relative)); + return useNativeURL ? new URL5(relative, base) : parseUrl3(url2.resolve(base, relative)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -47830,7 +47830,7 @@ var require_follow_redirects = __commonJS({ return typeof value === "object" && "length" in value; } function isURL(value) { - return URL3 && value instanceof URL3; + return URL5 && value instanceof URL5; } module2.exports = wrap({ http: http3, https: https3 }); module2.exports.wrap = wrap; @@ -47909,8 +47909,8 @@ var require_tiktoken_bg = __commonJS({ WASM_VECTOR_LEN = offset; return ptr; } - function isLikeNone(x2) { - return x2 === void 0 || x2 === null; + function isLikeNone(x4) { + return x4 === void 0 || x4 === null; } var cachedInt32Memory0 = null; function getInt32Memory0() { @@ -47960,11 +47960,11 @@ var require_tiktoken_bg = __commonJS({ ptr = ptr >>> 0; return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); } - function handleError(f4, args) { + function handleError(f6, args) { try { - return f4.apply(this, args); - } catch (e3) { - wasm.__wbindgen_export_3(addHeapObject(e3)); + return f6.apply(this, args); + } catch (e5) { + wasm.__wbindgen_export_3(addHeapObject(e5)); } } var TiktokenFinalization = new FinalizationRegistry((ptr) => wasm.__wbg_tiktoken_free(ptr >>> 0)); @@ -47991,12 +47991,12 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_name(retptr, this.__wbg_ptr); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - let v12; + let v14; if (r0 !== 0) { - v12 = getStringFromWasm0(r0, r1).slice(); + v14 = getStringFromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 1, 1); } - return v12; + return v14; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -48028,13 +48028,13 @@ var require_tiktoken_bg = __commonJS({ var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; var r22 = getInt32Memory0()[retptr / 4 + 2]; - var r3 = getInt32Memory0()[retptr / 4 + 3]; - if (r3) { + var r32 = getInt32Memory0()[retptr / 4 + 3]; + if (r32) { throw takeObject(r22); } - var v2 = getArrayU32FromWasm0(r0, r1).slice(); + var v22 = getArrayU32FromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 4, 4); - return v2; + return v22; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -48052,9 +48052,9 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_encode_ordinary(retptr, this.__wbg_ptr, ptr0, len0); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v2 = getArrayU32FromWasm0(r0, r1).slice(); + var v22 = getArrayU32FromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 4, 4); - return v2; + return v22; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -48107,9 +48107,9 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_decode(retptr, this.__wbg_ptr, ptr0, len0); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v2 = getArrayU8FromWasm0(r0, r1).slice(); + var v22 = getArrayU8FromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 1, 1); - return v2; + return v22; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -48125,9 +48125,9 @@ var require_tiktoken_bg = __commonJS({ wasm.tiktoken_decode_single_token_bytes(retptr, this.__wbg_ptr, token); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v12 = getArrayU8FromWasm0(r0, r1).slice(); + var v14 = getArrayU8FromWasm0(r0, r1).slice(); wasm.__wbindgen_export_2(r0, r1 * 1, 1); - return v12; + return v14; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } @@ -48186,7 +48186,7 @@ var require_tiktoken = __commonJS({ imports["./tiktoken_bg.js"] = wasm; var path2 = require("path"); var fs4 = require("fs"); - var candidates = __dirname.split(path2.sep).reduce((memo, _3, index, array) => { + var candidates = __dirname.split(path2.sep).reduce((memo, _4, index, array) => { const prefix = array.slice(0, index + 1).join(path2.sep) + path2.sep; if (!prefix.includes("node_modules" + path2.sep)) { memo.unshift( @@ -48218,41 +48218,524 @@ var require_tiktoken = __commonJS({ } }); +// 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: () => __classPrivateFieldGet8, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet7, + __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, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d7, b5) { + if (typeof b5 !== "function" && b5 !== null) + throw new TypeError("Class extends value " + String(b5) + " is not a constructor or null"); + extendStatics(d7, b5); + function __() { + this.constructor = d7; + } + d7.prototype = b5 === null ? Object.create(b5) : (__.prototype = b5.prototype, new __()); +} +function __rest(s4, e5) { + var t4 = {}; + for (var p5 in s4) if (Object.prototype.hasOwnProperty.call(s4, p5) && e5.indexOf(p5) < 0) + t4[p5] = s4[p5]; + if (s4 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i5 = 0, p5 = Object.getOwnPropertySymbols(s4); i5 < p5.length; i5++) { + if (e5.indexOf(p5[i5]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p5[i5])) + t4[p5[i5]] = s4[p5[i5]]; + } + return t4; +} +function __decorate(decorators, target, key, desc) { + var c4 = arguments.length, r5 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d7; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r5 = Reflect.decorate(decorators, target, key, desc); + else for (var i5 = decorators.length - 1; i5 >= 0; i5--) if (d7 = decorators[i5]) r5 = (c4 < 3 ? d7(r5) : c4 > 3 ? d7(target, key, r5) : d7(target, key)) || r5; + return c4 > 3 && r5 && Object.defineProperty(target, key, r5), r5; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f6) { + if (f6 !== void 0 && typeof f6 !== "function") throw new TypeError("Function expected"); + return f6; + } + var kind3 = contextIn.kind, key = kind3 === "getter" ? "get" : kind3 === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _4, done = false; + for (var i5 = decorators.length - 1; i5 >= 0; i5--) { + var context2 = {}; + for (var p5 in contextIn) context2[p5] = p5 === "access" ? {} : contextIn[p5]; + for (var p5 in contextIn.access) context2.access[p5] = contextIn.access[p5]; + context2.addInitializer = function(f6) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f6 || null)); + }; + var result = (0, decorators[i5])(kind3 === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); + if (kind3 === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_4 = accept(result.get)) descriptor.get = _4; + if (_4 = accept(result.set)) descriptor.set = _4; + if (_4 = accept(result.init)) initializers.unshift(_4); + } else if (_4 = accept(result)) { + if (kind3 === "field") initializers.unshift(_4); + else descriptor[key] = _4; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i5 = 0; i5 < initializers.length; i5++) { + value = useValue ? initializers[i5].call(thisArg, value) : initializers[i5].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x4) { + return typeof x4 === "symbol" ? x4 : "".concat(x4); +} +function __setFunctionName(f6, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f6, "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, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve) { + resolve(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e5) { + reject(e5); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e5) { + reject(e5); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _4 = { label: 0, sent: function() { + if (t4[0] & 1) throw t4[1]; + return t4[1]; + }, trys: [], ops: [] }, f6, y5, t4, g4; + return g4 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g4[Symbol.iterator] = function() { + return this; + }), g4; + function verb(n4) { + return function(v7) { + return step([n4, v7]); + }; + } + function step(op) { + if (f6) throw new TypeError("Generator is already executing."); + while (g4 && (g4 = 0, op[0] && (_4 = 0)), _4) try { + if (f6 = 1, y5 && (t4 = op[0] & 2 ? y5["return"] : op[0] ? y5["throw"] || ((t4 = y5["return"]) && t4.call(y5), 0) : y5.next) && !(t4 = t4.call(y5, op[1])).done) return t4; + if (y5 = 0, t4) op = [op[0] & 2, t4.value]; + switch (op[0]) { + case 0: + case 1: + t4 = op; + break; + case 4: + _4.label++; + return { value: op[1], done: false }; + case 5: + _4.label++; + y5 = op[1]; + op = [0]; + continue; + case 7: + op = _4.ops.pop(); + _4.trys.pop(); + continue; + default: + if (!(t4 = _4.trys, t4 = t4.length > 0 && t4[t4.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _4 = 0; + continue; + } + if (op[0] === 3 && (!t4 || op[1] > t4[0] && op[1] < t4[3])) { + _4.label = op[1]; + break; + } + if (op[0] === 6 && _4.label < t4[1]) { + _4.label = t4[1]; + t4 = op; + break; + } + if (t4 && _4.label < t4[2]) { + _4.label = t4[2]; + _4.ops.push(op); + break; + } + if (t4[2]) _4.ops.pop(); + _4.trys.pop(); + continue; + } + op = body.call(thisArg, _4); + } catch (e5) { + op = [6, e5]; + y5 = 0; + } finally { + f6 = t4 = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m6, o5) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(o5, p5)) __createBinding(o5, m6, p5); +} +function __values(o5) { + var s4 = typeof Symbol === "function" && Symbol.iterator, m6 = s4 && o5[s4], i5 = 0; + if (m6) return m6.call(o5); + if (o5 && typeof o5.length === "number") return { + next: function() { + if (o5 && i5 >= o5.length) o5 = void 0; + return { value: o5 && o5[i5++], done: !o5 }; + } + }; + throw new TypeError(s4 ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o5, n4) { + var m6 = typeof Symbol === "function" && o5[Symbol.iterator]; + if (!m6) return o5; + var i5 = m6.call(o5), r5, ar2 = [], e5; + try { + while ((n4 === void 0 || n4-- > 0) && !(r5 = i5.next()).done) ar2.push(r5.value); + } catch (error) { + e5 = { error }; + } finally { + try { + if (r5 && !r5.done && (m6 = i5["return"])) m6.call(i5); + } finally { + if (e5) throw e5.error; + } + } + return ar2; +} +function __spread() { + for (var ar2 = [], i5 = 0; i5 < arguments.length; i5++) + ar2 = ar2.concat(__read(arguments[i5])); + return ar2; +} +function __spreadArrays() { + for (var s4 = 0, i5 = 0, il = arguments.length; i5 < il; i5++) s4 += arguments[i5].length; + for (var r5 = Array(s4), k6 = 0, i5 = 0; i5 < il; i5++) + for (var a5 = arguments[i5], j6 = 0, jl = a5.length; j6 < jl; j6++, k6++) + r5[k6] = a5[j6]; + return r5; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i5 = 0, l5 = from.length, ar2; i5 < l5; i5++) { + if (ar2 || !(i5 in from)) { + if (!ar2) ar2 = Array.prototype.slice.call(from, 0, i5); + ar2[i5] = from[i5]; + } + } + return to.concat(ar2 || Array.prototype.slice.call(from)); +} +function __await(v7) { + return this instanceof __await ? (this.v = v7, this) : new __await(v7); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g4 = generator.apply(thisArg, _arguments || []), i5, q5 = []; + return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5; + function verb(n4) { + if (g4[n4]) i5[n4] = function(v7) { + return new Promise(function(a5, b5) { + q5.push([n4, v7, a5, b5]) > 1 || resume(n4, v7); + }); + }; + } + function resume(n4, v7) { + try { + step(g4[n4](v7)); + } catch (e5) { + settle2(q5[0][3], e5); + } + } + function step(r5) { + r5.value instanceof __await ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle2(q5[0][2], r5); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle2(f6, v7) { + if (f6(v7), q5.shift(), q5.length) resume(q5[0][0], q5[0][1]); + } +} +function __asyncDelegator(o5) { + var i5, p5; + return i5 = {}, verb("next"), verb("throw", function(e5) { + throw e5; + }), verb("return"), i5[Symbol.iterator] = function() { + return this; + }, i5; + function verb(n4, f6) { + i5[n4] = o5[n4] ? function(v7) { + return (p5 = !p5) ? { value: __await(o5[n4](v7)), done: false } : f6 ? f6(v7) : v7; + } : f6; + } +} +function __asyncValues(o5) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m6 = o5[Symbol.asyncIterator], i5; + return m6 ? m6.call(o5) : (o5 = typeof __values === "function" ? __values(o5) : o5[Symbol.iterator](), i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { + return this; + }, i5); + function verb(n4) { + i5[n4] = o5[n4] && function(v7) { + return new Promise(function(resolve, reject) { + v7 = o5[n4](v7), settle2(resolve, reject, v7.done, v7.value); + }); + }; + } + function settle2(resolve, reject, d7, v7) { + Promise.resolve(v7).then(function(v8) { + resolve({ value: v8, done: d7 }); + }, reject); + } +} +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 k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding(result, mod, k6); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet8(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); +} +function __classPrivateFieldSet7(receiver, state3, value, kind3, f6) { + if (kind3 === "m") throw new TypeError("Private method is not writable"); + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; +} +function __classPrivateFieldIn(state3, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state3 === "function" ? receiver === state3 : state3.has(receiver); +} +function __addDisposableResource(env2, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env2.stack.push({ value, dispose, async }); + } else if (async) { + env2.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env2) { + function fail(e5) { + env2.error = env2.hasError ? new _SuppressedError(e5, env2.error, "An error was suppressed during disposal.") : e5; + env2.hasError = true; + } + function next() { + while (env2.stack.length) { + var rec = env2.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e5) { + fail(e5); + return next(); + }); + } catch (e5) { + fail(e5); + } + } + if (env2.hasError) throw env2.error; + } + return next(); +} +var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d7, b5) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d8, b6) { + d8.__proto__ = b6; + } || function(d8, b6) { + for (var p5 in b6) if (Object.prototype.hasOwnProperty.call(b6, p5)) d8[p5] = b6[p5]; + }; + return extendStatics(d7, b5); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t4) { + for (var s4, i5 = 1, n4 = arguments.length; i5 < n4; i5++) { + s4 = arguments[i5]; + for (var p5 in s4) if (Object.prototype.hasOwnProperty.call(s4, p5)) t4[p5] = s4[p5]; + } + return t4; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m6[k6]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; + }; + __setModuleDefault = Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e5 = new Error(message); + return e5.name = "SuppressedError", e5.error = error, e5.suppressed = suppressed, e5; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet: __classPrivateFieldGet8, + __classPrivateFieldSet: __classPrivateFieldSet7, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources + }; + } +}); + // node_modules/agent-base/dist/helpers.js var require_helpers = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http3 = __importStar(require("http")); - var https3 = __importStar(require("https")); + var http3 = __importStar2(require("http")); + var https3 = __importStar2(require("https")); async function toBuffer(stream4) { let length = 0; const chunks = []; @@ -48292,42 +48775,42 @@ var require_helpers = __commonJS({ var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar(require("net")); - var http3 = __importStar(require("http")); + var net = __importStar2(require("net")); + var http3 = __importStar2(require("http")); var https_1 = require("https"); - __exportStar(require_helpers(), exports2); + __exportStar2(require_helpers(), exports2); var INTERNAL = Symbol("AgentBaseInternalState"); var Agent3 = class extends http3.Agent { constructor(opts) { @@ -48349,7 +48832,7 @@ var require_dist = __commonJS({ const { stack } = new Error(); if (typeof stack !== "string") return false; - return stack.split("\n").some((l3) => l3.indexOf("(https.js:") !== -1 || l3.indexOf("node:https:") !== -1); + return stack.split("\n").some((l5) => l5.indexOf("(https.js:") !== -1 || l5.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 @@ -48422,17 +48905,17 @@ var require_dist = __commonJS({ get defaultPort() { return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); } - set defaultPort(v2) { + set defaultPort(v7) { if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v2; + this[INTERNAL].defaultPort = v7; } } get protocol() { return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); } - set protocol(v2) { + set protocol(v7) { if (this[INTERNAL]) { - this[INTERNAL].protocol = v2; + this[INTERNAL].protocol = v7; } } }; @@ -48444,21 +48927,21 @@ var require_dist = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importDefault(require_src2()); + var debug_1 = __importDefault2(require_src2()); var debug3 = (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 b3 = socket.read(); - if (b3) - ondata(b3); + const b5 = socket.read(); + if (b5) + ondata(b5); else socket.once("readable", read); } @@ -48477,9 +48960,9 @@ var require_parse_proxy_response = __commonJS({ debug3("onerror %o", err); reject(err); } - function ondata(b3) { - buffers.push(b3); - buffersLength += b3.length; + function ondata(b5) { + buffers.push(b5); + buffersLength += b5.length; const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { @@ -48540,42 +49023,42 @@ var require_parse_proxy_response = __commonJS({ var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var assert_1 = __importDefault(require("assert")); - var debug_1 = __importDefault(require_src2()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src2()); var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); @@ -48656,11 +49139,11 @@ var require_dist2 = __commonJS({ socket.destroy(); const fakeSocket = new net.Socket({ writable: false }); fakeSocket.readable = true; - req.once("socket", (s2) => { + req.once("socket", (s4) => { debug3("Replaying proxy buffer for failed request"); - (0, assert_1.default)(s2.listenerCount("data") > 0); - s2.push(buffered); - s2.push(null); + (0, assert_1.default)(s4.listenerCount("data") > 0); + s4.push(buffered); + s4.push(null); }); return fakeSocket; } @@ -48687,41 +49170,41 @@ var require_dist2 = __commonJS({ var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + 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 = __importStar(require("net")); - var tls = __importStar(require("tls")); - var debug_1 = __importDefault(require_src2()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src2()); var events_1 = require("events"); var agent_base_1 = require_dist(); var url_1 = require("url"); @@ -48980,28 +49463,28 @@ var require_implementation = __commonJS({ var toStr = Object.prototype.toString; var max = Math.max; var funcType = "[object Function]"; - var concatty = function concatty2(a3, b3) { + var concatty = function concatty2(a5, b5) { var arr = []; - for (var i3 = 0; i3 < a3.length; i3 += 1) { - arr[i3] = a3[i3]; + for (var i5 = 0; i5 < a5.length; i5 += 1) { + arr[i5] = a5[i5]; } - for (var j4 = 0; j4 < b3.length; j4 += 1) { - arr[j4 + a3.length] = b3[j4]; + for (var j6 = 0; j6 < b5.length; j6 += 1) { + arr[j6 + a5.length] = b5[j6]; } return arr; }; var slicy = function slicy2(arrLike, offset) { var arr = []; - for (var i3 = offset || 0, j4 = 0; i3 < arrLike.length; i3 += 1, j4 += 1) { - arr[j4] = arrLike[i3]; + for (var i5 = offset || 0, j6 = 0; i5 < arrLike.length; i5 += 1, j6 += 1) { + arr[j6] = arrLike[i5]; } return arr; }; var joiny = function(arr, joiner) { var str2 = ""; - for (var i3 = 0; i3 < arr.length; i3 += 1) { - str2 += arr[i3]; - if (i3 + 1 < arr.length) { + for (var i5 = 0; i5 < arr.length; i5 += 1) { + str2 += arr[i5]; + if (i5 + 1 < arr.length) { str2 += joiner; } } @@ -49032,8 +49515,8 @@ var require_implementation = __commonJS({ }; var boundLength = max(0, target.length - args.length); var boundArgs = []; - for (var i3 = 0; i3 < boundLength; i3++) { - boundArgs[i3] = "$" + i3; + for (var i5 = 0; i5 < boundLength; i5++) { + boundArgs[i5] = "$" + i5; } bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { @@ -49084,14 +49567,14 @@ var require_get_intrinsic = __commonJS({ var getEvalledConstructor = function(expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); - } catch (e3) { + } catch (e5) { } }; var $gOPD = Object.getOwnPropertyDescriptor; if ($gOPD) { try { $gOPD({}, ""); - } catch (e3) { + } catch (e5) { $gOPD = null; } } @@ -49112,8 +49595,8 @@ var require_get_intrinsic = __commonJS({ }() : throwTypeError; var hasSymbols = require_has_symbols()(); var hasProto = require_has_proto()(); - var getProto = Object.getPrototypeOf || (hasProto ? function(x2) { - return x2.__proto__; + var getProto = Object.getPrototypeOf || (hasProto ? function(x4) { + return x4.__proto__; } : null); var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); @@ -49190,8 +49673,8 @@ var require_get_intrinsic = __commonJS({ if (getProto) { try { null.error; - } catch (e3) { - errorProto = getProto(getProto(e3)); + } catch (e5) { + errorProto = getProto(getProto(e5)); INTRINSICS["%Error.prototype%"] = errorProto; } } @@ -49339,8 +49822,8 @@ var require_get_intrinsic = __commonJS({ intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } - for (var i3 = 1, isOwn = true; i3 < parts.length; i3 += 1) { - var part = parts[i3]; + for (var i5 = 1, isOwn = true; i5 < parts.length; i5 += 1) { + var part = parts[i5]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { @@ -49360,7 +49843,7 @@ var require_get_intrinsic = __commonJS({ } return void undefined2; } - if ($gOPD && i3 + 1 >= parts.length) { + if ($gOPD && i5 + 1 >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; if (isOwn && "get" in desc && !("originalValue" in desc.get)) { @@ -49391,7 +49874,7 @@ var require_es_define_property = __commonJS({ if ($defineProperty) { try { $defineProperty({}, "a", { value: 1 }); - } catch (e3) { + } catch (e5) { $defineProperty = false; } } @@ -49408,7 +49891,7 @@ var require_gopd = __commonJS({ if ($gOPD) { try { $gOPD([], "length"); - } catch (e3) { + } catch (e5) { $gOPD = null; } } @@ -49478,7 +49961,7 @@ var require_has_property_descriptors = __commonJS({ } try { return $defineProperty([], "length", { value: 1 }).length !== 1; - } catch (e3) { + } catch (e5) { return true; } }; @@ -49736,17 +50219,17 @@ var require_object_inspect = __commonJS({ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; } if (isElement(obj)) { - var s2 = "<" + $toLowerCase.call(String(obj.nodeName)); + var s4 = "<" + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; - for (var i3 = 0; i3 < attrs.length; i3++) { - s2 += " " + attrs[i3].name + "=" + wrapQuotes(quote(attrs[i3].value), "double", opts); + for (var i5 = 0; i5 < attrs.length; i5++) { + s4 += " " + attrs[i5].name + "=" + wrapQuotes(quote(attrs[i5].value), "double", opts); } - s2 += ">"; + s4 += ">"; if (obj.childNodes && obj.childNodes.length) { - s2 += "..."; + s4 += "..."; } - s2 += ""; - return s2; + s4 += ""; + return s4; } if (isArray2(obj)) { if (obj.length === 0) { @@ -49837,12 +50320,12 @@ var require_object_inspect = __commonJS({ } return String(obj); }; - function wrapQuotes(s2, defaultStyle, opts) { + function wrapQuotes(s4, defaultStyle, opts) { var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'"; - return quoteChar + s2 + quoteChar; + return quoteChar + s4 + quoteChar; } - function quote(s2) { - return $replace.call(String(s2), /"/g, """); + function quote(s4) { + return $replace.call(String(s4), /"/g, """); } function isArray2(obj) { return toStr(obj) === "[object Array]" && (!toStringTag2 || !(typeof obj === "object" && toStringTag2 in obj)); @@ -49878,7 +50361,7 @@ var require_object_inspect = __commonJS({ try { symToString.call(obj); return true; - } catch (e3) { + } catch (e5) { } return false; } @@ -49889,7 +50372,7 @@ var require_object_inspect = __commonJS({ try { bigIntValueOf.call(obj); return true; - } catch (e3) { + } catch (e5) { } return false; } @@ -49902,110 +50385,110 @@ var require_object_inspect = __commonJS({ function toStr(obj) { return objectToString.call(obj); } - function nameOf(f4) { - if (f4.name) { - return f4.name; + function nameOf(f6) { + if (f6.name) { + return f6.name; } - var m4 = $match.call(functionToString.call(f4), /^function\s*([\w$]+)/); - if (m4) { - return m4[1]; + var m6 = $match.call(functionToString.call(f6), /^function\s*([\w$]+)/); + if (m6) { + return m6[1]; } return null; } - function indexOf(xs, x2) { + function indexOf(xs, x4) { if (xs.indexOf) { - return xs.indexOf(x2); + return xs.indexOf(x4); } - for (var i3 = 0, l3 = xs.length; i3 < l3; i3++) { - if (xs[i3] === x2) { - return i3; + for (var i5 = 0, l5 = xs.length; i5 < l5; i5++) { + if (xs[i5] === x4) { + return i5; } } return -1; } - function isMap(x2) { - if (!mapSize || !x2 || typeof x2 !== "object") { + function isMap(x4) { + if (!mapSize || !x4 || typeof x4 !== "object") { return false; } try { - mapSize.call(x2); + mapSize.call(x4); try { - setSize.call(x2); - } catch (s2) { + setSize.call(x4); + } catch (s4) { return true; } - return x2 instanceof Map; - } catch (e3) { + return x4 instanceof Map; + } catch (e5) { } return false; } - function isWeakMap(x2) { - if (!weakMapHas || !x2 || typeof x2 !== "object") { + function isWeakMap(x4) { + if (!weakMapHas || !x4 || typeof x4 !== "object") { return false; } try { - weakMapHas.call(x2, weakMapHas); + weakMapHas.call(x4, weakMapHas); try { - weakSetHas.call(x2, weakSetHas); - } catch (s2) { + weakSetHas.call(x4, weakSetHas); + } catch (s4) { return true; } - return x2 instanceof WeakMap; - } catch (e3) { + return x4 instanceof WeakMap; + } catch (e5) { } return false; } - function isWeakRef(x2) { - if (!weakRefDeref || !x2 || typeof x2 !== "object") { + function isWeakRef(x4) { + if (!weakRefDeref || !x4 || typeof x4 !== "object") { return false; } try { - weakRefDeref.call(x2); + weakRefDeref.call(x4); return true; - } catch (e3) { + } catch (e5) { } return false; } - function isSet(x2) { - if (!setSize || !x2 || typeof x2 !== "object") { + function isSet(x4) { + if (!setSize || !x4 || typeof x4 !== "object") { return false; } try { - setSize.call(x2); + setSize.call(x4); try { - mapSize.call(x2); - } catch (m4) { + mapSize.call(x4); + } catch (m6) { return true; } - return x2 instanceof Set; - } catch (e3) { + return x4 instanceof Set; + } catch (e5) { } return false; } - function isWeakSet(x2) { - if (!weakSetHas || !x2 || typeof x2 !== "object") { + function isWeakSet(x4) { + if (!weakSetHas || !x4 || typeof x4 !== "object") { return false; } try { - weakSetHas.call(x2, weakSetHas); + weakSetHas.call(x4, weakSetHas); try { - weakMapHas.call(x2, weakMapHas); - } catch (s2) { + weakMapHas.call(x4, weakMapHas); + } catch (s4) { return true; } - return x2 instanceof WeakSet; - } catch (e3) { + return x4 instanceof WeakSet; + } catch (e5) { } return false; } - function isElement(x2) { - if (!x2 || typeof x2 !== "object") { + function isElement(x4) { + if (!x4 || typeof x4 !== "object") { return false; } - if (typeof HTMLElement !== "undefined" && x2 instanceof HTMLElement) { + if (typeof HTMLElement !== "undefined" && x4 instanceof HTMLElement) { return true; } - return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function"; + return typeof x4.nodeName === "string" && typeof x4.getAttribute === "function"; } function inspectString(str2, opts) { if (str2.length > opts.maxStringLength) { @@ -50013,22 +50496,22 @@ var require_object_inspect = __commonJS({ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); return inspectString($slice.call(str2, 0, opts.maxStringLength), opts) + trailer; } - var s2 = $replace.call($replace.call(str2, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s2, "single", opts); + var s4 = $replace.call($replace.call(str2, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s4, "single", opts); } - function lowbyte(c2) { - var n2 = c2.charCodeAt(0); - var x2 = { + function lowbyte(c4) { + var n4 = c4.charCodeAt(0); + var x4 = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" - }[n2]; - if (x2) { - return "\\" + x2; + }[n4]; + if (x4) { + return "\\" + x4; } - return "\\x" + (n2 < 16 ? "0" : "") + $toUpperCase.call(n2.toString(16)); + return "\\x" + (n4 < 16 ? "0" : "") + $toUpperCase.call(n4.toString(16)); } function markBoxed(str2) { return "Object(" + str2 + ")"; @@ -50041,8 +50524,8 @@ var require_object_inspect = __commonJS({ return type2 + " (" + size + ") {" + joinedEntries + "}"; } function singleLineValues(xs) { - for (var i3 = 0; i3 < xs.length; i3++) { - if (indexOf(xs[i3], "\n") >= 0) { + for (var i5 = 0; i5 < xs.length; i5++) { + if (indexOf(xs[i5], "\n") >= 0) { return false; } } @@ -50074,16 +50557,16 @@ var require_object_inspect = __commonJS({ var xs = []; if (isArr) { xs.length = obj.length; - for (var i3 = 0; i3 < obj.length; i3++) { - xs[i3] = has(obj, i3) ? inspect3(obj[i3], obj) : ""; + for (var i5 = 0; i5 < obj.length; i5++) { + xs[i5] = has(obj, i5) ? inspect3(obj[i5], obj) : ""; } } var syms = typeof gOPS === "function" ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; - for (var k4 = 0; k4 < syms.length; k4++) { - symMap["$" + syms[k4]] = syms[k4]; + for (var k6 = 0; k6 < syms.length; k6++) { + symMap["$" + syms[k6]] = syms[k6]; } } for (var key in obj) { @@ -50102,9 +50585,9 @@ var require_object_inspect = __commonJS({ } } if (typeof gOPS === "function") { - for (var j4 = 0; j4 < syms.length; j4++) { - if (isEnumerable.call(obj, syms[j4])) { - xs.push("[" + inspect3(syms[j4]) + "]: " + inspect3(obj[syms[j4]], obj)); + for (var j6 = 0; j6 < syms.length; j6++) { + if (isEnumerable.call(obj, syms[j6])) { + xs.push("[" + inspect3(syms[j6]) + "]: " + inspect3(obj[syms[j6]], obj)); } } } @@ -50263,8 +50746,8 @@ var require_utils6 = __commonJS({ var isArray2 = Array.isArray; var hexTable = function() { var array = []; - for (var i3 = 0; i3 < 256; ++i3) { - array.push("%" + ((i3 < 16 ? "0" : "") + i3.toString(16)).toUpperCase()); + for (var i5 = 0; i5 < 256; ++i5) { + array.push("%" + ((i5 < 16 ? "0" : "") + i5.toString(16)).toUpperCase()); } return array; }(); @@ -50274,9 +50757,9 @@ var require_utils6 = __commonJS({ var obj = item.obj[item.prop]; if (isArray2(obj)) { var compacted = []; - for (var j4 = 0; j4 < obj.length; ++j4) { - if (typeof obj[j4] !== "undefined") { - compacted.push(obj[j4]); + for (var j6 = 0; j6 < obj.length; ++j6) { + if (typeof obj[j6] !== "undefined") { + compacted.push(obj[j6]); } } item.obj[item.prop] = compacted; @@ -50285,9 +50768,9 @@ var require_utils6 = __commonJS({ }; var arrayToObject2 = function arrayToObject3(source, options) { var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; - for (var i3 = 0; i3 < source.length; ++i3) { - if (typeof source[i3] !== "undefined") { - obj[i3] = source[i3]; + for (var i5 = 0; i5 < source.length; ++i5) { + if (typeof source[i5] !== "undefined") { + obj[i5] = source[i5]; } } return obj; @@ -50316,16 +50799,16 @@ var require_utils6 = __commonJS({ mergeTarget = arrayToObject2(target, options); } if (isArray2(target) && isArray2(source)) { - source.forEach(function(item, i3) { - if (has.call(target, i3)) { - var targetItem = target[i3]; + source.forEach(function(item, i5) { + if (has.call(target, i5)) { + var targetItem = target[i5]; if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { - target[i3] = merge3(targetItem, item, options); + target[i5] = merge3(targetItem, item, options); } else { target.push(item); } } else { - target[i3] = item; + target[i5] = item; } }); return target; @@ -50353,7 +50836,7 @@ var require_utils6 = __commonJS({ } try { return decodeURIComponent(strWithoutPlus); - } catch (e3) { + } catch (e5) { return strWithoutPlus; } }; @@ -50374,30 +50857,30 @@ var require_utils6 = __commonJS({ }); } var out = ""; - for (var j4 = 0; j4 < string.length; j4 += limit) { - var segment = string.length >= limit ? string.slice(j4, j4 + limit) : string; + for (var j6 = 0; j6 < string.length; j6 += limit) { + var segment = string.length >= limit ? string.slice(j6, j6 + limit) : string; var arr = []; - for (var i3 = 0; i3 < segment.length; ++i3) { - var c2 = segment.charCodeAt(i3); - if (c2 === 45 || c2 === 46 || c2 === 95 || c2 === 126 || c2 >= 48 && c2 <= 57 || c2 >= 65 && c2 <= 90 || c2 >= 97 && c2 <= 122 || format === formats.RFC1738 && (c2 === 40 || c2 === 41)) { - arr[arr.length] = segment.charAt(i3); + for (var i5 = 0; i5 < segment.length; ++i5) { + var c4 = segment.charCodeAt(i5); + if (c4 === 45 || c4 === 46 || c4 === 95 || c4 === 126 || c4 >= 48 && c4 <= 57 || c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 122 || format === formats.RFC1738 && (c4 === 40 || c4 === 41)) { + arr[arr.length] = segment.charAt(i5); continue; } - if (c2 < 128) { - arr[arr.length] = hexTable[c2]; + if (c4 < 128) { + arr[arr.length] = hexTable[c4]; continue; } - if (c2 < 2048) { - arr[arr.length] = hexTable[192 | c2 >> 6] + hexTable[128 | c2 & 63]; + if (c4 < 2048) { + arr[arr.length] = hexTable[192 | c4 >> 6] + hexTable[128 | c4 & 63]; continue; } - if (c2 < 55296 || c2 >= 57344) { - arr[arr.length] = hexTable[224 | c2 >> 12] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63]; + if (c4 < 55296 || c4 >= 57344) { + arr[arr.length] = hexTable[224 | c4 >> 12] + hexTable[128 | c4 >> 6 & 63] + hexTable[128 | c4 & 63]; continue; } - i3 += 1; - c2 = 65536 + ((c2 & 1023) << 10 | segment.charCodeAt(i3) & 1023); - arr[arr.length] = hexTable[240 | c2 >> 18] + hexTable[128 | c2 >> 12 & 63] + hexTable[128 | c2 >> 6 & 63] + hexTable[128 | c2 & 63]; + i5 += 1; + c4 = 65536 + ((c4 & 1023) << 10 | segment.charCodeAt(i5) & 1023); + arr[arr.length] = hexTable[240 | c4 >> 18] + hexTable[128 | c4 >> 12 & 63] + hexTable[128 | c4 >> 6 & 63] + hexTable[128 | c4 & 63]; } out += arr.join(""); } @@ -50406,12 +50889,12 @@ var require_utils6 = __commonJS({ var compact = function compact2(value) { var queue = [{ obj: { o: value }, prop: "o" }]; var refs = []; - for (var i3 = 0; i3 < queue.length; ++i3) { - var item = queue[i3]; + for (var i5 = 0; i5 < queue.length; ++i5) { + var item = queue[i5]; var obj = item.obj[item.prop]; var keys = Object.keys(obj); - for (var j4 = 0; j4 < keys.length; ++j4) { - var key = keys[j4]; + for (var j6 = 0; j6 < keys.length; ++j6) { + var key = keys[j6]; var val = obj[key]; if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { queue.push({ obj, prop: key }); @@ -50431,14 +50914,14 @@ var require_utils6 = __commonJS({ } return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; - var combine = function combine2(a3, b3) { - return [].concat(a3, b3); + var combine = function combine2(a5, b5) { + return [].concat(a5, b5); }; var maybeMap = function maybeMap2(val, fn) { if (isArray2(val)) { var mapped = []; - for (var i3 = 0; i3 < val.length; i3 += 1) { - mapped.push(fn(val[i3])); + for (var i5 = 0; i5 < val.length; i5 += 1) { + mapped.push(fn(val[i5])); } return mapped; } @@ -50508,11 +50991,11 @@ var require_stringify = __commonJS({ skipNulls: false, strictNullHandling: false }; - var isNonNullishPrimitive = function isNonNullishPrimitive2(v2) { - return typeof v2 === "string" || typeof v2 === "number" || typeof v2 === "boolean" || typeof v2 === "symbol" || typeof v2 === "bigint"; + var isNonNullishPrimitive = function isNonNullishPrimitive2(v7) { + return typeof v7 === "string" || typeof v7 === "number" || typeof v7 === "boolean" || typeof v7 === "symbol" || typeof v7 === "bigint"; }; var sentinel = {}; - var stringify3 = function stringify4(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { + var stringify5 = function stringify6(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { var obj = object; var tmpSc = sideChannel; var step = 0; @@ -50577,8 +51060,8 @@ var require_stringify = __commonJS({ if (allowEmptyArrays && isArray2(obj) && obj.length === 0) { return adjustedPrefix + "[]"; } - for (var j4 = 0; j4 < objKeys.length; ++j4) { - var key = objKeys[j4]; + for (var j6 = 0; j6 < objKeys.length; ++j6) { + var key = objKeys[j6]; var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key]; if (skipNulls && value === null) { continue; @@ -50588,7 +51071,7 @@ var require_stringify = __commonJS({ sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify4( + pushToArray(values, stringify6( value, keyPrefix, generateArrayPrefix, @@ -50699,12 +51182,12 @@ var require_stringify = __commonJS({ objKeys.sort(options.sort); } var sideChannel = getSideChannel(); - for (var i3 = 0; i3 < objKeys.length; ++i3) { - var key = objKeys[i3]; + for (var i5 = 0; i5 < objKeys.length; ++i5) { + var key = objKeys[i5]; if (options.skipNulls && obj[key] === null) { continue; } - pushToArray(keys, stringify3( + pushToArray(keys, stringify5( obj[key], key, generateArrayPrefix, @@ -50788,26 +51271,26 @@ var require_parse2 = __commonJS({ var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; var parts = cleanStr.split(options.delimiter, limit); var skipIndex = -1; - var i3; + var i5; var charset = options.charset; if (options.charsetSentinel) { - for (i3 = 0; i3 < parts.length; ++i3) { - if (parts[i3].indexOf("utf8=") === 0) { - if (parts[i3] === charsetSentinel) { + for (i5 = 0; i5 < parts.length; ++i5) { + if (parts[i5].indexOf("utf8=") === 0) { + if (parts[i5] === charsetSentinel) { charset = "utf-8"; - } else if (parts[i3] === isoSentinel) { + } else if (parts[i5] === isoSentinel) { charset = "iso-8859-1"; } - skipIndex = i3; - i3 = parts.length; + skipIndex = i5; + i5 = parts.length; } } } - for (i3 = 0; i3 < parts.length; ++i3) { - if (i3 === skipIndex) { + for (i5 = 0; i5 < parts.length; ++i5) { + if (i5 === skipIndex) { continue; } - var part = parts[i3]; + var part = parts[i5]; var bracketEqualsPos = part.indexOf("]="); var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; var key, val; @@ -50840,9 +51323,9 @@ var require_parse2 = __commonJS({ }; var parseObject = function(chain, val, options, valuesParsed) { var leaf = valuesParsed ? val : parseArrayValue(val, options); - for (var i3 = chain.length - 1; i3 >= 0; --i3) { + for (var i5 = chain.length - 1; i5 >= 0; --i5) { var obj; - var root = chain[i3]; + var root = chain[i5]; if (root === "[]" && options.parseArrays) { obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : [].concat(leaf); } else { @@ -50881,9 +51364,9 @@ var require_parse2 = __commonJS({ } keys.push(parent); } - var i3 = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i3 < options.depth) { - i3 += 1; + var i5 = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i5 < options.depth) { + i5 += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { if (!options.allowPrototypes) { return; @@ -50953,8 +51436,8 @@ var require_parse2 = __commonJS({ var tempObj = typeof str2 === "string" ? parseValues(str2, options) : str2; var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; var keys = Object.keys(tempObj); - for (var i3 = 0; i3 < keys.length; ++i3) { - var key = keys[i3]; + for (var i5 = 0; i5 < keys.length; ++i5) { + var key = keys[i5]; var newObj = parseKeys(key, tempObj[key], options, typeof str2 === "string"); obj = utils.merge(obj, newObj, options); } @@ -50970,13 +51453,13 @@ var require_parse2 = __commonJS({ var require_lib4 = __commonJS({ "node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; - var stringify3 = require_stringify(); - var parse2 = require_parse2(); + var stringify5 = require_stringify(); + var parse4 = require_parse2(); var formats = require_formats(); module2.exports = { formats, - parse: parse2, - stringify: stringify3 + parse: parse4, + stringify: stringify5 }; } }); @@ -50991,7 +51474,7 @@ var require_url = __commonJS({ function pathToFunc(pathPattern, options) { const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; return function buildURLPath(params = {}) { - return pathPattern.replace(paramRE, function(_3, placeholder) { + return pathPattern.replace(paramRE, function(_4, placeholder) { if (!hasOwn3.call(params, placeholder)) { throw new Error(`Parameter '${placeholder}' is required`); } @@ -51019,15 +51502,15 @@ var require_config = __commonJS({ [exports2.ServerEu]: "https://api.mistral.ai" }; function serverURLFromOptions(options) { - var _a5; + var _a6; let serverURL = options.serverURL; const params = {}; if (!serverURL) { - const server = (_a5 = options.server) !== null && _a5 !== void 0 ? _a5 : exports2.ServerEu; + const server = (_a6 = options.server) !== null && _a6 !== void 0 ? _a6 : exports2.ServerEu; serverURL = exports2.ServerList[server] || ""; } - const u3 = (0, url_js_1.pathToFunc)(serverURL)(params); - return new URL(u3); + const u5 = (0, url_js_1.pathToFunc)(serverURL)(params); + return new URL(u5); } exports2.SDK_METADATA = { language: "typescript", @@ -51078,9 +51561,9 @@ var require_custom_user_agent = __commonJS({ exports2.CustomUserAgentHook = void 0; var config_1 = require_config(); var CustomUserAgentHook = class { - beforeRequest(_3, request3) { - const version2 = config_1.SDK_METADATA.sdkVersion; - const ua = `mistral-client-typescript/${version2}`; + beforeRequest(_4, request3) { + const version4 = config_1.SDK_METADATA.sdkVersion; + const ua = `mistral-client-typescript/${version4}`; request3.headers.set("user-agent", ua); if (!request3.headers.get("user-agent")) { request3.headers.set("x-mistral-user-agent", ua); @@ -51100,7 +51583,7 @@ var require_deprecation_warning = __commonJS({ exports2.DeprecationWarningHook = void 0; var HEADER_MODEL_DEPRECATION_TIMESTAMP = "x-model-deprecation-timestamp"; var DeprecationWarningHook = class { - afterSuccess(_3, response) { + afterSuccess(_4, response) { if (response.headers.has(HEADER_MODEL_DEPRECATION_TIMESTAMP)) { response.clone().json().then((body) => { const model = body.model; @@ -51274,18 +51757,18 @@ var require_fp = __commonJS({ function ERR(error) { return { ok: false, error }; } - function unwrap(r3) { - if (!r3.ok) { - throw r3.error; + function unwrap(r5) { + if (!r5.ok) { + throw r5.error; } - return r3.value; + return r5.value; } async function unwrapAsync(pr2) { - const r3 = await pr2; - if (!r3.ok) { - throw r3.error; + const r5 = await pr2; + if (!r5.ok) { + throw r5.error; } - return r3.value; + return r5.value; } } }); @@ -51314,16 +51797,16 @@ var require_util8 = __commonJS({ return obj; }; util5.getValidEnumValues = (obj) => { - const validKeys = util5.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== "number"); + const validKeys = util5.objectKeys(obj).filter((k6) => typeof obj[obj[k6]] !== "number"); const filtered = {}; - for (const k4 of validKeys) { - filtered[k4] = obj[k4]; + for (const k6 of validKeys) { + filtered[k6] = obj[k6]; } return util5.objectValues(filtered); }; util5.objectValues = (obj) => { - return util5.objectKeys(obj).map(function(e3) { - return obj[e3]; + return util5.objectKeys(obj).map(function(e5) { + return obj[e5]; }); }; util5.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => { @@ -51347,7 +51830,7 @@ var require_util8 = __commonJS({ return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator); } util5.joinValues = joinValues; - util5.jsonStringifyReplacer = (_3, value) => { + util5.jsonStringifyReplacer = (_4, value) => { if (typeof value === "bigint") { return value.toString(); } @@ -51387,8 +51870,8 @@ var require_util8 = __commonJS({ "set" ]); var getParsedType = (data) => { - const t2 = typeof data; - switch (t2) { + const t4 = typeof data; + switch (t4) { case "undefined": return exports2.ZodParsedType.undefined; case "string": @@ -51500,10 +51983,10 @@ var require_ZodError = __commonJS({ fieldErrors._errors.push(mapper(issue)); } else { let curr = fieldErrors; - let i3 = 0; - while (i3 < issue.path.length) { - const el = issue.path[i3]; - const terminal = i3 === issue.path.length - 1; + let i5 = 0; + while (i5 < issue.path.length) { + const el = issue.path[i5]; + const terminal = i5 === issue.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { @@ -51511,7 +51994,7 @@ var require_ZodError = __commonJS({ curr[el]._errors.push(mapper(issue)); } curr = curr[el]; - i3++; + i5++; } } } @@ -51671,16 +52154,16 @@ var require_en = __commonJS({ var require_errors2 = __commonJS({ "node_modules/zod/lib/errors.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getErrorMap = exports2.setErrorMap = exports2.defaultErrorMap = void 0; - var en_1 = __importDefault(require_en()); + var en_1 = __importDefault2(require_en()); exports2.defaultErrorMap = en_1.default; var overrideErrorMap = en_1.default; - function setErrorMap(map) { - overrideErrorMap = map; + function setErrorMap(map2) { + overrideErrorMap = map2; } exports2.setErrorMap = setErrorMap; function getErrorMap() { @@ -51694,13 +52177,13 @@ var require_errors2 = __commonJS({ var require_parseUtil = __commonJS({ "node_modules/zod/lib/helpers/parseUtil.js"(exports2) { "use strict"; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAsync = exports2.isValid = exports2.isDirty = exports2.isAborted = exports2.OK = exports2.DIRTY = exports2.INVALID = exports2.ParseStatus = exports2.addIssueToContext = exports2.EMPTY_PATH = exports2.makeIssue = void 0; var errors_1 = require_errors2(); - var en_1 = __importDefault(require_en()); + var en_1 = __importDefault2(require_en()); var makeIssue = (params) => { const { data, path: path2, errorMaps, issueData } = params; const fullPath = [...path2, ...issueData.path || []]; @@ -51716,9 +52199,9 @@ var require_parseUtil = __commonJS({ }; } let errorMessage = ""; - const maps = errorMaps.filter((m4) => !!m4).slice().reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + const maps = errorMaps.filter((m6) => !!m6).slice().reverse(); + for (const map2 of maps) { + errorMessage = map2(fullIssue, { data, defaultError: errorMessage }).message; } return { ...issueData, @@ -51740,7 +52223,7 @@ var require_parseUtil = __commonJS({ overrideMap, overrideMap === en_1.default ? void 0 : en_1.default // then global default map - ].filter((x2) => !!x2) + ].filter((x4) => !!x4) }); ctx.common.issues.push(issue); } @@ -51759,12 +52242,12 @@ var require_parseUtil = __commonJS({ } static mergeArray(status, results) { const arrayValue = []; - for (const s2 of results) { - if (s2.status === "aborted") + for (const s4 of results) { + if (s4.status === "aborted") return exports2.INVALID; - if (s2.status === "dirty") + if (s4.status === "dirty") status.dirty(); - arrayValue.push(s2.value); + arrayValue.push(s4.value); } return { status: status.value, value: arrayValue }; } @@ -51807,13 +52290,13 @@ var require_parseUtil = __commonJS({ exports2.DIRTY = DIRTY; var OK = (value) => ({ status: "valid", value }); exports2.OK = OK; - var isAborted = (x2) => x2.status === "aborted"; + var isAborted = (x4) => x4.status === "aborted"; exports2.isAborted = isAborted; - var isDirty = (x2) => x2.status === "dirty"; + var isDirty = (x4) => x4.status === "dirty"; exports2.isDirty = isDirty; - var isValid = (x2) => x2.status === "valid"; + var isValid = (x4) => x4.status === "valid"; exports2.isValid = isValid; - var isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise; + var isAsync = (x4) => typeof Promise !== "undefined" && x4 instanceof Promise; exports2.isAsync = isAsync; } }); @@ -51844,16 +52327,16 @@ var require_errorUtil = __commonJS({ var require_types = __commonJS({ "node_modules/zod/lib/types.js"(exports2) { "use strict"; - var __classPrivateFieldGet13 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + var __classPrivateFieldGet14 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; - var __classPrivateFieldSet11 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state2, value, kind3, f4) { + var __classPrivateFieldSet12 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; var _ZodEnum_cache; var _ZodNativeEnum_cache; @@ -51913,13 +52396,13 @@ var require_types = __commonJS({ if (errorMap) return { errorMap, description }; const customMap = (iss, ctx) => { - var _a5, _b2; + var _a6, _b2; const { message } = params; if (iss.code === "invalid_enum_value") { return { message: message !== null && message !== void 0 ? message : ctx.defaultError }; } if (typeof ctx.data === "undefined") { - return { message: (_a5 = message !== null && message !== void 0 ? message : required_error) !== null && _a5 !== void 0 ? _a5 : ctx.defaultError }; + return { message: (_a6 = message !== null && message !== void 0 ? message : required_error) !== null && _a6 !== void 0 ? _a6 : ctx.defaultError }; } if (iss.code !== "invalid_type") return { message: ctx.defaultError }; @@ -52003,11 +52486,11 @@ var require_types = __commonJS({ throw result.error; } safeParse(data, params) { - var _a5; + var _a6; const ctx = { common: { issues: [], - async: (_a5 = params === null || params === void 0 ? void 0 : params.async) !== null && _a5 !== void 0 ? _a5 : false, + async: (_a6 = params === null || params === void 0 ? void 0 : params.async) !== null && _a6 !== void 0 ? _a6 : false, contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap }, path: (params === null || params === void 0 ? void 0 : params.path) || [], @@ -52209,11 +52692,11 @@ var require_types = __commonJS({ return new RegExp(`^${regex}$`); } exports2.datetimeRegex = datetimeRegex; - function isValidIP(ip, version2) { - if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) { + function isValidIP(ip, version4) { + if ((version4 === "v4" || !version4) && ipv4Regex.test(ip)) { return true; } - if ((version2 === "v6" || !version2) && ipv6Regex.test(ip)) { + if ((version4 === "v6" || !version4) && ipv6Regex.test(ip)) { return true; } return false; @@ -52364,7 +52847,7 @@ var require_types = __commonJS({ } else if (check.kind === "url") { try { new URL(input.data); - } catch (_a5) { + } catch (_a6) { ctx = this._getOrReturnCtx(input, ctx); (0, parseUtil_1.addIssueToContext)(ctx, { validation: "url", @@ -52534,7 +53017,7 @@ var require_types = __commonJS({ return this._addCheck({ kind: "ip", ...errorUtil_1.errorUtil.errToObj(options) }); } datetime(options) { - var _a5, _b2; + var _a6, _b2; if (typeof options === "string") { return this._addCheck({ kind: "datetime", @@ -52547,7 +53030,7 @@ var require_types = __commonJS({ return this._addCheck({ kind: "datetime", precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, - offset: (_a5 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a5 !== void 0 ? _a5 : false, + offset: (_a6 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a6 !== void 0 ? _a6 : false, local: (_b2 = options === null || options === void 0 ? void 0 : options.local) !== null && _b2 !== void 0 ? _b2 : false, ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) }); @@ -52712,11 +53195,11 @@ var require_types = __commonJS({ }; exports2.ZodString = ZodString; ZodString.create = (params) => { - var _a5; + var _a6; return new ZodString({ checks: [], typeName: ZodFirstPartyTypeKind.ZodString, - coerce: (_a5 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a5 !== void 0 ? _a5 : false, + coerce: (_a6 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a6 !== void 0 ? _a6 : false, ...processCreateParams(params) }); }; @@ -53119,11 +53602,11 @@ var require_types = __commonJS({ }; exports2.ZodBigInt = ZodBigInt; ZodBigInt.create = (params) => { - var _a5; + var _a6; return new ZodBigInt({ checks: [], typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: (_a5 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a5 !== void 0 ? _a5 : false, + coerce: (_a6 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a6 !== void 0 ? _a6 : false, ...processCreateParams(params) }); }; @@ -53456,14 +53939,14 @@ var require_types = __commonJS({ } } if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i3) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3)); + return Promise.all([...ctx.data].map((item, i5) => { + return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i5)); })).then((result2) => { return parseUtil_1.ParseStatus.mergeArray(status, result2); }); } - const result = [...ctx.data].map((item, i3) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3)); + const result = [...ctx.data].map((item, i5) => { + return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i5)); }); return parseUtil_1.ParseStatus.mergeArray(status, result); } @@ -53639,8 +54122,8 @@ var require_types = __commonJS({ unknownKeys: "strict", ...message !== void 0 ? { errorMap: (issue, ctx) => { - var _a5, _b2, _c2, _d2; - const defaultError = (_c2 = (_b2 = (_a5 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a5, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError; + var _a6, _b2, _c2, _d2; + const defaultError = (_c2 = (_b2 = (_a6 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a6, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError; if (issue.code === "unrecognized_keys") return { message: (_d2 = errorUtil_1.errorUtil.errToObj(message).message) !== null && _d2 !== void 0 ? _d2 : defaultError @@ -54068,17 +54551,17 @@ var require_types = __commonJS({ } }; exports2.ZodDiscriminatedUnion = ZodDiscriminatedUnion; - function mergeValues(a3, b3) { - const aType = (0, util_1.getParsedType)(a3); - const bType = (0, util_1.getParsedType)(b3); - if (a3 === b3) { - return { valid: true, data: a3 }; + function mergeValues(a5, b5) { + const aType = (0, util_1.getParsedType)(a5); + const bType = (0, util_1.getParsedType)(b5); + if (a5 === b5) { + return { valid: true, data: a5 }; } else if (aType === util_1.ZodParsedType.object && bType === util_1.ZodParsedType.object) { - const bKeys = util_1.util.objectKeys(b3); - const sharedKeys = util_1.util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a3, ...b3 }; + const bKeys = util_1.util.objectKeys(b5); + const sharedKeys = util_1.util.objectKeys(a5).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a5, ...b5 }; for (const key of sharedKeys) { - const sharedValue = mergeValues(a3[key], b3[key]); + const sharedValue = mergeValues(a5[key], b5[key]); if (!sharedValue.valid) { return { valid: false }; } @@ -54086,13 +54569,13 @@ var require_types = __commonJS({ } return { valid: true, data: newObj }; } else if (aType === util_1.ZodParsedType.array && bType === util_1.ZodParsedType.array) { - if (a3.length !== b3.length) { + if (a5.length !== b5.length) { return { valid: false }; } const newArray = []; - for (let index = 0; index < a3.length; index++) { - const itemA = a3[index]; - const itemB = b3[index]; + for (let index = 0; index < a5.length; index++) { + const itemA = a5[index]; + const itemB = b5[index]; const sharedValue = mergeValues(itemA, itemB); if (!sharedValue.valid) { return { valid: false }; @@ -54100,8 +54583,8 @@ var require_types = __commonJS({ newArray.push(sharedValue.data); } return { valid: true, data: newArray }; - } else if (aType === util_1.ZodParsedType.date && bType === util_1.ZodParsedType.date && +a3 === +b3) { - return { valid: true, data: a3 }; + } else if (aType === util_1.ZodParsedType.date && bType === util_1.ZodParsedType.date && +a5 === +b5) { + return { valid: true, data: a5 }; } else { return { valid: false }; } @@ -54197,7 +54680,7 @@ var require_types = __commonJS({ if (!schema) return null; return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }).filter((x2) => !!x2); + }).filter((x4) => !!x4); if (ctx.common.async) { return Promise.all(items).then((results) => { return parseUtil_1.ParseStatus.mergeArray(status, results); @@ -54399,7 +54882,7 @@ var require_types = __commonJS({ } return { status: status.value, value: parsedSet }; } - const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3))); + const elements = [...ctx.data.values()].map((item, i5) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i5))); if (ctx.common.async) { return Promise.all(elements).then((elements2) => finalizeSet(elements2)); } else { @@ -54459,7 +54942,7 @@ var require_types = __commonJS({ ctx.schemaErrorMap, (0, errors_1.getErrorMap)(), errors_1.defaultErrorMap - ].filter((x2) => !!x2), + ].filter((x4) => !!x4), issueData: { code: ZodError_1.ZodIssueCode.invalid_arguments, argumentsError: error @@ -54475,7 +54958,7 @@ var require_types = __commonJS({ ctx.schemaErrorMap, (0, errors_1.getErrorMap)(), errors_1.defaultErrorMap - ].filter((x2) => !!x2), + ].filter((x4) => !!x4), issueData: { code: ZodError_1.ZodIssueCode.invalid_return_type, returnTypeError: error @@ -54488,13 +54971,13 @@ var require_types = __commonJS({ const me2 = this; return (0, parseUtil_1.OK)(async function(...args) { const error = new ZodError_1.ZodError([]); - const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e3) => { - error.addIssue(makeArgsIssue(args, e3)); + const parsedArgs = await me2._def.args.parseAsync(args, params).catch((e5) => { + error.addIssue(makeArgsIssue(args, e5)); throw error; }); const result = await Reflect.apply(fn, this, parsedArgs); - const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e3) => { - error.addIssue(makeReturnsIssue(result, e3)); + const parsedReturns = await me2._def.returns._def.type.parseAsync(result, params).catch((e5) => { + error.addIssue(makeReturnsIssue(result, e5)); throw error; }); return parsedReturns; @@ -54617,10 +55100,10 @@ var require_types = __commonJS({ }); return parseUtil_1.INVALID; } - if (!__classPrivateFieldGet13(this, _ZodEnum_cache, "f")) { - __classPrivateFieldSet11(this, _ZodEnum_cache, new Set(this._def.values), "f"); + if (!__classPrivateFieldGet14(this, _ZodEnum_cache, "f")) { + __classPrivateFieldSet12(this, _ZodEnum_cache, new Set(this._def.values), "f"); } - if (!__classPrivateFieldGet13(this, _ZodEnum_cache, "f").has(input.data)) { + if (!__classPrivateFieldGet14(this, _ZodEnum_cache, "f").has(input.data)) { const ctx = this._getOrReturnCtx(input); const expectedValues = this._def.values; (0, parseUtil_1.addIssueToContext)(ctx, { @@ -54689,10 +55172,10 @@ var require_types = __commonJS({ }); return parseUtil_1.INVALID; } - if (!__classPrivateFieldGet13(this, _ZodNativeEnum_cache, "f")) { - __classPrivateFieldSet11(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), "f"); + if (!__classPrivateFieldGet14(this, _ZodNativeEnum_cache, "f")) { + __classPrivateFieldSet12(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), "f"); } - if (!__classPrivateFieldGet13(this, _ZodNativeEnum_cache, "f").has(input.data)) { + if (!__classPrivateFieldGet14(this, _ZodNativeEnum_cache, "f").has(input.data)) { const expectedValues = util_1.util.objectValues(nativeEnumValues); (0, parseUtil_1.addIssueToContext)(ctx, { received: ctx.data, @@ -55090,10 +55573,10 @@ var require_types = __commonJS({ } } } - static create(a3, b3) { + static create(a5, b5) { return new _ZodPipeline({ - in: a3, - out: b3, + in: a5, + out: b5, typeName: ZodFirstPartyTypeKind.ZodPipeline }); } @@ -55125,11 +55608,11 @@ var require_types = __commonJS({ function custom2(check, params = {}, fatal) { if (check) return ZodAny.create().superRefine((data, ctx) => { - var _a5, _b2; + var _a6, _b2; if (!check(data)) { - const p3 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const _fatal = (_b2 = (_a5 = p3.fatal) !== null && _a5 !== void 0 ? _a5 : fatal) !== null && _b2 !== void 0 ? _b2 : true; - const p22 = typeof p3 === "string" ? { message: p3 } : p3; + const p5 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; + const _fatal = (_b2 = (_a6 = p5.fatal) !== null && _a6 !== void 0 ? _a6 : fatal) !== null && _b2 !== void 0 ? _b2 : true; + const p22 = typeof p5 === "string" ? { message: p5 } : p5; ctx.addIssue({ code: "custom", ...p22, fatal: _fatal }); } }); @@ -55275,25 +55758,25 @@ var require_types = __commonJS({ var require_external = __commonJS({ "node_modules/zod/lib/external.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_errors2(), exports2); - __exportStar(require_parseUtil(), exports2); - __exportStar(require_typeAliases(), exports2); - __exportStar(require_util8(), exports2); - __exportStar(require_types(), exports2); - __exportStar(require_ZodError(), exports2); + __exportStar2(require_errors2(), exports2); + __exportStar2(require_parseUtil(), exports2); + __exportStar2(require_typeAliases(), exports2); + __exportStar2(require_util8(), exports2); + __exportStar2(require_types(), exports2); + __exportStar2(require_ZodError(), exports2); } }); @@ -55301,38 +55784,38 @@ var require_external = __commonJS({ var require_lib5 = __commonJS({ "node_modules/zod/lib/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - Object.defineProperty(o3, k22, { enumerable: true, get: function() { - return m4[k4]; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + Object.defineProperty(o5, k22, { enumerable: true, get: function() { + return m6[k6]; } }); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.z = void 0; - var z3 = __importStar(require_external()); - exports2.z = z3; - __exportStar(require_external(), exports2); - exports2.default = z3; + var z4 = __importStar2(require_external()); + exports2.z = z4; + __exportStar2(require_external(), exports2); + exports2.default = z4; } }); @@ -55340,62 +55823,62 @@ var require_lib5 = __commonJS({ var require_base64 = __commonJS({ "node_modules/@mistralai/mistralai/lib/base64.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.zodInbound = exports2.zodOutbound = void 0; exports2.bytesToBase64 = bytesToBase64; exports2.bytesFromBase64 = bytesFromBase64; - exports2.stringToBytes = stringToBytes2; + exports2.stringToBytes = stringToBytes4; exports2.stringFromBytes = stringFromBytes; exports2.stringToBase64 = stringToBase64; exports2.stringFromBase64 = stringFromBase64; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); function bytesToBase64(u8arr) { return btoa(String.fromCodePoint(...u8arr)); } function bytesFromBase64(encoded) { - return Uint8Array.from(atob(encoded), (c2) => c2.charCodeAt(0)); + return Uint8Array.from(atob(encoded), (c4) => c4.charCodeAt(0)); } - function stringToBytes2(str2) { + function stringToBytes4(str2) { return new TextEncoder().encode(str2); } function stringFromBytes(u8arr) { return new TextDecoder().decode(u8arr); } function stringToBase64(str2) { - return bytesToBase64(stringToBytes2(str2)); + return bytesToBase64(stringToBytes4(str2)); } function stringFromBase64(b64str) { return stringFromBytes(bytesFromBase64(b64str)); } - exports2.zodOutbound = z3.instanceof(Uint8Array).or(z3.string().transform(stringToBytes2)); - exports2.zodInbound = z3.instanceof(Uint8Array).or(z3.string().transform(bytesFromBase64)); + exports2.zodOutbound = z4.instanceof(Uint8Array).or(z4.string().transform(stringToBytes4)); + exports2.zodInbound = z4.instanceof(Uint8Array).or(z4.string().transform(bytesFromBase64)); } }); @@ -55441,20 +55924,20 @@ var require_encodings = __commonJS({ function encodeMatrix(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; - const encodeValue = (v2) => encodeString(serializeValue(v2)); + const encodeValue = (v7) => encodeString(serializeValue(v7)); pairs.forEach(([pk, pv]) => { let tmp = ""; let encValue = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v2) => `${encodeValue(v2)}`).join(","); + encValue = mapDefined(pv, (v7) => `${encodeValue(v7)}`).join(","); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k4, v2]) => { - return `,${encodeString(k4)},${encodeValue(v2)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k6, v7]) => { + return `,${encodeString(k6)},${encodeValue(v7)}`; }).join(""); encValue = encValue.slice(1); } else { @@ -55475,24 +55958,24 @@ var require_encodings = __commonJS({ function encodeLabel(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; - const encodeValue = (v2) => encodeString(serializeValue(v2)); + const encodeValue = (v7) => encodeString(serializeValue(v7)); pairs.forEach(([pk, pv]) => { let encValue = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v2) => `${encodeValue(v2)}`).join("."); + encValue = mapDefined(pv, (v7) => `${encodeValue(v7)}`).join("."); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k4, v2]) => { - return `.${encodeString(k4)}.${encodeValue(v2)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k6, v7]) => { + return `.${encodeString(k6)}.${encodeValue(v7)}`; }).join(""); encValue = encValue.slice(1); } else { - const k4 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${encodeString(pk)}=` : ""; - encValue = `${k4}${encodeValue(pv)}`; + const k6 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k6}${encodeValue(pv)}`; } out += `.${encValue}`; }); @@ -55502,10 +55985,10 @@ var require_encodings = __commonJS({ return (key, value, options) => { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; - const encodeValue = (v2) => encodeString(serializeValue(v2)); + const encodeValue = (v7) => encodeString(serializeValue(v7)); const encodedSep = encodeString(sep); pairs.forEach(([pk, pv]) => { let tmp = ""; @@ -55513,10 +55996,10 @@ var require_encodings = __commonJS({ if (pv === void 0) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v2) => `${encodeValue(v2)}`).join(encodedSep); + encValue = mapDefined(pv, (v7) => `${encodeValue(v7)}`).join(encodedSep); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k4, v2]) => { - return `${encodeString(k4)}${encodedSep}${encodeValue(v2)}`; + encValue = mapDefinedEntries(Object.entries(pv), ([k6, v7]) => { + return `${encodeString(k6)}${encodedSep}${encodeValue(v7)}`; }).join(encodedSep); } else { encValue = `${encodeValue(pv)}`; @@ -55536,10 +56019,10 @@ var require_encodings = __commonJS({ function encodeBodyForm(key, value, options) { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; - const encodeValue = (v2) => encodeString(serializeValue(v2)); + const encodeValue = (v7) => encodeString(serializeValue(v7)); pairs.forEach(([pk, pv]) => { let tmp = ""; let encValue = ""; @@ -55574,8 +56057,8 @@ var require_encodings = __commonJS({ return ""; } let out = ""; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; if (!(0, is_plain_object_js_1.isPlainObject)(value)) { throw new EncodingError(`Expected parameter '${key}' to be an object.`); @@ -55592,8 +56075,8 @@ var require_encodings = __commonJS({ } const pairs = Array.isArray(cv) ? cv : [cv]; let encoded = ""; - encoded = mapDefined(pairs, (v2) => { - return `${encodeString(pk)}=${encodeString(serializeValue(v2))}`; + encoded = mapDefined(pairs, (v7) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v7))}`; }).join("&"); out += `&${encoded}`; }); @@ -55603,8 +56086,8 @@ var require_encodings = __commonJS({ if (typeof value === "undefined") { return ""; } - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; const encVal = encodeString(JSON.stringify(value, jsonReplacer)); return (options === null || options === void 0 ? void 0 : options.explode) ? encVal : `${encodeString(key)}=${encVal}`; @@ -55612,24 +56095,24 @@ var require_encodings = __commonJS({ var encodeSimple = (key, value, options) => { let out = ""; const pairs = (options === null || options === void 0 ? void 0 : options.explode) ? explode(key, value) : [[key, value]]; - const encodeString = (v2) => { - return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v2) : v2; + const encodeString = (v7) => { + return (options === null || options === void 0 ? void 0 : options.charEncoding) === "percent" ? encodeURIComponent(v7) : v7; }; - const encodeValue = (v2) => encodeString(serializeValue(v2)); + const encodeValue = (v7) => encodeString(serializeValue(v7)); pairs.forEach(([pk, pv]) => { let tmp = ""; if (pv === void 0) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v2) => `${encodeValue(v2)}`).join(","); + tmp = mapDefined(pv, (v7) => `${encodeValue(v7)}`).join(","); } else if ((0, is_plain_object_js_1.isPlainObject)(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k4, v2]) => { - return `,${encodeString(k4)},${encodeValue(v2)}`; + tmp = mapDefinedEntries(Object.entries(pv), ([k6, v7]) => { + return `,${encodeString(k6)},${encodeValue(v7)}`; }).join(""); tmp = tmp.slice(1); } else { - const k4 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${pk}=` : ""; - tmp = `${k4}${encodeValue(pv)}`; + const k6 = (options === null || options === void 0 ? void 0 : options.explode) && (0, is_plain_object_js_1.isPlainObject)(value) ? `${pk}=` : ""; + tmp = `${k6}${encodeValue(pv)}`; } if (!tmp) { return; @@ -55641,10 +56124,10 @@ var require_encodings = __commonJS({ exports2.encodeSimple = encodeSimple; function explode(key, value) { if (Array.isArray(value)) { - return value.map((v2) => [key, v2]); + return value.map((v7) => [key, v7]); } else if ((0, is_plain_object_js_1.isPlainObject)(value)) { - const o3 = value !== null && value !== void 0 ? value : {}; - return Object.entries(o3).map(([k4, v2]) => [k4, v2]); + const o5 = value !== null && value !== void 0 ? value : {}; + return Object.entries(o5).map(([k6, v7]) => [k6, v7]); } else { return [[key, value]]; } @@ -55663,7 +56146,7 @@ var require_encodings = __commonJS({ } return `${value}`; } - function jsonReplacer(_3, value) { + function jsonReplacer(_4, value) { if (value instanceof Uint8Array) { return (0, base64_js_1.bytesToBase64)(value); } else { @@ -55671,45 +56154,45 @@ var require_encodings = __commonJS({ } } function mapDefined(inp, mapper) { - return inp.reduce((acc, v2) => { - if (v2 === void 0) { + return inp.reduce((acc, v7) => { + if (v7 === void 0) { return acc; } - const m4 = mapper(v2); - if (m4 === void 0) { + const m6 = mapper(v7); + if (m6 === void 0) { return acc; } - acc.push(m4); + acc.push(m6); return acc; }, []); } function mapDefinedEntries(inp, mapper) { const acc = []; - for (const [k4, v2] of inp) { - if (v2 === void 0) { + for (const [k6, v7] of inp) { + if (v7 === void 0) { continue; } - const m4 = mapper([k4, v2]); - if (m4 === void 0) { + const m6 = mapper([k6, v7]); + if (m6 === void 0) { continue; } - acc.push(m4); + acc.push(m6); } return acc; } function queryJoin(...args) { return args.filter(Boolean).join("&"); } - function queryEncoder(f4) { + function queryEncoder(f6) { const bulkEncode = function(values, options) { - var _a5, _b2; + var _a6, _b2; const opts = { ...options, - explode: (_a5 = options === null || options === void 0 ? void 0 : options.explode) !== null && _a5 !== void 0 ? _a5 : true, + explode: (_a6 = options === null || options === void 0 ? void 0 : options.explode) !== null && _a6 !== void 0 ? _a6 : true, charEncoding: (_b2 = options === null || options === void 0 ? void 0 : options.charEncoding) !== null && _b2 !== void 0 ? _b2 : "percent" }; const encoded = Object.entries(values).map(([key, value]) => { - return f4(key, value, opts); + return f6(key, value, opts); }); return queryJoin(...encoded); }; @@ -55729,11 +56212,11 @@ var require_dlv = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.dlv = dlv; - function dlv(obj, key, def, p3, undef) { + function dlv(obj, key, def, p5, undef) { key = Array.isArray(key) ? key : key.split("."); - for (p3 = 0; p3 < key.length; p3++) { - const k4 = key[p3]; - obj = k4 != null && obj ? obj[k4] : undef; + for (p5 = 0; p5 < key.length; p5++) { + const k6 = key[p5]; + obj = k6 != null && obj ? obj[k6] : undef; } return obj === undef ? def : obj; } @@ -55744,31 +56227,31 @@ var require_dlv = __commonJS({ var require_env = __commonJS({ "node_modules/@mistralai/mistralai/lib/env.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -55776,18 +56259,18 @@ var require_env = __commonJS({ exports2.env = env2; exports2.resetEnv = resetEnv; var dlv_js_1 = require_dlv(); - var z3 = __importStar(require_lib5()); - exports2.envSchema = z3.object({ - MISTRAL_API_KEY: z3.string().optional(), - MISTRAL_DEBUG: z3.coerce.boolean().optional() + var z4 = __importStar2(require_lib5()); + exports2.envSchema = z4.object({ + MISTRAL_API_KEY: z4.string().optional(), + MISTRAL_DEBUG: z4.coerce.boolean().optional() }); var envMemo = void 0; function env2() { - var _a5, _b2; + var _a6, _b2; if (envMemo) { return envMemo; } - envMemo = exports2.envSchema.parse((_b2 = (_a5 = (0, dlv_js_1.dlv)(globalThis, "process.env")) !== null && _a5 !== void 0 ? _a5 : (0, dlv_js_1.dlv)(globalThis, "Deno.env")) !== null && _b2 !== void 0 ? _b2 : {}); + envMemo = exports2.envSchema.parse((_b2 = (_a6 = (0, dlv_js_1.dlv)(globalThis, "process.env")) !== null && _a6 !== void 0 ? _a6 : (0, dlv_js_1.dlv)(globalThis, "Deno.env")) !== null && _b2 !== void 0 ? _b2 : {}); return envMemo; } function resetEnv() { @@ -55867,7 +56350,7 @@ var require_http = __commonJS({ } else { throw new Error(`Invalid hook type: ${args[0]}`); } - const index = target.findIndex((v2) => v2 === args[1]); + const index = target.findIndex((v7) => v7 === args[1]); if (index >= 0) { target.splice(index, 1); } @@ -55884,11 +56367,11 @@ var require_http = __commonJS({ exports2.HTTPClient = HTTPClient; var mediaParamSeparator = /\s*;\s*/g; function matchContentType(response, pattern) { - var _a5; + var _a6; if (pattern === "*") { return true; } - let contentType = ((_a5 = response.headers.get("content-type")) === null || _a5 === void 0 ? void 0 : _a5.trim()) || "application/octet-stream"; + let contentType = ((_a6 = response.headers.get("content-type")) === null || _a6 === void 0 ? void 0 : _a6.trim()) || "application/octet-stream"; contentType = contentType.toLowerCase(); const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); const [wantType = "", ...wantParams] = wantParts; @@ -56014,13 +56497,13 @@ var require_retries = __commonJS({ }; exports2.TemporaryError = TemporaryError; async function retry(fetchFn, options) { - var _a5; + var _a6; switch (options.config.strategy) { case "backoff": return retryBackoff(wrapFetcher(fetchFn, { statusCodes: options.statusCodes, retryConnectionErrors: !!options.config.retryConnectionErrors - }), (_a5 = options.config.backoff) !== null && _a5 !== void 0 ? _a5 : defaultBackoff); + }), (_a6 = options.config.backoff) !== null && _a6 !== void 0 ? _a6 : defaultBackoff); default: return await fetchFn(); } @@ -56065,7 +56548,7 @@ var require_retries = __commonJS({ async function retryBackoff(fn, strategy) { const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; const start = Date.now(); - let x2 = 0; + let x4 = 0; while (true) { try { const res = await fn(); @@ -56086,11 +56569,11 @@ var require_retries = __commonJS({ retryInterval = retryIntervalFromResponse(err.response); } if (retryInterval <= 0) { - retryInterval = initialInterval * Math.pow(x2, exponent) + Math.random() * 1e3; + retryInterval = initialInterval * Math.pow(x4, exponent) + Math.random() * 1e3; } - const d5 = Math.min(retryInterval, maxInterval); - await delay4(d5); - x2++; + const d7 = Math.min(retryInterval, maxInterval); + await delay4(d7); + x4++; } } } @@ -56120,16 +56603,16 @@ var require_retries = __commonJS({ var require_sdks = __commonJS({ "node_modules/@mistralai/mistralai/lib/sdks.js"(exports2) { "use strict"; - var __classPrivateFieldSet11 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state2, value, kind3, f4) { + var __classPrivateFieldSet12 = exports2 && exports2.__classPrivateFieldSet || function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; - var __classPrivateFieldGet13 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); + var __classPrivateFieldGet14 = exports2 && exports2.__classPrivateFieldGet || function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _ClientSDK_httpClient; var _ClientSDK_hooks; @@ -56155,30 +56638,30 @@ var require_sdks = __commonJS({ _ClientSDK_logger.set(this, void 0); const opt = options; if (typeof opt === "object" && opt != null && "hooks" in opt && opt.hooks instanceof hooks_js_1.SDKHooks) { - __classPrivateFieldSet11(this, _ClientSDK_hooks, opt.hooks, "f"); + __classPrivateFieldSet12(this, _ClientSDK_hooks, opt.hooks, "f"); } else { - __classPrivateFieldSet11(this, _ClientSDK_hooks, new hooks_js_1.SDKHooks(), "f"); + __classPrivateFieldSet12(this, _ClientSDK_hooks, new hooks_js_1.SDKHooks(), "f"); } - this._options = { ...options, hooks: __classPrivateFieldGet13(this, _ClientSDK_hooks, "f") }; + this._options = { ...options, hooks: __classPrivateFieldGet14(this, _ClientSDK_hooks, "f") }; const url2 = (0, config_js_1.serverURLFromOptions)(options); if (url2) { url2.pathname = url2.pathname.replace(/\/+$/, "") + "/"; } - const { baseURL, client } = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").sdkInit({ + const { baseURL, client } = __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").sdkInit({ baseURL: url2, client: options.httpClient || new http_js_1.HTTPClient() }); this._baseURL = baseURL; - __classPrivateFieldSet11(this, _ClientSDK_httpClient, client, "f"); - __classPrivateFieldSet11(this, _ClientSDK_logger, options.debugLogger, "f"); - if (!__classPrivateFieldGet13(this, _ClientSDK_logger, "f") && (0, env_js_1.env)().MISTRAL_DEBUG) { - __classPrivateFieldSet11(this, _ClientSDK_logger, console, "f"); + __classPrivateFieldSet12(this, _ClientSDK_httpClient, client, "f"); + __classPrivateFieldSet12(this, _ClientSDK_logger, options.debugLogger, "f"); + if (!__classPrivateFieldGet14(this, _ClientSDK_logger, "f") && (0, env_js_1.env)().MISTRAL_DEBUG) { + __classPrivateFieldSet12(this, _ClientSDK_logger, console, "f"); } } _createRequest(context2, conf, options) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const { method, path: path2, query, headers: opHeaders, security } = conf; - const base = (_a5 = conf.baseURL) !== null && _a5 !== void 0 ? _a5 : this._baseURL; + const base = (_a6 = conf.baseURL) !== null && _a6 !== void 0 ? _a6 : this._baseURL; if (!base) { return (0, fp_js_1.ERR)(new httpclienterrors_js_1.InvalidRequestError("No base URL provided for operation")); } @@ -56189,15 +56672,15 @@ var require_sdks = __commonJS({ } let finalQuery = query || ""; const secQuery = []; - for (const [k4, v2] of Object.entries((security === null || security === void 0 ? void 0 : security.queryParams) || {})) { - secQuery.push((0, encodings_js_1.encodeForm)(k4, v2, { charEncoding: "percent" })); + for (const [k6, v7] of Object.entries((security === null || security === void 0 ? void 0 : security.queryParams) || {})) { + secQuery.push((0, encodings_js_1.encodeForm)(k6, v7, { charEncoding: "percent" })); } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; } if (finalQuery) { - const q3 = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q3}`; + const q5 = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q5}`; } const headers = new Headers(opHeaders); const username = security === null || security === void 0 ? void 0 : security.basic.username; @@ -56207,18 +56690,18 @@ var require_sdks = __commonJS({ headers.set("Authorization", `Basic ${encoded}`); } const securityHeaders = new Headers((security === null || security === void 0 ? void 0 : security.headers) || {}); - for (const [k4, v2] of securityHeaders) { - headers.set(k4, v2); + for (const [k6, v7] of securityHeaders) { + headers.set(k6, v7); } let cookie = headers.get("cookie") || ""; - for (const [k4, v2] of Object.entries((security === null || security === void 0 ? void 0 : security.cookies) || {})) { - cookie += `; ${k4}=${v2}`; + for (const [k6, v7] of Object.entries((security === null || security === void 0 ? void 0 : security.cookies) || {})) { + cookie += `; ${k6}=${v7}`; } cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; headers.set("cookie", cookie); const userHeaders = new Headers((_b2 = options === null || options === void 0 ? void 0 : options.fetchOptions) === null || _b2 === void 0 ? void 0 : _b2.headers); - for (const [k4, v2] of userHeaders) { - headers.set(k4, v2); + for (const [k6, v7] of userHeaders) { + headers.set(k6, v7); } if (!isBrowserLike) { headers.set((_c2 = conf.uaHeader) !== null && _c2 !== void 0 ? _c2 : "user-agent", config_js_1.SDK_METADATA.userAgent); @@ -56244,7 +56727,7 @@ var require_sdks = __commonJS({ } let input; try { - input = __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeCreateRequest(context2, { + input = __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").beforeCreateRequest(context2, { url: reqURL, options: { ...fetchOptions, @@ -56263,30 +56746,30 @@ var require_sdks = __commonJS({ async _do(request3, options) { const { context: context2, errorCodes } = options; return (0, retries_js_1.retry)(async () => { - const req = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").beforeRequest(context2, request3.clone()); - await logRequest(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), req).catch((e3) => { - var _a5; - return (_a5 = __classPrivateFieldGet13(this, _ClientSDK_logger, "f")) === null || _a5 === void 0 ? void 0 : _a5.log("Failed to log request:", e3); + const req = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").beforeRequest(context2, request3.clone()); + await logRequest(__classPrivateFieldGet14(this, _ClientSDK_logger, "f"), req).catch((e5) => { + var _a6; + return (_a6 = __classPrivateFieldGet14(this, _ClientSDK_logger, "f")) === null || _a6 === void 0 ? void 0 : _a6.log("Failed to log request:", e5); }); - let response = await __classPrivateFieldGet13(this, _ClientSDK_httpClient, "f").request(req); + let response = await __classPrivateFieldGet14(this, _ClientSDK_httpClient, "f").request(req); try { if ((0, http_js_1.matchStatusCode)(response, errorCodes)) { - const result = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterError(context2, response, null); + const result = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").afterError(context2, response, null); if (result.error) { throw result.error; } response = result.response || response; } else { - response = await __classPrivateFieldGet13(this, _ClientSDK_hooks, "f").afterSuccess(context2, response); + response = await __classPrivateFieldGet14(this, _ClientSDK_hooks, "f").afterSuccess(context2, response); } } finally { - await logResponse(__classPrivateFieldGet13(this, _ClientSDK_logger, "f"), response, req).catch((e3) => { - var _a5; - return (_a5 = __classPrivateFieldGet13(this, _ClientSDK_logger, "f")) === null || _a5 === void 0 ? void 0 : _a5.log("Failed to log response:", e3); + await logResponse(__classPrivateFieldGet14(this, _ClientSDK_logger, "f"), response, req).catch((e5) => { + var _a6; + return (_a6 = __classPrivateFieldGet14(this, _ClientSDK_logger, "f")) === null || _a6 === void 0 ? void 0 : _a6.log("Failed to log response:", e5); }); } return response; - }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r3) => (0, fp_js_1.OK)(r3), (err) => { + }, { config: options.retryConfig, statusCodes: options.retryCodes }).then((r5) => (0, fp_js_1.OK)(r5), (err) => { switch (true) { case (0, http_js_1.isAbortError)(err): return (0, fp_js_1.ERR)(new httpclienterrors_js_1.RequestAbortedError("Request aborted by client", { @@ -56307,79 +56790,79 @@ var require_sdks = __commonJS({ exports2.ClientSDK = ClientSDK; _ClientSDK_httpClient = /* @__PURE__ */ new WeakMap(), _ClientSDK_hooks = /* @__PURE__ */ new WeakMap(), _ClientSDK_logger = /* @__PURE__ */ new WeakMap(); var jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; - async function logRequest(logger3, req) { - if (!logger3) { + async function logRequest(logger5, req) { + if (!logger5) { return; } const contentType = req.headers.get("content-type"); const ct2 = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || ""; - logger3.group(`> Request: ${req.method} ${req.url}`); - logger3.group("Headers:"); - for (const [k4, v2] of req.headers.entries()) { - logger3.log(`${k4}: ${v2}`); + logger5.group(`> Request: ${req.method} ${req.url}`); + logger5.group("Headers:"); + for (const [k6, v7] of req.headers.entries()) { + logger5.log(`${k6}: ${v7}`); } - logger3.groupEnd(); - logger3.group("Body:"); + logger5.groupEnd(); + logger5.group("Body:"); switch (true) { case jsonLikeContentTypeRE.test(ct2): - logger3.log(await req.clone().json()); + logger5.log(await req.clone().json()); break; case ct2.startsWith("text/"): - logger3.log(await req.clone().text()); + logger5.log(await req.clone().text()); break; case ct2 === "multipart/form-data": { const body = await req.clone().formData(); - for (const [k4, v2] of body) { - const vlabel = v2 instanceof Blob ? "" : v2; - logger3.log(`${k4}: ${vlabel}`); + for (const [k6, v7] of body) { + const vlabel = v7 instanceof Blob ? "" : v7; + logger5.log(`${k6}: ${vlabel}`); } break; } default: - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; } - logger3.groupEnd(); - logger3.groupEnd(); + logger5.groupEnd(); + logger5.groupEnd(); } - async function logResponse(logger3, res, req) { - if (!logger3) { + async function logResponse(logger5, res, req) { + if (!logger5) { return; } const contentType = res.headers.get("content-type"); const ct2 = (contentType === null || contentType === void 0 ? void 0 : contentType.split(";")[0]) || ""; - logger3.group(`< Response: ${req.method} ${req.url}`); - logger3.log("Status Code:", res.status, res.statusText); - logger3.group("Headers:"); - for (const [k4, v2] of res.headers.entries()) { - logger3.log(`${k4}: ${v2}`); - } - logger3.groupEnd(); - logger3.group("Body:"); + logger5.group(`< Response: ${req.method} ${req.url}`); + logger5.log("Status Code:", res.status, res.statusText); + logger5.group("Headers:"); + for (const [k6, v7] of res.headers.entries()) { + logger5.log(`${k6}: ${v7}`); + } + logger5.groupEnd(); + logger5.group("Body:"); switch (true) { case ((0, http_js_1.matchContentType)(res, "application/json") || jsonLikeContentTypeRE.test(ct2)): - logger3.log(await res.clone().json()); + logger5.log(await res.clone().json()); break; case (0, http_js_1.matchContentType)(res, "text/event-stream"): - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; case (0, http_js_1.matchContentType)(res, "text/*"): - logger3.log(await res.clone().text()); + logger5.log(await res.clone().text()); break; case (0, http_js_1.matchContentType)(res, "multipart/form-data"): { const body = await res.clone().formData(); - for (const [k4, v2] of body) { - const vlabel = v2 instanceof Blob ? "" : v2; - logger3.log(`${k4}: ${vlabel}`); + for (const [k6, v7] of body) { + const vlabel = v7 instanceof Blob ? "" : v7; + logger5.log(`${k6}: ${vlabel}`); } break; } default: - logger3.log(`<${contentType}>`); + logger5.log(`<${contentType}>`); break; } - logger3.groupEnd(); - logger3.groupEnd(); + logger5.groupEnd(); + logger5.groupEnd(); } } }); @@ -56442,13 +56925,13 @@ var require_event_streams = __commonJS({ newBuffer.set(buffer); newBuffer.set(value, buffer.length); buffer = newBuffer; - for (let i3 = position; i3 < buffer.length; i3++) { - const boundary = findBoundary(buffer, i3); + for (let i5 = position; i5 < buffer.length; i5++) { + const boundary = findBoundary(buffer, i5); if (boundary == null) { continue; } - const chunk = buffer.slice(position, i3); - position = i3 + boundary.length; + const chunk = buffer.slice(position, i5); + position = i5 + boundary.length; const event = parseEvent(chunk, this.decoder); if (event != null) { yield event; @@ -56465,11 +56948,11 @@ var require_event_streams = __commonJS({ yield event; } } - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") { + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") { return; } - throw e3; + throw e5; } finally { reader.releaseLock(); } @@ -56482,8 +56965,8 @@ var require_event_streams = __commonJS({ if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) { return null; } - for (const s2 of MESSAGE_BOUNDARIES) { - const seq = peekSequence(start, buffer, s2); + for (const s4 of MESSAGE_BOUNDARIES) { + const seq = peekSequence(start, buffer, s4); if (seq != null) { return seq; } @@ -56494,15 +56977,15 @@ var require_event_streams = __commonJS({ if (sequence.length > buffer.length - position) { return null; } - for (let i3 = 0; i3 < sequence.length; i3++) { - if (buffer[position + i3] !== sequence[i3]) { + for (let i5 = 0; i5 < sequence.length; i5++) { + if (buffer[position + i5] !== sequence[i5]) { return null; } } return sequence; } function parseEvent(chunk, decoder) { - var _a5; + var _a6; if (!chunk.length) { return null; } @@ -56532,7 +57015,7 @@ var require_event_streams = __commonJS({ } case "data": { publish = true; - (_a5 = rawEvent.data) !== null && _a5 !== void 0 ? _a5 : rawEvent.data = ""; + (_a6 = rawEvent.data) !== null && _a6 !== void 0 ? _a6 : rawEvent.data = ""; rawEvent.data += value + "\n"; break; } @@ -56542,10 +57025,10 @@ var require_event_streams = __commonJS({ break; } case "retry": { - const r3 = parseInt(value, 10); - if (!Number.isNaN(r3)) { + const r5 = parseInt(value, 10); + if (!Number.isNaN(r5)) { publish = true; - rawEvent.retry = r3; + rawEvent.retry = r5; } break; } @@ -56582,14 +57065,14 @@ var require_event_streams = __commonJS({ newBuffer.set(buffer); newBuffer.set(value, buffer.length); buffer = newBuffer; - for (let i3 = position; i3 < buffer.length; i3++) { - const boundary = findBoundary(buffer, i3); + for (let i5 = position; i5 < buffer.length; i5++) { + const boundary = findBoundary(buffer, i5); if (boundary == null) { continue; } const start = position; - const chunk = buffer.slice(start, i3); - position = i3 + boundary.length; + const chunk = buffer.slice(start, i5); + position = i5 + boundary.length; const event = parseEvent(chunk, id); if ((event === null || event === void 0 ? void 0 : event.data) === sentinel) { controller.enqueue(buffer.slice(0, start)); @@ -56601,8 +57084,8 @@ var require_event_streams = __commonJS({ } } } - } catch (e3) { - controller.error(e3); + } catch (e5) { + controller.error(e5); } finally { controller.close(); rdr.releaseLock(); @@ -56610,8 +57093,8 @@ var require_event_streams = __commonJS({ } }); } - function id(v2) { - return v2; + function id(v7) { + return v7; } } }); @@ -56620,37 +57103,37 @@ var require_event_streams = __commonJS({ var require_sdkvalidationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/sdkvalidationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SDKValidationError = void 0; exports2.formatZodError = formatZodError; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var SDKValidationError = class extends Error { constructor(message, cause, rawValue) { super(`${message}: ${cause}`); @@ -56665,7 +57148,7 @@ var require_sdkvalidationerror = __commonJS({ * default error message. */ pretty() { - if (this.cause instanceof z3.ZodError) { + if (this.cause instanceof z4.ZodError) { return `${this.rawMessage} ${formatZodError(this.cause)}`; } else { @@ -56713,8 +57196,8 @@ ${pre}${str2}`; case "invalid_union": { const len2 = issue.unionErrors.length; append2(`\u2502 \u2716\uFE0E Attemped to deserialize into one of ${len2} union members:`); - issue.unionErrors.forEach((err2, i3) => { - append2(`\u2502 \u2716\uFE0E Member ${i3 + 1} of ${len2}`); + issue.unionErrors.forEach((err2, i5) => { + append2(`\u2502 \u2716\uFE0E Member ${i5 + 1} of ${len2}`); append2(`${formatZodError(err2, level + 1)}`); }); } @@ -56733,13 +57216,13 @@ var require_schemas = __commonJS({ "node_modules/@mistralai/mistralai/lib/schemas.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.parse = parse2; + exports2.parse = parse4; exports2.safeParse = safeParse; exports2.collectExtraKeys = collectExtraKeys; var zod_1 = require_lib5(); var sdkvalidationerror_js_1 = require_sdkvalidationerror(); var fp_js_1 = require_fp(); - function parse2(rawValue, fn, errorMessage) { + function parse4(rawValue, fn, errorMessage) { try { return fn(rawValue); } catch (err) { @@ -56764,11 +57247,11 @@ var require_schemas = __commonJS({ if (key in shape) { continue; } - const v2 = val[key]; - if (typeof v2 === "undefined") { + const v7 = val[key]; + if (typeof v7 === "undefined") { continue; } - extras[key] = v2; + extras[key] = v7; delete val[key]; } return { ...val, [extrasKey]: extras }; @@ -56930,11 +57413,11 @@ var require_matchers = __commonJS({ data = raw; } if ("err" in matcher) { - const result = (0, schemas_js_1.safeParse)(data, (v2) => matcher.schema.parse(v2), "Response validation failed"); + const result = (0, schemas_js_1.safeParse)(data, (v7) => matcher.schema.parse(v7), "Response validation failed"); return [result.ok ? { ok: false, error: result.value } : result, raw]; } else { return [ - (0, schemas_js_1.safeParse)(data, (v2) => matcher.schema.parse(v2), "Response validation failed"), + (0, schemas_js_1.safeParse)(data, (v7) => matcher.schema.parse(v7), "Response validation failed"), raw ]; } @@ -56943,14 +57426,14 @@ var require_matchers = __commonJS({ var headerValRE = /, */; function unpackHeaders(headers) { const out = {}; - for (const [k4, v2] of headers.entries()) { - out[k4] = v2.split(headerValRE); + for (const [k6, v7] of headers.entries()) { + out[k6] = v7.split(headerValRE); } return out; } async function discardResponseBody(res) { - var _a5; - const reader = (_a5 = res.body) === null || _a5 === void 0 ? void 0 : _a5.getReader(); + var _a6; + const reader = (_a6 = res.body) === null || _a6 === void 0 ? void 0 : _a6.getReader(); if (reader == null) { return; } @@ -56997,7 +57480,7 @@ var require_security = __commonJS({ }; exports2.SecurityError = SecurityError; function resolveSecurity(...options) { - const state2 = { + const state3 = { basic: { username: "", password: "" }, headers: {}, queryParams: {}, @@ -57005,21 +57488,21 @@ var require_security = __commonJS({ oauth2: { type: "none" } }; const option = options.find((opts) => { - return opts.every((o3) => { - if (o3.value == null) { + return opts.every((o5) => { + if (o5.value == null) { return false; - } else if (o3.type === "http:basic") { - return o3.value.username != null || o3.value.password != null; - } else if (o3.type === "http:custom") { + } else if (o5.type === "http:basic") { + return o5.value.username != null || o5.value.password != null; + } else if (o5.type === "http:custom") { return null; - } else if (o3.type === "oauth2:password") { - return typeof o3.value === "string" && !!o3.value; - } else if (o3.type === "oauth2:client_credentials") { - return o3.value.clientID != null || o3.value.clientSecret != null; - } else if (typeof o3.value === "string") { - return !!o3.value; + } else if (o5.type === "oauth2:password") { + return typeof o5.value === "string" && !!o5.value; + } else if (o5.type === "oauth2:client_credentials") { + return o5.value.clientID != null || o5.value.clientSecret != null; + } else if (typeof o5.value === "string") { + return !!o5.value; } else { - throw new Error(`Unrecognized security type: ${o3.type} (value type: ${typeof o3.value})`); + throw new Error(`Unrecognized security type: ${o5.type} (value type: ${typeof o5.value})`); } }); }); @@ -57033,47 +57516,47 @@ var require_security = __commonJS({ const { type: type2 } = spec; switch (type2) { case "apiKey:header": - state2.headers[spec.fieldName] = spec.value; + state3.headers[spec.fieldName] = spec.value; break; case "apiKey:query": - state2.queryParams[spec.fieldName] = spec.value; + state3.queryParams[spec.fieldName] = spec.value; break; case "apiKey:cookie": - state2.cookies[spec.fieldName] = spec.value; + state3.cookies[spec.fieldName] = spec.value; break; case "http:basic": - applyBasic(state2, spec); + applyBasic(state3, spec); break; case "http:custom": break; case "http:bearer": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2:password": - applyBearer(state2, spec); + applyBearer(state3, spec); break; case "oauth2:client_credentials": break; case "openIdConnect": - applyBearer(state2, spec); + applyBearer(state3, spec); break; default: spec; throw SecurityError.unrecognizedType(type2); } }); - return state2; + return state3; } - function applyBasic(state2, spec) { + function applyBasic(state3, spec) { if (spec.value == null) { return; } - state2.basic = spec.value; + state3.basic = spec.value; } - function applyBearer(state2, spec) { + function applyBearer(state3, spec) { if (typeof spec.value !== "string" || !spec.value) { return; } @@ -57081,15 +57564,15 @@ var require_security = __commonJS({ if (value.slice(0, 7).toLowerCase() !== "bearer ") { value = `Bearer ${value}`; } - state2.headers[spec.fieldName] = value; + state3.headers[spec.fieldName] = value; } function resolveGlobalSecurity(security) { - var _a5; + var _a6; return resolveSecurity([ { fieldName: "Authorization", type: "http:bearer", - value: (_a5 = security === null || security === void 0 ? void 0 : security.apiKey) !== null && _a5 !== void 0 ? _a5 : (0, env_js_1.env)().MISTRAL_API_KEY + value: (_a6 = security === null || security === void 0 ? void 0 : security.apiKey) !== null && _a6 !== void 0 ? _a6 : (0, env_js_1.env)().MISTRAL_API_KEY } ]); } @@ -57128,12 +57611,12 @@ var require_primitives = __commonJS({ out = inp; return out; } - for (const [k4, v2] of Object.entries(inp)) { - const j4 = mappings[k4]; - if (j4 === null) { + for (const [k6, v7] of Object.entries(inp)) { + const j6 = mappings[k6]; + if (j6 === null) { continue; } - out[j4 !== null && j4 !== void 0 ? j4 : k4] = v2; + out[j6 !== null && j6 !== void 0 ? j6 : k6] = v7; } return out; } @@ -57195,46 +57678,46 @@ var require_primitives = __commonJS({ var require_imageurl = __commonJS({ "node_modules/@mistralai/mistralai/models/components/imageurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ImageURL$ = exports2.ImageURL$outboundSchema = exports2.ImageURL$inboundSchema = void 0; exports2.imageURLToJSON = imageURLToJSON; exports2.imageURLFromJSON = imageURLFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.ImageURL$inboundSchema = z3.object({ - url: z3.string(), - detail: z3.nullable(z3.string()).optional() + exports2.ImageURL$inboundSchema = z4.object({ + url: z4.string(), + detail: z4.nullable(z4.string()).optional() }); - exports2.ImageURL$outboundSchema = z3.object({ - url: z3.string(), - detail: z3.nullable(z3.string()).optional() + exports2.ImageURL$outboundSchema = z4.object({ + url: z4.string(), + detail: z4.nullable(z4.string()).optional() }); var ImageURL$; (function(ImageURL$2) { @@ -57245,7 +57728,7 @@ var require_imageurl = __commonJS({ return JSON.stringify(exports2.ImageURL$outboundSchema.parse(imageURL)); } function imageURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ImageURL$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ImageURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ImageURL$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ImageURL' from JSON`); } } }); @@ -57254,31 +57737,31 @@ var require_imageurl = __commonJS({ var require_imageurlchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/imageurlchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -57287,15 +57770,15 @@ var require_imageurlchunk = __commonJS({ exports2.imageURLChunkImageURLFromJSON = imageURLChunkImageURLFromJSON; exports2.imageURLChunkToJSON = imageURLChunkToJSON; exports2.imageURLChunkFromJSON = imageURLChunkFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var imageurl_js_1 = require_imageurl(); exports2.ImageURLChunkType = { ImageUrl: "image_url" }; - exports2.ImageURLChunkImageURL$inboundSchema = z3.union([imageurl_js_1.ImageURL$inboundSchema, z3.string()]); - exports2.ImageURLChunkImageURL$outboundSchema = z3.union([imageurl_js_1.ImageURL$outboundSchema, z3.string()]); + exports2.ImageURLChunkImageURL$inboundSchema = z4.union([imageurl_js_1.ImageURL$inboundSchema, z4.string()]); + exports2.ImageURLChunkImageURL$outboundSchema = z4.union([imageurl_js_1.ImageURL$outboundSchema, z4.string()]); var ImageURLChunkImageURL$; (function(ImageURLChunkImageURL$2) { ImageURLChunkImageURL$2.inboundSchema = exports2.ImageURLChunkImageURL$inboundSchema; @@ -57305,28 +57788,28 @@ var require_imageurlchunk = __commonJS({ return JSON.stringify(exports2.ImageURLChunkImageURL$outboundSchema.parse(imageURLChunkImageURL)); } function imageURLChunkImageURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ImageURLChunkImageURL$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ImageURLChunkImageURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ImageURLChunkImageURL$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ImageURLChunkImageURL' from JSON`); } - exports2.ImageURLChunkType$inboundSchema = z3.nativeEnum(exports2.ImageURLChunkType); + exports2.ImageURLChunkType$inboundSchema = z4.nativeEnum(exports2.ImageURLChunkType); exports2.ImageURLChunkType$outboundSchema = exports2.ImageURLChunkType$inboundSchema; var ImageURLChunkType$; (function(ImageURLChunkType$2) { ImageURLChunkType$2.inboundSchema = exports2.ImageURLChunkType$inboundSchema; ImageURLChunkType$2.outboundSchema = exports2.ImageURLChunkType$outboundSchema; })(ImageURLChunkType$ || (exports2.ImageURLChunkType$ = ImageURLChunkType$ = {})); - exports2.ImageURLChunk$inboundSchema = z3.object({ - image_url: z3.union([imageurl_js_1.ImageURL$inboundSchema, z3.string()]), + exports2.ImageURLChunk$inboundSchema = z4.object({ + image_url: z4.union([imageurl_js_1.ImageURL$inboundSchema, z4.string()]), type: exports2.ImageURLChunkType$inboundSchema.default("image_url") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "image_url": "imageUrl" }); }); - exports2.ImageURLChunk$outboundSchema = z3.object({ - imageUrl: z3.union([imageurl_js_1.ImageURL$outboundSchema, z3.string()]), + exports2.ImageURLChunk$outboundSchema = z4.object({ + imageUrl: z4.union([imageurl_js_1.ImageURL$outboundSchema, z4.string()]), type: exports2.ImageURLChunkType$outboundSchema.default("image_url") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { imageUrl: "image_url" }); }); @@ -57339,7 +57822,7 @@ var require_imageurlchunk = __commonJS({ return JSON.stringify(exports2.ImageURLChunk$outboundSchema.parse(imageURLChunk)); } function imageURLChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ImageURLChunk$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ImageURLChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ImageURLChunk$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ImageURLChunk' from JSON`); } } }); @@ -57348,63 +57831,63 @@ var require_imageurlchunk = __commonJS({ var require_referencechunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/referencechunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ReferenceChunk$ = exports2.ReferenceChunk$outboundSchema = exports2.ReferenceChunk$inboundSchema = exports2.ReferenceChunkType$ = exports2.ReferenceChunkType$outboundSchema = exports2.ReferenceChunkType$inboundSchema = exports2.ReferenceChunkType = void 0; exports2.referenceChunkToJSON = referenceChunkToJSON; exports2.referenceChunkFromJSON = referenceChunkFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.ReferenceChunkType = { Reference: "reference" }; - exports2.ReferenceChunkType$inboundSchema = z3.nativeEnum(exports2.ReferenceChunkType); + exports2.ReferenceChunkType$inboundSchema = z4.nativeEnum(exports2.ReferenceChunkType); exports2.ReferenceChunkType$outboundSchema = exports2.ReferenceChunkType$inboundSchema; var ReferenceChunkType$; (function(ReferenceChunkType$2) { ReferenceChunkType$2.inboundSchema = exports2.ReferenceChunkType$inboundSchema; ReferenceChunkType$2.outboundSchema = exports2.ReferenceChunkType$outboundSchema; })(ReferenceChunkType$ || (exports2.ReferenceChunkType$ = ReferenceChunkType$ = {})); - exports2.ReferenceChunk$inboundSchema = z3.object({ - reference_ids: z3.array(z3.number().int()), + exports2.ReferenceChunk$inboundSchema = z4.object({ + reference_ids: z4.array(z4.number().int()), type: exports2.ReferenceChunkType$inboundSchema.default("reference") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "reference_ids": "referenceIds" }); }); - exports2.ReferenceChunk$outboundSchema = z3.object({ - referenceIds: z3.array(z3.number().int()), + exports2.ReferenceChunk$outboundSchema = z4.object({ + referenceIds: z4.array(z4.number().int()), type: exports2.ReferenceChunkType$outboundSchema.default("reference") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { referenceIds: "reference_ids" }); }); @@ -57417,7 +57900,7 @@ var require_referencechunk = __commonJS({ return JSON.stringify(exports2.ReferenceChunk$outboundSchema.parse(referenceChunk)); } function referenceChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ReferenceChunk$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ReferenceChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ReferenceChunk$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ReferenceChunk' from JSON`); } } }); @@ -57426,55 +57909,55 @@ var require_referencechunk = __commonJS({ var require_textchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/textchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TextChunk$ = exports2.TextChunk$outboundSchema = exports2.TextChunk$inboundSchema = exports2.TextChunkType$ = exports2.TextChunkType$outboundSchema = exports2.TextChunkType$inboundSchema = exports2.TextChunkType = void 0; exports2.textChunkToJSON = textChunkToJSON; exports2.textChunkFromJSON = textChunkFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); exports2.TextChunkType = { Text: "text" }; - exports2.TextChunkType$inboundSchema = z3.nativeEnum(exports2.TextChunkType); + exports2.TextChunkType$inboundSchema = z4.nativeEnum(exports2.TextChunkType); exports2.TextChunkType$outboundSchema = exports2.TextChunkType$inboundSchema; var TextChunkType$; (function(TextChunkType$2) { TextChunkType$2.inboundSchema = exports2.TextChunkType$inboundSchema; TextChunkType$2.outboundSchema = exports2.TextChunkType$outboundSchema; })(TextChunkType$ || (exports2.TextChunkType$ = TextChunkType$ = {})); - exports2.TextChunk$inboundSchema = z3.object({ - text: z3.string(), + exports2.TextChunk$inboundSchema = z4.object({ + text: z4.string(), type: exports2.TextChunkType$inboundSchema.default("text") }); - exports2.TextChunk$outboundSchema = z3.object({ - text: z3.string(), + exports2.TextChunk$outboundSchema = z4.object({ + text: z4.string(), type: exports2.TextChunkType$outboundSchema.default("text") }); var TextChunk$; @@ -57486,7 +57969,7 @@ var require_textchunk = __commonJS({ return JSON.stringify(exports2.TextChunk$outboundSchema.parse(textChunk)); } function textChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.TextChunk$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'TextChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.TextChunk$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'TextChunk' from JSON`); } } }); @@ -57495,58 +57978,58 @@ var require_textchunk = __commonJS({ var require_contentchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/contentchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ContentChunk$ = exports2.ContentChunk$outboundSchema = exports2.ContentChunk$inboundSchema = void 0; exports2.contentChunkToJSON = contentChunkToJSON; exports2.contentChunkFromJSON = contentChunkFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var imageurlchunk_js_1 = require_imageurlchunk(); var referencechunk_js_1 = require_referencechunk(); var textchunk_js_1 = require_textchunk(); - exports2.ContentChunk$inboundSchema = z3.union([ - imageurlchunk_js_1.ImageURLChunk$inboundSchema.and(z3.object({ type: z3.literal("image_url") }).transform((v2) => ({ - type: v2.type + exports2.ContentChunk$inboundSchema = z4.union([ + imageurlchunk_js_1.ImageURLChunk$inboundSchema.and(z4.object({ type: z4.literal("image_url") }).transform((v7) => ({ + type: v7.type }))), - textchunk_js_1.TextChunk$inboundSchema.and(z3.object({ type: z3.literal("text") }).transform((v2) => ({ type: v2.type }))), - referencechunk_js_1.ReferenceChunk$inboundSchema.and(z3.object({ type: z3.literal("reference") }).transform((v2) => ({ - type: v2.type + textchunk_js_1.TextChunk$inboundSchema.and(z4.object({ type: z4.literal("text") }).transform((v7) => ({ type: v7.type }))), + referencechunk_js_1.ReferenceChunk$inboundSchema.and(z4.object({ type: z4.literal("reference") }).transform((v7) => ({ + type: v7.type }))) ]); - exports2.ContentChunk$outboundSchema = z3.union([ - imageurlchunk_js_1.ImageURLChunk$outboundSchema.and(z3.object({ type: z3.literal("image_url") }).transform((v2) => ({ - type: v2.type + exports2.ContentChunk$outboundSchema = z4.union([ + imageurlchunk_js_1.ImageURLChunk$outboundSchema.and(z4.object({ type: z4.literal("image_url") }).transform((v7) => ({ + type: v7.type }))), - textchunk_js_1.TextChunk$outboundSchema.and(z3.object({ type: z3.literal("text") }).transform((v2) => ({ type: v2.type }))), - referencechunk_js_1.ReferenceChunk$outboundSchema.and(z3.object({ type: z3.literal("reference") }).transform((v2) => ({ - type: v2.type + textchunk_js_1.TextChunk$outboundSchema.and(z4.object({ type: z4.literal("text") }).transform((v7) => ({ type: v7.type }))), + referencechunk_js_1.ReferenceChunk$outboundSchema.and(z4.object({ type: z4.literal("reference") }).transform((v7) => ({ + type: v7.type }))) ]); var ContentChunk$; @@ -57558,7 +58041,7 @@ var require_contentchunk = __commonJS({ return JSON.stringify(exports2.ContentChunk$outboundSchema.parse(contentChunk)); } function contentChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ContentChunk$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ContentChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ContentChunk$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ContentChunk' from JSON`); } } }); @@ -57567,31 +58050,31 @@ var require_contentchunk = __commonJS({ var require_functioncall = __commonJS({ "node_modules/@mistralai/mistralai/models/components/functioncall.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -57600,10 +58083,10 @@ var require_functioncall = __commonJS({ exports2.argumentsFromJSON = argumentsFromJSON; exports2.functionCallToJSON = functionCallToJSON; exports2.functionCallFromJSON = functionCallFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.Arguments$inboundSchema = z3.union([z3.record(z3.any()), z3.string()]); - exports2.Arguments$outboundSchema = z3.union([z3.record(z3.any()), z3.string()]); + exports2.Arguments$inboundSchema = z4.union([z4.record(z4.any()), z4.string()]); + exports2.Arguments$outboundSchema = z4.union([z4.record(z4.any()), z4.string()]); var Arguments$; (function(Arguments$2) { Arguments$2.inboundSchema = exports2.Arguments$inboundSchema; @@ -57613,15 +58096,15 @@ var require_functioncall = __commonJS({ return JSON.stringify(exports2.Arguments$outboundSchema.parse(value)); } function argumentsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Arguments$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Arguments' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Arguments$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Arguments' from JSON`); } - exports2.FunctionCall$inboundSchema = z3.object({ - name: z3.string(), - arguments: z3.union([z3.record(z3.any()), z3.string()]) + exports2.FunctionCall$inboundSchema = z4.object({ + name: z4.string(), + arguments: z4.union([z4.record(z4.any()), z4.string()]) }); - exports2.FunctionCall$outboundSchema = z3.object({ - name: z3.string(), - arguments: z3.union([z3.record(z3.any()), z3.string()]) + exports2.FunctionCall$outboundSchema = z4.object({ + name: z4.string(), + arguments: z4.union([z4.record(z4.any()), z4.string()]) }); var FunctionCall$; (function(FunctionCall$2) { @@ -57632,7 +58115,7 @@ var require_functioncall = __commonJS({ return JSON.stringify(exports2.FunctionCall$outboundSchema.parse(functionCall)); } function functionCallFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FunctionCall$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FunctionCall' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FunctionCall$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FunctionCall' from JSON`); } } }); @@ -57653,47 +58136,47 @@ var require_enums = __commonJS({ var require_tooltypes = __commonJS({ "node_modules/@mistralai/mistralai/models/components/tooltypes.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolTypes$ = exports2.ToolTypes$outboundSchema = exports2.ToolTypes$inboundSchema = exports2.ToolTypes = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var enums_js_1 = require_enums(); exports2.ToolTypes = { Function: "function" }; - exports2.ToolTypes$inboundSchema = z3.union([ - z3.nativeEnum(exports2.ToolTypes), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.ToolTypes$inboundSchema = z4.union([ + z4.nativeEnum(exports2.ToolTypes), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.ToolTypes$outboundSchema = z3.union([ - z3.nativeEnum(exports2.ToolTypes), - z3.string().and(z3.custom()) + exports2.ToolTypes$outboundSchema = z4.union([ + z4.nativeEnum(exports2.ToolTypes), + z4.string().and(z4.custom()) ]); var ToolTypes$; (function(ToolTypes$2) { @@ -57707,48 +58190,48 @@ var require_tooltypes = __commonJS({ var require_toolcall = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolcall.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolCall$ = exports2.ToolCall$outboundSchema = exports2.ToolCall$inboundSchema = void 0; exports2.toolCallToJSON = toolCallToJSON; exports2.toolCallFromJSON = toolCallFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var functioncall_js_1 = require_functioncall(); var tooltypes_js_1 = require_tooltypes(); - exports2.ToolCall$inboundSchema = z3.object({ - id: z3.string().default("null"), + exports2.ToolCall$inboundSchema = z4.object({ + id: z4.string().default("null"), type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: functioncall_js_1.FunctionCall$inboundSchema }); - exports2.ToolCall$outboundSchema = z3.object({ - id: z3.string().default("null"), + exports2.ToolCall$outboundSchema = z4.object({ + id: z4.string().default("null"), type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: functioncall_js_1.FunctionCall$outboundSchema }); @@ -57761,7 +58244,7 @@ var require_toolcall = __commonJS({ return JSON.stringify(exports2.ToolCall$outboundSchema.parse(toolCall)); } function toolCallFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ToolCall$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ToolCall' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ToolCall$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ToolCall' from JSON`); } } }); @@ -57770,31 +58253,31 @@ var require_toolcall = __commonJS({ var require_assistantmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/assistantmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -57803,7 +58286,7 @@ var require_assistantmessage = __commonJS({ exports2.assistantMessageContentFromJSON = assistantMessageContentFromJSON; exports2.assistantMessageToJSON = assistantMessageToJSON; exports2.assistantMessageFromJSON = assistantMessageFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); @@ -57811,8 +58294,8 @@ var require_assistantmessage = __commonJS({ exports2.AssistantMessageRole = { Assistant: "assistant" }; - exports2.AssistantMessageContent$inboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.AssistantMessageContent$outboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.AssistantMessageContent$inboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.AssistantMessageContent$outboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var AssistantMessageContent$; (function(AssistantMessageContent$2) { AssistantMessageContent$2.inboundSchema = exports2.AssistantMessageContent$inboundSchema; @@ -57822,32 +58305,32 @@ var require_assistantmessage = __commonJS({ return JSON.stringify(exports2.AssistantMessageContent$outboundSchema.parse(assistantMessageContent)); } function assistantMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AssistantMessageContent$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AssistantMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AssistantMessageContent$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AssistantMessageContent' from JSON`); } - exports2.AssistantMessageRole$inboundSchema = z3.nativeEnum(exports2.AssistantMessageRole); + exports2.AssistantMessageRole$inboundSchema = z4.nativeEnum(exports2.AssistantMessageRole); exports2.AssistantMessageRole$outboundSchema = exports2.AssistantMessageRole$inboundSchema; var AssistantMessageRole$; (function(AssistantMessageRole$2) { AssistantMessageRole$2.inboundSchema = exports2.AssistantMessageRole$inboundSchema; AssistantMessageRole$2.outboundSchema = exports2.AssistantMessageRole$outboundSchema; })(AssistantMessageRole$ || (exports2.AssistantMessageRole$ = AssistantMessageRole$ = {})); - exports2.AssistantMessage$inboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), - tool_calls: z3.nullable(z3.array(toolcall_js_1.ToolCall$inboundSchema)).optional(), - prefix: z3.boolean().default(false), + exports2.AssistantMessage$inboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), + tool_calls: z4.nullable(z4.array(toolcall_js_1.ToolCall$inboundSchema)).optional(), + prefix: z4.boolean().default(false), role: exports2.AssistantMessageRole$inboundSchema.default("assistant") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "tool_calls": "toolCalls" }); }); - exports2.AssistantMessage$outboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), - toolCalls: z3.nullable(z3.array(toolcall_js_1.ToolCall$outboundSchema)).optional(), - prefix: z3.boolean().default(false), + exports2.AssistantMessage$outboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), + toolCalls: z4.nullable(z4.array(toolcall_js_1.ToolCall$outboundSchema)).optional(), + prefix: z4.boolean().default(false), role: exports2.AssistantMessageRole$outboundSchema.default("assistant") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { toolCalls: "tool_calls" }); }); @@ -57860,7 +58343,7 @@ var require_assistantmessage = __commonJS({ return JSON.stringify(exports2.AssistantMessage$outboundSchema.parse(assistantMessage)); } function assistantMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AssistantMessage$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AssistantMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AssistantMessage$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AssistantMessage' from JSON`); } } }); @@ -57869,41 +58352,41 @@ var require_assistantmessage = __commonJS({ var require_responseformats = __commonJS({ "node_modules/@mistralai/mistralai/models/components/responseformats.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ResponseFormats$ = exports2.ResponseFormats$outboundSchema = exports2.ResponseFormats$inboundSchema = exports2.ResponseFormats = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); exports2.ResponseFormats = { Text: "text", JsonObject: "json_object" }; - exports2.ResponseFormats$inboundSchema = z3.nativeEnum(exports2.ResponseFormats); + exports2.ResponseFormats$inboundSchema = z4.nativeEnum(exports2.ResponseFormats); exports2.ResponseFormats$outboundSchema = exports2.ResponseFormats$inboundSchema; var ResponseFormats$; (function(ResponseFormats$2) { @@ -57917,44 +58400,44 @@ var require_responseformats = __commonJS({ var require_responseformat = __commonJS({ "node_modules/@mistralai/mistralai/models/components/responseformat.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ResponseFormat$ = exports2.ResponseFormat$outboundSchema = exports2.ResponseFormat$inboundSchema = void 0; exports2.responseFormatToJSON = responseFormatToJSON; exports2.responseFormatFromJSON = responseFormatFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var responseformats_js_1 = require_responseformats(); - exports2.ResponseFormat$inboundSchema = z3.object({ + exports2.ResponseFormat$inboundSchema = z4.object({ type: responseformats_js_1.ResponseFormats$inboundSchema.optional() }); - exports2.ResponseFormat$outboundSchema = z3.object({ + exports2.ResponseFormat$outboundSchema = z4.object({ type: responseformats_js_1.ResponseFormats$outboundSchema.optional() }); var ResponseFormat$; @@ -57966,7 +58449,7 @@ var require_responseformat = __commonJS({ return JSON.stringify(exports2.ResponseFormat$outboundSchema.parse(responseFormat)); } function responseFormatFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ResponseFormat$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ResponseFormat' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ResponseFormat$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ResponseFormat' from JSON`); } } }); @@ -57975,31 +58458,31 @@ var require_responseformat = __commonJS({ var require_systemmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/systemmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58008,14 +58491,14 @@ var require_systemmessage = __commonJS({ exports2.systemMessageContentFromJSON = systemMessageContentFromJSON; exports2.systemMessageToJSON = systemMessageToJSON; exports2.systemMessageFromJSON = systemMessageFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var textchunk_js_1 = require_textchunk(); exports2.Role = { System: "system" }; - exports2.SystemMessageContent$inboundSchema = z3.union([z3.string(), z3.array(textchunk_js_1.TextChunk$inboundSchema)]); - exports2.SystemMessageContent$outboundSchema = z3.union([z3.string(), z3.array(textchunk_js_1.TextChunk$outboundSchema)]); + exports2.SystemMessageContent$inboundSchema = z4.union([z4.string(), z4.array(textchunk_js_1.TextChunk$inboundSchema)]); + exports2.SystemMessageContent$outboundSchema = z4.union([z4.string(), z4.array(textchunk_js_1.TextChunk$outboundSchema)]); var SystemMessageContent$; (function(SystemMessageContent$2) { SystemMessageContent$2.inboundSchema = exports2.SystemMessageContent$inboundSchema; @@ -58025,21 +58508,21 @@ var require_systemmessage = __commonJS({ return JSON.stringify(exports2.SystemMessageContent$outboundSchema.parse(systemMessageContent)); } function systemMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.SystemMessageContent$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'SystemMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.SystemMessageContent$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'SystemMessageContent' from JSON`); } - exports2.Role$inboundSchema = z3.nativeEnum(exports2.Role); + exports2.Role$inboundSchema = z4.nativeEnum(exports2.Role); exports2.Role$outboundSchema = exports2.Role$inboundSchema; var Role$; (function(Role$2) { Role$2.inboundSchema = exports2.Role$inboundSchema; Role$2.outboundSchema = exports2.Role$outboundSchema; })(Role$ || (exports2.Role$ = Role$ = {})); - exports2.SystemMessage$inboundSchema = z3.object({ - content: z3.union([z3.string(), z3.array(textchunk_js_1.TextChunk$inboundSchema)]), + exports2.SystemMessage$inboundSchema = z4.object({ + content: z4.union([z4.string(), z4.array(textchunk_js_1.TextChunk$inboundSchema)]), role: exports2.Role$inboundSchema.default("system") }); - exports2.SystemMessage$outboundSchema = z3.object({ - content: z3.union([z3.string(), z3.array(textchunk_js_1.TextChunk$outboundSchema)]), + exports2.SystemMessage$outboundSchema = z4.object({ + content: z4.union([z4.string(), z4.array(textchunk_js_1.TextChunk$outboundSchema)]), role: exports2.Role$outboundSchema.default("system") }); var SystemMessage$; @@ -58051,7 +58534,7 @@ var require_systemmessage = __commonJS({ return JSON.stringify(exports2.SystemMessage$outboundSchema.parse(systemMessage)); } function systemMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.SystemMessage$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'SystemMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.SystemMessage$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'SystemMessage' from JSON`); } } }); @@ -58060,48 +58543,48 @@ var require_systemmessage = __commonJS({ var require_function = __commonJS({ "node_modules/@mistralai/mistralai/models/components/function.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FunctionT$ = exports2.FunctionT$outboundSchema = exports2.FunctionT$inboundSchema = void 0; exports2.functionToJSON = functionToJSON; exports2.functionFromJSON = functionFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.FunctionT$inboundSchema = z3.object({ - name: z3.string(), - description: z3.string().default(""), - parameters: z3.record(z3.any()) + exports2.FunctionT$inboundSchema = z4.object({ + name: z4.string(), + description: z4.string().default(""), + parameters: z4.record(z4.any()) }); - exports2.FunctionT$outboundSchema = z3.object({ - name: z3.string(), - description: z3.string().default(""), - parameters: z3.record(z3.any()) + exports2.FunctionT$outboundSchema = z4.object({ + name: z4.string(), + description: z4.string().default(""), + parameters: z4.record(z4.any()) }); var FunctionT$; (function(FunctionT$2) { @@ -58112,7 +58595,7 @@ var require_function = __commonJS({ return JSON.stringify(exports2.FunctionT$outboundSchema.parse(functionT)); } function functionFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FunctionT$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FunctionT' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FunctionT$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FunctionT' from JSON`); } } }); @@ -58121,46 +58604,46 @@ var require_function = __commonJS({ var require_tool = __commonJS({ "node_modules/@mistralai/mistralai/models/components/tool.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Tool$ = exports2.Tool$outboundSchema = exports2.Tool$inboundSchema = void 0; exports2.toolToJSON = toolToJSON; exports2.toolFromJSON = toolFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var function_js_1 = require_function(); var tooltypes_js_1 = require_tooltypes(); - exports2.Tool$inboundSchema = z3.object({ + exports2.Tool$inboundSchema = z4.object({ type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: function_js_1.FunctionT$inboundSchema }); - exports2.Tool$outboundSchema = z3.object({ + exports2.Tool$outboundSchema = z4.object({ type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: function_js_1.FunctionT$outboundSchema }); @@ -58173,7 +58656,7 @@ var require_tool = __commonJS({ return JSON.stringify(exports2.Tool$outboundSchema.parse(tool)); } function toolFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Tool$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Tool' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Tool$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Tool' from JSON`); } } }); @@ -58182,44 +58665,44 @@ var require_tool = __commonJS({ var require_functionname = __commonJS({ "node_modules/@mistralai/mistralai/models/components/functionname.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FunctionName$ = exports2.FunctionName$outboundSchema = exports2.FunctionName$inboundSchema = void 0; exports2.functionNameToJSON = functionNameToJSON; exports2.functionNameFromJSON = functionNameFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.FunctionName$inboundSchema = z3.object({ - name: z3.string() + exports2.FunctionName$inboundSchema = z4.object({ + name: z4.string() }); - exports2.FunctionName$outboundSchema = z3.object({ - name: z3.string() + exports2.FunctionName$outboundSchema = z4.object({ + name: z4.string() }); var FunctionName$; (function(FunctionName$2) { @@ -58230,7 +58713,7 @@ var require_functionname = __commonJS({ return JSON.stringify(exports2.FunctionName$outboundSchema.parse(functionName)); } function functionNameFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FunctionName$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FunctionName' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FunctionName$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FunctionName' from JSON`); } } }); @@ -58239,46 +58722,46 @@ var require_functionname = __commonJS({ var require_toolchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolChoice$ = exports2.ToolChoice$outboundSchema = exports2.ToolChoice$inboundSchema = void 0; exports2.toolChoiceToJSON = toolChoiceToJSON; exports2.toolChoiceFromJSON = toolChoiceFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var functionname_js_1 = require_functionname(); var tooltypes_js_1 = require_tooltypes(); - exports2.ToolChoice$inboundSchema = z3.object({ + exports2.ToolChoice$inboundSchema = z4.object({ type: tooltypes_js_1.ToolTypes$inboundSchema.optional(), function: functionname_js_1.FunctionName$inboundSchema }); - exports2.ToolChoice$outboundSchema = z3.object({ + exports2.ToolChoice$outboundSchema = z4.object({ type: tooltypes_js_1.ToolTypes$outboundSchema.optional(), function: functionname_js_1.FunctionName$outboundSchema }); @@ -58291,7 +58774,7 @@ var require_toolchoice = __commonJS({ return JSON.stringify(exports2.ToolChoice$outboundSchema.parse(toolChoice)); } function toolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ToolChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ToolChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ToolChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ToolChoice' from JSON`); } } }); @@ -58300,43 +58783,43 @@ var require_toolchoice = __commonJS({ var require_toolchoiceenum = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolchoiceenum.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolChoiceEnum$ = exports2.ToolChoiceEnum$outboundSchema = exports2.ToolChoiceEnum$inboundSchema = exports2.ToolChoiceEnum = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); exports2.ToolChoiceEnum = { Auto: "auto", None: "none", Any: "any", Required: "required" }; - exports2.ToolChoiceEnum$inboundSchema = z3.nativeEnum(exports2.ToolChoiceEnum); + exports2.ToolChoiceEnum$inboundSchema = z4.nativeEnum(exports2.ToolChoiceEnum); exports2.ToolChoiceEnum$outboundSchema = exports2.ToolChoiceEnum$inboundSchema; var ToolChoiceEnum$; (function(ToolChoiceEnum$2) { @@ -58350,31 +58833,31 @@ var require_toolchoiceenum = __commonJS({ var require_toolmessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/toolmessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58383,15 +58866,15 @@ var require_toolmessage = __commonJS({ exports2.toolMessageContentFromJSON = toolMessageContentFromJSON; exports2.toolMessageToJSON = toolMessageToJSON; exports2.toolMessageFromJSON = toolMessageFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); exports2.ToolMessageRole = { Tool: "tool" }; - exports2.ToolMessageContent$inboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.ToolMessageContent$outboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.ToolMessageContent$inboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.ToolMessageContent$outboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var ToolMessageContent$; (function(ToolMessageContent$2) { ToolMessageContent$2.inboundSchema = exports2.ToolMessageContent$inboundSchema; @@ -58401,32 +58884,32 @@ var require_toolmessage = __commonJS({ return JSON.stringify(exports2.ToolMessageContent$outboundSchema.parse(toolMessageContent)); } function toolMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ToolMessageContent$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ToolMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ToolMessageContent$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ToolMessageContent' from JSON`); } - exports2.ToolMessageRole$inboundSchema = z3.nativeEnum(exports2.ToolMessageRole); + exports2.ToolMessageRole$inboundSchema = z4.nativeEnum(exports2.ToolMessageRole); exports2.ToolMessageRole$outboundSchema = exports2.ToolMessageRole$inboundSchema; var ToolMessageRole$; (function(ToolMessageRole$2) { ToolMessageRole$2.inboundSchema = exports2.ToolMessageRole$inboundSchema; ToolMessageRole$2.outboundSchema = exports2.ToolMessageRole$outboundSchema; })(ToolMessageRole$ || (exports2.ToolMessageRole$ = ToolMessageRole$ = {})); - exports2.ToolMessage$inboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)])), - tool_call_id: z3.nullable(z3.string()).optional(), - name: z3.nullable(z3.string()).optional(), + exports2.ToolMessage$inboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)])), + tool_call_id: z4.nullable(z4.string()).optional(), + name: z4.nullable(z4.string()).optional(), role: exports2.ToolMessageRole$inboundSchema.default("tool") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "tool_call_id": "toolCallId" }); }); - exports2.ToolMessage$outboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)])), - toolCallId: z3.nullable(z3.string()).optional(), - name: z3.nullable(z3.string()).optional(), + exports2.ToolMessage$outboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)])), + toolCallId: z4.nullable(z4.string()).optional(), + name: z4.nullable(z4.string()).optional(), role: exports2.ToolMessageRole$outboundSchema.default("tool") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { toolCallId: "tool_call_id" }); }); @@ -58439,7 +58922,7 @@ var require_toolmessage = __commonJS({ return JSON.stringify(exports2.ToolMessage$outboundSchema.parse(toolMessage)); } function toolMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ToolMessage$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ToolMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ToolMessage$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ToolMessage' from JSON`); } } }); @@ -58448,31 +58931,31 @@ var require_toolmessage = __commonJS({ var require_usermessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/usermessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58481,14 +58964,14 @@ var require_usermessage = __commonJS({ exports2.userMessageContentFromJSON = userMessageContentFromJSON; exports2.userMessageToJSON = userMessageToJSON; exports2.userMessageFromJSON = userMessageFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); exports2.UserMessageRole = { User: "user" }; - exports2.UserMessageContent$inboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.UserMessageContent$outboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.UserMessageContent$inboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.UserMessageContent$outboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var UserMessageContent$; (function(UserMessageContent$2) { UserMessageContent$2.inboundSchema = exports2.UserMessageContent$inboundSchema; @@ -58498,21 +58981,21 @@ var require_usermessage = __commonJS({ return JSON.stringify(exports2.UserMessageContent$outboundSchema.parse(userMessageContent)); } function userMessageContentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UserMessageContent$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UserMessageContent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UserMessageContent$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UserMessageContent' from JSON`); } - exports2.UserMessageRole$inboundSchema = z3.nativeEnum(exports2.UserMessageRole); + exports2.UserMessageRole$inboundSchema = z4.nativeEnum(exports2.UserMessageRole); exports2.UserMessageRole$outboundSchema = exports2.UserMessageRole$inboundSchema; var UserMessageRole$; (function(UserMessageRole$2) { UserMessageRole$2.inboundSchema = exports2.UserMessageRole$inboundSchema; UserMessageRole$2.outboundSchema = exports2.UserMessageRole$outboundSchema; })(UserMessageRole$ || (exports2.UserMessageRole$ = UserMessageRole$ = {})); - exports2.UserMessage$inboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)])), + exports2.UserMessage$inboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)])), role: exports2.UserMessageRole$inboundSchema.default("user") }); - exports2.UserMessage$outboundSchema = z3.object({ - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)])), + exports2.UserMessage$outboundSchema = z4.object({ + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)])), role: exports2.UserMessageRole$outboundSchema.default("user") }); var UserMessage$; @@ -58524,7 +59007,7 @@ var require_usermessage = __commonJS({ return JSON.stringify(exports2.UserMessage$outboundSchema.parse(userMessage)); } function userMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UserMessage$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UserMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UserMessage$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UserMessage' from JSON`); } } }); @@ -58533,31 +59016,31 @@ var require_usermessage = __commonJS({ var require_agentscompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/agentscompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58570,7 +59053,7 @@ var require_agentscompletionrequest = __commonJS({ exports2.agentsCompletionRequestToolChoiceFromJSON = agentsCompletionRequestToolChoiceFromJSON; exports2.agentsCompletionRequestToJSON = agentsCompletionRequestToJSON; exports2.agentsCompletionRequestFromJSON = agentsCompletionRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -58581,8 +59064,8 @@ var require_agentscompletionrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.AgentsCompletionRequestStop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.AgentsCompletionRequestStop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.AgentsCompletionRequestStop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.AgentsCompletionRequestStop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var AgentsCompletionRequestStop$; (function(AgentsCompletionRequestStop$2) { AgentsCompletionRequestStop$2.inboundSchema = exports2.AgentsCompletionRequestStop$inboundSchema; @@ -58592,27 +59075,27 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestStop$outboundSchema.parse(agentsCompletionRequestStop)); } function agentsCompletionRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionRequestStop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionRequestStop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionRequestStop' from JSON`); } - exports2.AgentsCompletionRequestMessages$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionRequestMessages$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); - exports2.AgentsCompletionRequestMessages$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionRequestMessages$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); var AgentsCompletionRequestMessages$; (function(AgentsCompletionRequestMessages$2) { @@ -58623,10 +59106,10 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestMessages$outboundSchema.parse(agentsCompletionRequestMessages)); } function agentsCompletionRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionRequestMessages$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionRequestMessages$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionRequestMessages' from JSON`); } - exports2.AgentsCompletionRequestToolChoice$inboundSchema = z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.AgentsCompletionRequestToolChoice$outboundSchema = z3.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.AgentsCompletionRequestToolChoice$inboundSchema = z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.AgentsCompletionRequestToolChoice$outboundSchema = z4.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var AgentsCompletionRequestToolChoice$; (function(AgentsCompletionRequestToolChoice$2) { AgentsCompletionRequestToolChoice$2.inboundSchema = exports2.AgentsCompletionRequestToolChoice$inboundSchema; @@ -58636,36 +59119,36 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequestToolChoice$outboundSchema.parse(agentsCompletionRequestToolChoice)); } function agentsCompletionRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionRequestToolChoice' from JSON`); - } - exports2.AgentsCompletionRequest$inboundSchema = z3.object({ - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionRequestToolChoice' from JSON`); + } + exports2.AgentsCompletionRequest$inboundSchema = z4.object({ + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z3.number().optional(), - frequency_penalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - agent_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + tools: z4.nullable(z4.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z4.number().optional(), + frequency_penalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + agent_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "max_tokens": "maxTokens", "random_seed": "randomSeed", "response_format": "responseFormat", @@ -58675,37 +59158,37 @@ var require_agentscompletionrequest = __commonJS({ "agent_id": "agentId" }); }); - exports2.AgentsCompletionRequest$outboundSchema = z3.object({ - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionRequest$outboundSchema = z4.object({ + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z3.union([ + tools: z4.nullable(z4.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z4.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z3.number().optional(), - frequencyPenalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - agentId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + presencePenalty: z4.number().optional(), + frequencyPenalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + agentId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { maxTokens: "max_tokens", randomSeed: "random_seed", responseFormat: "response_format", @@ -58724,7 +59207,7 @@ var require_agentscompletionrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionRequest$outboundSchema.parse(agentsCompletionRequest)); } function agentsCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionRequest' from JSON`); } } }); @@ -58733,31 +59216,31 @@ var require_agentscompletionrequest = __commonJS({ var require_agentscompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/agentscompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58770,7 +59253,7 @@ var require_agentscompletionstreamrequest = __commonJS({ exports2.agentsCompletionStreamRequestToolChoiceFromJSON = agentsCompletionStreamRequestToolChoiceFromJSON; exports2.agentsCompletionStreamRequestToJSON = agentsCompletionStreamRequestToJSON; exports2.agentsCompletionStreamRequestFromJSON = agentsCompletionStreamRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -58781,8 +59264,8 @@ var require_agentscompletionstreamrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.AgentsCompletionStreamRequestStop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.AgentsCompletionStreamRequestStop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.AgentsCompletionStreamRequestStop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.AgentsCompletionStreamRequestStop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var AgentsCompletionStreamRequestStop$; (function(AgentsCompletionStreamRequestStop$2) { AgentsCompletionStreamRequestStop$2.inboundSchema = exports2.AgentsCompletionStreamRequestStop$inboundSchema; @@ -58792,27 +59275,27 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestStop$outboundSchema.parse(agentsCompletionStreamRequestStop)); } function agentsCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionStreamRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionStreamRequestStop' from JSON`); } - exports2.AgentsCompletionStreamRequestMessages$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionStreamRequestMessages$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); - exports2.AgentsCompletionStreamRequestMessages$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionStreamRequestMessages$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); var AgentsCompletionStreamRequestMessages$; (function(AgentsCompletionStreamRequestMessages$2) { @@ -58823,10 +59306,10 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestMessages$outboundSchema.parse(agentsCompletionStreamRequestMessages)); } function agentsCompletionStreamRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionStreamRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionStreamRequestMessages' from JSON`); } - exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema = z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema = z3.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema = z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema = z4.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var AgentsCompletionStreamRequestToolChoice$; (function(AgentsCompletionStreamRequestToolChoice$2) { AgentsCompletionStreamRequestToolChoice$2.inboundSchema = exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema; @@ -58836,36 +59319,36 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequestToolChoice$outboundSchema.parse(agentsCompletionStreamRequestToolChoice)); } function agentsCompletionStreamRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionStreamRequestToolChoice' from JSON`); - } - exports2.AgentsCompletionStreamRequest$inboundSchema = z3.object({ - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionStreamRequestToolChoice' from JSON`); + } + exports2.AgentsCompletionStreamRequest$inboundSchema = z4.object({ + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z3.number().optional(), - frequency_penalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - agent_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + tools: z4.nullable(z4.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z4.number().optional(), + frequency_penalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + agent_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "max_tokens": "maxTokens", "random_seed": "randomSeed", "response_format": "responseFormat", @@ -58875,37 +59358,37 @@ var require_agentscompletionstreamrequest = __commonJS({ "agent_id": "agentId" }); }); - exports2.AgentsCompletionStreamRequest$outboundSchema = z3.object({ - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.AgentsCompletionStreamRequest$outboundSchema = z4.object({ + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z3.union([ + tools: z4.nullable(z4.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z4.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z3.number().optional(), - frequencyPenalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - agentId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + presencePenalty: z4.number().optional(), + frequencyPenalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + agentId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { maxTokens: "max_tokens", randomSeed: "random_seed", responseFormat: "response_format", @@ -58924,7 +59407,7 @@ var require_agentscompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.AgentsCompletionStreamRequest$outboundSchema.parse(agentsCompletionStreamRequest)); } function agentsCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.AgentsCompletionStreamRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'AgentsCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.AgentsCompletionStreamRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'AgentsCompletionStreamRequest' from JSON`); } } }); @@ -58933,36 +59416,36 @@ var require_agentscompletionstreamrequest = __commonJS({ var require_apiendpoint = __commonJS({ "node_modules/@mistralai/mistralai/models/components/apiendpoint.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ApiEndpoint$ = exports2.ApiEndpoint$outboundSchema = exports2.ApiEndpoint$inboundSchema = exports2.ApiEndpoint = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var enums_js_1 = require_enums(); exports2.ApiEndpoint = { RootV1ChatCompletions: "/v1/chat/completions", @@ -58971,13 +59454,13 @@ var require_apiendpoint = __commonJS({ RootV1Moderations: "/v1/moderations", RootV1ChatModerations: "/v1/chat/moderations" }; - exports2.ApiEndpoint$inboundSchema = z3.union([ - z3.nativeEnum(exports2.ApiEndpoint), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.ApiEndpoint$inboundSchema = z4.union([ + z4.nativeEnum(exports2.ApiEndpoint), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.ApiEndpoint$outboundSchema = z3.union([ - z3.nativeEnum(exports2.ApiEndpoint), - z3.string().and(z3.custom()) + exports2.ApiEndpoint$outboundSchema = z4.union([ + z4.nativeEnum(exports2.ApiEndpoint), + z4.string().and(z4.custom()) ]); var ApiEndpoint$; (function(ApiEndpoint$2) { @@ -58991,58 +59474,58 @@ var require_apiendpoint = __commonJS({ var require_archiveftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/archiveftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArchiveFTModelOut$ = exports2.ArchiveFTModelOut$outboundSchema = exports2.ArchiveFTModelOut$inboundSchema = exports2.ArchiveFTModelOutObject$ = exports2.ArchiveFTModelOutObject$outboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema = exports2.ArchiveFTModelOutObject = void 0; exports2.archiveFTModelOutToJSON = archiveFTModelOutToJSON; exports2.archiveFTModelOutFromJSON = archiveFTModelOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); exports2.ArchiveFTModelOutObject = { Model: "model" }; - exports2.ArchiveFTModelOutObject$inboundSchema = z3.nativeEnum(exports2.ArchiveFTModelOutObject); + exports2.ArchiveFTModelOutObject$inboundSchema = z4.nativeEnum(exports2.ArchiveFTModelOutObject); exports2.ArchiveFTModelOutObject$outboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema; var ArchiveFTModelOutObject$; (function(ArchiveFTModelOutObject$2) { ArchiveFTModelOutObject$2.inboundSchema = exports2.ArchiveFTModelOutObject$inboundSchema; ArchiveFTModelOutObject$2.outboundSchema = exports2.ArchiveFTModelOutObject$outboundSchema; })(ArchiveFTModelOutObject$ || (exports2.ArchiveFTModelOutObject$ = ArchiveFTModelOutObject$ = {})); - exports2.ArchiveFTModelOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - archived: z3.boolean().default(true) + exports2.ArchiveFTModelOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + archived: z4.boolean().default(true) }); - exports2.ArchiveFTModelOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - archived: z3.boolean().default(true) + exports2.ArchiveFTModelOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + archived: z4.boolean().default(true) }); var ArchiveFTModelOut$; (function(ArchiveFTModelOut$2) { @@ -59053,7 +59536,7 @@ var require_archiveftmodelout = __commonJS({ return JSON.stringify(exports2.ArchiveFTModelOut$outboundSchema.parse(archiveFTModelOut)); } function archiveFTModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ArchiveFTModelOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ArchiveFTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ArchiveFTModelOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ArchiveFTModelOut' from JSON`); } } }); @@ -59062,62 +59545,62 @@ var require_archiveftmodelout = __commonJS({ var require_modelcapabilities = __commonJS({ "node_modules/@mistralai/mistralai/models/components/modelcapabilities.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ModelCapabilities$ = exports2.ModelCapabilities$outboundSchema = exports2.ModelCapabilities$inboundSchema = void 0; exports2.modelCapabilitiesToJSON = modelCapabilitiesToJSON; exports2.modelCapabilitiesFromJSON = modelCapabilitiesFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ModelCapabilities$inboundSchema = z3.object({ - completion_chat: z3.boolean().default(true), - completion_fim: z3.boolean().default(false), - function_calling: z3.boolean().default(true), - fine_tuning: z3.boolean().default(false), - vision: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ModelCapabilities$inboundSchema = z4.object({ + completion_chat: z4.boolean().default(true), + completion_fim: z4.boolean().default(false), + function_calling: z4.boolean().default(true), + fine_tuning: z4.boolean().default(false), + vision: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "completion_chat": "completionChat", "completion_fim": "completionFim", "function_calling": "functionCalling", "fine_tuning": "fineTuning" }); }); - exports2.ModelCapabilities$outboundSchema = z3.object({ - completionChat: z3.boolean().default(true), - completionFim: z3.boolean().default(false), - functionCalling: z3.boolean().default(true), - fineTuning: z3.boolean().default(false), - vision: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ModelCapabilities$outboundSchema = z4.object({ + completionChat: z4.boolean().default(true), + completionFim: z4.boolean().default(false), + functionCalling: z4.boolean().default(true), + fineTuning: z4.boolean().default(false), + vision: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { completionChat: "completion_chat", completionFim: "completion_fim", functionCalling: "function_calling", @@ -59133,7 +59616,7 @@ var require_modelcapabilities = __commonJS({ return JSON.stringify(exports2.ModelCapabilities$outboundSchema.parse(modelCapabilities)); } function modelCapabilitiesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ModelCapabilities$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ModelCapabilities' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ModelCapabilities$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ModelCapabilities' from JSON`); } } }); @@ -59142,86 +59625,86 @@ var require_modelcapabilities = __commonJS({ var require_basemodelcard = __commonJS({ "node_modules/@mistralai/mistralai/models/components/basemodelcard.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BaseModelCard$ = exports2.BaseModelCard$outboundSchema = exports2.BaseModelCard$inboundSchema = exports2.Type$ = exports2.Type$outboundSchema = exports2.Type$inboundSchema = exports2.Type = void 0; exports2.baseModelCardToJSON = baseModelCardToJSON; exports2.baseModelCardFromJSON = baseModelCardFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var modelcapabilities_js_1 = require_modelcapabilities(); exports2.Type = { Base: "base" }; - exports2.Type$inboundSchema = z3.nativeEnum(exports2.Type); + exports2.Type$inboundSchema = z4.nativeEnum(exports2.Type); exports2.Type$outboundSchema = exports2.Type$inboundSchema; var Type$; (function(Type$2) { Type$2.inboundSchema = exports2.Type$inboundSchema; Type$2.outboundSchema = exports2.Type$outboundSchema; })(Type$ || (exports2.Type$ = Type$ = {})); - exports2.BaseModelCard$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - created: z3.number().int().optional(), - owned_by: z3.string().default("mistralai"), + exports2.BaseModelCard$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + created: z4.number().int().optional(), + owned_by: z4.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$inboundSchema, - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), - max_context_length: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - deprecation: z3.nullable(z3.string().datetime({ offset: true }).transform((v2) => new Date(v2))).optional(), - default_model_temperature: z3.nullable(z3.number()).optional(), - type: z3.literal("base").default("base") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), + max_context_length: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + deprecation: z4.nullable(z4.string().datetime({ offset: true }).transform((v7) => new Date(v7))).optional(), + default_model_temperature: z4.nullable(z4.number()).optional(), + type: z4.literal("base").default("base") + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", "default_model_temperature": "defaultModelTemperature" }); }); - exports2.BaseModelCard$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - created: z3.number().int().optional(), - ownedBy: z3.string().default("mistralai"), + exports2.BaseModelCard$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + created: z4.number().int().optional(), + ownedBy: z4.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$outboundSchema, - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), - maxContextLength: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - deprecation: z3.nullable(z3.date().transform((v2) => v2.toISOString())).optional(), - defaultModelTemperature: z3.nullable(z3.number()).optional(), - type: z3.literal("base").default("base") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), + maxContextLength: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + deprecation: z4.nullable(z4.date().transform((v7) => v7.toISOString())).optional(), + defaultModelTemperature: z4.nullable(z4.number()).optional(), + type: z4.literal("base").default("base") + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { ownedBy: "owned_by", maxContextLength: "max_context_length", defaultModelTemperature: "default_model_temperature" @@ -59236,7 +59719,7 @@ var require_basemodelcard = __commonJS({ return JSON.stringify(exports2.BaseModelCard$outboundSchema.parse(baseModelCard)); } function baseModelCardFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.BaseModelCard$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'BaseModelCard' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.BaseModelCard$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'BaseModelCard' from JSON`); } } }); @@ -59245,46 +59728,46 @@ var require_basemodelcard = __commonJS({ var require_batcherror = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batcherror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchError$ = exports2.BatchError$outboundSchema = exports2.BatchError$inboundSchema = void 0; exports2.batchErrorToJSON = batchErrorToJSON; exports2.batchErrorFromJSON = batchErrorFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.BatchError$inboundSchema = z3.object({ - message: z3.string(), - count: z3.number().int().default(1) + exports2.BatchError$inboundSchema = z4.object({ + message: z4.string(), + count: z4.number().int().default(1) }); - exports2.BatchError$outboundSchema = z3.object({ - message: z3.string(), - count: z3.number().int().default(1) + exports2.BatchError$outboundSchema = z4.object({ + message: z4.string(), + count: z4.number().int().default(1) }); var BatchError$; (function(BatchError$2) { @@ -59295,7 +59778,7 @@ var require_batcherror = __commonJS({ return JSON.stringify(exports2.BatchError$outboundSchema.parse(batchError)); } function batchErrorFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.BatchError$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'BatchError' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.BatchError$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'BatchError' from JSON`); } } }); @@ -59304,61 +59787,61 @@ var require_batcherror = __commonJS({ var require_batchjobin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobIn$ = exports2.BatchJobIn$outboundSchema = exports2.BatchJobIn$inboundSchema = void 0; exports2.batchJobInToJSON = batchJobInToJSON; exports2.batchJobInFromJSON = batchJobInFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var apiendpoint_js_1 = require_apiendpoint(); - exports2.BatchJobIn$inboundSchema = z3.object({ - input_files: z3.array(z3.string()), + exports2.BatchJobIn$inboundSchema = z4.object({ + input_files: z4.array(z4.string()), endpoint: apiendpoint_js_1.ApiEndpoint$inboundSchema, - model: z3.string(), - metadata: z3.nullable(z3.record(z3.string())).optional(), - timeout_hours: z3.number().int().default(24) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + model: z4.string(), + metadata: z4.nullable(z4.record(z4.string())).optional(), + timeout_hours: z4.number().int().default(24) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "input_files": "inputFiles", "timeout_hours": "timeoutHours" }); }); - exports2.BatchJobIn$outboundSchema = z3.object({ - inputFiles: z3.array(z3.string()), + exports2.BatchJobIn$outboundSchema = z4.object({ + inputFiles: z4.array(z4.string()), endpoint: apiendpoint_js_1.ApiEndpoint$outboundSchema, - model: z3.string(), - metadata: z3.nullable(z3.record(z3.string())).optional(), - timeoutHours: z3.number().int().default(24) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + model: z4.string(), + metadata: z4.nullable(z4.record(z4.string())).optional(), + timeoutHours: z4.number().int().default(24) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { inputFiles: "input_files", timeoutHours: "timeout_hours" }); @@ -59372,7 +59855,7 @@ var require_batchjobin = __commonJS({ return JSON.stringify(exports2.BatchJobIn$outboundSchema.parse(batchJobIn)); } function batchJobInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.BatchJobIn$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'BatchJobIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.BatchJobIn$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'BatchJobIn' from JSON`); } } }); @@ -59381,36 +59864,36 @@ var require_batchjobin = __commonJS({ var require_batchjobstatus = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobstatus.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobStatus$ = exports2.BatchJobStatus$outboundSchema = exports2.BatchJobStatus$inboundSchema = exports2.BatchJobStatus = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); exports2.BatchJobStatus = { Queued: "QUEUED", Running: "RUNNING", @@ -59420,7 +59903,7 @@ var require_batchjobstatus = __commonJS({ CancellationRequested: "CANCELLATION_REQUESTED", Cancelled: "CANCELLED" }; - exports2.BatchJobStatus$inboundSchema = z3.nativeEnum(exports2.BatchJobStatus); + exports2.BatchJobStatus$inboundSchema = z4.nativeEnum(exports2.BatchJobStatus); exports2.BatchJobStatus$outboundSchema = exports2.BatchJobStatus$inboundSchema; var BatchJobStatus$; (function(BatchJobStatus$2) { @@ -59434,38 +59917,38 @@ var require_batchjobstatus = __commonJS({ var require_batchjobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobOut$ = exports2.BatchJobOut$outboundSchema = exports2.BatchJobOut$inboundSchema = exports2.BatchJobOutObject$ = exports2.BatchJobOutObject$outboundSchema = exports2.BatchJobOutObject$inboundSchema = exports2.BatchJobOutObject = void 0; exports2.batchJobOutToJSON = batchJobOutToJSON; exports2.batchJobOutFromJSON = batchJobOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var batcherror_js_1 = require_batcherror(); @@ -59473,33 +59956,33 @@ var require_batchjobout = __commonJS({ exports2.BatchJobOutObject = { Batch: "batch" }; - exports2.BatchJobOutObject$inboundSchema = z3.nativeEnum(exports2.BatchJobOutObject); + exports2.BatchJobOutObject$inboundSchema = z4.nativeEnum(exports2.BatchJobOutObject); exports2.BatchJobOutObject$outboundSchema = exports2.BatchJobOutObject$inboundSchema; var BatchJobOutObject$; (function(BatchJobOutObject$2) { BatchJobOutObject$2.inboundSchema = exports2.BatchJobOutObject$inboundSchema; BatchJobOutObject$2.outboundSchema = exports2.BatchJobOutObject$outboundSchema; })(BatchJobOutObject$ || (exports2.BatchJobOutObject$ = BatchJobOutObject$ = {})); - exports2.BatchJobOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("batch").default("batch"), - input_files: z3.array(z3.string()), - metadata: z3.nullable(z3.record(z3.any())).optional(), - endpoint: z3.string(), - model: z3.string(), - output_file: z3.nullable(z3.string()).optional(), - error_file: z3.nullable(z3.string()).optional(), - errors: z3.array(batcherror_js_1.BatchError$inboundSchema), + exports2.BatchJobOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("batch").default("batch"), + input_files: z4.array(z4.string()), + metadata: z4.nullable(z4.record(z4.any())).optional(), + endpoint: z4.string(), + model: z4.string(), + output_file: z4.nullable(z4.string()).optional(), + error_file: z4.nullable(z4.string()).optional(), + errors: z4.array(batcherror_js_1.BatchError$inboundSchema), status: batchjobstatus_js_1.BatchJobStatus$inboundSchema, - created_at: z3.number().int(), - total_requests: z3.number().int(), - completed_requests: z3.number().int(), - succeeded_requests: z3.number().int(), - failed_requests: z3.number().int(), - started_at: z3.nullable(z3.number().int()).optional(), - completed_at: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + created_at: z4.number().int(), + total_requests: z4.number().int(), + completed_requests: z4.number().int(), + succeeded_requests: z4.number().int(), + failed_requests: z4.number().int(), + started_at: z4.nullable(z4.number().int()).optional(), + completed_at: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "input_files": "inputFiles", "output_file": "outputFile", "error_file": "errorFile", @@ -59512,26 +59995,26 @@ var require_batchjobout = __commonJS({ "completed_at": "completedAt" }); }); - exports2.BatchJobOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("batch").default("batch"), - inputFiles: z3.array(z3.string()), - metadata: z3.nullable(z3.record(z3.any())).optional(), - endpoint: z3.string(), - model: z3.string(), - outputFile: z3.nullable(z3.string()).optional(), - errorFile: z3.nullable(z3.string()).optional(), - errors: z3.array(batcherror_js_1.BatchError$outboundSchema), + exports2.BatchJobOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("batch").default("batch"), + inputFiles: z4.array(z4.string()), + metadata: z4.nullable(z4.record(z4.any())).optional(), + endpoint: z4.string(), + model: z4.string(), + outputFile: z4.nullable(z4.string()).optional(), + errorFile: z4.nullable(z4.string()).optional(), + errors: z4.array(batcherror_js_1.BatchError$outboundSchema), status: batchjobstatus_js_1.BatchJobStatus$outboundSchema, - createdAt: z3.number().int(), - totalRequests: z3.number().int(), - completedRequests: z3.number().int(), - succeededRequests: z3.number().int(), - failedRequests: z3.number().int(), - startedAt: z3.nullable(z3.number().int()).optional(), - completedAt: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + createdAt: z4.number().int(), + totalRequests: z4.number().int(), + completedRequests: z4.number().int(), + succeededRequests: z4.number().int(), + failedRequests: z4.number().int(), + startedAt: z4.nullable(z4.number().int()).optional(), + completedAt: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { inputFiles: "input_files", outputFile: "output_file", errorFile: "error_file", @@ -59553,7 +60036,7 @@ var require_batchjobout = __commonJS({ return JSON.stringify(exports2.BatchJobOut$outboundSchema.parse(batchJobOut)); } function batchJobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.BatchJobOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'BatchJobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.BatchJobOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'BatchJobOut' from JSON`); } } }); @@ -59562,59 +60045,59 @@ var require_batchjobout = __commonJS({ var require_batchjobsout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/batchjobsout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BatchJobsOut$ = exports2.BatchJobsOut$outboundSchema = exports2.BatchJobsOut$inboundSchema = exports2.BatchJobsOutObject$ = exports2.BatchJobsOutObject$outboundSchema = exports2.BatchJobsOutObject$inboundSchema = exports2.BatchJobsOutObject = void 0; exports2.batchJobsOutToJSON = batchJobsOutToJSON; exports2.batchJobsOutFromJSON = batchJobsOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var batchjobout_js_1 = require_batchjobout(); exports2.BatchJobsOutObject = { List: "list" }; - exports2.BatchJobsOutObject$inboundSchema = z3.nativeEnum(exports2.BatchJobsOutObject); + exports2.BatchJobsOutObject$inboundSchema = z4.nativeEnum(exports2.BatchJobsOutObject); exports2.BatchJobsOutObject$outboundSchema = exports2.BatchJobsOutObject$inboundSchema; var BatchJobsOutObject$; (function(BatchJobsOutObject$2) { BatchJobsOutObject$2.inboundSchema = exports2.BatchJobsOutObject$inboundSchema; BatchJobsOutObject$2.outboundSchema = exports2.BatchJobsOutObject$outboundSchema; })(BatchJobsOutObject$ || (exports2.BatchJobsOutObject$ = BatchJobsOutObject$ = {})); - exports2.BatchJobsOut$inboundSchema = z3.object({ - data: z3.array(batchjobout_js_1.BatchJobOut$inboundSchema).optional(), - object: z3.literal("list").default("list"), - total: z3.number().int() + exports2.BatchJobsOut$inboundSchema = z4.object({ + data: z4.array(batchjobout_js_1.BatchJobOut$inboundSchema).optional(), + object: z4.literal("list").default("list"), + total: z4.number().int() }); - exports2.BatchJobsOut$outboundSchema = z3.object({ - data: z3.array(batchjobout_js_1.BatchJobOut$outboundSchema).optional(), - object: z3.literal("list").default("list"), - total: z3.number().int() + exports2.BatchJobsOut$outboundSchema = z4.object({ + data: z4.array(batchjobout_js_1.BatchJobOut$outboundSchema).optional(), + object: z4.literal("list").default("list"), + total: z4.number().int() }); var BatchJobsOut$; (function(BatchJobsOut$2) { @@ -59625,7 +60108,7 @@ var require_batchjobsout = __commonJS({ return JSON.stringify(exports2.BatchJobsOut$outboundSchema.parse(batchJobsOut)); } function batchJobsOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.BatchJobsOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'BatchJobsOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.BatchJobsOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'BatchJobsOut' from JSON`); } } }); @@ -59634,31 +60117,31 @@ var require_batchjobsout = __commonJS({ var require_chatclassificationrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatclassificationrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -59671,39 +60154,39 @@ var require_chatclassificationrequest = __commonJS({ exports2.chatClassificationRequestInputsFromJSON = chatClassificationRequestInputsFromJSON; exports2.chatClassificationRequestToJSON = chatClassificationRequestToJSON; exports2.chatClassificationRequestFromJSON = chatClassificationRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); var systemmessage_js_1 = require_systemmessage(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.Two$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.Two$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]); - exports2.Two$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.Two$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]); var Two$; @@ -59715,34 +60198,34 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.Two$outboundSchema.parse(two)); } function twoFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Two$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Two' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Two$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Two' from JSON`); } - exports2.One$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.One$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]); - exports2.One$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.One$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]); var One$; @@ -59754,65 +60237,65 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.One$outboundSchema.parse(one)); } function oneFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.One$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'One' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.One$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'One' from JSON`); } - exports2.ChatClassificationRequestInputs$inboundSchema = z3.union([ - z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatClassificationRequestInputs$inboundSchema = z4.union([ + z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), - z3.array(z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + z4.array(z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]))) ]); - exports2.ChatClassificationRequestInputs$outboundSchema = z3.union([ - z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatClassificationRequestInputs$outboundSchema = z4.union([ + z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), - z3.array(z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + z4.array(z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]))) ]); @@ -59825,79 +60308,79 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.ChatClassificationRequestInputs$outboundSchema.parse(chatClassificationRequestInputs)); } function chatClassificationRequestInputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatClassificationRequestInputs$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatClassificationRequestInputs' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatClassificationRequestInputs$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatClassificationRequestInputs' from JSON`); } - exports2.ChatClassificationRequest$inboundSchema = z3.object({ - input: z3.union([ - z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatClassificationRequest$inboundSchema = z4.object({ + input: z4.union([ + z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), - z3.array(z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + z4.array(z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]))) ]), - model: z3.nullable(z3.string()) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + model: z4.nullable(z4.string()) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "input": "inputs" }); }); - exports2.ChatClassificationRequest$outboundSchema = z3.object({ - inputs: z3.union([ - z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatClassificationRequest$outboundSchema = z4.object({ + inputs: z4.union([ + z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), - z3.array(z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + z4.array(z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ]))) ]), - model: z3.nullable(z3.string()) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + model: z4.nullable(z4.string()) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { inputs: "input" }); }); @@ -59910,7 +60393,7 @@ var require_chatclassificationrequest = __commonJS({ return JSON.stringify(exports2.ChatClassificationRequest$outboundSchema.parse(chatClassificationRequest)); } function chatClassificationRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatClassificationRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatClassificationRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatClassificationRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatClassificationRequest' from JSON`); } } }); @@ -59919,38 +60402,38 @@ var require_chatclassificationrequest = __commonJS({ var require_chatcompletionchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ChatCompletionChoice$ = exports2.ChatCompletionChoice$outboundSchema = exports2.ChatCompletionChoice$inboundSchema = exports2.FinishReason$ = exports2.FinishReason$outboundSchema = exports2.FinishReason$inboundSchema = exports2.FinishReason = void 0; exports2.chatCompletionChoiceToJSON = chatCompletionChoiceToJSON; exports2.chatCompletionChoiceFromJSON = chatCompletionChoiceFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var enums_js_1 = require_enums(); @@ -59962,34 +60445,34 @@ var require_chatcompletionchoice = __commonJS({ Error: "error", ToolCalls: "tool_calls" }; - exports2.FinishReason$inboundSchema = z3.union([ - z3.nativeEnum(exports2.FinishReason), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.FinishReason$inboundSchema = z4.union([ + z4.nativeEnum(exports2.FinishReason), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.FinishReason$outboundSchema = z3.union([ - z3.nativeEnum(exports2.FinishReason), - z3.string().and(z3.custom()) + exports2.FinishReason$outboundSchema = z4.union([ + z4.nativeEnum(exports2.FinishReason), + z4.string().and(z4.custom()) ]); var FinishReason$; (function(FinishReason$2) { FinishReason$2.inboundSchema = exports2.FinishReason$inboundSchema; FinishReason$2.outboundSchema = exports2.FinishReason$outboundSchema; })(FinishReason$ || (exports2.FinishReason$ = FinishReason$ = {})); - exports2.ChatCompletionChoice$inboundSchema = z3.object({ - index: z3.number().int(), + exports2.ChatCompletionChoice$inboundSchema = z4.object({ + index: z4.number().int(), message: assistantmessage_js_1.AssistantMessage$inboundSchema, finish_reason: exports2.FinishReason$inboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "finish_reason": "finishReason" }); }); - exports2.ChatCompletionChoice$outboundSchema = z3.object({ - index: z3.number().int(), + exports2.ChatCompletionChoice$outboundSchema = z4.object({ + index: z4.number().int(), message: assistantmessage_js_1.AssistantMessage$outboundSchema, finishReason: exports2.FinishReason$outboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { finishReason: "finish_reason" }); }); @@ -60002,7 +60485,7 @@ var require_chatcompletionchoice = __commonJS({ return JSON.stringify(exports2.ChatCompletionChoice$outboundSchema.parse(chatCompletionChoice)); } function chatCompletionChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionChoice' from JSON`); } } }); @@ -60011,31 +60494,31 @@ var require_chatcompletionchoice = __commonJS({ var require_chatcompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -60048,7 +60531,7 @@ var require_chatcompletionrequest = __commonJS({ exports2.chatCompletionRequestToolChoiceFromJSON = chatCompletionRequestToolChoiceFromJSON; exports2.chatCompletionRequestToJSON = chatCompletionRequestToJSON; exports2.chatCompletionRequestFromJSON = chatCompletionRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -60059,8 +60542,8 @@ var require_chatcompletionrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.Stop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.Stop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.Stop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.Stop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var Stop$; (function(Stop$2) { Stop$2.inboundSchema = exports2.Stop$inboundSchema; @@ -60070,27 +60553,27 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.Stop$outboundSchema.parse(stop)); } function stopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Stop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Stop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Stop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Stop' from JSON`); } - exports2.Messages$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.Messages$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); - exports2.Messages$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.Messages$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); var Messages$; (function(Messages$2) { @@ -60101,10 +60584,10 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.Messages$outboundSchema.parse(messages)); } function messagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Messages$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Messages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Messages$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Messages' from JSON`); } - exports2.ChatCompletionRequestToolChoice$inboundSchema = z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.ChatCompletionRequestToolChoice$outboundSchema = z3.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.ChatCompletionRequestToolChoice$inboundSchema = z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.ChatCompletionRequestToolChoice$outboundSchema = z4.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var ChatCompletionRequestToolChoice$; (function(ChatCompletionRequestToolChoice$2) { ChatCompletionRequestToolChoice$2.inboundSchema = exports2.ChatCompletionRequestToolChoice$inboundSchema; @@ -60114,39 +60597,39 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionRequestToolChoice$outboundSchema.parse(chatCompletionRequestToolChoice)); } function chatCompletionRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionRequestToolChoice' from JSON`); - } - exports2.ChatCompletionRequest$inboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - top_p: z3.number().default(1), - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionRequestToolChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionRequestToolChoice' from JSON`); + } + exports2.ChatCompletionRequest$inboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + top_p: z4.number().default(1), + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z3.number().optional(), - frequency_penalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - safe_prompt: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + tools: z4.nullable(z4.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z4.number().optional(), + frequency_penalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + safe_prompt: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", @@ -60157,40 +60640,40 @@ var require_chatcompletionrequest = __commonJS({ "safe_prompt": "safePrompt" }); }); - exports2.ChatCompletionRequest$outboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - topP: z3.number().default(1), - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatCompletionRequest$outboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + topP: z4.number().default(1), + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z3.union([ + tools: z4.nullable(z4.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z4.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z3.number().optional(), - frequencyPenalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - safePrompt: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + presencePenalty: z4.number().optional(), + frequencyPenalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + safePrompt: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -60210,7 +60693,7 @@ var require_chatcompletionrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionRequest$outboundSchema.parse(chatCompletionRequest)); } function chatCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionRequest' from JSON`); } } }); @@ -60219,57 +60702,57 @@ var require_chatcompletionrequest = __commonJS({ var require_usageinfo = __commonJS({ "node_modules/@mistralai/mistralai/models/components/usageinfo.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UsageInfo$ = exports2.UsageInfo$outboundSchema = exports2.UsageInfo$inboundSchema = void 0; exports2.usageInfoToJSON = usageInfoToJSON; exports2.usageInfoFromJSON = usageInfoFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.UsageInfo$inboundSchema = z3.object({ - prompt_tokens: z3.number().int(), - completion_tokens: z3.number().int(), - total_tokens: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.UsageInfo$inboundSchema = z4.object({ + prompt_tokens: z4.number().int(), + completion_tokens: z4.number().int(), + total_tokens: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "prompt_tokens": "promptTokens", "completion_tokens": "completionTokens", "total_tokens": "totalTokens" }); }); - exports2.UsageInfo$outboundSchema = z3.object({ - promptTokens: z3.number().int(), - completionTokens: z3.number().int(), - totalTokens: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.UsageInfo$outboundSchema = z4.object({ + promptTokens: z4.number().int(), + completionTokens: z4.number().int(), + totalTokens: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { promptTokens: "prompt_tokens", completionTokens: "completion_tokens", totalTokens: "total_tokens" @@ -60284,7 +60767,7 @@ var require_usageinfo = __commonJS({ return JSON.stringify(exports2.UsageInfo$outboundSchema.parse(usageInfo)); } function usageInfoFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UsageInfo$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UsageInfo' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UsageInfo$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UsageInfo' from JSON`); } } }); @@ -60293,56 +60776,56 @@ var require_usageinfo = __commonJS({ var require_chatcompletionresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ChatCompletionResponse$ = exports2.ChatCompletionResponse$outboundSchema = exports2.ChatCompletionResponse$inboundSchema = void 0; exports2.chatCompletionResponseToJSON = chatCompletionResponseToJSON; exports2.chatCompletionResponseFromJSON = chatCompletionResponseFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var chatcompletionchoice_js_1 = require_chatcompletionchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.ChatCompletionResponse$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.ChatCompletionResponse$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - created: z3.number().int().optional(), - choices: z3.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() + created: z4.number().int().optional(), + choices: z4.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() }); - exports2.ChatCompletionResponse$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.ChatCompletionResponse$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - created: z3.number().int().optional(), - choices: z3.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() + created: z4.number().int().optional(), + choices: z4.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() }); var ChatCompletionResponse$; (function(ChatCompletionResponse$2) { @@ -60353,7 +60836,7 @@ var require_chatcompletionresponse = __commonJS({ return JSON.stringify(exports2.ChatCompletionResponse$outboundSchema.parse(chatCompletionResponse)); } function chatCompletionResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionResponse$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionResponse$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionResponse' from JSON`); } } }); @@ -60362,31 +60845,31 @@ var require_chatcompletionresponse = __commonJS({ var require_chatcompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/chatcompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -60399,7 +60882,7 @@ var require_chatcompletionstreamrequest = __commonJS({ exports2.chatCompletionStreamRequestToolChoiceFromJSON = chatCompletionStreamRequestToolChoiceFromJSON; exports2.chatCompletionStreamRequestToJSON = chatCompletionStreamRequestToJSON; exports2.chatCompletionStreamRequestFromJSON = chatCompletionStreamRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var assistantmessage_js_1 = require_assistantmessage(); @@ -60410,8 +60893,8 @@ var require_chatcompletionstreamrequest = __commonJS({ var toolchoiceenum_js_1 = require_toolchoiceenum(); var toolmessage_js_1 = require_toolmessage(); var usermessage_js_1 = require_usermessage(); - exports2.ChatCompletionStreamRequestStop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.ChatCompletionStreamRequestStop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.ChatCompletionStreamRequestStop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.ChatCompletionStreamRequestStop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var ChatCompletionStreamRequestStop$; (function(ChatCompletionStreamRequestStop$2) { ChatCompletionStreamRequestStop$2.inboundSchema = exports2.ChatCompletionStreamRequestStop$inboundSchema; @@ -60421,27 +60904,27 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestStop$outboundSchema.parse(chatCompletionStreamRequestStop)); } function chatCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionStreamRequestStop' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionStreamRequestStop' from JSON`); } - exports2.ChatCompletionStreamRequestMessages$inboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatCompletionStreamRequestMessages$inboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); - exports2.ChatCompletionStreamRequestMessages$outboundSchema = z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatCompletionStreamRequestMessages$outboundSchema = z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ role: v2.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ role: v7.role }))), + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ role: v2.role }))) + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ role: v7.role }))) ]); var ChatCompletionStreamRequestMessages$; (function(ChatCompletionStreamRequestMessages$2) { @@ -60452,10 +60935,10 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestMessages$outboundSchema.parse(chatCompletionStreamRequestMessages)); } function chatCompletionStreamRequestMessagesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionStreamRequestMessages' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionStreamRequestMessages$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionStreamRequestMessages' from JSON`); } - exports2.ChatCompletionStreamRequestToolChoice$inboundSchema = z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); - exports2.ChatCompletionStreamRequestToolChoice$outboundSchema = z3.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); + exports2.ChatCompletionStreamRequestToolChoice$inboundSchema = z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]); + exports2.ChatCompletionStreamRequestToolChoice$outboundSchema = z4.union([toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema]); var ChatCompletionStreamRequestToolChoice$; (function(ChatCompletionStreamRequestToolChoice$2) { ChatCompletionStreamRequestToolChoice$2.inboundSchema = exports2.ChatCompletionStreamRequestToolChoice$inboundSchema; @@ -60465,39 +60948,39 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequestToolChoice$outboundSchema.parse(chatCompletionStreamRequestToolChoice)); } function chatCompletionStreamRequestToolChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionStreamRequestToolChoice' from JSON`); - } - exports2.ChatCompletionStreamRequest$inboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - top_p: z3.number().default(1), - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$inboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionStreamRequestToolChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionStreamRequestToolChoice' from JSON`); + } + exports2.ChatCompletionStreamRequest$inboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + top_p: z4.number().default(1), + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$inboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$inboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$inboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$inboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$inboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$inboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$inboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), response_format: responseformat_js_1.ResponseFormat$inboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$inboundSchema)).optional(), - tool_choice: z3.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), - presence_penalty: z3.number().optional(), - frequency_penalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - safe_prompt: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + tools: z4.nullable(z4.array(tool_js_1.Tool$inboundSchema)).optional(), + tool_choice: z4.union([toolchoice_js_1.ToolChoice$inboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$inboundSchema]).optional(), + presence_penalty: z4.number().optional(), + frequency_penalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + safe_prompt: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", @@ -60508,40 +60991,40 @@ var require_chatcompletionstreamrequest = __commonJS({ "safe_prompt": "safePrompt" }); }); - exports2.ChatCompletionStreamRequest$outboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - topP: z3.number().default(1), - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - messages: z3.array(z3.union([ - systemmessage_js_1.SystemMessage$outboundSchema.and(z3.object({ role: z3.literal("system") }).transform((v2) => ({ - role: v2.role + exports2.ChatCompletionStreamRequest$outboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + topP: z4.number().default(1), + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + messages: z4.array(z4.union([ + systemmessage_js_1.SystemMessage$outboundSchema.and(z4.object({ role: z4.literal("system") }).transform((v7) => ({ + role: v7.role }))), - usermessage_js_1.UserMessage$outboundSchema.and(z3.object({ role: z3.literal("user") }).transform((v2) => ({ - role: v2.role + usermessage_js_1.UserMessage$outboundSchema.and(z4.object({ role: z4.literal("user") }).transform((v7) => ({ + role: v7.role }))), - assistantmessage_js_1.AssistantMessage$outboundSchema.and(z3.object({ role: z3.literal("assistant") }).transform((v2) => ({ - role: v2.role + assistantmessage_js_1.AssistantMessage$outboundSchema.and(z4.object({ role: z4.literal("assistant") }).transform((v7) => ({ + role: v7.role }))), - toolmessage_js_1.ToolMessage$outboundSchema.and(z3.object({ role: z3.literal("tool") }).transform((v2) => ({ - role: v2.role + toolmessage_js_1.ToolMessage$outboundSchema.and(z4.object({ role: z4.literal("tool") }).transform((v7) => ({ + role: v7.role }))) ])), responseFormat: responseformat_js_1.ResponseFormat$outboundSchema.optional(), - tools: z3.nullable(z3.array(tool_js_1.Tool$outboundSchema)).optional(), - toolChoice: z3.union([ + tools: z4.nullable(z4.array(tool_js_1.Tool$outboundSchema)).optional(), + toolChoice: z4.union([ toolchoice_js_1.ToolChoice$outboundSchema, toolchoiceenum_js_1.ToolChoiceEnum$outboundSchema ]).optional(), - presencePenalty: z3.number().optional(), - frequencyPenalty: z3.number().optional(), - n: z3.nullable(z3.number().int()).optional(), - safePrompt: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + presencePenalty: z4.number().optional(), + frequencyPenalty: z4.number().optional(), + n: z4.nullable(z4.number().int()).optional(), + safePrompt: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -60561,7 +61044,7 @@ var require_chatcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.ChatCompletionStreamRequest$outboundSchema.parse(chatCompletionStreamRequest)); } function chatCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ChatCompletionStreamRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ChatCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ChatCompletionStreamRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ChatCompletionStreamRequest' from JSON`); } } }); @@ -60570,57 +61053,57 @@ var require_chatcompletionstreamrequest = __commonJS({ var require_metricout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/metricout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MetricOut$ = exports2.MetricOut$outboundSchema = exports2.MetricOut$inboundSchema = void 0; exports2.metricOutToJSON = metricOutToJSON; exports2.metricOutFromJSON = metricOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.MetricOut$inboundSchema = z3.object({ - train_loss: z3.nullable(z3.number()).optional(), - valid_loss: z3.nullable(z3.number()).optional(), - valid_mean_token_accuracy: z3.nullable(z3.number()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.MetricOut$inboundSchema = z4.object({ + train_loss: z4.nullable(z4.number()).optional(), + valid_loss: z4.nullable(z4.number()).optional(), + valid_mean_token_accuracy: z4.nullable(z4.number()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "train_loss": "trainLoss", "valid_loss": "validLoss", "valid_mean_token_accuracy": "validMeanTokenAccuracy" }); }); - exports2.MetricOut$outboundSchema = z3.object({ - trainLoss: z3.nullable(z3.number()).optional(), - validLoss: z3.nullable(z3.number()).optional(), - validMeanTokenAccuracy: z3.nullable(z3.number()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.MetricOut$outboundSchema = z4.object({ + trainLoss: z4.nullable(z4.number()).optional(), + validLoss: z4.nullable(z4.number()).optional(), + validMeanTokenAccuracy: z4.nullable(z4.number()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { trainLoss: "train_loss", validLoss: "valid_loss", validMeanTokenAccuracy: "valid_mean_token_accuracy" @@ -60635,7 +61118,7 @@ var require_metricout = __commonJS({ return JSON.stringify(exports2.MetricOut$outboundSchema.parse(metricOut)); } function metricOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.MetricOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'MetricOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.MetricOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'MetricOut' from JSON`); } } }); @@ -60644,57 +61127,57 @@ var require_metricout = __commonJS({ var require_checkpointout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/checkpointout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CheckpointOut$ = exports2.CheckpointOut$outboundSchema = exports2.CheckpointOut$inboundSchema = void 0; exports2.checkpointOutToJSON = checkpointOutToJSON; exports2.checkpointOutFromJSON = checkpointOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var metricout_js_1 = require_metricout(); - exports2.CheckpointOut$inboundSchema = z3.object({ + exports2.CheckpointOut$inboundSchema = z4.object({ metrics: metricout_js_1.MetricOut$inboundSchema, - step_number: z3.number().int(), - created_at: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + step_number: z4.number().int(), + created_at: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "step_number": "stepNumber", "created_at": "createdAt" }); }); - exports2.CheckpointOut$outboundSchema = z3.object({ + exports2.CheckpointOut$outboundSchema = z4.object({ metrics: metricout_js_1.MetricOut$outboundSchema, - stepNumber: z3.number().int(), - createdAt: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + stepNumber: z4.number().int(), + createdAt: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { stepNumber: "step_number", createdAt: "created_at" }); @@ -60708,7 +61191,7 @@ var require_checkpointout = __commonJS({ return JSON.stringify(exports2.CheckpointOut$outboundSchema.parse(checkpointOut)); } function checkpointOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.CheckpointOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'CheckpointOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.CheckpointOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'CheckpointOut' from JSON`); } } }); @@ -60717,53 +61200,53 @@ var require_checkpointout = __commonJS({ var require_classificationobject = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationobject.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClassificationObject$ = exports2.ClassificationObject$outboundSchema = exports2.ClassificationObject$inboundSchema = void 0; exports2.classificationObjectToJSON = classificationObjectToJSON; exports2.classificationObjectFromJSON = classificationObjectFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ClassificationObject$inboundSchema = z3.object({ - categories: z3.record(z3.boolean()).optional(), - category_scores: z3.record(z3.number()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ClassificationObject$inboundSchema = z4.object({ + categories: z4.record(z4.boolean()).optional(), + category_scores: z4.record(z4.number()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "category_scores": "categoryScores" }); }); - exports2.ClassificationObject$outboundSchema = z3.object({ - categories: z3.record(z3.boolean()).optional(), - categoryScores: z3.record(z3.number()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ClassificationObject$outboundSchema = z4.object({ + categories: z4.record(z4.boolean()).optional(), + categoryScores: z4.record(z4.number()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { categoryScores: "category_scores" }); }); @@ -60776,7 +61259,7 @@ var require_classificationobject = __commonJS({ return JSON.stringify(exports2.ClassificationObject$outboundSchema.parse(classificationObject)); } function classificationObjectFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ClassificationObject$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ClassificationObject' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ClassificationObject$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ClassificationObject' from JSON`); } } }); @@ -60785,31 +61268,31 @@ var require_classificationobject = __commonJS({ var require_classificationrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -60818,11 +61301,11 @@ var require_classificationrequest = __commonJS({ exports2.classificationRequestInputsFromJSON = classificationRequestInputsFromJSON; exports2.classificationRequestToJSON = classificationRequestToJSON; exports2.classificationRequestFromJSON = classificationRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.ClassificationRequestInputs$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.ClassificationRequestInputs$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.ClassificationRequestInputs$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.ClassificationRequestInputs$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var ClassificationRequestInputs$; (function(ClassificationRequestInputs$2) { ClassificationRequestInputs$2.inboundSchema = exports2.ClassificationRequestInputs$inboundSchema; @@ -60832,21 +61315,21 @@ var require_classificationrequest = __commonJS({ return JSON.stringify(exports2.ClassificationRequestInputs$outboundSchema.parse(classificationRequestInputs)); } function classificationRequestInputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ClassificationRequestInputs$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ClassificationRequestInputs' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ClassificationRequestInputs$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ClassificationRequestInputs' from JSON`); } - exports2.ClassificationRequest$inboundSchema = z3.object({ - input: z3.union([z3.string(), z3.array(z3.string())]), - model: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ClassificationRequest$inboundSchema = z4.object({ + input: z4.union([z4.string(), z4.array(z4.string())]), + model: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "input": "inputs" }); }); - exports2.ClassificationRequest$outboundSchema = z3.object({ - inputs: z3.union([z3.string(), z3.array(z3.string())]), - model: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.ClassificationRequest$outboundSchema = z4.object({ + inputs: z4.union([z4.string(), z4.array(z4.string())]), + model: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { inputs: "input" }); }); @@ -60859,7 +61342,7 @@ var require_classificationrequest = __commonJS({ return JSON.stringify(exports2.ClassificationRequest$outboundSchema.parse(classificationRequest)); } function classificationRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ClassificationRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ClassificationRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ClassificationRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ClassificationRequest' from JSON`); } } }); @@ -60868,49 +61351,49 @@ var require_classificationrequest = __commonJS({ var require_classificationresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/classificationresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ClassificationResponse$ = exports2.ClassificationResponse$outboundSchema = exports2.ClassificationResponse$inboundSchema = void 0; exports2.classificationResponseToJSON = classificationResponseToJSON; exports2.classificationResponseFromJSON = classificationResponseFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var classificationobject_js_1 = require_classificationobject(); - exports2.ClassificationResponse$inboundSchema = z3.object({ - id: z3.string().optional(), - model: z3.string().optional(), - results: z3.array(classificationobject_js_1.ClassificationObject$inboundSchema).optional() + exports2.ClassificationResponse$inboundSchema = z4.object({ + id: z4.string().optional(), + model: z4.string().optional(), + results: z4.array(classificationobject_js_1.ClassificationObject$inboundSchema).optional() }); - exports2.ClassificationResponse$outboundSchema = z3.object({ - id: z3.string().optional(), - model: z3.string().optional(), - results: z3.array(classificationobject_js_1.ClassificationObject$outboundSchema).optional() + exports2.ClassificationResponse$outboundSchema = z4.object({ + id: z4.string().optional(), + model: z4.string().optional(), + results: z4.array(classificationobject_js_1.ClassificationObject$outboundSchema).optional() }); var ClassificationResponse$; (function(ClassificationResponse$2) { @@ -60921,7 +61404,7 @@ var require_classificationresponse = __commonJS({ return JSON.stringify(exports2.ClassificationResponse$outboundSchema.parse(classificationResponse)); } function classificationResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ClassificationResponse$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ClassificationResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ClassificationResponse$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ClassificationResponse' from JSON`); } } }); @@ -60930,31 +61413,31 @@ var require_classificationresponse = __commonJS({ var require_deltamessage = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deltamessage.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -60963,13 +61446,13 @@ var require_deltamessage = __commonJS({ exports2.contentFromJSON = contentFromJSON; exports2.deltaMessageToJSON = deltaMessageToJSON; exports2.deltaMessageFromJSON = deltaMessageFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var contentchunk_js_1 = require_contentchunk(); var toolcall_js_1 = require_toolcall(); - exports2.Content$inboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)]); - exports2.Content$outboundSchema = z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)]); + exports2.Content$inboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)]); + exports2.Content$outboundSchema = z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)]); var Content$; (function(Content$2) { Content$2.inboundSchema = exports2.Content$inboundSchema; @@ -60979,23 +61462,23 @@ var require_deltamessage = __commonJS({ return JSON.stringify(exports2.Content$outboundSchema.parse(content)); } function contentFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Content$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Content' from JSON`); - } - exports2.DeltaMessage$inboundSchema = z3.object({ - role: z3.nullable(z3.string()).optional(), - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), - tool_calls: z3.nullable(z3.array(toolcall_js_1.ToolCall$inboundSchema)).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Content$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Content' from JSON`); + } + exports2.DeltaMessage$inboundSchema = z4.object({ + role: z4.nullable(z4.string()).optional(), + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$inboundSchema)])).optional(), + tool_calls: z4.nullable(z4.array(toolcall_js_1.ToolCall$inboundSchema)).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "tool_calls": "toolCalls" }); }); - exports2.DeltaMessage$outboundSchema = z3.object({ - role: z3.nullable(z3.string()).optional(), - content: z3.nullable(z3.union([z3.string(), z3.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), - toolCalls: z3.nullable(z3.array(toolcall_js_1.ToolCall$outboundSchema)).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.DeltaMessage$outboundSchema = z4.object({ + role: z4.nullable(z4.string()).optional(), + content: z4.nullable(z4.union([z4.string(), z4.array(contentchunk_js_1.ContentChunk$outboundSchema)])).optional(), + toolCalls: z4.nullable(z4.array(toolcall_js_1.ToolCall$outboundSchema)).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { toolCalls: "tool_calls" }); }); @@ -61008,7 +61491,7 @@ var require_deltamessage = __commonJS({ return JSON.stringify(exports2.DeltaMessage$outboundSchema.parse(deltaMessage)); } function deltaMessageFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DeltaMessage$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DeltaMessage' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DeltaMessage$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DeltaMessage' from JSON`); } } }); @@ -61017,38 +61500,38 @@ var require_deltamessage = __commonJS({ var require_completionresponsestreamchoice = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionresponsestreamchoice.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionResponseStreamChoice$ = exports2.CompletionResponseStreamChoice$outboundSchema = exports2.CompletionResponseStreamChoice$inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$ = exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason = void 0; exports2.completionResponseStreamChoiceToJSON = completionResponseStreamChoiceToJSON; exports2.completionResponseStreamChoiceFromJSON = completionResponseStreamChoiceFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var enums_js_1 = require_enums(); @@ -61059,34 +61542,34 @@ var require_completionresponsestreamchoice = __commonJS({ Error: "error", ToolCalls: "tool_calls" }; - exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = z3.union([ - z3.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema = z4.union([ + z4.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = z3.union([ - z3.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), - z3.string().and(z3.custom()) + exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema = z4.union([ + z4.nativeEnum(exports2.CompletionResponseStreamChoiceFinishReason), + z4.string().and(z4.custom()) ]); var CompletionResponseStreamChoiceFinishReason$; (function(CompletionResponseStreamChoiceFinishReason$2) { CompletionResponseStreamChoiceFinishReason$2.inboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema; CompletionResponseStreamChoiceFinishReason$2.outboundSchema = exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema; })(CompletionResponseStreamChoiceFinishReason$ || (exports2.CompletionResponseStreamChoiceFinishReason$ = CompletionResponseStreamChoiceFinishReason$ = {})); - exports2.CompletionResponseStreamChoice$inboundSchema = z3.object({ - index: z3.number().int(), + exports2.CompletionResponseStreamChoice$inboundSchema = z4.object({ + index: z4.number().int(), delta: deltamessage_js_1.DeltaMessage$inboundSchema, - finish_reason: z3.nullable(exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + finish_reason: z4.nullable(exports2.CompletionResponseStreamChoiceFinishReason$inboundSchema) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "finish_reason": "finishReason" }); }); - exports2.CompletionResponseStreamChoice$outboundSchema = z3.object({ - index: z3.number().int(), + exports2.CompletionResponseStreamChoice$outboundSchema = z4.object({ + index: z4.number().int(), delta: deltamessage_js_1.DeltaMessage$outboundSchema, - finishReason: z3.nullable(exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + finishReason: z4.nullable(exports2.CompletionResponseStreamChoiceFinishReason$outboundSchema) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { finishReason: "finish_reason" }); }); @@ -61099,7 +61582,7 @@ var require_completionresponsestreamchoice = __commonJS({ return JSON.stringify(exports2.CompletionResponseStreamChoice$outboundSchema.parse(completionResponseStreamChoice)); } function completionResponseStreamChoiceFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.CompletionResponseStreamChoice$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'CompletionResponseStreamChoice' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.CompletionResponseStreamChoice$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'CompletionResponseStreamChoice' from JSON`); } } }); @@ -61108,56 +61591,56 @@ var require_completionresponsestreamchoice = __commonJS({ var require_completionchunk = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionchunk.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionChunk$ = exports2.CompletionChunk$outboundSchema = exports2.CompletionChunk$inboundSchema = void 0; exports2.completionChunkToJSON = completionChunkToJSON; exports2.completionChunkFromJSON = completionChunkFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var completionresponsestreamchoice_js_1 = require_completionresponsestreamchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.CompletionChunk$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string().optional(), - created: z3.number().int().optional(), - model: z3.string(), + exports2.CompletionChunk$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string().optional(), + created: z4.number().int().optional(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema.optional(), - choices: z3.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$inboundSchema) + choices: z4.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$inboundSchema) }); - exports2.CompletionChunk$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string().optional(), - created: z3.number().int().optional(), - model: z3.string(), + exports2.CompletionChunk$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string().optional(), + created: z4.number().int().optional(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema.optional(), - choices: z3.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$outboundSchema) + choices: z4.array(completionresponsestreamchoice_js_1.CompletionResponseStreamChoice$outboundSchema) }); var CompletionChunk$; (function(CompletionChunk$2) { @@ -61168,7 +61651,7 @@ var require_completionchunk = __commonJS({ return JSON.stringify(exports2.CompletionChunk$outboundSchema.parse(completionChunk)); } function completionChunkFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.CompletionChunk$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'CompletionChunk' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.CompletionChunk$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'CompletionChunk' from JSON`); } } }); @@ -61177,54 +61660,54 @@ var require_completionchunk = __commonJS({ var require_completionevent = __commonJS({ "node_modules/@mistralai/mistralai/models/components/completionevent.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CompletionEvent$ = exports2.CompletionEvent$outboundSchema = exports2.CompletionEvent$inboundSchema = void 0; exports2.completionEventToJSON = completionEventToJSON; exports2.completionEventFromJSON = completionEventFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var completionchunk_js_1 = require_completionchunk(); - exports2.CompletionEvent$inboundSchema = z3.object({ - data: z3.string().transform((v2, ctx) => { + exports2.CompletionEvent$inboundSchema = z4.object({ + data: z4.string().transform((v7, ctx) => { try { - return JSON.parse(v2); + return JSON.parse(v7); } catch (err) { ctx.addIssue({ - code: z3.ZodIssueCode.custom, + code: z4.ZodIssueCode.custom, message: `malformed json: ${err}` }); - return z3.NEVER; + return z4.NEVER; } }).pipe(completionchunk_js_1.CompletionChunk$inboundSchema) }); - exports2.CompletionEvent$outboundSchema = z3.object({ + exports2.CompletionEvent$outboundSchema = z4.object({ data: completionchunk_js_1.CompletionChunk$outboundSchema }); var CompletionEvent$; @@ -61236,7 +61719,7 @@ var require_completionevent = __commonJS({ return JSON.stringify(exports2.CompletionEvent$outboundSchema.parse(completionEvent)); } function completionEventFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.CompletionEvent$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'CompletionEvent' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.CompletionEvent$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'CompletionEvent' from JSON`); } } }); @@ -61245,48 +61728,48 @@ var require_completionevent = __commonJS({ var require_deletefileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deletefileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteFileOut$ = exports2.DeleteFileOut$outboundSchema = exports2.DeleteFileOut$inboundSchema = void 0; exports2.deleteFileOutToJSON = deleteFileOutToJSON; exports2.deleteFileOutFromJSON = deleteFileOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.DeleteFileOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - deleted: z3.boolean() + exports2.DeleteFileOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + deleted: z4.boolean() }); - exports2.DeleteFileOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - deleted: z3.boolean() + exports2.DeleteFileOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + deleted: z4.boolean() }); var DeleteFileOut$; (function(DeleteFileOut$2) { @@ -61297,7 +61780,7 @@ var require_deletefileout = __commonJS({ return JSON.stringify(exports2.DeleteFileOut$outboundSchema.parse(deleteFileOut)); } function deleteFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DeleteFileOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DeleteFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DeleteFileOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DeleteFileOut' from JSON`); } } }); @@ -61306,48 +61789,48 @@ var require_deletefileout = __commonJS({ var require_deletemodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/deletemodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteModelOut$ = exports2.DeleteModelOut$outboundSchema = exports2.DeleteModelOut$inboundSchema = void 0; exports2.deleteModelOutToJSON = deleteModelOutToJSON; exports2.deleteModelOutFromJSON = deleteModelOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.DeleteModelOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - deleted: z3.boolean().default(true) + exports2.DeleteModelOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + deleted: z4.boolean().default(true) }); - exports2.DeleteModelOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - deleted: z3.boolean().default(true) + exports2.DeleteModelOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + deleted: z4.boolean().default(true) }); var DeleteModelOut$; (function(DeleteModelOut$2) { @@ -61358,7 +61841,7 @@ var require_deletemodelout = __commonJS({ return JSON.stringify(exports2.DeleteModelOut$outboundSchema.parse(deleteModelOut)); } function deleteModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DeleteModelOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DeleteModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DeleteModelOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DeleteModelOut' from JSON`); } } }); @@ -61367,55 +61850,55 @@ var require_deletemodelout = __commonJS({ var require_eventout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/eventout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EventOut$ = exports2.EventOut$outboundSchema = exports2.EventOut$inboundSchema = void 0; exports2.eventOutToJSON = eventOutToJSON; exports2.eventOutFromJSON = eventOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.EventOut$inboundSchema = z3.object({ - name: z3.string(), - data: z3.nullable(z3.record(z3.any())).optional(), - created_at: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.EventOut$inboundSchema = z4.object({ + name: z4.string(), + data: z4.nullable(z4.record(z4.any())).optional(), + created_at: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "created_at": "createdAt" }); }); - exports2.EventOut$outboundSchema = z3.object({ - name: z3.string(), - data: z3.nullable(z3.record(z3.any())).optional(), - createdAt: z3.number().int() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.EventOut$outboundSchema = z4.object({ + name: z4.string(), + data: z4.nullable(z4.record(z4.any())).optional(), + createdAt: z4.number().int() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { createdAt: "created_at" }); }); @@ -61428,7 +61911,7 @@ var require_eventout = __commonJS({ return JSON.stringify(exports2.EventOut$outboundSchema.parse(eventOut)); } function eventOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.EventOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'EventOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.EventOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'EventOut' from JSON`); } } }); @@ -61437,71 +61920,71 @@ var require_eventout = __commonJS({ var require_githubrepositoryout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/githubrepositoryout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GithubRepositoryOut$ = exports2.GithubRepositoryOut$outboundSchema = exports2.GithubRepositoryOut$inboundSchema = exports2.GithubRepositoryOutType$ = exports2.GithubRepositoryOutType$outboundSchema = exports2.GithubRepositoryOutType$inboundSchema = exports2.GithubRepositoryOutType = void 0; exports2.githubRepositoryOutToJSON = githubRepositoryOutToJSON; exports2.githubRepositoryOutFromJSON = githubRepositoryOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.GithubRepositoryOutType = { Github: "github" }; - exports2.GithubRepositoryOutType$inboundSchema = z3.nativeEnum(exports2.GithubRepositoryOutType); + exports2.GithubRepositoryOutType$inboundSchema = z4.nativeEnum(exports2.GithubRepositoryOutType); exports2.GithubRepositoryOutType$outboundSchema = exports2.GithubRepositoryOutType$inboundSchema; var GithubRepositoryOutType$; (function(GithubRepositoryOutType$2) { GithubRepositoryOutType$2.inboundSchema = exports2.GithubRepositoryOutType$inboundSchema; GithubRepositoryOutType$2.outboundSchema = exports2.GithubRepositoryOutType$outboundSchema; })(GithubRepositoryOutType$ || (exports2.GithubRepositoryOutType$ = GithubRepositoryOutType$ = {})); - exports2.GithubRepositoryOut$inboundSchema = z3.object({ - type: z3.literal("github").default("github"), - name: z3.string(), - owner: z3.string(), - ref: z3.nullable(z3.string()).optional(), - weight: z3.number().default(1), - commit_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.GithubRepositoryOut$inboundSchema = z4.object({ + type: z4.literal("github").default("github"), + name: z4.string(), + owner: z4.string(), + ref: z4.nullable(z4.string()).optional(), + weight: z4.number().default(1), + commit_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "commit_id": "commitId" }); }); - exports2.GithubRepositoryOut$outboundSchema = z3.object({ - type: z3.literal("github").default("github"), - name: z3.string(), - owner: z3.string(), - ref: z3.nullable(z3.string()).optional(), - weight: z3.number().default(1), - commitId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.GithubRepositoryOut$outboundSchema = z4.object({ + type: z4.literal("github").default("github"), + name: z4.string(), + owner: z4.string(), + ref: z4.nullable(z4.string()).optional(), + weight: z4.number().default(1), + commitId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { commitId: "commit_id" }); }); @@ -61514,7 +61997,7 @@ var require_githubrepositoryout = __commonJS({ return JSON.stringify(exports2.GithubRepositoryOut$outboundSchema.parse(githubRepositoryOut)); } function githubRepositoryOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.GithubRepositoryOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'GithubRepositoryOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.GithubRepositoryOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'GithubRepositoryOut' from JSON`); } } }); @@ -61523,50 +62006,50 @@ var require_githubrepositoryout = __commonJS({ var require_jobmetadataout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobmetadataout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobMetadataOut$ = exports2.JobMetadataOut$outboundSchema = exports2.JobMetadataOut$inboundSchema = void 0; exports2.jobMetadataOutToJSON = jobMetadataOutToJSON; exports2.jobMetadataOutFromJSON = jobMetadataOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobMetadataOut$inboundSchema = z3.object({ - expected_duration_seconds: z3.nullable(z3.number().int()).optional(), - cost: z3.nullable(z3.number()).optional(), - cost_currency: z3.nullable(z3.string()).optional(), - train_tokens_per_step: z3.nullable(z3.number().int()).optional(), - train_tokens: z3.nullable(z3.number().int()).optional(), - data_tokens: z3.nullable(z3.number().int()).optional(), - estimated_start_time: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobMetadataOut$inboundSchema = z4.object({ + expected_duration_seconds: z4.nullable(z4.number().int()).optional(), + cost: z4.nullable(z4.number()).optional(), + cost_currency: z4.nullable(z4.string()).optional(), + train_tokens_per_step: z4.nullable(z4.number().int()).optional(), + train_tokens: z4.nullable(z4.number().int()).optional(), + data_tokens: z4.nullable(z4.number().int()).optional(), + estimated_start_time: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "expected_duration_seconds": "expectedDurationSeconds", "cost_currency": "costCurrency", "train_tokens_per_step": "trainTokensPerStep", @@ -61575,16 +62058,16 @@ var require_jobmetadataout = __commonJS({ "estimated_start_time": "estimatedStartTime" }); }); - exports2.JobMetadataOut$outboundSchema = z3.object({ - expectedDurationSeconds: z3.nullable(z3.number().int()).optional(), - cost: z3.nullable(z3.number()).optional(), - costCurrency: z3.nullable(z3.string()).optional(), - trainTokensPerStep: z3.nullable(z3.number().int()).optional(), - trainTokens: z3.nullable(z3.number().int()).optional(), - dataTokens: z3.nullable(z3.number().int()).optional(), - estimatedStartTime: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobMetadataOut$outboundSchema = z4.object({ + expectedDurationSeconds: z4.nullable(z4.number().int()).optional(), + cost: z4.nullable(z4.number()).optional(), + costCurrency: z4.nullable(z4.string()).optional(), + trainTokensPerStep: z4.nullable(z4.number().int()).optional(), + trainTokens: z4.nullable(z4.number().int()).optional(), + dataTokens: z4.nullable(z4.number().int()).optional(), + estimatedStartTime: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { expectedDurationSeconds: "expected_duration_seconds", costCurrency: "cost_currency", trainTokensPerStep: "train_tokens_per_step", @@ -61602,7 +62085,7 @@ var require_jobmetadataout = __commonJS({ return JSON.stringify(exports2.JobMetadataOut$outboundSchema.parse(jobMetadataOut)); } function jobMetadataOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobMetadataOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobMetadataOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobMetadataOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobMetadataOut' from JSON`); } } }); @@ -61611,50 +62094,50 @@ var require_jobmetadataout = __commonJS({ var require_trainingparameters = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingparameters.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingParameters$ = exports2.TrainingParameters$outboundSchema = exports2.TrainingParameters$inboundSchema = void 0; exports2.trainingParametersToJSON = trainingParametersToJSON; exports2.trainingParametersFromJSON = trainingParametersFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingParameters$inboundSchema = z3.object({ - training_steps: z3.nullable(z3.number().int()).optional(), - learning_rate: z3.number().default(1e-4), - weight_decay: z3.nullable(z3.number()).optional(), - warmup_fraction: z3.nullable(z3.number()).optional(), - epochs: z3.nullable(z3.number()).optional(), - fim_ratio: z3.nullable(z3.number()).optional(), - seq_len: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingParameters$inboundSchema = z4.object({ + training_steps: z4.nullable(z4.number().int()).optional(), + learning_rate: z4.number().default(1e-4), + weight_decay: z4.nullable(z4.number()).optional(), + warmup_fraction: z4.nullable(z4.number()).optional(), + epochs: z4.nullable(z4.number()).optional(), + fim_ratio: z4.nullable(z4.number()).optional(), + seq_len: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "training_steps": "trainingSteps", "learning_rate": "learningRate", "weight_decay": "weightDecay", @@ -61663,16 +62146,16 @@ var require_trainingparameters = __commonJS({ "seq_len": "seqLen" }); }); - exports2.TrainingParameters$outboundSchema = z3.object({ - trainingSteps: z3.nullable(z3.number().int()).optional(), - learningRate: z3.number().default(1e-4), - weightDecay: z3.nullable(z3.number()).optional(), - warmupFraction: z3.nullable(z3.number()).optional(), - epochs: z3.nullable(z3.number()).optional(), - fimRatio: z3.nullable(z3.number()).optional(), - seqLen: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingParameters$outboundSchema = z4.object({ + trainingSteps: z4.nullable(z4.number().int()).optional(), + learningRate: z4.number().default(1e-4), + weightDecay: z4.nullable(z4.number()).optional(), + warmupFraction: z4.nullable(z4.number()).optional(), + epochs: z4.nullable(z4.number()).optional(), + fimRatio: z4.nullable(z4.number()).optional(), + seqLen: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { trainingSteps: "training_steps", learningRate: "learning_rate", weightDecay: "weight_decay", @@ -61690,7 +62173,7 @@ var require_trainingparameters = __commonJS({ return JSON.stringify(exports2.TrainingParameters$outboundSchema.parse(trainingParameters)); } function trainingParametersFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.TrainingParameters$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'TrainingParameters' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.TrainingParameters$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'TrainingParameters' from JSON`); } } }); @@ -61699,67 +62182,67 @@ var require_trainingparameters = __commonJS({ var require_wandbintegrationout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/wandbintegrationout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WandbIntegrationOut$ = exports2.WandbIntegrationOut$outboundSchema = exports2.WandbIntegrationOut$inboundSchema = exports2.WandbIntegrationOutType$ = exports2.WandbIntegrationOutType$outboundSchema = exports2.WandbIntegrationOutType$inboundSchema = exports2.WandbIntegrationOutType = void 0; exports2.wandbIntegrationOutToJSON = wandbIntegrationOutToJSON; exports2.wandbIntegrationOutFromJSON = wandbIntegrationOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.WandbIntegrationOutType = { Wandb: "wandb" }; - exports2.WandbIntegrationOutType$inboundSchema = z3.nativeEnum(exports2.WandbIntegrationOutType); + exports2.WandbIntegrationOutType$inboundSchema = z4.nativeEnum(exports2.WandbIntegrationOutType); exports2.WandbIntegrationOutType$outboundSchema = exports2.WandbIntegrationOutType$inboundSchema; var WandbIntegrationOutType$; (function(WandbIntegrationOutType$2) { WandbIntegrationOutType$2.inboundSchema = exports2.WandbIntegrationOutType$inboundSchema; WandbIntegrationOutType$2.outboundSchema = exports2.WandbIntegrationOutType$outboundSchema; })(WandbIntegrationOutType$ || (exports2.WandbIntegrationOutType$ = WandbIntegrationOutType$ = {})); - exports2.WandbIntegrationOut$inboundSchema = z3.object({ - type: z3.literal("wandb").default("wandb"), - project: z3.string(), - name: z3.nullable(z3.string()).optional(), - run_name: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.WandbIntegrationOut$inboundSchema = z4.object({ + type: z4.literal("wandb").default("wandb"), + project: z4.string(), + name: z4.nullable(z4.string()).optional(), + run_name: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "run_name": "runName" }); }); - exports2.WandbIntegrationOut$outboundSchema = z3.object({ - type: z3.literal("wandb").default("wandb"), - project: z3.string(), - name: z3.nullable(z3.string()).optional(), - runName: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.WandbIntegrationOut$outboundSchema = z4.object({ + type: z4.literal("wandb").default("wandb"), + project: z4.string(), + name: z4.nullable(z4.string()).optional(), + runName: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { runName: "run_name" }); }); @@ -61772,7 +62255,7 @@ var require_wandbintegrationout = __commonJS({ return JSON.stringify(exports2.WandbIntegrationOut$outboundSchema.parse(wandbIntegrationOut)); } function wandbIntegrationOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.WandbIntegrationOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'WandbIntegrationOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.WandbIntegrationOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'WandbIntegrationOut' from JSON`); } } }); @@ -61781,31 +62264,31 @@ var require_wandbintegrationout = __commonJS({ var require_detailedjobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/detailedjobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -61816,7 +62299,7 @@ var require_detailedjobout = __commonJS({ exports2.detailedJobOutRepositoriesFromJSON = detailedJobOutRepositoriesFromJSON; exports2.detailedJobOutToJSON = detailedJobOutToJSON; exports2.detailedJobOutFromJSON = detailedJobOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var checkpointout_js_1 = require_checkpointout(); @@ -61840,14 +62323,14 @@ var require_detailedjobout = __commonJS({ exports2.DetailedJobOutObject = { Job: "job" }; - exports2.DetailedJobOutStatus$inboundSchema = z3.nativeEnum(exports2.DetailedJobOutStatus); + exports2.DetailedJobOutStatus$inboundSchema = z4.nativeEnum(exports2.DetailedJobOutStatus); exports2.DetailedJobOutStatus$outboundSchema = exports2.DetailedJobOutStatus$inboundSchema; var DetailedJobOutStatus$; (function(DetailedJobOutStatus$2) { DetailedJobOutStatus$2.inboundSchema = exports2.DetailedJobOutStatus$inboundSchema; DetailedJobOutStatus$2.outboundSchema = exports2.DetailedJobOutStatus$outboundSchema; })(DetailedJobOutStatus$ || (exports2.DetailedJobOutStatus$ = DetailedJobOutStatus$ = {})); - exports2.DetailedJobOutObject$inboundSchema = z3.nativeEnum(exports2.DetailedJobOutObject); + exports2.DetailedJobOutObject$inboundSchema = z4.nativeEnum(exports2.DetailedJobOutObject); exports2.DetailedJobOutObject$outboundSchema = exports2.DetailedJobOutObject$inboundSchema; var DetailedJobOutObject$; (function(DetailedJobOutObject$2) { @@ -61865,7 +62348,7 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOutIntegrations$outboundSchema.parse(detailedJobOutIntegrations)); } function detailedJobOutIntegrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DetailedJobOutIntegrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DetailedJobOutIntegrations$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DetailedJobOutIntegrations' from JSON`); } exports2.DetailedJobOutRepositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema; exports2.DetailedJobOutRepositories$outboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema; @@ -61878,30 +62361,30 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOutRepositories$outboundSchema.parse(detailedJobOutRepositories)); } function detailedJobOutRepositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DetailedJobOutRepositories$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DetailedJobOutRepositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DetailedJobOutRepositories$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DetailedJobOutRepositories' from JSON`); } - exports2.DetailedJobOut$inboundSchema = z3.object({ - id: z3.string(), - auto_start: z3.boolean(), + exports2.DetailedJobOut$inboundSchema = z4.object({ + id: z4.string(), + auto_start: z4.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$inboundSchema, - model: z3.string(), + model: z4.string(), status: exports2.DetailedJobOutStatus$inboundSchema, - job_type: z3.string(), - created_at: z3.number().int(), - modified_at: z3.number().int(), - training_files: z3.array(z3.string()), - validation_files: z3.nullable(z3.array(z3.string())).optional(), - object: z3.literal("job").default("job"), - fine_tuned_model: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), - trained_tokens: z3.nullable(z3.number().int()).optional(), - repositories: z3.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), - metadata: z3.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional(), - events: z3.array(eventout_js_1.EventOut$inboundSchema).optional(), - checkpoints: z3.array(checkpointout_js_1.CheckpointOut$inboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + job_type: z4.string(), + created_at: z4.number().int(), + modified_at: z4.number().int(), + training_files: z4.array(z4.string()), + validation_files: z4.nullable(z4.array(z4.string())).optional(), + object: z4.literal("job").default("job"), + fine_tuned_model: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), + trained_tokens: z4.nullable(z4.number().int()).optional(), + repositories: z4.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), + metadata: z4.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional(), + events: z4.array(eventout_js_1.EventOut$inboundSchema).optional(), + checkpoints: z4.array(checkpointout_js_1.CheckpointOut$inboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "auto_start": "autoStart", "job_type": "jobType", "created_at": "createdAt", @@ -61912,28 +62395,28 @@ var require_detailedjobout = __commonJS({ "trained_tokens": "trainedTokens" }); }); - exports2.DetailedJobOut$outboundSchema = z3.object({ - id: z3.string(), - autoStart: z3.boolean(), + exports2.DetailedJobOut$outboundSchema = z4.object({ + id: z4.string(), + autoStart: z4.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$outboundSchema, - model: z3.string(), + model: z4.string(), status: exports2.DetailedJobOutStatus$outboundSchema, - jobType: z3.string(), - createdAt: z3.number().int(), - modifiedAt: z3.number().int(), - trainingFiles: z3.array(z3.string()), - validationFiles: z3.nullable(z3.array(z3.string())).optional(), - object: z3.literal("job").default("job"), - fineTunedModel: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), - trainedTokens: z3.nullable(z3.number().int()).optional(), - repositories: z3.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), - metadata: z3.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional(), - events: z3.array(eventout_js_1.EventOut$outboundSchema).optional(), - checkpoints: z3.array(checkpointout_js_1.CheckpointOut$outboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + jobType: z4.string(), + createdAt: z4.number().int(), + modifiedAt: z4.number().int(), + trainingFiles: z4.array(z4.string()), + validationFiles: z4.nullable(z4.array(z4.string())).optional(), + object: z4.literal("job").default("job"), + fineTunedModel: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), + trainedTokens: z4.nullable(z4.number().int()).optional(), + repositories: z4.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), + metadata: z4.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional(), + events: z4.array(eventout_js_1.EventOut$outboundSchema).optional(), + checkpoints: z4.array(checkpointout_js_1.CheckpointOut$outboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { autoStart: "auto_start", jobType: "job_type", createdAt: "created_at", @@ -61953,7 +62436,7 @@ var require_detailedjobout = __commonJS({ return JSON.stringify(exports2.DetailedJobOut$outboundSchema.parse(detailedJobOut)); } function detailedJobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DetailedJobOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DetailedJobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DetailedJobOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DetailedJobOut' from JSON`); } } }); @@ -61962,31 +62445,31 @@ var require_detailedjobout = __commonJS({ var require_embeddingrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -61995,11 +62478,11 @@ var require_embeddingrequest = __commonJS({ exports2.inputsFromJSON = inputsFromJSON; exports2.embeddingRequestToJSON = embeddingRequestToJSON; exports2.embeddingRequestFromJSON = embeddingRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.Inputs$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.Inputs$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.Inputs$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.Inputs$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var Inputs$; (function(Inputs$2) { Inputs$2.inboundSchema = exports2.Inputs$inboundSchema; @@ -62009,24 +62492,24 @@ var require_embeddingrequest = __commonJS({ return JSON.stringify(exports2.Inputs$outboundSchema.parse(inputs)); } function inputsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Inputs$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Inputs' from JSON`); - } - exports2.EmbeddingRequest$inboundSchema = z3.object({ - input: z3.union([z3.string(), z3.array(z3.string())]), - model: z3.string().default("mistral-embed"), - encoding_format: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Inputs$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Inputs' from JSON`); + } + exports2.EmbeddingRequest$inboundSchema = z4.object({ + input: z4.union([z4.string(), z4.array(z4.string())]), + model: z4.string().default("mistral-embed"), + encoding_format: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "input": "inputs", "encoding_format": "encodingFormat" }); }); - exports2.EmbeddingRequest$outboundSchema = z3.object({ - inputs: z3.union([z3.string(), z3.array(z3.string())]), - model: z3.string().default("mistral-embed"), - encodingFormat: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.EmbeddingRequest$outboundSchema = z4.object({ + inputs: z4.union([z4.string(), z4.array(z4.string())]), + model: z4.string().default("mistral-embed"), + encodingFormat: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { inputs: "input", encodingFormat: "encoding_format" }); @@ -62040,7 +62523,7 @@ var require_embeddingrequest = __commonJS({ return JSON.stringify(exports2.EmbeddingRequest$outboundSchema.parse(embeddingRequest)); } function embeddingRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.EmbeddingRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'EmbeddingRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.EmbeddingRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'EmbeddingRequest' from JSON`); } } }); @@ -62049,48 +62532,48 @@ var require_embeddingrequest = __commonJS({ var require_embeddingresponsedata = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingresponsedata.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EmbeddingResponseData$ = exports2.EmbeddingResponseData$outboundSchema = exports2.EmbeddingResponseData$inboundSchema = void 0; exports2.embeddingResponseDataToJSON = embeddingResponseDataToJSON; exports2.embeddingResponseDataFromJSON = embeddingResponseDataFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.EmbeddingResponseData$inboundSchema = z3.object({ - object: z3.string().optional(), - embedding: z3.array(z3.number()).optional(), - index: z3.number().int().optional() + exports2.EmbeddingResponseData$inboundSchema = z4.object({ + object: z4.string().optional(), + embedding: z4.array(z4.number()).optional(), + index: z4.number().int().optional() }); - exports2.EmbeddingResponseData$outboundSchema = z3.object({ - object: z3.string().optional(), - embedding: z3.array(z3.number()).optional(), - index: z3.number().int().optional() + exports2.EmbeddingResponseData$outboundSchema = z4.object({ + object: z4.string().optional(), + embedding: z4.array(z4.number()).optional(), + index: z4.number().int().optional() }); var EmbeddingResponseData$; (function(EmbeddingResponseData$2) { @@ -62101,7 +62584,7 @@ var require_embeddingresponsedata = __commonJS({ return JSON.stringify(exports2.EmbeddingResponseData$outboundSchema.parse(embeddingResponseData)); } function embeddingResponseDataFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.EmbeddingResponseData$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'EmbeddingResponseData' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.EmbeddingResponseData$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'EmbeddingResponseData' from JSON`); } } }); @@ -62110,54 +62593,54 @@ var require_embeddingresponsedata = __commonJS({ var require_embeddingresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/embeddingresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EmbeddingResponse$ = exports2.EmbeddingResponse$outboundSchema = exports2.EmbeddingResponse$inboundSchema = void 0; exports2.embeddingResponseToJSON = embeddingResponseToJSON; exports2.embeddingResponseFromJSON = embeddingResponseFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var embeddingresponsedata_js_1 = require_embeddingresponsedata(); var usageinfo_js_1 = require_usageinfo(); - exports2.EmbeddingResponse$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.EmbeddingResponse$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - data: z3.array(embeddingresponsedata_js_1.EmbeddingResponseData$inboundSchema) + data: z4.array(embeddingresponsedata_js_1.EmbeddingResponseData$inboundSchema) }); - exports2.EmbeddingResponse$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.EmbeddingResponse$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - data: z3.array(embeddingresponsedata_js_1.EmbeddingResponseData$outboundSchema) + data: z4.array(embeddingresponsedata_js_1.EmbeddingResponseData$outboundSchema) }); var EmbeddingResponse$; (function(EmbeddingResponse$2) { @@ -62168,7 +62651,7 @@ var require_embeddingresponse = __commonJS({ return JSON.stringify(exports2.EmbeddingResponse$outboundSchema.parse(embeddingResponse)); } function embeddingResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.EmbeddingResponse$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'EmbeddingResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.EmbeddingResponse$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'EmbeddingResponse' from JSON`); } } }); @@ -62177,48 +62660,48 @@ var require_embeddingresponse = __commonJS({ var require_filepurpose = __commonJS({ "node_modules/@mistralai/mistralai/models/components/filepurpose.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilePurpose$ = exports2.FilePurpose$outboundSchema = exports2.FilePurpose$inboundSchema = exports2.FilePurpose = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var enums_js_1 = require_enums(); exports2.FilePurpose = { FineTune: "fine-tune", Batch: "batch" }; - exports2.FilePurpose$inboundSchema = z3.union([ - z3.nativeEnum(exports2.FilePurpose), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.FilePurpose$inboundSchema = z4.union([ + z4.nativeEnum(exports2.FilePurpose), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.FilePurpose$outboundSchema = z3.union([ - z3.nativeEnum(exports2.FilePurpose), - z3.string().and(z3.custom()) + exports2.FilePurpose$outboundSchema = z4.union([ + z4.nativeEnum(exports2.FilePurpose), + z4.string().and(z4.custom()) ]); var FilePurpose$; (function(FilePurpose$2) { @@ -62232,36 +62715,36 @@ var require_filepurpose = __commonJS({ var require_sampletype = __commonJS({ "node_modules/@mistralai/mistralai/models/components/sampletype.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SampleType$ = exports2.SampleType$outboundSchema = exports2.SampleType$inboundSchema = exports2.SampleType = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var enums_js_1 = require_enums(); exports2.SampleType = { Pretrain: "pretrain", @@ -62270,13 +62753,13 @@ var require_sampletype = __commonJS({ BatchResult: "batch_result", BatchError: "batch_error" }; - exports2.SampleType$inboundSchema = z3.union([ - z3.nativeEnum(exports2.SampleType), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.SampleType$inboundSchema = z4.union([ + z4.nativeEnum(exports2.SampleType), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.SampleType$outboundSchema = z3.union([ - z3.nativeEnum(exports2.SampleType), - z3.string().and(z3.custom()) + exports2.SampleType$outboundSchema = z4.union([ + z4.nativeEnum(exports2.SampleType), + z4.string().and(z4.custom()) ]); var SampleType$; (function(SampleType$2) { @@ -62290,49 +62773,49 @@ var require_sampletype = __commonJS({ var require_source = __commonJS({ "node_modules/@mistralai/mistralai/models/components/source.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Source$ = exports2.Source$outboundSchema = exports2.Source$inboundSchema = exports2.Source = void 0; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var enums_js_1 = require_enums(); exports2.Source = { Upload: "upload", Repository: "repository", Mistral: "mistral" }; - exports2.Source$inboundSchema = z3.union([ - z3.nativeEnum(exports2.Source), - z3.string().transform(enums_js_1.catchUnrecognizedEnum) + exports2.Source$inboundSchema = z4.union([ + z4.nativeEnum(exports2.Source), + z4.string().transform(enums_js_1.catchUnrecognizedEnum) ]); - exports2.Source$outboundSchema = z3.union([ - z3.nativeEnum(exports2.Source), - z3.string().and(z3.custom()) + exports2.Source$outboundSchema = z4.union([ + z4.nativeEnum(exports2.Source), + z4.string().and(z4.custom()) ]); var Source$; (function(Source$2) { @@ -62346,72 +62829,72 @@ var require_source = __commonJS({ var require_fileschema = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fileschema.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FileSchema$ = exports2.FileSchema$outboundSchema = exports2.FileSchema$inboundSchema = void 0; exports2.fileSchemaToJSON = fileSchemaToJSON; exports2.fileSchemaFromJSON = fileSchemaFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.FileSchema$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - created_at: z3.number().int(), - filename: z3.string(), + exports2.FileSchema$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + created_at: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z3.nullable(z3.number().int()).optional(), + num_lines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$inboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.FileSchema$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - createdAt: z3.number().int(), - filename: z3.string(), + exports2.FileSchema$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + createdAt: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z3.nullable(z3.number().int()).optional(), + numLines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$outboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -62426,7 +62909,7 @@ var require_fileschema = __commonJS({ return JSON.stringify(exports2.FileSchema$outboundSchema.parse(fileSchema)); } function fileSchemaFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FileSchema$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FileSchema' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FileSchema$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FileSchema' from JSON`); } } }); @@ -62435,44 +62918,44 @@ var require_fileschema = __commonJS({ var require_filesignedurl = __commonJS({ "node_modules/@mistralai/mistralai/models/components/filesignedurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FileSignedURL$ = exports2.FileSignedURL$outboundSchema = exports2.FileSignedURL$inboundSchema = void 0; exports2.fileSignedURLToJSON = fileSignedURLToJSON; exports2.fileSignedURLFromJSON = fileSignedURLFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.FileSignedURL$inboundSchema = z3.object({ - url: z3.string() + exports2.FileSignedURL$inboundSchema = z4.object({ + url: z4.string() }); - exports2.FileSignedURL$outboundSchema = z3.object({ - url: z3.string() + exports2.FileSignedURL$outboundSchema = z4.object({ + url: z4.string() }); var FileSignedURL$; (function(FileSignedURL$2) { @@ -62483,7 +62966,7 @@ var require_filesignedurl = __commonJS({ return JSON.stringify(exports2.FileSignedURL$outboundSchema.parse(fileSignedURL)); } function fileSignedURLFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FileSignedURL$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FileSignedURL' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FileSignedURL$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FileSignedURL' from JSON`); } } }); @@ -62492,31 +62975,31 @@ var require_filesignedurl = __commonJS({ var require_fimcompletionrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -62525,11 +63008,11 @@ var require_fimcompletionrequest = __commonJS({ exports2.fimCompletionRequestStopFromJSON = fimCompletionRequestStopFromJSON; exports2.fimCompletionRequestToJSON = fimCompletionRequestToJSON; exports2.fimCompletionRequestFromJSON = fimCompletionRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FIMCompletionRequestStop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.FIMCompletionRequestStop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.FIMCompletionRequestStop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.FIMCompletionRequestStop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var FIMCompletionRequestStop$; (function(FIMCompletionRequestStop$2) { FIMCompletionRequestStop$2.inboundSchema = exports2.FIMCompletionRequestStop$inboundSchema; @@ -62539,40 +63022,40 @@ var require_fimcompletionrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionRequestStop$outboundSchema.parse(fimCompletionRequestStop)); } function fimCompletionRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FIMCompletionRequestStop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FIMCompletionRequestStop' from JSON`); - } - exports2.FIMCompletionRequest$inboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - top_p: z3.number().default(1), - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - prompt: z3.string(), - suffix: z3.nullable(z3.string()).optional(), - min_tokens: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FIMCompletionRequestStop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FIMCompletionRequestStop' from JSON`); + } + exports2.FIMCompletionRequest$inboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + top_p: z4.number().default(1), + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + prompt: z4.string(), + suffix: z4.nullable(z4.string()).optional(), + min_tokens: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", "min_tokens": "minTokens" }); }); - exports2.FIMCompletionRequest$outboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - topP: z3.number().default(1), - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(false), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - prompt: z3.string(), - suffix: z3.nullable(z3.string()).optional(), - minTokens: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FIMCompletionRequest$outboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + topP: z4.number().default(1), + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(false), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + prompt: z4.string(), + suffix: z4.nullable(z4.string()).optional(), + minTokens: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -62588,7 +63071,7 @@ var require_fimcompletionrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionRequest$outboundSchema.parse(fimCompletionRequest)); } function fimCompletionRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FIMCompletionRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FIMCompletionRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FIMCompletionRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FIMCompletionRequest' from JSON`); } } }); @@ -62597,56 +63080,56 @@ var require_fimcompletionrequest = __commonJS({ var require_fimcompletionresponse = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionresponse.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FIMCompletionResponse$ = exports2.FIMCompletionResponse$outboundSchema = exports2.FIMCompletionResponse$inboundSchema = void 0; exports2.fimCompletionResponseToJSON = fimCompletionResponseToJSON; exports2.fimCompletionResponseFromJSON = fimCompletionResponseFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var chatcompletionchoice_js_1 = require_chatcompletionchoice(); var usageinfo_js_1 = require_usageinfo(); - exports2.FIMCompletionResponse$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.FIMCompletionResponse$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$inboundSchema, - created: z3.number().int().optional(), - choices: z3.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() + created: z4.number().int().optional(), + choices: z4.array(chatcompletionchoice_js_1.ChatCompletionChoice$inboundSchema).optional() }); - exports2.FIMCompletionResponse$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - model: z3.string(), + exports2.FIMCompletionResponse$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + model: z4.string(), usage: usageinfo_js_1.UsageInfo$outboundSchema, - created: z3.number().int().optional(), - choices: z3.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() + created: z4.number().int().optional(), + choices: z4.array(chatcompletionchoice_js_1.ChatCompletionChoice$outboundSchema).optional() }); var FIMCompletionResponse$; (function(FIMCompletionResponse$2) { @@ -62657,7 +63140,7 @@ var require_fimcompletionresponse = __commonJS({ return JSON.stringify(exports2.FIMCompletionResponse$outboundSchema.parse(fimCompletionResponse)); } function fimCompletionResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FIMCompletionResponse$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FIMCompletionResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FIMCompletionResponse$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FIMCompletionResponse' from JSON`); } } }); @@ -62666,31 +63149,31 @@ var require_fimcompletionresponse = __commonJS({ var require_fimcompletionstreamrequest = __commonJS({ "node_modules/@mistralai/mistralai/models/components/fimcompletionstreamrequest.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -62699,11 +63182,11 @@ var require_fimcompletionstreamrequest = __commonJS({ exports2.fimCompletionStreamRequestStopFromJSON = fimCompletionStreamRequestStopFromJSON; exports2.fimCompletionStreamRequestToJSON = fimCompletionStreamRequestToJSON; exports2.fimCompletionStreamRequestFromJSON = fimCompletionStreamRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FIMCompletionStreamRequestStop$inboundSchema = z3.union([z3.string(), z3.array(z3.string())]); - exports2.FIMCompletionStreamRequestStop$outboundSchema = z3.union([z3.string(), z3.array(z3.string())]); + exports2.FIMCompletionStreamRequestStop$inboundSchema = z4.union([z4.string(), z4.array(z4.string())]); + exports2.FIMCompletionStreamRequestStop$outboundSchema = z4.union([z4.string(), z4.array(z4.string())]); var FIMCompletionStreamRequestStop$; (function(FIMCompletionStreamRequestStop$2) { FIMCompletionStreamRequestStop$2.inboundSchema = exports2.FIMCompletionStreamRequestStop$inboundSchema; @@ -62713,40 +63196,40 @@ var require_fimcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionStreamRequestStop$outboundSchema.parse(fimCompletionStreamRequestStop)); } function fimCompletionStreamRequestStopFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FIMCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FIMCompletionStreamRequestStop' from JSON`); - } - exports2.FIMCompletionStreamRequest$inboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - top_p: z3.number().default(1), - max_tokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - random_seed: z3.nullable(z3.number().int()).optional(), - prompt: z3.string(), - suffix: z3.nullable(z3.string()).optional(), - min_tokens: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FIMCompletionStreamRequestStop$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FIMCompletionStreamRequestStop' from JSON`); + } + exports2.FIMCompletionStreamRequest$inboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + top_p: z4.number().default(1), + max_tokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + random_seed: z4.nullable(z4.number().int()).optional(), + prompt: z4.string(), + suffix: z4.nullable(z4.string()).optional(), + min_tokens: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "top_p": "topP", "max_tokens": "maxTokens", "random_seed": "randomSeed", "min_tokens": "minTokens" }); }); - exports2.FIMCompletionStreamRequest$outboundSchema = z3.object({ - model: z3.nullable(z3.string()), - temperature: z3.nullable(z3.number()).optional(), - topP: z3.number().default(1), - maxTokens: z3.nullable(z3.number().int()).optional(), - stream: z3.boolean().default(true), - stop: z3.union([z3.string(), z3.array(z3.string())]).optional(), - randomSeed: z3.nullable(z3.number().int()).optional(), - prompt: z3.string(), - suffix: z3.nullable(z3.string()).optional(), - minTokens: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FIMCompletionStreamRequest$outboundSchema = z4.object({ + model: z4.nullable(z4.string()), + temperature: z4.nullable(z4.number()).optional(), + topP: z4.number().default(1), + maxTokens: z4.nullable(z4.number().int()).optional(), + stream: z4.boolean().default(true), + stop: z4.union([z4.string(), z4.array(z4.string())]).optional(), + randomSeed: z4.nullable(z4.number().int()).optional(), + prompt: z4.string(), + suffix: z4.nullable(z4.string()).optional(), + minTokens: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { topP: "top_p", maxTokens: "max_tokens", randomSeed: "random_seed", @@ -62762,7 +63245,7 @@ var require_fimcompletionstreamrequest = __commonJS({ return JSON.stringify(exports2.FIMCompletionStreamRequest$outboundSchema.parse(fimCompletionStreamRequest)); } function fimCompletionStreamRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FIMCompletionStreamRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FIMCompletionStreamRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FIMCompletionStreamRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FIMCompletionStreamRequest' from JSON`); } } }); @@ -62771,60 +63254,60 @@ var require_fimcompletionstreamrequest = __commonJS({ var require_ftmodelcapabilitiesout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelcapabilitiesout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelCapabilitiesOut$ = exports2.FTModelCapabilitiesOut$outboundSchema = exports2.FTModelCapabilitiesOut$inboundSchema = void 0; exports2.ftModelCapabilitiesOutToJSON = ftModelCapabilitiesOutToJSON; exports2.ftModelCapabilitiesOutFromJSON = ftModelCapabilitiesOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FTModelCapabilitiesOut$inboundSchema = z3.object({ - completion_chat: z3.boolean().default(true), - completion_fim: z3.boolean().default(false), - function_calling: z3.boolean().default(false), - fine_tuning: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FTModelCapabilitiesOut$inboundSchema = z4.object({ + completion_chat: z4.boolean().default(true), + completion_fim: z4.boolean().default(false), + function_calling: z4.boolean().default(false), + fine_tuning: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "completion_chat": "completionChat", "completion_fim": "completionFim", "function_calling": "functionCalling", "fine_tuning": "fineTuning" }); }); - exports2.FTModelCapabilitiesOut$outboundSchema = z3.object({ - completionChat: z3.boolean().default(true), - completionFim: z3.boolean().default(false), - functionCalling: z3.boolean().default(false), - fineTuning: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FTModelCapabilitiesOut$outboundSchema = z4.object({ + completionChat: z4.boolean().default(true), + completionFim: z4.boolean().default(false), + functionCalling: z4.boolean().default(false), + fineTuning: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { completionChat: "completion_chat", completionFim: "completion_fim", functionCalling: "function_calling", @@ -62840,7 +63323,7 @@ var require_ftmodelcapabilitiesout = __commonJS({ return JSON.stringify(exports2.FTModelCapabilitiesOut$outboundSchema.parse(ftModelCapabilitiesOut)); } function ftModelCapabilitiesOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FTModelCapabilitiesOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FTModelCapabilitiesOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FTModelCapabilitiesOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FTModelCapabilitiesOut' from JSON`); } } }); @@ -62849,92 +63332,92 @@ var require_ftmodelcapabilitiesout = __commonJS({ var require_ftmodelcard = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelcard.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelCard$ = exports2.FTModelCard$outboundSchema = exports2.FTModelCard$inboundSchema = exports2.FTModelCardType$ = exports2.FTModelCardType$outboundSchema = exports2.FTModelCardType$inboundSchema = exports2.FTModelCardType = void 0; exports2.ftModelCardToJSON = ftModelCardToJSON; exports2.ftModelCardFromJSON = ftModelCardFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var modelcapabilities_js_1 = require_modelcapabilities(); exports2.FTModelCardType = { FineTuned: "fine-tuned" }; - exports2.FTModelCardType$inboundSchema = z3.nativeEnum(exports2.FTModelCardType); + exports2.FTModelCardType$inboundSchema = z4.nativeEnum(exports2.FTModelCardType); exports2.FTModelCardType$outboundSchema = exports2.FTModelCardType$inboundSchema; var FTModelCardType$; (function(FTModelCardType$2) { FTModelCardType$2.inboundSchema = exports2.FTModelCardType$inboundSchema; FTModelCardType$2.outboundSchema = exports2.FTModelCardType$outboundSchema; })(FTModelCardType$ || (exports2.FTModelCardType$ = FTModelCardType$ = {})); - exports2.FTModelCard$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - created: z3.number().int().optional(), - owned_by: z3.string().default("mistralai"), + exports2.FTModelCard$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + created: z4.number().int().optional(), + owned_by: z4.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$inboundSchema, - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), - max_context_length: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - deprecation: z3.nullable(z3.string().datetime({ offset: true }).transform((v2) => new Date(v2))).optional(), - default_model_temperature: z3.nullable(z3.number()).optional(), - type: z3.literal("fine-tuned").default("fine-tuned"), - job: z3.string(), - root: z3.string(), - archived: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), + max_context_length: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + deprecation: z4.nullable(z4.string().datetime({ offset: true }).transform((v7) => new Date(v7))).optional(), + default_model_temperature: z4.nullable(z4.number()).optional(), + type: z4.literal("fine-tuned").default("fine-tuned"), + job: z4.string(), + root: z4.string(), + archived: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "owned_by": "ownedBy", "max_context_length": "maxContextLength", "default_model_temperature": "defaultModelTemperature" }); }); - exports2.FTModelCard$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string().default("model"), - created: z3.number().int().optional(), - ownedBy: z3.string().default("mistralai"), + exports2.FTModelCard$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string().default("model"), + created: z4.number().int().optional(), + ownedBy: z4.string().default("mistralai"), capabilities: modelcapabilities_js_1.ModelCapabilities$outboundSchema, - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), - maxContextLength: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - deprecation: z3.nullable(z3.date().transform((v2) => v2.toISOString())).optional(), - defaultModelTemperature: z3.nullable(z3.number()).optional(), - type: z3.literal("fine-tuned").default("fine-tuned"), - job: z3.string(), - root: z3.string(), - archived: z3.boolean().default(false) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), + maxContextLength: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + deprecation: z4.nullable(z4.date().transform((v7) => v7.toISOString())).optional(), + defaultModelTemperature: z4.nullable(z4.number()).optional(), + type: z4.literal("fine-tuned").default("fine-tuned"), + job: z4.string(), + root: z4.string(), + archived: z4.boolean().default(false) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { ownedBy: "owned_by", maxContextLength: "max_context_length", defaultModelTemperature: "default_model_temperature" @@ -62949,7 +63432,7 @@ var require_ftmodelcard = __commonJS({ return JSON.stringify(exports2.FTModelCard$outboundSchema.parse(ftModelCard)); } function ftModelCardFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FTModelCard$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FTModelCard' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FTModelCard$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FTModelCard' from JSON`); } } }); @@ -62958,85 +63441,85 @@ var require_ftmodelcard = __commonJS({ var require_ftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/ftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FTModelOut$ = exports2.FTModelOut$outboundSchema = exports2.FTModelOut$inboundSchema = exports2.FTModelOutObject$ = exports2.FTModelOutObject$outboundSchema = exports2.FTModelOutObject$inboundSchema = exports2.FTModelOutObject = void 0; exports2.ftModelOutToJSON = ftModelOutToJSON; exports2.ftModelOutFromJSON = ftModelOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var ftmodelcapabilitiesout_js_1 = require_ftmodelcapabilitiesout(); exports2.FTModelOutObject = { Model: "model" }; - exports2.FTModelOutObject$inboundSchema = z3.nativeEnum(exports2.FTModelOutObject); + exports2.FTModelOutObject$inboundSchema = z4.nativeEnum(exports2.FTModelOutObject); exports2.FTModelOutObject$outboundSchema = exports2.FTModelOutObject$inboundSchema; var FTModelOutObject$; (function(FTModelOutObject$2) { FTModelOutObject$2.inboundSchema = exports2.FTModelOutObject$inboundSchema; FTModelOutObject$2.outboundSchema = exports2.FTModelOutObject$outboundSchema; })(FTModelOutObject$ || (exports2.FTModelOutObject$ = FTModelOutObject$ = {})); - exports2.FTModelOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - created: z3.number().int(), - owned_by: z3.string(), - root: z3.string(), - archived: z3.boolean(), - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), + exports2.FTModelOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + created: z4.number().int(), + owned_by: z4.string(), + root: z4.string(), + archived: z4.boolean(), + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), capabilities: ftmodelcapabilitiesout_js_1.FTModelCapabilitiesOut$inboundSchema, - max_context_length: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - job: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + max_context_length: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + job: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "owned_by": "ownedBy", "max_context_length": "maxContextLength" }); }); - exports2.FTModelOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - created: z3.number().int(), - ownedBy: z3.string(), - root: z3.string(), - archived: z3.boolean(), - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional(), + exports2.FTModelOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + created: z4.number().int(), + ownedBy: z4.string(), + root: z4.string(), + archived: z4.boolean(), + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional(), capabilities: ftmodelcapabilitiesout_js_1.FTModelCapabilitiesOut$outboundSchema, - maxContextLength: z3.number().int().default(32768), - aliases: z3.array(z3.string()).optional(), - job: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + maxContextLength: z4.number().int().default(32768), + aliases: z4.array(z4.string()).optional(), + job: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { ownedBy: "owned_by", maxContextLength: "max_context_length" }); @@ -63050,7 +63533,7 @@ var require_ftmodelout = __commonJS({ return JSON.stringify(exports2.FTModelOut$outboundSchema.parse(ftModelOut)); } function ftModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FTModelOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FTModelOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FTModelOut' from JSON`); } } }); @@ -63059,64 +63542,64 @@ var require_ftmodelout = __commonJS({ var require_githubrepositoryin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/githubrepositoryin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GithubRepositoryIn$ = exports2.GithubRepositoryIn$outboundSchema = exports2.GithubRepositoryIn$inboundSchema = exports2.GithubRepositoryInType$ = exports2.GithubRepositoryInType$outboundSchema = exports2.GithubRepositoryInType$inboundSchema = exports2.GithubRepositoryInType = void 0; exports2.githubRepositoryInToJSON = githubRepositoryInToJSON; exports2.githubRepositoryInFromJSON = githubRepositoryInFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); exports2.GithubRepositoryInType = { Github: "github" }; - exports2.GithubRepositoryInType$inboundSchema = z3.nativeEnum(exports2.GithubRepositoryInType); + exports2.GithubRepositoryInType$inboundSchema = z4.nativeEnum(exports2.GithubRepositoryInType); exports2.GithubRepositoryInType$outboundSchema = exports2.GithubRepositoryInType$inboundSchema; var GithubRepositoryInType$; (function(GithubRepositoryInType$2) { GithubRepositoryInType$2.inboundSchema = exports2.GithubRepositoryInType$inboundSchema; GithubRepositoryInType$2.outboundSchema = exports2.GithubRepositoryInType$outboundSchema; })(GithubRepositoryInType$ || (exports2.GithubRepositoryInType$ = GithubRepositoryInType$ = {})); - exports2.GithubRepositoryIn$inboundSchema = z3.object({ - type: z3.literal("github").default("github"), - name: z3.string(), - owner: z3.string(), - ref: z3.nullable(z3.string()).optional(), - weight: z3.number().default(1), - token: z3.string() - }); - exports2.GithubRepositoryIn$outboundSchema = z3.object({ - type: z3.literal("github").default("github"), - name: z3.string(), - owner: z3.string(), - ref: z3.nullable(z3.string()).optional(), - weight: z3.number().default(1), - token: z3.string() + exports2.GithubRepositoryIn$inboundSchema = z4.object({ + type: z4.literal("github").default("github"), + name: z4.string(), + owner: z4.string(), + ref: z4.nullable(z4.string()).optional(), + weight: z4.number().default(1), + token: z4.string() + }); + exports2.GithubRepositoryIn$outboundSchema = z4.object({ + type: z4.literal("github").default("github"), + name: z4.string(), + owner: z4.string(), + ref: z4.nullable(z4.string()).optional(), + weight: z4.number().default(1), + token: z4.string() }); var GithubRepositoryIn$; (function(GithubRepositoryIn$2) { @@ -63127,7 +63610,7 @@ var require_githubrepositoryin = __commonJS({ return JSON.stringify(exports2.GithubRepositoryIn$outboundSchema.parse(githubRepositoryIn)); } function githubRepositoryInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.GithubRepositoryIn$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'GithubRepositoryIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.GithubRepositoryIn$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'GithubRepositoryIn' from JSON`); } } }); @@ -63136,53 +63619,53 @@ var require_githubrepositoryin = __commonJS({ var require_trainingfile = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingFile$ = exports2.TrainingFile$outboundSchema = exports2.TrainingFile$inboundSchema = void 0; exports2.trainingFileToJSON = trainingFileToJSON; exports2.trainingFileFromJSON = trainingFileFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingFile$inboundSchema = z3.object({ - file_id: z3.string(), - weight: z3.number().default(1) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingFile$inboundSchema = z4.object({ + file_id: z4.string(), + weight: z4.number().default(1) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "file_id": "fileId" }); }); - exports2.TrainingFile$outboundSchema = z3.object({ - fileId: z3.string(), - weight: z3.number().default(1) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingFile$outboundSchema = z4.object({ + fileId: z4.string(), + weight: z4.number().default(1) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { fileId: "file_id" }); }); @@ -63195,7 +63678,7 @@ var require_trainingfile = __commonJS({ return JSON.stringify(exports2.TrainingFile$outboundSchema.parse(trainingFile)); } function trainingFileFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.TrainingFile$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'TrainingFile' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.TrainingFile$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'TrainingFile' from JSON`); } } }); @@ -63204,50 +63687,50 @@ var require_trainingfile = __commonJS({ var require_trainingparametersin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/trainingparametersin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TrainingParametersIn$ = exports2.TrainingParametersIn$outboundSchema = exports2.TrainingParametersIn$inboundSchema = void 0; exports2.trainingParametersInToJSON = trainingParametersInToJSON; exports2.trainingParametersInFromJSON = trainingParametersInFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.TrainingParametersIn$inboundSchema = z3.object({ - training_steps: z3.nullable(z3.number().int()).optional(), - learning_rate: z3.number().default(1e-4), - weight_decay: z3.nullable(z3.number()).optional(), - warmup_fraction: z3.nullable(z3.number()).optional(), - epochs: z3.nullable(z3.number()).optional(), - fim_ratio: z3.nullable(z3.number()).optional(), - seq_len: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingParametersIn$inboundSchema = z4.object({ + training_steps: z4.nullable(z4.number().int()).optional(), + learning_rate: z4.number().default(1e-4), + weight_decay: z4.nullable(z4.number()).optional(), + warmup_fraction: z4.nullable(z4.number()).optional(), + epochs: z4.nullable(z4.number()).optional(), + fim_ratio: z4.nullable(z4.number()).optional(), + seq_len: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "training_steps": "trainingSteps", "learning_rate": "learningRate", "weight_decay": "weightDecay", @@ -63256,16 +63739,16 @@ var require_trainingparametersin = __commonJS({ "seq_len": "seqLen" }); }); - exports2.TrainingParametersIn$outboundSchema = z3.object({ - trainingSteps: z3.nullable(z3.number().int()).optional(), - learningRate: z3.number().default(1e-4), - weightDecay: z3.nullable(z3.number()).optional(), - warmupFraction: z3.nullable(z3.number()).optional(), - epochs: z3.nullable(z3.number()).optional(), - fimRatio: z3.nullable(z3.number()).optional(), - seqLen: z3.nullable(z3.number().int()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.TrainingParametersIn$outboundSchema = z4.object({ + trainingSteps: z4.nullable(z4.number().int()).optional(), + learningRate: z4.number().default(1e-4), + weightDecay: z4.nullable(z4.number()).optional(), + warmupFraction: z4.nullable(z4.number()).optional(), + epochs: z4.nullable(z4.number()).optional(), + fimRatio: z4.nullable(z4.number()).optional(), + seqLen: z4.nullable(z4.number().int()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { trainingSteps: "training_steps", learningRate: "learning_rate", weightDecay: "weight_decay", @@ -63283,7 +63766,7 @@ var require_trainingparametersin = __commonJS({ return JSON.stringify(exports2.TrainingParametersIn$outboundSchema.parse(trainingParametersIn)); } function trainingParametersInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.TrainingParametersIn$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'TrainingParametersIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.TrainingParametersIn$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'TrainingParametersIn' from JSON`); } } }); @@ -63292,70 +63775,70 @@ var require_trainingparametersin = __commonJS({ var require_wandbintegration = __commonJS({ "node_modules/@mistralai/mistralai/models/components/wandbintegration.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WandbIntegration$ = exports2.WandbIntegration$outboundSchema = exports2.WandbIntegration$inboundSchema = exports2.WandbIntegrationType$ = exports2.WandbIntegrationType$outboundSchema = exports2.WandbIntegrationType$inboundSchema = exports2.WandbIntegrationType = void 0; exports2.wandbIntegrationToJSON = wandbIntegrationToJSON; exports2.wandbIntegrationFromJSON = wandbIntegrationFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.WandbIntegrationType = { Wandb: "wandb" }; - exports2.WandbIntegrationType$inboundSchema = z3.nativeEnum(exports2.WandbIntegrationType); + exports2.WandbIntegrationType$inboundSchema = z4.nativeEnum(exports2.WandbIntegrationType); exports2.WandbIntegrationType$outboundSchema = exports2.WandbIntegrationType$inboundSchema; var WandbIntegrationType$; (function(WandbIntegrationType$2) { WandbIntegrationType$2.inboundSchema = exports2.WandbIntegrationType$inboundSchema; WandbIntegrationType$2.outboundSchema = exports2.WandbIntegrationType$outboundSchema; })(WandbIntegrationType$ || (exports2.WandbIntegrationType$ = WandbIntegrationType$ = {})); - exports2.WandbIntegration$inboundSchema = z3.object({ - type: z3.literal("wandb").default("wandb"), - project: z3.string(), - name: z3.nullable(z3.string()).optional(), - api_key: z3.string(), - run_name: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.WandbIntegration$inboundSchema = z4.object({ + type: z4.literal("wandb").default("wandb"), + project: z4.string(), + name: z4.nullable(z4.string()).optional(), + api_key: z4.string(), + run_name: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "api_key": "apiKey", "run_name": "runName" }); }); - exports2.WandbIntegration$outboundSchema = z3.object({ - type: z3.literal("wandb").default("wandb"), - project: z3.string(), - name: z3.nullable(z3.string()).optional(), - apiKey: z3.string(), - runName: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.WandbIntegration$outboundSchema = z4.object({ + type: z4.literal("wandb").default("wandb"), + project: z4.string(), + name: z4.nullable(z4.string()).optional(), + apiKey: z4.string(), + runName: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { apiKey: "api_key", runName: "run_name" }); @@ -63369,7 +63852,7 @@ var require_wandbintegration = __commonJS({ return JSON.stringify(exports2.WandbIntegration$outboundSchema.parse(wandbIntegration)); } function wandbIntegrationFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.WandbIntegration$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'WandbIntegration' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.WandbIntegration$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'WandbIntegration' from JSON`); } } }); @@ -63378,31 +63861,31 @@ var require_wandbintegration = __commonJS({ var require_jobin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -63413,7 +63896,7 @@ var require_jobin = __commonJS({ exports2.jobInRepositoriesFromJSON = jobInRepositoriesFromJSON; exports2.jobInToJSON = jobInToJSON; exports2.jobInFromJSON = jobInFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var githubrepositoryin_js_1 = require_githubrepositoryin(); @@ -63431,7 +63914,7 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobInIntegrations$outboundSchema.parse(jobInIntegrations)); } function jobInIntegrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobInIntegrations$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobInIntegrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobInIntegrations$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobInIntegrations' from JSON`); } exports2.JobInRepositories$inboundSchema = githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema; exports2.JobInRepositories$outboundSchema = githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema; @@ -63444,35 +63927,35 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobInRepositories$outboundSchema.parse(jobInRepositories)); } function jobInRepositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobInRepositories$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobInRepositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobInRepositories$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobInRepositories' from JSON`); } - exports2.JobIn$inboundSchema = z3.object({ - model: z3.string(), - training_files: z3.array(trainingfile_js_1.TrainingFile$inboundSchema).optional(), - validation_files: z3.nullable(z3.array(z3.string())).optional(), + exports2.JobIn$inboundSchema = z4.object({ + model: z4.string(), + training_files: z4.array(trainingfile_js_1.TrainingFile$inboundSchema).optional(), + validation_files: z4.nullable(z4.array(z4.string())).optional(), hyperparameters: trainingparametersin_js_1.TrainingParametersIn$inboundSchema, - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegration_js_1.WandbIntegration$inboundSchema)).optional(), - repositories: z3.array(githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema).optional(), - auto_start: z3.boolean().optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegration_js_1.WandbIntegration$inboundSchema)).optional(), + repositories: z4.array(githubrepositoryin_js_1.GithubRepositoryIn$inboundSchema).optional(), + auto_start: z4.boolean().optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "training_files": "trainingFiles", "validation_files": "validationFiles", "auto_start": "autoStart" }); }); - exports2.JobIn$outboundSchema = z3.object({ - model: z3.string(), - trainingFiles: z3.array(trainingfile_js_1.TrainingFile$outboundSchema).optional(), - validationFiles: z3.nullable(z3.array(z3.string())).optional(), + exports2.JobIn$outboundSchema = z4.object({ + model: z4.string(), + trainingFiles: z4.array(trainingfile_js_1.TrainingFile$outboundSchema).optional(), + validationFiles: z4.nullable(z4.array(z4.string())).optional(), hyperparameters: trainingparametersin_js_1.TrainingParametersIn$outboundSchema, - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegration_js_1.WandbIntegration$outboundSchema)).optional(), - repositories: z3.array(githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema).optional(), - autoStart: z3.boolean().optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegration_js_1.WandbIntegration$outboundSchema)).optional(), + repositories: z4.array(githubrepositoryin_js_1.GithubRepositoryIn$outboundSchema).optional(), + autoStart: z4.boolean().optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { trainingFiles: "training_files", validationFiles: "validation_files", autoStart: "auto_start" @@ -63487,7 +63970,7 @@ var require_jobin = __commonJS({ return JSON.stringify(exports2.JobIn$outboundSchema.parse(jobIn)); } function jobInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobIn$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobIn$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobIn' from JSON`); } } }); @@ -63496,31 +63979,31 @@ var require_jobin = __commonJS({ var require_jobout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -63531,7 +64014,7 @@ var require_jobout = __commonJS({ exports2.repositoriesFromJSON = repositoriesFromJSON; exports2.jobOutToJSON = jobOutToJSON; exports2.jobOutFromJSON = jobOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var githubrepositoryout_js_1 = require_githubrepositoryout(); @@ -63553,14 +64036,14 @@ var require_jobout = __commonJS({ exports2.ObjectT = { Job: "job" }; - exports2.Status$inboundSchema = z3.nativeEnum(exports2.Status); + exports2.Status$inboundSchema = z4.nativeEnum(exports2.Status); exports2.Status$outboundSchema = exports2.Status$inboundSchema; var Status$; (function(Status$2) { Status$2.inboundSchema = exports2.Status$inboundSchema; Status$2.outboundSchema = exports2.Status$outboundSchema; })(Status$ || (exports2.Status$ = Status$ = {})); - exports2.ObjectT$inboundSchema = z3.nativeEnum(exports2.ObjectT); + exports2.ObjectT$inboundSchema = z4.nativeEnum(exports2.ObjectT); exports2.ObjectT$outboundSchema = exports2.ObjectT$inboundSchema; var ObjectT$; (function(ObjectT$2) { @@ -63578,7 +64061,7 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.Integrations$outboundSchema.parse(integrations)); } function integrationsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Integrations$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Integrations' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Integrations$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Integrations' from JSON`); } exports2.Repositories$inboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema; exports2.Repositories$outboundSchema = githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema; @@ -63591,28 +64074,28 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.Repositories$outboundSchema.parse(repositories)); } function repositoriesFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Repositories$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Repositories' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Repositories$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Repositories' from JSON`); } - exports2.JobOut$inboundSchema = z3.object({ - id: z3.string(), - auto_start: z3.boolean(), + exports2.JobOut$inboundSchema = z4.object({ + id: z4.string(), + auto_start: z4.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$inboundSchema, - model: z3.string(), + model: z4.string(), status: exports2.Status$inboundSchema, - job_type: z3.string(), - created_at: z3.number().int(), - modified_at: z3.number().int(), - training_files: z3.array(z3.string()), - validation_files: z3.nullable(z3.array(z3.string())).optional(), - object: z3.literal("job").default("job"), - fine_tuned_model: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), - trained_tokens: z3.nullable(z3.number().int()).optional(), - repositories: z3.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), - metadata: z3.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + job_type: z4.string(), + created_at: z4.number().int(), + modified_at: z4.number().int(), + training_files: z4.array(z4.string()), + validation_files: z4.nullable(z4.array(z4.string())).optional(), + object: z4.literal("job").default("job"), + fine_tuned_model: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegrationout_js_1.WandbIntegrationOut$inboundSchema)).optional(), + trained_tokens: z4.nullable(z4.number().int()).optional(), + repositories: z4.array(githubrepositoryout_js_1.GithubRepositoryOut$inboundSchema).optional(), + metadata: z4.nullable(jobmetadataout_js_1.JobMetadataOut$inboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "auto_start": "autoStart", "job_type": "jobType", "created_at": "createdAt", @@ -63623,26 +64106,26 @@ var require_jobout = __commonJS({ "trained_tokens": "trainedTokens" }); }); - exports2.JobOut$outboundSchema = z3.object({ - id: z3.string(), - autoStart: z3.boolean(), + exports2.JobOut$outboundSchema = z4.object({ + id: z4.string(), + autoStart: z4.boolean(), hyperparameters: trainingparameters_js_1.TrainingParameters$outboundSchema, - model: z3.string(), + model: z4.string(), status: exports2.Status$outboundSchema, - jobType: z3.string(), - createdAt: z3.number().int(), - modifiedAt: z3.number().int(), - trainingFiles: z3.array(z3.string()), - validationFiles: z3.nullable(z3.array(z3.string())).optional(), - object: z3.literal("job").default("job"), - fineTunedModel: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional(), - integrations: z3.nullable(z3.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), - trainedTokens: z3.nullable(z3.number().int()).optional(), - repositories: z3.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), - metadata: z3.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + jobType: z4.string(), + createdAt: z4.number().int(), + modifiedAt: z4.number().int(), + trainingFiles: z4.array(z4.string()), + validationFiles: z4.nullable(z4.array(z4.string())).optional(), + object: z4.literal("job").default("job"), + fineTunedModel: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional(), + integrations: z4.nullable(z4.array(wandbintegrationout_js_1.WandbIntegrationOut$outboundSchema)).optional(), + trainedTokens: z4.nullable(z4.number().int()).optional(), + repositories: z4.array(githubrepositoryout_js_1.GithubRepositoryOut$outboundSchema).optional(), + metadata: z4.nullable(jobmetadataout_js_1.JobMetadataOut$outboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { autoStart: "auto_start", jobType: "job_type", createdAt: "created_at", @@ -63662,7 +64145,7 @@ var require_jobout = __commonJS({ return JSON.stringify(exports2.JobOut$outboundSchema.parse(jobOut)); } function jobOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobOut' from JSON`); } } }); @@ -63671,59 +64154,59 @@ var require_jobout = __commonJS({ var require_jobsout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/jobsout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsOut$ = exports2.JobsOut$outboundSchema = exports2.JobsOut$inboundSchema = exports2.JobsOutObject$ = exports2.JobsOutObject$outboundSchema = exports2.JobsOutObject$inboundSchema = exports2.JobsOutObject = void 0; exports2.jobsOutToJSON = jobsOutToJSON; exports2.jobsOutFromJSON = jobsOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var jobout_js_1 = require_jobout(); exports2.JobsOutObject = { List: "list" }; - exports2.JobsOutObject$inboundSchema = z3.nativeEnum(exports2.JobsOutObject); + exports2.JobsOutObject$inboundSchema = z4.nativeEnum(exports2.JobsOutObject); exports2.JobsOutObject$outboundSchema = exports2.JobsOutObject$inboundSchema; var JobsOutObject$; (function(JobsOutObject$2) { JobsOutObject$2.inboundSchema = exports2.JobsOutObject$inboundSchema; JobsOutObject$2.outboundSchema = exports2.JobsOutObject$outboundSchema; })(JobsOutObject$ || (exports2.JobsOutObject$ = JobsOutObject$ = {})); - exports2.JobsOut$inboundSchema = z3.object({ - data: z3.array(jobout_js_1.JobOut$inboundSchema).optional(), - object: z3.literal("list").default("list"), - total: z3.number().int() + exports2.JobsOut$inboundSchema = z4.object({ + data: z4.array(jobout_js_1.JobOut$inboundSchema).optional(), + object: z4.literal("list").default("list"), + total: z4.number().int() }); - exports2.JobsOut$outboundSchema = z3.object({ - data: z3.array(jobout_js_1.JobOut$outboundSchema).optional(), - object: z3.literal("list").default("list"), - total: z3.number().int() + exports2.JobsOut$outboundSchema = z4.object({ + data: z4.array(jobout_js_1.JobOut$outboundSchema).optional(), + object: z4.literal("list").default("list"), + total: z4.number().int() }); var JobsOut$; (function(JobsOut$2) { @@ -63734,7 +64217,7 @@ var require_jobsout = __commonJS({ return JSON.stringify(exports2.JobsOut$outboundSchema.parse(jobsOut)); } function jobsOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsOut' from JSON`); } } }); @@ -63743,65 +64226,65 @@ var require_jobsout = __commonJS({ var require_legacyjobmetadataout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/legacyjobmetadataout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LegacyJobMetadataOut$ = exports2.LegacyJobMetadataOut$outboundSchema = exports2.LegacyJobMetadataOut$inboundSchema = exports2.LegacyJobMetadataOutObject$ = exports2.LegacyJobMetadataOutObject$outboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema = exports2.LegacyJobMetadataOutObject = void 0; exports2.legacyJobMetadataOutToJSON = legacyJobMetadataOutToJSON; exports2.legacyJobMetadataOutFromJSON = legacyJobMetadataOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.LegacyJobMetadataOutObject = { JobMetadata: "job.metadata" }; - exports2.LegacyJobMetadataOutObject$inboundSchema = z3.nativeEnum(exports2.LegacyJobMetadataOutObject); + exports2.LegacyJobMetadataOutObject$inboundSchema = z4.nativeEnum(exports2.LegacyJobMetadataOutObject); exports2.LegacyJobMetadataOutObject$outboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema; var LegacyJobMetadataOutObject$; (function(LegacyJobMetadataOutObject$2) { LegacyJobMetadataOutObject$2.inboundSchema = exports2.LegacyJobMetadataOutObject$inboundSchema; LegacyJobMetadataOutObject$2.outboundSchema = exports2.LegacyJobMetadataOutObject$outboundSchema; })(LegacyJobMetadataOutObject$ || (exports2.LegacyJobMetadataOutObject$ = LegacyJobMetadataOutObject$ = {})); - exports2.LegacyJobMetadataOut$inboundSchema = z3.object({ - expected_duration_seconds: z3.nullable(z3.number().int()).optional(), - cost: z3.nullable(z3.number()).optional(), - cost_currency: z3.nullable(z3.string()).optional(), - train_tokens_per_step: z3.nullable(z3.number().int()).optional(), - train_tokens: z3.nullable(z3.number().int()).optional(), - data_tokens: z3.nullable(z3.number().int()).optional(), - estimated_start_time: z3.nullable(z3.number().int()).optional(), - deprecated: z3.boolean().default(true), - details: z3.string(), - epochs: z3.nullable(z3.number()).optional(), - training_steps: z3.nullable(z3.number().int()).optional(), - object: z3.literal("job.metadata").default("job.metadata") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.LegacyJobMetadataOut$inboundSchema = z4.object({ + expected_duration_seconds: z4.nullable(z4.number().int()).optional(), + cost: z4.nullable(z4.number()).optional(), + cost_currency: z4.nullable(z4.string()).optional(), + train_tokens_per_step: z4.nullable(z4.number().int()).optional(), + train_tokens: z4.nullable(z4.number().int()).optional(), + data_tokens: z4.nullable(z4.number().int()).optional(), + estimated_start_time: z4.nullable(z4.number().int()).optional(), + deprecated: z4.boolean().default(true), + details: z4.string(), + epochs: z4.nullable(z4.number()).optional(), + training_steps: z4.nullable(z4.number().int()).optional(), + object: z4.literal("job.metadata").default("job.metadata") + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "expected_duration_seconds": "expectedDurationSeconds", "cost_currency": "costCurrency", "train_tokens_per_step": "trainTokensPerStep", @@ -63811,21 +64294,21 @@ var require_legacyjobmetadataout = __commonJS({ "training_steps": "trainingSteps" }); }); - exports2.LegacyJobMetadataOut$outboundSchema = z3.object({ - expectedDurationSeconds: z3.nullable(z3.number().int()).optional(), - cost: z3.nullable(z3.number()).optional(), - costCurrency: z3.nullable(z3.string()).optional(), - trainTokensPerStep: z3.nullable(z3.number().int()).optional(), - trainTokens: z3.nullable(z3.number().int()).optional(), - dataTokens: z3.nullable(z3.number().int()).optional(), - estimatedStartTime: z3.nullable(z3.number().int()).optional(), - deprecated: z3.boolean().default(true), - details: z3.string(), - epochs: z3.nullable(z3.number()).optional(), - trainingSteps: z3.nullable(z3.number().int()).optional(), - object: z3.literal("job.metadata").default("job.metadata") - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.LegacyJobMetadataOut$outboundSchema = z4.object({ + expectedDurationSeconds: z4.nullable(z4.number().int()).optional(), + cost: z4.nullable(z4.number()).optional(), + costCurrency: z4.nullable(z4.string()).optional(), + trainTokensPerStep: z4.nullable(z4.number().int()).optional(), + trainTokens: z4.nullable(z4.number().int()).optional(), + dataTokens: z4.nullable(z4.number().int()).optional(), + estimatedStartTime: z4.nullable(z4.number().int()).optional(), + deprecated: z4.boolean().default(true), + details: z4.string(), + epochs: z4.nullable(z4.number()).optional(), + trainingSteps: z4.nullable(z4.number().int()).optional(), + object: z4.literal("job.metadata").default("job.metadata") + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { expectedDurationSeconds: "expected_duration_seconds", costCurrency: "cost_currency", trainTokensPerStep: "train_tokens_per_step", @@ -63844,7 +64327,7 @@ var require_legacyjobmetadataout = __commonJS({ return JSON.stringify(exports2.LegacyJobMetadataOut$outboundSchema.parse(legacyJobMetadataOut)); } function legacyJobMetadataOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.LegacyJobMetadataOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'LegacyJobMetadataOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.LegacyJobMetadataOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'LegacyJobMetadataOut' from JSON`); } } }); @@ -63853,49 +64336,49 @@ var require_legacyjobmetadataout = __commonJS({ var require_listfilesout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/listfilesout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ListFilesOut$ = exports2.ListFilesOut$outboundSchema = exports2.ListFilesOut$inboundSchema = void 0; exports2.listFilesOutToJSON = listFilesOutToJSON; exports2.listFilesOutFromJSON = listFilesOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var fileschema_js_1 = require_fileschema(); - exports2.ListFilesOut$inboundSchema = z3.object({ - data: z3.array(fileschema_js_1.FileSchema$inboundSchema), - object: z3.string(), - total: z3.number().int() + exports2.ListFilesOut$inboundSchema = z4.object({ + data: z4.array(fileschema_js_1.FileSchema$inboundSchema), + object: z4.string(), + total: z4.number().int() }); - exports2.ListFilesOut$outboundSchema = z3.object({ - data: z3.array(fileschema_js_1.FileSchema$outboundSchema), - object: z3.string(), - total: z3.number().int() + exports2.ListFilesOut$outboundSchema = z4.object({ + data: z4.array(fileschema_js_1.FileSchema$outboundSchema), + object: z4.string(), + total: z4.number().int() }); var ListFilesOut$; (function(ListFilesOut$2) { @@ -63906,7 +64389,7 @@ var require_listfilesout = __commonJS({ return JSON.stringify(exports2.ListFilesOut$outboundSchema.parse(listFilesOut)); } function listFilesOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ListFilesOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ListFilesOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ListFilesOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ListFilesOut' from JSON`); } } }); @@ -63915,31 +64398,31 @@ var require_listfilesout = __commonJS({ var require_modellist = __commonJS({ "node_modules/@mistralai/mistralai/models/components/modellist.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -63948,24 +64431,24 @@ var require_modellist = __commonJS({ exports2.dataFromJSON = dataFromJSON; exports2.modelListToJSON = modelListToJSON; exports2.modelListFromJSON = modelListFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var basemodelcard_js_1 = require_basemodelcard(); var ftmodelcard_js_1 = require_ftmodelcard(); - exports2.Data$inboundSchema = z3.union([ - basemodelcard_js_1.BaseModelCard$inboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.Data$inboundSchema = z4.union([ + basemodelcard_js_1.BaseModelCard$inboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - ftmodelcard_js_1.FTModelCard$inboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + ftmodelcard_js_1.FTModelCard$inboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ]); - exports2.Data$outboundSchema = z3.union([ - basemodelcard_js_1.BaseModelCard$outboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.Data$outboundSchema = z4.union([ + basemodelcard_js_1.BaseModelCard$outboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - ftmodelcard_js_1.FTModelCard$outboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + ftmodelcard_js_1.FTModelCard$outboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ]); var Data$; @@ -63977,27 +64460,27 @@ var require_modellist = __commonJS({ return JSON.stringify(exports2.Data$outboundSchema.parse(data)); } function dataFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Data$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Data' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Data$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Data' from JSON`); } - exports2.ModelList$inboundSchema = z3.object({ - object: z3.string().default("list"), - data: z3.array(z3.union([ - basemodelcard_js_1.BaseModelCard$inboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.ModelList$inboundSchema = z4.object({ + object: z4.string().default("list"), + data: z4.array(z4.union([ + basemodelcard_js_1.BaseModelCard$inboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - ftmodelcard_js_1.FTModelCard$inboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + ftmodelcard_js_1.FTModelCard$inboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ])).optional() }); - exports2.ModelList$outboundSchema = z3.object({ - object: z3.string().default("list"), - data: z3.array(z3.union([ - basemodelcard_js_1.BaseModelCard$outboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.ModelList$outboundSchema = z4.object({ + object: z4.string().default("list"), + data: z4.array(z4.union([ + basemodelcard_js_1.BaseModelCard$outboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - ftmodelcard_js_1.FTModelCard$outboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + ftmodelcard_js_1.FTModelCard$outboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ])).optional() }); @@ -64010,7 +64493,7 @@ var require_modellist = __commonJS({ return JSON.stringify(exports2.ModelList$outboundSchema.parse(modelList)); } function modelListFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ModelList$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ModelList' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ModelList$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ModelList' from JSON`); } } }); @@ -64019,74 +64502,74 @@ var require_modellist = __commonJS({ var require_retrievefileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/retrievefileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetrieveFileOut$ = exports2.RetrieveFileOut$outboundSchema = exports2.RetrieveFileOut$inboundSchema = void 0; exports2.retrieveFileOutToJSON = retrieveFileOutToJSON; exports2.retrieveFileOutFromJSON = retrieveFileOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.RetrieveFileOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - created_at: z3.number().int(), - filename: z3.string(), + exports2.RetrieveFileOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + created_at: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z3.nullable(z3.number().int()).optional(), + num_lines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$inboundSchema, - deleted: z3.boolean() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + deleted: z4.boolean() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.RetrieveFileOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - createdAt: z3.number().int(), - filename: z3.string(), + exports2.RetrieveFileOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + createdAt: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z3.nullable(z3.number().int()).optional(), + numLines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$outboundSchema, - deleted: z3.boolean() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + deleted: z4.boolean() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -64101,7 +64584,7 @@ var require_retrievefileout = __commonJS({ return JSON.stringify(exports2.RetrieveFileOut$outboundSchema.parse(retrieveFileOut)); } function retrieveFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.RetrieveFileOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'RetrieveFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.RetrieveFileOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'RetrieveFileOut' from JSON`); } } }); @@ -64110,51 +64593,51 @@ var require_retrievefileout = __commonJS({ var require_security2 = __commonJS({ "node_modules/@mistralai/mistralai/models/components/security.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Security$ = exports2.Security$outboundSchema = exports2.Security$inboundSchema = void 0; exports2.securityToJSON = securityToJSON; exports2.securityFromJSON = securityFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.Security$inboundSchema = z3.object({ - ApiKey: z3.string().optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.Security$inboundSchema = z4.object({ + ApiKey: z4.string().optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "ApiKey": "apiKey" }); }); - exports2.Security$outboundSchema = z3.object({ - apiKey: z3.string().optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.Security$outboundSchema = z4.object({ + apiKey: z4.string().optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { apiKey: "ApiKey" }); }); @@ -64167,7 +64650,7 @@ var require_security2 = __commonJS({ return JSON.stringify(exports2.Security$outboundSchema.parse(security)); } function securityFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Security$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Security' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Security$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Security' from JSON`); } } }); @@ -64176,58 +64659,58 @@ var require_security2 = __commonJS({ var require_unarchiveftmodelout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/unarchiveftmodelout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UnarchiveFTModelOut$ = exports2.UnarchiveFTModelOut$outboundSchema = exports2.UnarchiveFTModelOut$inboundSchema = exports2.UnarchiveFTModelOutObject$ = exports2.UnarchiveFTModelOutObject$outboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema = exports2.UnarchiveFTModelOutObject = void 0; exports2.unarchiveFTModelOutToJSON = unarchiveFTModelOutToJSON; exports2.unarchiveFTModelOutFromJSON = unarchiveFTModelOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); exports2.UnarchiveFTModelOutObject = { Model: "model" }; - exports2.UnarchiveFTModelOutObject$inboundSchema = z3.nativeEnum(exports2.UnarchiveFTModelOutObject); + exports2.UnarchiveFTModelOutObject$inboundSchema = z4.nativeEnum(exports2.UnarchiveFTModelOutObject); exports2.UnarchiveFTModelOutObject$outboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema; var UnarchiveFTModelOutObject$; (function(UnarchiveFTModelOutObject$2) { UnarchiveFTModelOutObject$2.inboundSchema = exports2.UnarchiveFTModelOutObject$inboundSchema; UnarchiveFTModelOutObject$2.outboundSchema = exports2.UnarchiveFTModelOutObject$outboundSchema; })(UnarchiveFTModelOutObject$ || (exports2.UnarchiveFTModelOutObject$ = UnarchiveFTModelOutObject$ = {})); - exports2.UnarchiveFTModelOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - archived: z3.boolean().default(false) + exports2.UnarchiveFTModelOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + archived: z4.boolean().default(false) }); - exports2.UnarchiveFTModelOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.literal("model").default("model"), - archived: z3.boolean().default(false) + exports2.UnarchiveFTModelOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.literal("model").default("model"), + archived: z4.boolean().default(false) }); var UnarchiveFTModelOut$; (function(UnarchiveFTModelOut$2) { @@ -64238,7 +64721,7 @@ var require_unarchiveftmodelout = __commonJS({ return JSON.stringify(exports2.UnarchiveFTModelOut$outboundSchema.parse(unarchiveFTModelOut)); } function unarchiveFTModelOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UnarchiveFTModelOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UnarchiveFTModelOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UnarchiveFTModelOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UnarchiveFTModelOut' from JSON`); } } }); @@ -64247,46 +64730,46 @@ var require_unarchiveftmodelout = __commonJS({ var require_updateftmodelin = __commonJS({ "node_modules/@mistralai/mistralai/models/components/updateftmodelin.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UpdateFTModelIn$ = exports2.UpdateFTModelIn$outboundSchema = exports2.UpdateFTModelIn$inboundSchema = void 0; exports2.updateFTModelInToJSON = updateFTModelInToJSON; exports2.updateFTModelInFromJSON = updateFTModelInFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.UpdateFTModelIn$inboundSchema = z3.object({ - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional() + exports2.UpdateFTModelIn$inboundSchema = z4.object({ + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional() }); - exports2.UpdateFTModelIn$outboundSchema = z3.object({ - name: z3.nullable(z3.string()).optional(), - description: z3.nullable(z3.string()).optional() + exports2.UpdateFTModelIn$outboundSchema = z4.object({ + name: z4.nullable(z4.string()).optional(), + description: z4.nullable(z4.string()).optional() }); var UpdateFTModelIn$; (function(UpdateFTModelIn$2) { @@ -64297,7 +64780,7 @@ var require_updateftmodelin = __commonJS({ return JSON.stringify(exports2.UpdateFTModelIn$outboundSchema.parse(updateFTModelIn)); } function updateFTModelInFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UpdateFTModelIn$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UpdateFTModelIn' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UpdateFTModelIn$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UpdateFTModelIn' from JSON`); } } }); @@ -64306,72 +64789,72 @@ var require_updateftmodelin = __commonJS({ var require_uploadfileout = __commonJS({ "node_modules/@mistralai/mistralai/models/components/uploadfileout.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadFileOut$ = exports2.UploadFileOut$outboundSchema = exports2.UploadFileOut$inboundSchema = void 0; exports2.uploadFileOutToJSON = uploadFileOutToJSON; exports2.uploadFileOutFromJSON = uploadFileOutFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); var filepurpose_js_1 = require_filepurpose(); var sampletype_js_1 = require_sampletype(); var source_js_1 = require_source(); - exports2.UploadFileOut$inboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - created_at: z3.number().int(), - filename: z3.string(), + exports2.UploadFileOut$inboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + created_at: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$inboundSchema, sample_type: sampletype_js_1.SampleType$inboundSchema, - num_lines: z3.nullable(z3.number().int()).optional(), + num_lines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$inboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "created_at": "createdAt", "sample_type": "sampleType", "num_lines": "numLines" }); }); - exports2.UploadFileOut$outboundSchema = z3.object({ - id: z3.string(), - object: z3.string(), - bytes: z3.number().int(), - createdAt: z3.number().int(), - filename: z3.string(), + exports2.UploadFileOut$outboundSchema = z4.object({ + id: z4.string(), + object: z4.string(), + bytes: z4.number().int(), + createdAt: z4.number().int(), + filename: z4.string(), purpose: filepurpose_js_1.FilePurpose$outboundSchema, sampleType: sampletype_js_1.SampleType$outboundSchema, - numLines: z3.nullable(z3.number().int()).optional(), + numLines: z4.nullable(z4.number().int()).optional(), source: source_js_1.Source$outboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { createdAt: "created_at", sampleType: "sample_type", numLines: "num_lines" @@ -64386,7 +64869,7 @@ var require_uploadfileout = __commonJS({ return JSON.stringify(exports2.UploadFileOut$outboundSchema.parse(uploadFileOut)); } function uploadFileOutFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.UploadFileOut$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'UploadFileOut' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.UploadFileOut$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'UploadFileOut' from JSON`); } } }); @@ -64395,31 +64878,31 @@ var require_uploadfileout = __commonJS({ var require_validationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/components/validationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -64428,10 +64911,10 @@ var require_validationerror = __commonJS({ exports2.locFromJSON = locFromJSON; exports2.validationErrorToJSON = validationErrorToJSON; exports2.validationErrorFromJSON = validationErrorFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - exports2.Loc$inboundSchema = z3.union([z3.string(), z3.number().int()]); - exports2.Loc$outboundSchema = z3.union([z3.string(), z3.number().int()]); + exports2.Loc$inboundSchema = z4.union([z4.string(), z4.number().int()]); + exports2.Loc$outboundSchema = z4.union([z4.string(), z4.number().int()]); var Loc$; (function(Loc$2) { Loc$2.inboundSchema = exports2.Loc$inboundSchema; @@ -64441,17 +64924,17 @@ var require_validationerror = __commonJS({ return JSON.stringify(exports2.Loc$outboundSchema.parse(loc)); } function locFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.Loc$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'Loc' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.Loc$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'Loc' from JSON`); } - exports2.ValidationError$inboundSchema = z3.object({ - loc: z3.array(z3.union([z3.string(), z3.number().int()])), - msg: z3.string(), - type: z3.string() + exports2.ValidationError$inboundSchema = z4.object({ + loc: z4.array(z4.union([z4.string(), z4.number().int()])), + msg: z4.string(), + type: z4.string() }); - exports2.ValidationError$outboundSchema = z3.object({ - loc: z3.array(z3.union([z3.string(), z3.number().int()])), - msg: z3.string(), - type: z3.string() + exports2.ValidationError$outboundSchema = z4.object({ + loc: z4.array(z4.union([z4.string(), z4.number().int()])), + msg: z4.string(), + type: z4.string() }); var ValidationError$; (function(ValidationError$2) { @@ -64462,7 +64945,7 @@ var require_validationerror = __commonJS({ return JSON.stringify(exports2.ValidationError$outboundSchema.parse(validationError)); } function validationErrorFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.ValidationError$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'ValidationError' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.ValidationError$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'ValidationError' from JSON`); } } }); @@ -64471,106 +64954,106 @@ var require_validationerror = __commonJS({ var require_components = __commonJS({ "node_modules/@mistralai/mistralai/models/components/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_agentscompletionrequest(), exports2); - __exportStar(require_agentscompletionstreamrequest(), exports2); - __exportStar(require_apiendpoint(), exports2); - __exportStar(require_archiveftmodelout(), exports2); - __exportStar(require_assistantmessage(), exports2); - __exportStar(require_basemodelcard(), exports2); - __exportStar(require_batcherror(), exports2); - __exportStar(require_batchjobin(), exports2); - __exportStar(require_batchjobout(), exports2); - __exportStar(require_batchjobsout(), exports2); - __exportStar(require_batchjobstatus(), exports2); - __exportStar(require_chatclassificationrequest(), exports2); - __exportStar(require_chatcompletionchoice(), exports2); - __exportStar(require_chatcompletionrequest(), exports2); - __exportStar(require_chatcompletionresponse(), exports2); - __exportStar(require_chatcompletionstreamrequest(), exports2); - __exportStar(require_checkpointout(), exports2); - __exportStar(require_classificationobject(), exports2); - __exportStar(require_classificationrequest(), exports2); - __exportStar(require_classificationresponse(), exports2); - __exportStar(require_completionchunk(), exports2); - __exportStar(require_completionevent(), exports2); - __exportStar(require_completionresponsestreamchoice(), exports2); - __exportStar(require_contentchunk(), exports2); - __exportStar(require_deletefileout(), exports2); - __exportStar(require_deletemodelout(), exports2); - __exportStar(require_deltamessage(), exports2); - __exportStar(require_detailedjobout(), exports2); - __exportStar(require_embeddingrequest(), exports2); - __exportStar(require_embeddingresponse(), exports2); - __exportStar(require_embeddingresponsedata(), exports2); - __exportStar(require_eventout(), exports2); - __exportStar(require_filepurpose(), exports2); - __exportStar(require_fileschema(), exports2); - __exportStar(require_filesignedurl(), exports2); - __exportStar(require_fimcompletionrequest(), exports2); - __exportStar(require_fimcompletionresponse(), exports2); - __exportStar(require_fimcompletionstreamrequest(), exports2); - __exportStar(require_ftmodelcapabilitiesout(), exports2); - __exportStar(require_ftmodelcard(), exports2); - __exportStar(require_ftmodelout(), exports2); - __exportStar(require_function(), exports2); - __exportStar(require_functioncall(), exports2); - __exportStar(require_functionname(), exports2); - __exportStar(require_githubrepositoryin(), exports2); - __exportStar(require_githubrepositoryout(), exports2); - __exportStar(require_imageurl(), exports2); - __exportStar(require_imageurlchunk(), exports2); - __exportStar(require_jobin(), exports2); - __exportStar(require_jobmetadataout(), exports2); - __exportStar(require_jobout(), exports2); - __exportStar(require_jobsout(), exports2); - __exportStar(require_legacyjobmetadataout(), exports2); - __exportStar(require_listfilesout(), exports2); - __exportStar(require_metricout(), exports2); - __exportStar(require_modelcapabilities(), exports2); - __exportStar(require_modellist(), exports2); - __exportStar(require_referencechunk(), exports2); - __exportStar(require_responseformat(), exports2); - __exportStar(require_responseformats(), exports2); - __exportStar(require_retrievefileout(), exports2); - __exportStar(require_sampletype(), exports2); - __exportStar(require_security2(), exports2); - __exportStar(require_source(), exports2); - __exportStar(require_systemmessage(), exports2); - __exportStar(require_textchunk(), exports2); - __exportStar(require_tool(), exports2); - __exportStar(require_toolcall(), exports2); - __exportStar(require_toolchoice(), exports2); - __exportStar(require_toolchoiceenum(), exports2); - __exportStar(require_toolmessage(), exports2); - __exportStar(require_tooltypes(), exports2); - __exportStar(require_trainingfile(), exports2); - __exportStar(require_trainingparameters(), exports2); - __exportStar(require_trainingparametersin(), exports2); - __exportStar(require_unarchiveftmodelout(), exports2); - __exportStar(require_updateftmodelin(), exports2); - __exportStar(require_uploadfileout(), exports2); - __exportStar(require_usageinfo(), exports2); - __exportStar(require_usermessage(), exports2); - __exportStar(require_validationerror(), exports2); - __exportStar(require_wandbintegration(), exports2); - __exportStar(require_wandbintegrationout(), exports2); + __exportStar2(require_agentscompletionrequest(), exports2); + __exportStar2(require_agentscompletionstreamrequest(), exports2); + __exportStar2(require_apiendpoint(), exports2); + __exportStar2(require_archiveftmodelout(), exports2); + __exportStar2(require_assistantmessage(), exports2); + __exportStar2(require_basemodelcard(), exports2); + __exportStar2(require_batcherror(), exports2); + __exportStar2(require_batchjobin(), exports2); + __exportStar2(require_batchjobout(), exports2); + __exportStar2(require_batchjobsout(), exports2); + __exportStar2(require_batchjobstatus(), exports2); + __exportStar2(require_chatclassificationrequest(), exports2); + __exportStar2(require_chatcompletionchoice(), exports2); + __exportStar2(require_chatcompletionrequest(), exports2); + __exportStar2(require_chatcompletionresponse(), exports2); + __exportStar2(require_chatcompletionstreamrequest(), exports2); + __exportStar2(require_checkpointout(), exports2); + __exportStar2(require_classificationobject(), exports2); + __exportStar2(require_classificationrequest(), exports2); + __exportStar2(require_classificationresponse(), exports2); + __exportStar2(require_completionchunk(), exports2); + __exportStar2(require_completionevent(), exports2); + __exportStar2(require_completionresponsestreamchoice(), exports2); + __exportStar2(require_contentchunk(), exports2); + __exportStar2(require_deletefileout(), exports2); + __exportStar2(require_deletemodelout(), exports2); + __exportStar2(require_deltamessage(), exports2); + __exportStar2(require_detailedjobout(), exports2); + __exportStar2(require_embeddingrequest(), exports2); + __exportStar2(require_embeddingresponse(), exports2); + __exportStar2(require_embeddingresponsedata(), exports2); + __exportStar2(require_eventout(), exports2); + __exportStar2(require_filepurpose(), exports2); + __exportStar2(require_fileschema(), exports2); + __exportStar2(require_filesignedurl(), exports2); + __exportStar2(require_fimcompletionrequest(), exports2); + __exportStar2(require_fimcompletionresponse(), exports2); + __exportStar2(require_fimcompletionstreamrequest(), exports2); + __exportStar2(require_ftmodelcapabilitiesout(), exports2); + __exportStar2(require_ftmodelcard(), exports2); + __exportStar2(require_ftmodelout(), exports2); + __exportStar2(require_function(), exports2); + __exportStar2(require_functioncall(), exports2); + __exportStar2(require_functionname(), exports2); + __exportStar2(require_githubrepositoryin(), exports2); + __exportStar2(require_githubrepositoryout(), exports2); + __exportStar2(require_imageurl(), exports2); + __exportStar2(require_imageurlchunk(), exports2); + __exportStar2(require_jobin(), exports2); + __exportStar2(require_jobmetadataout(), exports2); + __exportStar2(require_jobout(), exports2); + __exportStar2(require_jobsout(), exports2); + __exportStar2(require_legacyjobmetadataout(), exports2); + __exportStar2(require_listfilesout(), exports2); + __exportStar2(require_metricout(), exports2); + __exportStar2(require_modelcapabilities(), exports2); + __exportStar2(require_modellist(), exports2); + __exportStar2(require_referencechunk(), exports2); + __exportStar2(require_responseformat(), exports2); + __exportStar2(require_responseformats(), exports2); + __exportStar2(require_retrievefileout(), exports2); + __exportStar2(require_sampletype(), exports2); + __exportStar2(require_security2(), exports2); + __exportStar2(require_source(), exports2); + __exportStar2(require_systemmessage(), exports2); + __exportStar2(require_textchunk(), exports2); + __exportStar2(require_tool(), exports2); + __exportStar2(require_toolcall(), exports2); + __exportStar2(require_toolchoice(), exports2); + __exportStar2(require_toolchoiceenum(), exports2); + __exportStar2(require_toolmessage(), exports2); + __exportStar2(require_tooltypes(), exports2); + __exportStar2(require_trainingfile(), exports2); + __exportStar2(require_trainingparameters(), exports2); + __exportStar2(require_trainingparametersin(), exports2); + __exportStar2(require_unarchiveftmodelout(), exports2); + __exportStar2(require_updateftmodelin(), exports2); + __exportStar2(require_uploadfileout(), exports2); + __exportStar2(require_usageinfo(), exports2); + __exportStar2(require_usermessage(), exports2); + __exportStar2(require_validationerror(), exports2); + __exportStar2(require_wandbintegration(), exports2); + __exportStar2(require_wandbintegrationout(), exports2); } }); @@ -64578,37 +65061,37 @@ var require_components = __commonJS({ var require_httpvalidationerror = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/httpvalidationerror.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HTTPValidationError$ = exports2.HTTPValidationError$outboundSchema = exports2.HTTPValidationError$inboundSchema = exports2.HTTPValidationError = void 0; - var z3 = __importStar(require_lib5()); - var components = __importStar(require_components()); + var z4 = __importStar2(require_lib5()); + var components = __importStar2(require_components()); var HTTPValidationError = class extends Error { constructor(err) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; @@ -64620,13 +65103,13 @@ var require_httpvalidationerror = __commonJS({ } }; exports2.HTTPValidationError = HTTPValidationError; - exports2.HTTPValidationError$inboundSchema = z3.object({ - detail: z3.array(components.ValidationError$inboundSchema).optional() - }).transform((v2) => { - return new HTTPValidationError(v2); + exports2.HTTPValidationError$inboundSchema = z4.object({ + detail: z4.array(components.ValidationError$inboundSchema).optional() + }).transform((v7) => { + return new HTTPValidationError(v7); }); - exports2.HTTPValidationError$outboundSchema = z3.instanceof(HTTPValidationError).transform((v2) => v2.data$).pipe(z3.object({ - detail: z3.array(components.ValidationError$outboundSchema).optional() + exports2.HTTPValidationError$outboundSchema = z4.instanceof(HTTPValidationError).transform((v7) => v7.data$).pipe(z4.object({ + detail: z4.array(components.ValidationError$outboundSchema).optional() })); var HTTPValidationError$; (function(HTTPValidationError$2) { @@ -64640,27 +65123,27 @@ var require_httpvalidationerror = __commonJS({ var require_errors3 = __commonJS({ "node_modules/@mistralai/mistralai/models/errors/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_httpclienterrors(), exports2); - __exportStar(require_httpvalidationerror(), exports2); - __exportStar(require_sdkerror(), exports2); - __exportStar(require_sdkvalidationerror(), exports2); + __exportStar2(require_httpclienterrors(), exports2); + __exportStar2(require_httpvalidationerror(), exports2); + __exportStar2(require_sdkerror(), exports2); + __exportStar2(require_sdkvalidationerror(), exports2); } }); @@ -64668,42 +65151,42 @@ var require_errors3 = __commonJS({ var require_agentsComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/agentsComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentsComplete = agentsComplete; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function agentsComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.AgentsCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -64765,44 +65248,44 @@ var require_agentsComplete = __commonJS({ var require_agentsStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/agentsStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.agentsStream = agentsStream; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function agentsStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.AgentsCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -64851,7 +65334,7 @@ var require_agentsStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M4.match(M4.sse(200, z3.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M4.match(M4.sse(200, z4.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -64903,51 +65386,51 @@ var require_agents = __commonJS({ var require_deletemodelv1modelsmodeliddelete = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/deletemodelv1modelsmodeliddelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DeleteModelV1ModelsModelIdDeleteRequest$ = exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = void 0; exports2.deleteModelV1ModelsModelIdDeleteRequestToJSON = deleteModelV1ModelsModelIdDeleteRequestToJSON; exports2.deleteModelV1ModelsModelIdDeleteRequestFromJSON = deleteModelV1ModelsModelIdDeleteRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = z3.object({ - model_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema = z4.object({ + model_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "model_id": "modelId" }); }); - exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = z3.object({ - modelId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema = z4.object({ + modelId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { modelId: "model_id" }); }); @@ -64960,7 +65443,7 @@ var require_deletemodelv1modelsmodeliddelete = __commonJS({ return JSON.stringify(exports2.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(deleteModelV1ModelsModelIdDeleteRequest)); } function deleteModelV1ModelsModelIdDeleteRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'DeleteModelV1ModelsModelIdDeleteRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.DeleteModelV1ModelsModelIdDeleteRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'DeleteModelV1ModelsModelIdDeleteRequest' from JSON`); } } }); @@ -64969,51 +65452,51 @@ var require_deletemodelv1modelsmodeliddelete = __commonJS({ var require_filesapiroutesdeletefile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesdeletefile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesDeleteFileRequest$ = exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = void 0; exports2.filesApiRoutesDeleteFileRequestToJSON = filesApiRoutesDeleteFileRequestToJSON; exports2.filesApiRoutesDeleteFileRequestFromJSON = filesApiRoutesDeleteFileRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = z3.object({ - file_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesDeleteFileRequest$inboundSchema = z4.object({ + file_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = z3.object({ - fileId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesDeleteFileRequest$outboundSchema = z4.object({ + fileId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { fileId: "file_id" }); }); @@ -65026,7 +65509,7 @@ var require_filesapiroutesdeletefile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(filesApiRoutesDeleteFileRequest)); } function filesApiRoutesDeleteFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesDeleteFileRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesDeleteFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesDeleteFileRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesDeleteFileRequest' from JSON`); } } }); @@ -65035,51 +65518,51 @@ var require_filesapiroutesdeletefile = __commonJS({ var require_filesapiroutesdownloadfile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesdownloadfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesDownloadFileRequest$ = exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = void 0; exports2.filesApiRoutesDownloadFileRequestToJSON = filesApiRoutesDownloadFileRequestToJSON; exports2.filesApiRoutesDownloadFileRequestFromJSON = filesApiRoutesDownloadFileRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = z3.object({ - file_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesDownloadFileRequest$inboundSchema = z4.object({ + file_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = z3.object({ - fileId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesDownloadFileRequest$outboundSchema = z4.object({ + fileId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { fileId: "file_id" }); }); @@ -65092,7 +65575,7 @@ var require_filesapiroutesdownloadfile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(filesApiRoutesDownloadFileRequest)); } function filesApiRoutesDownloadFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesDownloadFileRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesDownloadFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesDownloadFileRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesDownloadFileRequest' from JSON`); } } }); @@ -65101,53 +65584,53 @@ var require_filesapiroutesdownloadfile = __commonJS({ var require_filesapiroutesgetsignedurl = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesgetsignedurl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesGetSignedUrlRequest$ = exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = void 0; exports2.filesApiRoutesGetSignedUrlRequestToJSON = filesApiRoutesGetSignedUrlRequestToJSON; exports2.filesApiRoutesGetSignedUrlRequestFromJSON = filesApiRoutesGetSignedUrlRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = z3.object({ - file_id: z3.string(), - expiry: z3.number().int().default(24) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema = z4.object({ + file_id: z4.string(), + expiry: z4.number().int().default(24) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = z3.object({ - fileId: z3.string(), - expiry: z3.number().int().default(24) - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema = z4.object({ + fileId: z4.string(), + expiry: z4.number().int().default(24) + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { fileId: "file_id" }); }); @@ -65160,7 +65643,7 @@ var require_filesapiroutesgetsignedurl = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(filesApiRoutesGetSignedUrlRequest)); } function filesApiRoutesGetSignedUrlRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesGetSignedUrlRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesGetSignedUrlRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesGetSignedUrlRequest' from JSON`); } } }); @@ -65169,63 +65652,63 @@ var require_filesapiroutesgetsignedurl = __commonJS({ var require_filesapirouteslistfiles = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapirouteslistfiles.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesListFilesRequest$ = exports2.FilesApiRoutesListFilesRequest$outboundSchema = exports2.FilesApiRoutesListFilesRequest$inboundSchema = void 0; exports2.filesApiRoutesListFilesRequestToJSON = filesApiRoutesListFilesRequestToJSON; exports2.filesApiRoutesListFilesRequestFromJSON = filesApiRoutesListFilesRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.FilesApiRoutesListFilesRequest$inboundSchema = z3.object({ - page: z3.number().int().default(0), - page_size: z3.number().int().default(100), - sample_type: z3.nullable(z3.array(components.SampleType$inboundSchema)).optional(), - source: z3.nullable(z3.array(components.Source$inboundSchema)).optional(), - search: z3.nullable(z3.string()).optional(), - purpose: z3.nullable(components.FilePurpose$inboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + var components = __importStar2(require_components()); + exports2.FilesApiRoutesListFilesRequest$inboundSchema = z4.object({ + page: z4.number().int().default(0), + page_size: z4.number().int().default(100), + sample_type: z4.nullable(z4.array(components.SampleType$inboundSchema)).optional(), + source: z4.nullable(z4.array(components.Source$inboundSchema)).optional(), + search: z4.nullable(z4.string()).optional(), + purpose: z4.nullable(components.FilePurpose$inboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "page_size": "pageSize", "sample_type": "sampleType" }); }); - exports2.FilesApiRoutesListFilesRequest$outboundSchema = z3.object({ - page: z3.number().int().default(0), - pageSize: z3.number().int().default(100), - sampleType: z3.nullable(z3.array(components.SampleType$outboundSchema)).optional(), - source: z3.nullable(z3.array(components.Source$outboundSchema)).optional(), - search: z3.nullable(z3.string()).optional(), - purpose: z3.nullable(components.FilePurpose$outboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesListFilesRequest$outboundSchema = z4.object({ + page: z4.number().int().default(0), + pageSize: z4.number().int().default(100), + sampleType: z4.nullable(z4.array(components.SampleType$outboundSchema)).optional(), + source: z4.nullable(z4.array(components.Source$outboundSchema)).optional(), + search: z4.nullable(z4.string()).optional(), + purpose: z4.nullable(components.FilePurpose$outboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { pageSize: "page_size", sampleType: "sample_type" }); @@ -65239,7 +65722,7 @@ var require_filesapirouteslistfiles = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesListFilesRequest$outboundSchema.parse(filesApiRoutesListFilesRequest)); } function filesApiRoutesListFilesRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesListFilesRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesListFilesRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesListFilesRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesListFilesRequest' from JSON`); } } }); @@ -65248,51 +65731,51 @@ var require_filesapirouteslistfiles = __commonJS({ var require_filesapiroutesretrievefile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesretrievefile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FilesApiRoutesRetrieveFileRequest$ = exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = void 0; exports2.filesApiRoutesRetrieveFileRequestToJSON = filesApiRoutesRetrieveFileRequestToJSON; exports2.filesApiRoutesRetrieveFileRequestFromJSON = filesApiRoutesRetrieveFileRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = z3.object({ - file_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema = z4.object({ + file_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "file_id": "fileId" }); }); - exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = z3.object({ - fileId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema = z4.object({ + fileId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { fileId: "file_id" }); }); @@ -65305,7 +65788,7 @@ var require_filesapiroutesretrievefile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(filesApiRoutesRetrieveFileRequest)); } function filesApiRoutesRetrieveFileRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesRetrieveFileRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesRetrieveFileRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesRetrieveFileRequest' from JSON`); } } }); @@ -65314,38 +65797,38 @@ var require_filesapiroutesretrievefile = __commonJS({ var require_blobs = __commonJS({ "node_modules/@mistralai/mistralai/types/blobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.blobLikeSchema = void 0; exports2.isBlobLike = isBlobLike3; - var z3 = __importStar(require_lib5()); - exports2.blobLikeSchema = z3.custom(isBlobLike3, { + var z4 = __importStar2(require_lib5()); + exports2.blobLikeSchema = z4.custom(isBlobLike3, { message: "expected a Blob, File or Blob-like object", fatal: true }); @@ -65372,31 +65855,31 @@ var require_blobs = __commonJS({ var require_filesapiroutesuploadfile = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/filesapiroutesuploadfile.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -65405,26 +65888,26 @@ var require_filesapiroutesuploadfile = __commonJS({ exports2.fileFromJSON = fileFromJSON; exports2.filesApiRoutesUploadFileMultiPartBodyParamsToJSON = filesApiRoutesUploadFileMultiPartBodyParamsToJSON; exports2.filesApiRoutesUploadFileMultiPartBodyParamsFromJSON = filesApiRoutesUploadFileMultiPartBodyParamsFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); var blobs_js_1 = require_blobs(); - var components = __importStar(require_components()); - exports2.FileT$inboundSchema = z3.object({ - fileName: z3.string(), - content: z3.union([ - z3.instanceof(ReadableStream), - z3.instanceof(Blob), - z3.instanceof(ArrayBuffer), - z3.instanceof(Uint8Array) + var components = __importStar2(require_components()); + exports2.FileT$inboundSchema = z4.object({ + fileName: z4.string(), + content: z4.union([ + z4.instanceof(ReadableStream), + z4.instanceof(Blob), + z4.instanceof(ArrayBuffer), + z4.instanceof(Uint8Array) ]) }); - exports2.FileT$outboundSchema = z3.object({ - fileName: z3.string(), - content: z3.union([ - z3.instanceof(ReadableStream), - z3.instanceof(Blob), - z3.instanceof(ArrayBuffer), - z3.instanceof(Uint8Array) + exports2.FileT$outboundSchema = z4.object({ + fileName: z4.string(), + content: z4.union([ + z4.instanceof(ReadableStream), + z4.instanceof(Blob), + z4.instanceof(ArrayBuffer), + z4.instanceof(Uint8Array) ]) }); var FileT$; @@ -65436,14 +65919,14 @@ var require_filesapiroutesuploadfile = __commonJS({ return JSON.stringify(exports2.FileT$outboundSchema.parse(fileT)); } function fileFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FileT$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FileT' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FileT$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FileT' from JSON`); } - exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema = z3.object({ - file: z3.lazy(() => exports2.FileT$inboundSchema), + exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema = z4.object({ + file: z4.lazy(() => exports2.FileT$inboundSchema), purpose: components.FilePurpose$inboundSchema.optional() }); - exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema = z3.object({ - file: z3.lazy(() => exports2.FileT$outboundSchema).or(blobs_js_1.blobLikeSchema), + exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema = z4.object({ + file: z4.lazy(() => exports2.FileT$outboundSchema).or(blobs_js_1.blobLikeSchema), purpose: components.FilePurpose$outboundSchema.optional() }); var FilesApiRoutesUploadFileMultiPartBodyParams$; @@ -65455,7 +65938,7 @@ var require_filesapiroutesuploadfile = __commonJS({ return JSON.stringify(exports2.FilesApiRoutesUploadFileMultiPartBodyParams$outboundSchema.parse(filesApiRoutesUploadFileMultiPartBodyParams)); } function filesApiRoutesUploadFileMultiPartBodyParamsFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'FilesApiRoutesUploadFileMultiPartBodyParams' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.FilesApiRoutesUploadFileMultiPartBodyParams$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'FilesApiRoutesUploadFileMultiPartBodyParams' from JSON`); } } }); @@ -65464,51 +65947,51 @@ var require_filesapiroutesuploadfile = __commonJS({ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchcancelbatchjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchCancelBatchJobRequest$ = exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchCancelBatchJobRequestToJSON = jobsApiRoutesBatchCancelBatchJobRequestToJSON; exports2.jobsApiRoutesBatchCancelBatchJobRequestFromJSON = jobsApiRoutesBatchCancelBatchJobRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = z3.object({ - job_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema = z4.object({ + job_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = z3.object({ - jobId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema = z4.object({ + jobId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { jobId: "job_id" }); }); @@ -65521,7 +66004,7 @@ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(jobsApiRoutesBatchCancelBatchJobRequest)); } function jobsApiRoutesBatchCancelBatchJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesBatchCancelBatchJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesBatchCancelBatchJobRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesBatchCancelBatchJobRequest' from JSON`); } } }); @@ -65530,51 +66013,51 @@ var require_jobsapiroutesbatchcancelbatchjob = __commonJS({ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchgetbatchjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchGetBatchJobRequest$ = exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchGetBatchJobRequestToJSON = jobsApiRoutesBatchGetBatchJobRequestToJSON; exports2.jobsApiRoutesBatchGetBatchJobRequestFromJSON = jobsApiRoutesBatchGetBatchJobRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z3.object({ - job_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema = z4.object({ + job_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = z3.object({ - jobId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema = z4.object({ + jobId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { jobId: "job_id" }); }); @@ -65587,7 +66070,7 @@ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(jobsApiRoutesBatchGetBatchJobRequest)); } function jobsApiRoutesBatchGetBatchJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesBatchGetBatchJobRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobRequest' from JSON`); } } }); @@ -65596,66 +66079,66 @@ var require_jobsapiroutesbatchgetbatchjob = __commonJS({ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesbatchgetbatchjobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesBatchGetBatchJobsRequest$ = exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = void 0; exports2.jobsApiRoutesBatchGetBatchJobsRequestToJSON = jobsApiRoutesBatchGetBatchJobsRequestToJSON; exports2.jobsApiRoutesBatchGetBatchJobsRequestFromJSON = jobsApiRoutesBatchGetBatchJobsRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = z3.object({ - page: z3.number().int().default(0), - page_size: z3.number().int().default(100), - model: z3.nullable(z3.string()).optional(), - metadata: z3.nullable(z3.record(z3.any())).optional(), - created_after: z3.nullable(z3.string().datetime({ offset: true }).transform((v2) => new Date(v2))).optional(), - created_by_me: z3.boolean().default(false), - status: z3.nullable(components.BatchJobStatus$inboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + var components = __importStar2(require_components()); + exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema = z4.object({ + page: z4.number().int().default(0), + page_size: z4.number().int().default(100), + model: z4.nullable(z4.string()).optional(), + metadata: z4.nullable(z4.record(z4.any())).optional(), + created_after: z4.nullable(z4.string().datetime({ offset: true }).transform((v7) => new Date(v7))).optional(), + created_by_me: z4.boolean().default(false), + status: z4.nullable(components.BatchJobStatus$inboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "page_size": "pageSize", "created_after": "createdAfter", "created_by_me": "createdByMe" }); }); - exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = z3.object({ - page: z3.number().int().default(0), - pageSize: z3.number().int().default(100), - model: z3.nullable(z3.string()).optional(), - metadata: z3.nullable(z3.record(z3.any())).optional(), - createdAfter: z3.nullable(z3.date().transform((v2) => v2.toISOString())).optional(), - createdByMe: z3.boolean().default(false), - status: z3.nullable(components.BatchJobStatus$outboundSchema).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema = z4.object({ + page: z4.number().int().default(0), + pageSize: z4.number().int().default(100), + model: z4.nullable(z4.string()).optional(), + metadata: z4.nullable(z4.record(z4.any())).optional(), + createdAfter: z4.nullable(z4.date().transform((v7) => v7.toISOString())).optional(), + createdByMe: z4.boolean().default(false), + status: z4.nullable(components.BatchJobStatus$outboundSchema).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { pageSize: "page_size", createdAfter: "created_after", createdByMe: "created_by_me" @@ -65670,7 +66153,7 @@ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.parse(jobsApiRoutesBatchGetBatchJobsRequest)); } function jobsApiRoutesBatchGetBatchJobsRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobsRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesBatchGetBatchJobsRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesBatchGetBatchJobsRequest' from JSON`); } } }); @@ -65679,51 +66162,51 @@ var require_jobsapiroutesbatchgetbatchjobs = __commonJS({ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningarchivefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningArchiveFineTunedModelRequestToJSON = jobsApiRoutesFineTuningArchiveFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = z3.object({ - model_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema = z4.object({ + model_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "model_id": "modelId" }); }); - exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = z3.object({ - modelId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema = z4.object({ + modelId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { modelId: "model_id" }); }); @@ -65736,7 +66219,7 @@ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningArchiveFineTunedModelRequest)); } function jobsApiRoutesFineTuningArchiveFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningArchiveFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningArchiveFineTunedModelRequest' from JSON`); } } }); @@ -65745,51 +66228,51 @@ var require_jobsapiroutesfinetuningarchivefinetunedmodel = __commonJS({ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningcancelfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningCancelFineTuningJobRequestToJSON = jobsApiRoutesFineTuningCancelFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = z3.object({ - job_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema = z4.object({ + job_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = z3.object({ - jobId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema = z4.object({ + jobId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { jobId: "job_id" }); }); @@ -65802,7 +66285,7 @@ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningCancelFineTuningJobRequest)); } function jobsApiRoutesFineTuningCancelFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningCancelFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningCancelFineTuningJobRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningCancelFineTuningJobRequest' from JSON`); } } }); @@ -65811,45 +66294,45 @@ var require_jobsapiroutesfinetuningcancelfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningcreatefinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$ = exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningCreateFineTuningJobResponseToJSON = jobsApiRoutesFineTuningCreateFineTuningJobResponseToJSON; exports2.jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON = jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = z3.union([ + var components = __importStar2(require_components()); + exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema = z4.union([ components.LegacyJobMetadataOut$inboundSchema, components.JobOut$inboundSchema ]); - exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = z3.union([ + exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema = z4.union([ components.LegacyJobMetadataOut$outboundSchema, components.JobOut$outboundSchema ]); @@ -65862,7 +66345,7 @@ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$outboundSchema.parse(jobsApiRoutesFineTuningCreateFineTuningJobResponse)); } function jobsApiRoutesFineTuningCreateFineTuningJobResponseFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningCreateFineTuningJobResponse$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningCreateFineTuningJobResponse' from JSON`); } } }); @@ -65871,51 +66354,51 @@ var require_jobsapiroutesfinetuningcreatefinetuningjob = __commonJS({ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuninggetfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningGetFineTuningJobRequestToJSON = jobsApiRoutesFineTuningGetFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = z3.object({ - job_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema = z4.object({ + job_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = z3.object({ - jobId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema = z4.object({ + jobId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { jobId: "job_id" }); }); @@ -65928,7 +66411,7 @@ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningGetFineTuningJobRequest)); } function jobsApiRoutesFineTuningGetFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningGetFineTuningJobRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobRequest' from JSON`); } } }); @@ -65937,38 +66420,38 @@ var require_jobsapiroutesfinetuninggetfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuninggetfinetuningjobs.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$ = exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = exports2.Status$ = exports2.Status$outboundSchema = exports2.Status$inboundSchema = exports2.Status = void 0; exports2.jobsApiRoutesFineTuningGetFineTuningJobsRequestToJSON = jobsApiRoutesFineTuningGetFineTuningJobsRequestToJSON; exports2.jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON = jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); exports2.Status = { @@ -65983,25 +66466,25 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ Cancelled: "CANCELLED", CancellationRequested: "CANCELLATION_REQUESTED" }; - exports2.Status$inboundSchema = z3.nativeEnum(exports2.Status); + exports2.Status$inboundSchema = z4.nativeEnum(exports2.Status); exports2.Status$outboundSchema = exports2.Status$inboundSchema; var Status$; (function(Status$2) { Status$2.inboundSchema = exports2.Status$inboundSchema; Status$2.outboundSchema = exports2.Status$outboundSchema; })(Status$ || (exports2.Status$ = Status$ = {})); - exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = z3.object({ - page: z3.number().int().default(0), - page_size: z3.number().int().default(100), - model: z3.nullable(z3.string()).optional(), - created_after: z3.nullable(z3.string().datetime({ offset: true }).transform((v2) => new Date(v2))).optional(), - created_by_me: z3.boolean().default(false), - status: z3.nullable(exports2.Status$inboundSchema).optional(), - wandb_project: z3.nullable(z3.string()).optional(), - wandb_name: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema = z4.object({ + page: z4.number().int().default(0), + page_size: z4.number().int().default(100), + model: z4.nullable(z4.string()).optional(), + created_after: z4.nullable(z4.string().datetime({ offset: true }).transform((v7) => new Date(v7))).optional(), + created_by_me: z4.boolean().default(false), + status: z4.nullable(exports2.Status$inboundSchema).optional(), + wandb_project: z4.nullable(z4.string()).optional(), + wandb_name: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "page_size": "pageSize", "created_after": "createdAfter", "created_by_me": "createdByMe", @@ -66009,18 +66492,18 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ "wandb_name": "wandbName" }); }); - exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = z3.object({ - page: z3.number().int().default(0), - pageSize: z3.number().int().default(100), - model: z3.nullable(z3.string()).optional(), - createdAfter: z3.nullable(z3.date().transform((v2) => v2.toISOString())).optional(), - createdByMe: z3.boolean().default(false), - status: z3.nullable(exports2.Status$outboundSchema).optional(), - wandbProject: z3.nullable(z3.string()).optional(), - wandbName: z3.nullable(z3.string()).optional(), - suffix: z3.nullable(z3.string()).optional() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema = z4.object({ + page: z4.number().int().default(0), + pageSize: z4.number().int().default(100), + model: z4.nullable(z4.string()).optional(), + createdAfter: z4.nullable(z4.date().transform((v7) => v7.toISOString())).optional(), + createdByMe: z4.boolean().default(false), + status: z4.nullable(exports2.Status$outboundSchema).optional(), + wandbProject: z4.nullable(z4.string()).optional(), + wandbName: z4.nullable(z4.string()).optional(), + suffix: z4.nullable(z4.string()).optional() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { pageSize: "page_size", createdAfter: "created_after", createdByMe: "created_by_me", @@ -66037,7 +66520,7 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.parse(jobsApiRoutesFineTuningGetFineTuningJobsRequest)); } function jobsApiRoutesFineTuningGetFineTuningJobsRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobsRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningGetFineTuningJobsRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningGetFineTuningJobsRequest' from JSON`); } } }); @@ -66046,51 +66529,51 @@ var require_jobsapiroutesfinetuninggetfinetuningjobs = __commonJS({ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningstartfinetuningjob.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$ = exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningStartFineTuningJobRequestToJSON = jobsApiRoutesFineTuningStartFineTuningJobRequestToJSON; exports2.jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON = jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = z3.object({ - job_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema = z4.object({ + job_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "job_id": "jobId" }); }); - exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = z3.object({ - jobId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema = z4.object({ + jobId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { jobId: "job_id" }); }); @@ -66103,7 +66586,7 @@ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(jobsApiRoutesFineTuningStartFineTuningJobRequest)); } function jobsApiRoutesFineTuningStartFineTuningJobRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningStartFineTuningJobRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningStartFineTuningJobRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningStartFineTuningJobRequest' from JSON`); } } }); @@ -66112,51 +66595,51 @@ var require_jobsapiroutesfinetuningstartfinetuningjob = __commonJS({ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningunarchivefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestToJSON = jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = z3.object({ - model_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema = z4.object({ + model_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "model_id": "modelId" }); }); - exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = z3.object({ - modelId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema = z4.object({ + modelId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { modelId: "model_id" }); }); @@ -66169,7 +66652,7 @@ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUnarchiveFineTunedModelRequest)); } function jobsApiRoutesFineTuningUnarchiveFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest' from JSON`); } } }); @@ -66178,55 +66661,55 @@ var require_jobsapiroutesfinetuningunarchivefinetunedmodel = __commonJS({ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/jobsapiroutesfinetuningupdatefinetunedmodel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$ = exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = void 0; exports2.jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestToJSON; exports2.jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON = jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = z3.object({ - model_id: z3.string(), + var components = __importStar2(require_components()); + exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema = z4.object({ + model_id: z4.string(), UpdateFTModelIn: components.UpdateFTModelIn$inboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "model_id": "modelId", "UpdateFTModelIn": "updateFTModelIn" }); }); - exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z3.object({ - modelId: z3.string(), + exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema = z4.object({ + modelId: z4.string(), updateFTModelIn: components.UpdateFTModelIn$outboundSchema - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { modelId: "model_id", updateFTModelIn: "UpdateFTModelIn" }); @@ -66240,7 +66723,7 @@ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ return JSON.stringify(exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(jobsApiRoutesFineTuningUpdateFineTunedModelRequest)); } function jobsApiRoutesFineTuningUpdateFineTunedModelRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'JobsApiRoutesFineTuningUpdateFineTunedModelRequest' from JSON`); } } }); @@ -66249,31 +66732,31 @@ var require_jobsapiroutesfinetuningupdatefinetunedmodel = __commonJS({ var require_retrievemodelv1modelsmodelidget = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/retrievemodelv1modelsmodelidget.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -66282,21 +66765,21 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ exports2.retrieveModelV1ModelsModelIdGetRequestFromJSON = retrieveModelV1ModelsModelIdGetRequestFromJSON; exports2.retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetToJSON = retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetToJSON; exports2.retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON = retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var primitives_js_1 = require_primitives(); var schemas_js_1 = require_schemas(); - var components = __importStar(require_components()); - exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema = z3.object({ - model_id: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + var components = __importStar2(require_components()); + exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema = z4.object({ + model_id: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { "model_id": "modelId" }); }); - exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema = z3.object({ - modelId: z3.string() - }).transform((v2) => { - return (0, primitives_js_1.remap)(v2, { + exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema = z4.object({ + modelId: z4.string() + }).transform((v7) => { + return (0, primitives_js_1.remap)(v7, { modelId: "model_id" }); }); @@ -66309,22 +66792,22 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ return JSON.stringify(exports2.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(retrieveModelV1ModelsModelIdGetRequest)); } function retrieveModelV1ModelsModelIdGetRequestFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetRequest' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.RetrieveModelV1ModelsModelIdGetRequest$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetRequest' from JSON`); } - exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema = z3.union([ - components.BaseModelCard$inboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema = z4.union([ + components.BaseModelCard$inboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - components.FTModelCard$inboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + components.FTModelCard$inboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ]); - exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema = z3.union([ - components.BaseModelCard$outboundSchema.and(z3.object({ type: z3.literal("base") }).transform((v2) => ({ - type: v2.type + exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema = z4.union([ + components.BaseModelCard$outboundSchema.and(z4.object({ type: z4.literal("base") }).transform((v7) => ({ + type: v7.type }))), - components.FTModelCard$outboundSchema.and(z3.object({ type: z3.literal("fine-tuned") }).transform((v2) => ({ - type: v2.type + components.FTModelCard$outboundSchema.and(z4.object({ type: z4.literal("fine-tuned") }).transform((v7) => ({ + type: v7.type }))) ]); var RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$; @@ -66336,7 +66819,7 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ return JSON.stringify(exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$outboundSchema.parse(retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet)); } function retrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGetFromJSON(jsonString) { - return (0, schemas_js_1.safeParse)(jsonString, (x2) => exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema.parse(JSON.parse(x2)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet' from JSON`); + return (0, schemas_js_1.safeParse)(jsonString, (x4) => exports2.RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet$inboundSchema.parse(JSON.parse(x4)), `Failed to parse 'RetrieveModelV1ModelsModelIdGetResponseRetrieveModelV1ModelsModelIdGet' from JSON`); } } }); @@ -66345,42 +66828,42 @@ var require_retrievemodelv1modelsmodelidget = __commonJS({ var require_operations = __commonJS({ "node_modules/@mistralai/mistralai/models/operations/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_deletemodelv1modelsmodeliddelete(), exports2); - __exportStar(require_filesapiroutesdeletefile(), exports2); - __exportStar(require_filesapiroutesdownloadfile(), exports2); - __exportStar(require_filesapiroutesgetsignedurl(), exports2); - __exportStar(require_filesapirouteslistfiles(), exports2); - __exportStar(require_filesapiroutesretrievefile(), exports2); - __exportStar(require_filesapiroutesuploadfile(), exports2); - __exportStar(require_jobsapiroutesbatchcancelbatchjob(), exports2); - __exportStar(require_jobsapiroutesbatchgetbatchjob(), exports2); - __exportStar(require_jobsapiroutesbatchgetbatchjobs(), exports2); - __exportStar(require_jobsapiroutesfinetuningarchivefinetunedmodel(), exports2); - __exportStar(require_jobsapiroutesfinetuningcancelfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuningcreatefinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuninggetfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuninggetfinetuningjobs(), exports2); - __exportStar(require_jobsapiroutesfinetuningstartfinetuningjob(), exports2); - __exportStar(require_jobsapiroutesfinetuningunarchivefinetunedmodel(), exports2); - __exportStar(require_jobsapiroutesfinetuningupdatefinetunedmodel(), exports2); - __exportStar(require_retrievemodelv1modelsmodelidget(), exports2); + __exportStar2(require_deletemodelv1modelsmodeliddelete(), exports2); + __exportStar2(require_filesapiroutesdeletefile(), exports2); + __exportStar2(require_filesapiroutesdownloadfile(), exports2); + __exportStar2(require_filesapiroutesgetsignedurl(), exports2); + __exportStar2(require_filesapirouteslistfiles(), exports2); + __exportStar2(require_filesapiroutesretrievefile(), exports2); + __exportStar2(require_filesapiroutesuploadfile(), exports2); + __exportStar2(require_jobsapiroutesbatchcancelbatchjob(), exports2); + __exportStar2(require_jobsapiroutesbatchgetbatchjob(), exports2); + __exportStar2(require_jobsapiroutesbatchgetbatchjobs(), exports2); + __exportStar2(require_jobsapiroutesfinetuningarchivefinetunedmodel(), exports2); + __exportStar2(require_jobsapiroutesfinetuningcancelfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuningcreatefinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuninggetfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuninggetfinetuningjobs(), exports2); + __exportStar2(require_jobsapiroutesfinetuningstartfinetuningjob(), exports2); + __exportStar2(require_jobsapiroutesfinetuningunarchivefinetunedmodel(), exports2); + __exportStar2(require_jobsapiroutesfinetuningupdatefinetunedmodel(), exports2); + __exportStar2(require_retrievemodelv1modelsmodelidget(), exports2); } }); @@ -66388,42 +66871,42 @@ var require_operations = __commonJS({ var require_batchJobsCancel = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsCancel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsCancel = batchJobsCancel; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsCancel(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchCancelBatchJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -66487,41 +66970,41 @@ var require_batchJobsCancel = __commonJS({ var require_batchJobsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsCreate = batchJobsCreate; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); + var components = __importStar2(require_components()); async function batchJobsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.BatchJobIn$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -66580,42 +67063,42 @@ var require_batchJobsCreate = __commonJS({ var require_batchJobsGet = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsGet.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsGet = batchJobsGet; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsGet(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchGetBatchJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -66679,42 +67162,42 @@ var require_batchJobsGet = __commonJS({ var require_batchJobsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/batchJobsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.batchJobsList = batchJobsList; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function batchJobsList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesBatchGetBatchJobsRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -66842,8 +67325,8 @@ var require_batch = __commonJS({ var mistraljobs_js_1 = require_mistraljobs(); var Batch = class extends sdks_js_1.ClientSDK { get jobs() { - var _a5; - return (_a5 = this._jobs) !== null && _a5 !== void 0 ? _a5 : this._jobs = new mistraljobs_js_1.MistralJobs(this._options); + var _a6; + return (_a6 = this._jobs) !== null && _a6 !== void 0 ? _a6 : this._jobs = new mistraljobs_js_1.MistralJobs(this._options); } }; exports2.Batch = Batch; @@ -66854,42 +67337,42 @@ var require_batch = __commonJS({ var require_chatComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/chatComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.chatComplete = chatComplete; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function chatComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -66951,44 +67434,44 @@ var require_chatComplete = __commonJS({ var require_chatStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/chatStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.chatStream = chatStream; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function chatStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67037,7 +67520,7 @@ var require_chatStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M4.match(M4.sse(200, z3.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M4.match(M4.sse(200, z4.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -67089,42 +67572,42 @@ var require_chat = __commonJS({ var require_classifiersModerate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/classifiersModerate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.classifiersModerate = classifiersModerate; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function classifiersModerate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ClassificationRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67186,42 +67669,42 @@ var require_classifiersModerate = __commonJS({ var require_classifiersModerateChat = __commonJS({ "node_modules/@mistralai/mistralai/funcs/classifiersModerateChat.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.classifiersModerateChat = classifiersModerateChat; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function classifiersModerateChat(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.ChatClassificationRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67311,42 +67794,42 @@ var require_classifiers = __commonJS({ var require_embeddingsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/embeddingsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.embeddingsCreate = embeddingsCreate; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function embeddingsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.EmbeddingRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67432,42 +67915,42 @@ var require_embeddings = __commonJS({ var require_filesDelete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesDelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesDelete = filesDelete; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesDelete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesDeleteFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67531,42 +68014,42 @@ var require_filesDelete = __commonJS({ var require_filesDownload = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesDownload.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesDownload = filesDownload; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var operations = __importStar(require_operations()); + var operations = __importStar2(require_operations()); async function filesDownload(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesDownloadFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67617,7 +68100,7 @@ var require_filesDownload = __commonJS({ return doResult; } const response = doResult.value; - const [result] = await M4.match(M4.stream(200, z3.instanceof(ReadableStream)), M4.fail(["4XX", "5XX"]))(response); + const [result] = await M4.match(M4.stream(200, z4.instanceof(ReadableStream)), M4.fail(["4XX", "5XX"]))(response); if (!result.ok) { return result; } @@ -67630,42 +68113,42 @@ var require_filesDownload = __commonJS({ var require_filesGetSignedUrl = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesGetSignedUrl.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesGetSignedUrl = filesGetSignedUrl; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesGetSignedUrl(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67733,42 +68216,42 @@ var require_filesGetSignedUrl = __commonJS({ var require_filesList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesList = filesList; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesListFilesRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67835,42 +68318,42 @@ var require_filesList = __commonJS({ var require_filesRetrieve = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesRetrieve.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesRetrieve = filesRetrieve; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function filesRetrieve(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.FilesApiRoutesRetrieveFileRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -67935,8 +68418,8 @@ var require_streams = __commonJS({ "node_modules/@mistralai/mistralai/types/streams.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReadableStream = isReadableStream5; - function isReadableStream5(val) { + exports2.isReadableStream = isReadableStream6; + function isReadableStream6(val) { if (typeof val !== "object" || val === null) { return false; } @@ -67950,42 +68433,42 @@ var require_streams = __commonJS({ var require_filesUpload = __commonJS({ "node_modules/@mistralai/mistralai/funcs/filesUpload.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.filesUpload = filesUpload; var files_js_1 = require_files(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); var blobs_js_1 = require_blobs(); var streams_js_1 = require_streams(); async function filesUpload(client, request3, options) { @@ -68132,42 +68615,42 @@ var require_files2 = __commonJS({ var require_fimComplete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fimComplete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fimComplete = fimComplete; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function fimComplete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.FIMCompletionRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68229,44 +68712,44 @@ var require_fimComplete = __commonJS({ var require_fimStream = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fimStream.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fimStream = fimStream; - var z3 = __importStar(require_lib5()); + var z4 = __importStar2(require_lib5()); var encodings_js_1 = require_encodings(); var event_streams_js_1 = require_event_streams(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function fimStream(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.FIMCompletionStreamRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68315,7 +68798,7 @@ var require_fimStream = __commonJS({ const responseFields = { HttpMeta: { Response: response, Request: req } }; - const [result] = await M4.match(M4.sse(200, z3.instanceof(ReadableStream).transform((stream4) => { + const [result] = await M4.match(M4.sse(200, z4.instanceof(ReadableStream).transform((stream4) => { return new event_streams_js_1.EventStream({ stream: stream4, decoder(rawEvent) { @@ -68370,42 +68853,42 @@ var require_fim = __commonJS({ var require_fineTuningJobsCancel = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsCancel.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsCancel = fineTuningJobsCancel; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsCancel(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningCancelFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68469,42 +68952,42 @@ var require_fineTuningJobsCancel = __commonJS({ var require_fineTuningJobsCreate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsCreate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsCreate = fineTuningJobsCreate; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsCreate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => components.JobIn$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68563,42 +69046,42 @@ var require_fineTuningJobsCreate = __commonJS({ var require_fineTuningJobsGet = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsGet.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsGet = fineTuningJobsGet; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsGet(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningGetFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68662,42 +69145,42 @@ var require_fineTuningJobsGet = __commonJS({ var require_fineTuningJobsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsList = fineTuningJobsList; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsList(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningGetFineTuningJobsRequest$outboundSchema.optional().parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68767,42 +69250,42 @@ var require_fineTuningJobsList = __commonJS({ var require_fineTuningJobsStart = __commonJS({ "node_modules/@mistralai/mistralai/funcs/fineTuningJobsStart.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fineTuningJobsStart = fineTuningJobsStart; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function fineTuningJobsStart(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningStartFineTuningJobRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -68936,8 +69419,8 @@ var require_finetuning = __commonJS({ var jobs_js_1 = require_jobs(); var FineTuning2 = class extends sdks_js_1.ClientSDK { get jobs() { - var _a5; - return (_a5 = this._jobs) !== null && _a5 !== void 0 ? _a5 : this._jobs = new jobs_js_1.Jobs(this._options); + var _a6; + return (_a6 = this._jobs) !== null && _a6 !== void 0 ? _a6 : this._jobs = new jobs_js_1.Jobs(this._options); } }; exports2.FineTuning = FineTuning2; @@ -68948,42 +69431,42 @@ var require_finetuning = __commonJS({ var require_modelsArchive = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsArchive.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsArchive = modelsArchive; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsArchive(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningArchiveFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -69047,43 +69530,43 @@ var require_modelsArchive = __commonJS({ var require_modelsDelete = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsDelete.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsDelete = modelsDelete; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); + var operations = __importStar2(require_operations()); async function modelsDelete(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.DeleteModelV1ModelsModelIdDeleteRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -69150,40 +69633,40 @@ var require_modelsDelete = __commonJS({ var require_modelsList = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsList.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsList = modelsList; - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var errors = __importStar(require_errors3()); + var components = __importStar2(require_components()); + var errors = __importStar2(require_errors3()); async function modelsList(client, options) { const path2 = (0, url_js_1.pathToFunc)("/v1/models")(); const headers = new Headers({ @@ -69237,42 +69720,42 @@ var require_modelsList = __commonJS({ var require_modelsRetrieve = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsRetrieve.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsRetrieve = modelsRetrieve; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var errors = __importStar(require_errors3()); - var operations = __importStar(require_operations()); + var errors = __importStar2(require_errors3()); + var operations = __importStar2(require_operations()); async function modelsRetrieve(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.RetrieveModelV1ModelsModelIdGetRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -69339,42 +69822,42 @@ var require_modelsRetrieve = __commonJS({ var require_modelsUnarchive = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsUnarchive.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsUnarchive = modelsUnarchive; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsUnarchive(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningUnarchiveFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -69438,42 +69921,42 @@ var require_modelsUnarchive = __commonJS({ var require_modelsUpdate = __commonJS({ "node_modules/@mistralai/mistralai/funcs/modelsUpdate.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.modelsUpdate = modelsUpdate; var encodings_js_1 = require_encodings(); - var M4 = __importStar(require_matchers()); + var M4 = __importStar2(require_matchers()); var schemas_js_1 = require_schemas(); var security_js_1 = require_security(); var url_js_1 = require_url(); - var components = __importStar(require_components()); - var operations = __importStar(require_operations()); + var components = __importStar2(require_components()); + var operations = __importStar2(require_operations()); async function modelsUpdate(client, request3, options) { const parsed = (0, schemas_js_1.safeParse)(request3, (value) => operations.JobsApiRoutesFineTuningUpdateFineTunedModelRequest$outboundSchema.parse(value), "Input validation failed"); if (!parsed.ok) { @@ -69626,40 +70109,40 @@ var require_sdk = __commonJS({ var models_js_1 = require_models(); var Mistral2 = class extends sdks_js_1.ClientSDK { get models() { - var _a5; - return (_a5 = this._models) !== null && _a5 !== void 0 ? _a5 : this._models = new models_js_1.Models(this._options); + var _a6; + return (_a6 = this._models) !== null && _a6 !== void 0 ? _a6 : this._models = new models_js_1.Models(this._options); } get files() { - var _a5; - return (_a5 = this._files) !== null && _a5 !== void 0 ? _a5 : this._files = new files_js_1.Files(this._options); + var _a6; + return (_a6 = this._files) !== null && _a6 !== void 0 ? _a6 : this._files = new files_js_1.Files(this._options); } get fineTuning() { - var _a5; - return (_a5 = this._fineTuning) !== null && _a5 !== void 0 ? _a5 : this._fineTuning = new finetuning_js_1.FineTuning(this._options); + var _a6; + return (_a6 = this._fineTuning) !== null && _a6 !== void 0 ? _a6 : this._fineTuning = new finetuning_js_1.FineTuning(this._options); } get batch() { - var _a5; - return (_a5 = this._batch) !== null && _a5 !== void 0 ? _a5 : this._batch = new batch_js_1.Batch(this._options); + var _a6; + return (_a6 = this._batch) !== null && _a6 !== void 0 ? _a6 : this._batch = new batch_js_1.Batch(this._options); } get chat() { - var _a5; - return (_a5 = this._chat) !== null && _a5 !== void 0 ? _a5 : this._chat = new chat_js_1.Chat(this._options); + var _a6; + return (_a6 = this._chat) !== null && _a6 !== void 0 ? _a6 : this._chat = new chat_js_1.Chat(this._options); } get fim() { - var _a5; - return (_a5 = this._fim) !== null && _a5 !== void 0 ? _a5 : this._fim = new fim_js_1.Fim(this._options); + var _a6; + return (_a6 = this._fim) !== null && _a6 !== void 0 ? _a6 : this._fim = new fim_js_1.Fim(this._options); } get agents() { - var _a5; - return (_a5 = this._agents) !== null && _a5 !== void 0 ? _a5 : this._agents = new agents_js_1.Agents(this._options); + var _a6; + return (_a6 = this._agents) !== null && _a6 !== void 0 ? _a6 : this._agents = new agents_js_1.Agents(this._options); } get embeddings() { - var _a5; - return (_a5 = this._embeddings) !== null && _a5 !== void 0 ? _a5 : this._embeddings = new embeddings_js_1.Embeddings(this._options); + var _a6; + return (_a6 = this._embeddings) !== null && _a6 !== void 0 ? _a6 : this._embeddings = new embeddings_js_1.Embeddings(this._options); } get classifiers() { - var _a5; - return (_a5 = this._classifiers) !== null && _a5 !== void 0 ? _a5 : this._classifiers = new classifiers_js_1.Classifiers(this._options); + var _a6; + return (_a6 = this._classifiers) !== null && _a6 !== void 0 ? _a6 : this._classifiers = new classifiers_js_1.Classifiers(this._options); } }; exports2.Mistral = Mistral2; @@ -69670,256 +70153,25454 @@ var require_sdk = __commonJS({ var require_mistralai = __commonJS({ "node_modules/@mistralai/mistralai/index.js"(exports2) { "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { - return m4[k4]; + return m6[k6]; } }; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; }); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) { - Object.defineProperty(o3, "default", { enumerable: true, value: v2 }); - } : function(o3, v2) { - o3["default"] = v2; + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); }; - var __importStar = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k4 in mod) if (k4 !== "default" && Object.prototype.hasOwnProperty.call(mod, k4)) __createBinding(result, mod, k4); + for (var k6 in mod) if (k6 !== "default" && Object.prototype.hasOwnProperty.call(mod, k6)) __createBinding2(result, mod, k6); } - __setModuleDefault(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.files = void 0; - __exportStar(require_config(), exports2); - exports2.files = __importStar(require_files()); - __exportStar(require_sdk(), exports2); + __exportStar2(require_config(), exports2); + exports2.files = __importStar2(require_files()); + __exportStar2(require_sdk(), exports2); } }); -// node_modules/@commitlint/types/lib/ensure.js -var require_ensure = __commonJS({ - "node_modules/@commitlint/types/lib/ensure.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// node_modules/@smithy/types/dist-cjs/index.js +var require_dist_cjs = __commonJS({ + "node_modules/@smithy/types/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AlgorithmId: () => AlgorithmId, + EndpointURLScheme: () => EndpointURLScheme, + FieldPosition: () => FieldPosition, + HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation2, + HttpAuthLocation: () => HttpAuthLocation, + IniSectionType: () => IniSectionType, + RequestHandlerProtocol: () => RequestHandlerProtocol, + SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY4, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => { + HttpAuthLocation2["HEADER"] = "header"; + HttpAuthLocation2["QUERY"] = "query"; + return HttpAuthLocation2; + })(HttpAuthLocation || {}); + var HttpApiKeyAuthLocation2 = /* @__PURE__ */ ((HttpApiKeyAuthLocation22) => { + HttpApiKeyAuthLocation22["HEADER"] = "header"; + HttpApiKeyAuthLocation22["QUERY"] = "query"; + return HttpApiKeyAuthLocation22; + })(HttpApiKeyAuthLocation2 || {}); + var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => { + EndpointURLScheme2["HTTP"] = "http"; + EndpointURLScheme2["HTTPS"] = "https"; + return EndpointURLScheme2; + })(EndpointURLScheme || {}); + var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => { + AlgorithmId2["MD5"] = "md5"; + AlgorithmId2["CRC32"] = "crc32"; + AlgorithmId2["CRC32C"] = "crc32c"; + AlgorithmId2["SHA1"] = "sha1"; + AlgorithmId2["SHA256"] = "sha256"; + return AlgorithmId2; + })(AlgorithmId || {}); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== void 0) { + checksumAlgorithms.push({ + algorithmId: () => "sha256", + checksumConstructor: () => runtimeConfig.sha256 + }); + } + if (runtimeConfig.md5 != void 0) { + checksumAlgorithms.push({ + algorithmId: () => "md5", + checksumConstructor: () => runtimeConfig.md5 + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return getChecksumConfiguration(runtimeConfig); + }, "getDefaultClientConfiguration"); + var resolveDefaultRuntimeConfig3 = /* @__PURE__ */ __name((config6) => { + return resolveChecksumRuntimeConfig(config6); + }, "resolveDefaultRuntimeConfig"); + var FieldPosition = /* @__PURE__ */ ((FieldPosition2) => { + FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER"; + FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER"; + return FieldPosition2; + })(FieldPosition || {}); + var SMITHY_CONTEXT_KEY4 = "__smithy_context"; + var IniSectionType = /* @__PURE__ */ ((IniSectionType2) => { + IniSectionType2["PROFILE"] = "profile"; + IniSectionType2["SSO_SESSION"] = "sso-session"; + IniSectionType2["SERVICES"] = "services"; + return IniSectionType2; + })(IniSectionType || {}); + var RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => { + RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0"; + return RequestHandlerProtocol2; + })(RequestHandlerProtocol || {}); } }); -// node_modules/@commitlint/types/lib/format.js -var require_format = __commonJS({ - "node_modules/@commitlint/types/lib/format.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// node_modules/@smithy/protocol-http/dist-cjs/index.js +var require_dist_cjs2 = __commonJS({ + "node_modules/@smithy/protocol-http/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Field: () => Field, + Fields: () => Fields, + HttpRequest: () => HttpRequest10, + HttpResponse: () => HttpResponse4, + IHttpRequest: () => import_types6.HttpRequest, + getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration3, + isValidHostname: () => isValidHostname, + resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var getHttpHandlerExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; + }, + httpHandler() { + return runtimeConfig.httpHandler; + }, + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); + } + }; + }, "getHttpHandlerExtensionConfiguration"); + var resolveHttpHandlerRuntimeConfig3 = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler() + }; + }, "resolveHttpHandlerRuntimeConfig"); + var import_types6 = require_dist_cjs(); + var Field = class { + static { + __name(this, "Field"); + } + constructor({ name, kind: kind3 = import_types6.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind3; + this.values = values; + } + /** + * Appends a value to the field. + * + * @param value The value to append. + */ + add(value) { + this.values.push(value); + } + /** + * Overwrite existing field values. + * + * @param values The new field values. + */ + set(values) { + this.values = values; + } + /** + * Remove all matching entries from list. + * + * @param value Value to remove. + */ + remove(value) { + this.values = this.values.filter((v7) => v7 !== value); + } + /** + * Get comma-delimited string. + * + * @returns String representation of {@link Field}. + */ + toString() { + return this.values.map((v7) => v7.includes(",") || v7.includes(" ") ? `"${v7}"` : v7).join(", "); + } + /** + * Get string values as a list + * + * @returns Values in {@link Field} as a list. + */ + get() { + return this.values; + } + }; + var Fields = class { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + static { + __name(this, "Fields"); + } + /** + * Set entry for a {@link Field} name. The `name` + * attribute will be used to key the collection. + * + * @param field The {@link Field} to set. + */ + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + /** + * Retrieve {@link Field} entry by name. + * + * @param name The name of the {@link Field} entry + * to retrieve + * @returns The {@link Field} if it exists. + */ + getField(name) { + return this.entries[name.toLowerCase()]; + } + /** + * Delete entry from collection. + * + * @param name Name of the entry to delete. + */ + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + /** + * Helper function for retrieving specific types of fields. + * Used to grab all headers or all trailers. + * + * @param kind {@link FieldPosition} of entries to retrieve. + * @returns The {@link Field} entries with the specified + * {@link FieldPosition}. + */ + getByType(kind3) { + return Object.values(this.entries).filter((field) => field.kind === kind3); + } + }; + var HttpRequest10 = class _HttpRequest { + static { + __name(this, "HttpRequest"); + } + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:"; + this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + /** + * Note: this does not deep-clone the body. + */ + static clone(request3) { + const cloned = new _HttpRequest({ + ...request3, + headers: { ...request3.headers } + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + /** + * This method only actually asserts that request is the interface {@link IHttpRequest}, + * and not necessarily this concrete class. Left in place for API stability. + * + * Do not call instance methods on the input of this function, and + * do not assume it has the HttpRequest prototype. + */ + static isInstance(request3) { + if (!request3) { + return false; + } + const req = request3; + return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object"; + } + /** + * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call + * this method because {@link HttpRequest.isInstance} incorrectly + * asserts that IHttpRequest (interface) objects are of type HttpRequest (class). + */ + clone() { + return _HttpRequest.clone(this); + } + }; + function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param + }; + }, {}); + } + __name(cloneQuery, "cloneQuery"); + var HttpResponse4 = class { + static { + __name(this, "HttpResponse"); + } + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } + }; + function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); + } + __name(isValidHostname, "isValidHostname"); } }); -// node_modules/@commitlint/types/lib/is-ignored.js -var require_is_ignored = __commonJS({ - "node_modules/@commitlint/types/lib/is-ignored.js"(exports2) { +// node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +var require_dist_cjs3 = __commonJS({ + "node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + eventStreamHandlingMiddleware: () => eventStreamHandlingMiddleware, + eventStreamHandlingMiddlewareOptions: () => eventStreamHandlingMiddlewareOptions, + eventStreamHeaderMiddleware: () => eventStreamHeaderMiddleware, + eventStreamHeaderMiddlewareOptions: () => eventStreamHeaderMiddlewareOptions, + getEventStreamPlugin: () => getEventStreamPlugin, + resolveEventStreamConfig: () => resolveEventStreamConfig + }); + module2.exports = __toCommonJS2(index_exports); + function resolveEventStreamConfig(input) { + const eventSigner = input.signer; + const messageSigner = input.signer; + const newInput = Object.assign(input, { + eventSigner, + messageSigner + }); + const eventStreamPayloadHandler = newInput.eventStreamPayloadHandlerProvider(newInput); + return Object.assign(newInput, { + eventStreamPayloadHandler + }); + } + __name(resolveEventStreamConfig, "resolveEventStreamConfig"); + var import_protocol_http15 = require_dist_cjs2(); + var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) return next(args); + return options.eventStreamPayloadHandler.handle(next, args, context2); + }, "eventStreamHandlingMiddleware"); + var eventStreamHandlingMiddlewareOptions = { + tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"], + name: "eventStreamHandlingMiddleware", + relation: "after", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var eventStreamHeaderMiddleware = /* @__PURE__ */ __name((next) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) return next(args); + request3.headers = { + ...request3.headers, + "content-type": "application/vnd.amazon.eventstream", + "x-amz-content-sha256": "STREAMING-AWS4-HMAC-SHA256-EVENTS" + }; + return next({ + ...args, + request: request3 + }); + }, "eventStreamHeaderMiddleware"); + var eventStreamHeaderMiddlewareOptions = { + step: "build", + tags: ["EVENT_STREAM", "HEADER", "CONTENT_TYPE", "CONTENT_SHA256"], + name: "eventStreamHeaderMiddleware", + override: true + }; + var getEventStreamPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(eventStreamHandlingMiddleware(options), eventStreamHandlingMiddlewareOptions); + clientStack.add(eventStreamHeaderMiddleware, eventStreamHeaderMiddlewareOptions); + }, "applyToStack") + }), "getEventStreamPlugin"); } }); -// node_modules/@commitlint/types/lib/lint.js -var require_lint = __commonJS({ - "node_modules/@commitlint/types/lib/lint.js"(exports2) { +// node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +var require_dist_cjs4 = __commonJS({ + "node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + getHostHeaderPlugin: () => getHostHeaderPlugin3, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig3 + }); + module2.exports = __toCommonJS2(index_exports); + var import_protocol_http15 = require_dist_cjs2(); + function resolveHostHeaderConfig3(input) { + return input; + } + __name(resolveHostHeaderConfig3, "resolveHostHeaderConfig"); + var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http15.HttpRequest.isInstance(args.request)) return next(args); + const { request: request3 } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request3.headers[":authority"]) { + delete request3.headers["host"]; + request3.headers[":authority"] = request3.hostname + (request3.port ? ":" + request3.port : ""); + } else if (!request3.headers["host"]) { + let host = request3.hostname; + if (request3.port != null) host += `:${request3.port}`; + request3.headers["host"] = host; + } + return next(args); + }, "hostHeaderMiddleware"); + var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true + }; + var getHostHeaderPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + }, "applyToStack") + }), "getHostHeaderPlugin"); } }); -// node_modules/@commitlint/types/lib/load.js -var require_load = __commonJS({ - "node_modules/@commitlint/types/lib/load.js"(exports2) { +// node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +var require_dist_cjs5 = __commonJS({ + "node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + getLoggerPlugin: () => getLoggerPlugin3, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions + }); + module2.exports = __toCommonJS2(index_exports); + var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context2) => async (args) => { + try { + const response = await next(args); + const { clientName, commandName, logger: logger5, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context2.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + logger5?.info?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger: logger5, dynamoDbDocumentClientOptions = {} } = context2; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context2.inputFilterSensitiveLog; + logger5?.error?.({ + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; + } + }, "loggerMiddleware"); + var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true + }; + var getLoggerPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); + }, "applyToStack") + }), "getLoggerPlugin"); } }); -// node_modules/@commitlint/types/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/@commitlint/types/lib/parse.js"(exports2) { +// node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +var require_dist_cjs6 = __commonJS({ + "node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js"(exports2, module2) { "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin3, + recursionDetectionMiddleware: () => recursionDetectionMiddleware + }); + module2.exports = __toCommonJS2(index_exports); + var import_protocol_http15 = require_dist_cjs2(); + var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; + var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; + var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; + var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3) || options.runtime !== "node") { + return next(args); + } + const traceIdHeader = Object.keys(request3.headers ?? {}).find((h5) => h5.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME; + if (request3.headers.hasOwnProperty(traceIdHeader)) { + return next(args); + } + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = /* @__PURE__ */ __name((str2) => typeof str2 === "string" && str2.length > 0, "nonEmptyString"); + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request3.headers[TRACE_ID_HEADER_NAME] = traceId; + } + return next({ + ...args, + request: request3 + }); + }, "recursionDetectionMiddleware"); + var addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" + }; + var getRecursionDetectionPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); + }, "applyToStack") + }), "getRecursionDetectionPlugin"); } }); -// node_modules/@commitlint/types/lib/prompt.js -var require_prompt = __commonJS({ - "node_modules/@commitlint/types/lib/prompt.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); +// node_modules/@smithy/core/dist-es/getSmithyContext.js +var import_types, getSmithyContext; +var init_getSmithyContext = __esm({ + "node_modules/@smithy/core/dist-es/getSmithyContext.js"() { + import_types = __toESM(require_dist_cjs()); + getSmithyContext = (context2) => context2[import_types.SMITHY_CONTEXT_KEY] || (context2[import_types.SMITHY_CONTEXT_KEY] = {}); } }); -// node_modules/@commitlint/types/lib/rules.js -var require_rules = __commonJS({ - "node_modules/@commitlint/types/lib/rules.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.RuleConfigQuality = exports2.RuleConfigSeverity = void 0; - var RuleConfigSeverity2; - (function(RuleConfigSeverity3) { - RuleConfigSeverity3[RuleConfigSeverity3["Disabled"] = 0] = "Disabled"; - RuleConfigSeverity3[RuleConfigSeverity3["Warning"] = 1] = "Warning"; - RuleConfigSeverity3[RuleConfigSeverity3["Error"] = 2] = "Error"; - })(RuleConfigSeverity2 || (exports2.RuleConfigSeverity = RuleConfigSeverity2 = {})); - var RuleConfigQuality; - (function(RuleConfigQuality2) { - RuleConfigQuality2[RuleConfigQuality2["User"] = 0] = "User"; - RuleConfigQuality2[RuleConfigQuality2["Qualified"] = 1] = "Qualified"; - })(RuleConfigQuality || (exports2.RuleConfigQuality = RuleConfigQuality = {})); +// node_modules/@smithy/util-middleware/dist-cjs/index.js +var require_dist_cjs7 = __commonJS({ + "node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + getSmithyContext: () => getSmithyContext8, + normalizeProvider: () => normalizeProvider4 + }); + module2.exports = __toCommonJS2(src_exports); + var import_types6 = require_dist_cjs(); + var getSmithyContext8 = /* @__PURE__ */ __name((context2) => context2[import_types6.SMITHY_CONTEXT_KEY] || (context2[import_types6.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); + var normalizeProvider4 = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }, "normalizeProvider"); } }); -// node_modules/@commitlint/types/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@commitlint/types/lib/index.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - var desc = Object.getOwnPropertyDescriptor(m4, k4); - if (!desc || ("get" in desc ? !m4.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m4[k4]; - } }; +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js +var resolveAuthOptions; +var init_resolveAuthOptions = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/resolveAuthOptions.js"() { + resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => { + if (!authSchemePreference || authSchemePreference.length === 0) { + return candidateAuthOptions; } - Object.defineProperty(o3, k22, desc); - } : function(o3, m4, k4, k22) { - if (k22 === void 0) k22 = k4; - o3[k22] = m4[k4]; - }); - var __exportStar = exports2 && exports2.__exportStar || function(m4, exports3) { - for (var p3 in m4) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p3)) __createBinding(exports3, m4, p3); + const preferredAuthOptions = []; + for (const preferredSchemeName of authSchemePreference) { + for (const candidateAuthOption of candidateAuthOptions) { + const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1]; + if (candidateAuthSchemeName === preferredSchemeName) { + preferredAuthOptions.push(candidateAuthOption); + } + } + } + for (const candidateAuthOption of candidateAuthOptions) { + if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) { + preferredAuthOptions.push(candidateAuthOption); + } + } + return preferredAuthOptions; }; - Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar(require_ensure(), exports2); - __exportStar(require_format(), exports2); - __exportStar(require_is_ignored(), exports2); - __exportStar(require_lint(), exports2); - __exportStar(require_load(), exports2); - __exportStar(require_parse3(), exports2); - __exportStar(require_prompt(), exports2); - __exportStar(require_rules(), exports2); } }); -// src/github-action.ts -var import_core22 = __toESM(require_core(), 1); -var import_exec = __toESM(require_exec(), 1); -var import_github = __toESM(require_github(), 1); +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map2 = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map2.set(scheme.schemeId, scheme); + } + return map2; +} +var import_types2, import_util_middleware, httpAuthSchemeMiddleware; +var init_httpAuthSchemeMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() { + import_types2 = __toESM(require_dist_cjs()); + import_util_middleware = __toESM(require_dist_cjs7()); + init_resolveAuthOptions(); + httpAuthSchemeMiddleware = (config6, mwOptions) => (next, context2) => async (args) => { + const options = config6.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config6, context2, args.input)); + const authSchemePreference = config6.authSchemePreference ? await config6.authSchemePreference() : []; + const resolvedOptions = resolveAuthOptions(options, authSchemePreference); + const authSchemes = convertHttpAuthSchemesToMap(config6.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context2); + const failureReasons = []; + for (const option of resolvedOptions) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config6)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config6, context2) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); + }; + } +}); -// node_modules/@clack/core/dist/index.mjs -var import_sisteransi = __toESM(require_src(), 1); -var import_node_process = require("node:process"); -var f = __toESM(require("node:readline"), 1); -function j(t2) { - return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2; -} -var M = { exports: {} }; -(function(t2) { - var u3 = {}; - t2.exports = u3, u3.eastAsianWidth = function(e3) { - var s2 = e3.charCodeAt(0), C3 = e3.length == 2 ? e3.charCodeAt(1) : 0, D4 = s2; - return 55296 <= s2 && s2 <= 56319 && 56320 <= C3 && C3 <= 57343 && (s2 &= 1023, C3 &= 1023, D4 = s2 << 10 | C3, D4 += 65536), D4 == 12288 || 65281 <= D4 && D4 <= 65376 || 65504 <= D4 && D4 <= 65510 ? "F" : D4 == 8361 || 65377 <= D4 && D4 <= 65470 || 65474 <= D4 && D4 <= 65479 || 65482 <= D4 && D4 <= 65487 || 65490 <= D4 && D4 <= 65495 || 65498 <= D4 && D4 <= 65500 || 65512 <= D4 && D4 <= 65518 ? "H" : 4352 <= D4 && D4 <= 4447 || 4515 <= D4 && D4 <= 4519 || 4602 <= D4 && D4 <= 4607 || 9001 <= D4 && D4 <= 9002 || 11904 <= D4 && D4 <= 11929 || 11931 <= D4 && D4 <= 12019 || 12032 <= D4 && D4 <= 12245 || 12272 <= D4 && D4 <= 12283 || 12289 <= D4 && D4 <= 12350 || 12353 <= D4 && D4 <= 12438 || 12441 <= D4 && D4 <= 12543 || 12549 <= D4 && D4 <= 12589 || 12593 <= D4 && D4 <= 12686 || 12688 <= D4 && D4 <= 12730 || 12736 <= D4 && D4 <= 12771 || 12784 <= D4 && D4 <= 12830 || 12832 <= D4 && D4 <= 12871 || 12880 <= D4 && D4 <= 13054 || 13056 <= D4 && D4 <= 19903 || 19968 <= D4 && D4 <= 42124 || 42128 <= D4 && D4 <= 42182 || 43360 <= D4 && D4 <= 43388 || 44032 <= D4 && D4 <= 55203 || 55216 <= D4 && D4 <= 55238 || 55243 <= D4 && D4 <= 55291 || 63744 <= D4 && D4 <= 64255 || 65040 <= D4 && D4 <= 65049 || 65072 <= D4 && D4 <= 65106 || 65108 <= D4 && D4 <= 65126 || 65128 <= D4 && D4 <= 65131 || 110592 <= D4 && D4 <= 110593 || 127488 <= D4 && D4 <= 127490 || 127504 <= D4 && D4 <= 127546 || 127552 <= D4 && D4 <= 127560 || 127568 <= D4 && D4 <= 127569 || 131072 <= D4 && D4 <= 194367 || 177984 <= D4 && D4 <= 196605 || 196608 <= D4 && D4 <= 262141 ? "W" : 32 <= D4 && D4 <= 126 || 162 <= D4 && D4 <= 163 || 165 <= D4 && D4 <= 166 || D4 == 172 || D4 == 175 || 10214 <= D4 && D4 <= 10221 || 10629 <= D4 && D4 <= 10630 ? "Na" : D4 == 161 || D4 == 164 || 167 <= D4 && D4 <= 168 || D4 == 170 || 173 <= D4 && D4 <= 174 || 176 <= D4 && D4 <= 180 || 182 <= D4 && D4 <= 186 || 188 <= D4 && D4 <= 191 || D4 == 198 || D4 == 208 || 215 <= D4 && D4 <= 216 || 222 <= D4 && D4 <= 225 || D4 == 230 || 232 <= D4 && D4 <= 234 || 236 <= D4 && D4 <= 237 || D4 == 240 || 242 <= D4 && D4 <= 243 || 247 <= D4 && D4 <= 250 || D4 == 252 || D4 == 254 || D4 == 257 || D4 == 273 || D4 == 275 || D4 == 283 || 294 <= D4 && D4 <= 295 || D4 == 299 || 305 <= D4 && D4 <= 307 || D4 == 312 || 319 <= D4 && D4 <= 322 || D4 == 324 || 328 <= D4 && D4 <= 331 || D4 == 333 || 338 <= D4 && D4 <= 339 || 358 <= D4 && D4 <= 359 || D4 == 363 || D4 == 462 || D4 == 464 || D4 == 466 || D4 == 468 || D4 == 470 || D4 == 472 || D4 == 474 || D4 == 476 || D4 == 593 || D4 == 609 || D4 == 708 || D4 == 711 || 713 <= D4 && D4 <= 715 || D4 == 717 || D4 == 720 || 728 <= D4 && D4 <= 731 || D4 == 733 || D4 == 735 || 768 <= D4 && D4 <= 879 || 913 <= D4 && D4 <= 929 || 931 <= D4 && D4 <= 937 || 945 <= D4 && D4 <= 961 || 963 <= D4 && D4 <= 969 || D4 == 1025 || 1040 <= D4 && D4 <= 1103 || D4 == 1105 || D4 == 8208 || 8211 <= D4 && D4 <= 8214 || 8216 <= D4 && D4 <= 8217 || 8220 <= D4 && D4 <= 8221 || 8224 <= D4 && D4 <= 8226 || 8228 <= D4 && D4 <= 8231 || D4 == 8240 || 8242 <= D4 && D4 <= 8243 || D4 == 8245 || D4 == 8251 || D4 == 8254 || D4 == 8308 || D4 == 8319 || 8321 <= D4 && D4 <= 8324 || D4 == 8364 || D4 == 8451 || D4 == 8453 || D4 == 8457 || D4 == 8467 || D4 == 8470 || 8481 <= D4 && D4 <= 8482 || D4 == 8486 || D4 == 8491 || 8531 <= D4 && D4 <= 8532 || 8539 <= D4 && D4 <= 8542 || 8544 <= D4 && D4 <= 8555 || 8560 <= D4 && D4 <= 8569 || D4 == 8585 || 8592 <= D4 && D4 <= 8601 || 8632 <= D4 && D4 <= 8633 || D4 == 8658 || D4 == 8660 || D4 == 8679 || D4 == 8704 || 8706 <= D4 && D4 <= 8707 || 8711 <= D4 && D4 <= 8712 || D4 == 8715 || D4 == 8719 || D4 == 8721 || D4 == 8725 || D4 == 8730 || 8733 <= D4 && D4 <= 8736 || D4 == 8739 || D4 == 8741 || 8743 <= D4 && D4 <= 8748 || D4 == 8750 || 8756 <= D4 && D4 <= 8759 || 8764 <= D4 && D4 <= 8765 || D4 == 8776 || D4 == 8780 || D4 == 8786 || 8800 <= D4 && D4 <= 8801 || 8804 <= D4 && D4 <= 8807 || 8810 <= D4 && D4 <= 8811 || 8814 <= D4 && D4 <= 8815 || 8834 <= D4 && D4 <= 8835 || 8838 <= D4 && D4 <= 8839 || D4 == 8853 || D4 == 8857 || D4 == 8869 || D4 == 8895 || D4 == 8978 || 9312 <= D4 && D4 <= 9449 || 9451 <= D4 && D4 <= 9547 || 9552 <= D4 && D4 <= 9587 || 9600 <= D4 && D4 <= 9615 || 9618 <= D4 && D4 <= 9621 || 9632 <= D4 && D4 <= 9633 || 9635 <= D4 && D4 <= 9641 || 9650 <= D4 && D4 <= 9651 || 9654 <= D4 && D4 <= 9655 || 9660 <= D4 && D4 <= 9661 || 9664 <= D4 && D4 <= 9665 || 9670 <= D4 && D4 <= 9672 || D4 == 9675 || 9678 <= D4 && D4 <= 9681 || 9698 <= D4 && D4 <= 9701 || D4 == 9711 || 9733 <= D4 && D4 <= 9734 || D4 == 9737 || 9742 <= D4 && D4 <= 9743 || 9748 <= D4 && D4 <= 9749 || D4 == 9756 || D4 == 9758 || D4 == 9792 || D4 == 9794 || 9824 <= D4 && D4 <= 9825 || 9827 <= D4 && D4 <= 9829 || 9831 <= D4 && D4 <= 9834 || 9836 <= D4 && D4 <= 9837 || D4 == 9839 || 9886 <= D4 && D4 <= 9887 || 9918 <= D4 && D4 <= 9919 || 9924 <= D4 && D4 <= 9933 || 9935 <= D4 && D4 <= 9953 || D4 == 9955 || 9960 <= D4 && D4 <= 9983 || D4 == 10045 || D4 == 10071 || 10102 <= D4 && D4 <= 10111 || 11093 <= D4 && D4 <= 11097 || 12872 <= D4 && D4 <= 12879 || 57344 <= D4 && D4 <= 63743 || 65024 <= D4 && D4 <= 65039 || D4 == 65533 || 127232 <= D4 && D4 <= 127242 || 127248 <= D4 && D4 <= 127277 || 127280 <= D4 && D4 <= 127337 || 127344 <= D4 && D4 <= 127386 || 917760 <= D4 && D4 <= 917999 || 983040 <= D4 && D4 <= 1048573 || 1048576 <= D4 && D4 <= 1114109 ? "A" : "N"; - }, u3.characterLength = function(e3) { - var s2 = this.eastAsianWidth(e3); - return s2 == "F" || s2 == "W" || s2 == "A" ? 2 : 1; - }; - function F3(e3) { - return e3.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; - } - u3.length = function(e3) { - for (var s2 = F3(e3), C3 = 0, D4 = 0; D4 < s2.length; D4++) C3 = C3 + this.characterLength(s2[D4]); - return C3; - }, u3.slice = function(e3, s2, C3) { - textLen = u3.length(e3), s2 = s2 || 0, C3 = C3 || 1, s2 < 0 && (s2 = textLen + s2), C3 < 0 && (C3 = textLen + C3); - for (var D4 = "", i3 = 0, n2 = F3(e3), E3 = 0; E3 < n2.length; E3++) { - var h3 = n2[E3], o3 = u3.length(h3); - if (i3 >= s2 - (o3 == 2 ? 1 : 0)) if (i3 + o3 <= C3) D4 += h3; - else break; - i3 += o3; - } - return D4; - }; -})(M); -var J = M.exports; -var Q = j(J); -var X = function() { - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; -var DD = j(X); -var m = 10; -var T = (t2 = 0) => (u3) => `\x1B[${u3 + t2}m`; -var P = (t2 = 0) => (u3) => `\x1B[${38 + t2};5;${u3}m`; -var W = (t2 = 0) => (u3, F3, e3) => `\x1B[${38 + t2};2;${u3};${F3};${e3}m`; -var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; -Object.keys(r.modifier); -var uD = Object.keys(r.color); -var FD = Object.keys(r.bgColor); -[...uD, ...FD]; -function tD() { - const t2 = /* @__PURE__ */ new Map(); - for (const [u3, F3] of Object.entries(r)) { - for (const [e3, s2] of Object.entries(F3)) r[e3] = { open: `\x1B[${s2[0]}m`, close: `\x1B[${s2[1]}m` }, F3[e3] = r[e3], t2.set(s2[0], s2[1]); - Object.defineProperty(r, u3, { value: F3, enumerable: false }); - } - return Object.defineProperty(r, "codes", { value: t2, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = T(m), r.bgColor.ansi256 = P(m), r.bgColor.ansi16m = W(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u3, F3, e3) => u3 === F3 && F3 === e3 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(F3 / 255 * 5) + Math.round(e3 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => { - const F3 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u3.toString(16)); - if (!F3) return [0, 0, 0]; - let [e3] = F3; - e3.length === 3 && (e3 = [...e3].map((C3) => C3 + C3).join("")); - const s2 = Number.parseInt(e3, 16); - return [s2 >> 16 & 255, s2 >> 8 & 255, s2 & 255]; - }, enumerable: false }, hexToAnsi256: { value: (u3) => r.rgbToAnsi256(...r.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => { - if (u3 < 8) return 30 + u3; - if (u3 < 16) return 90 + (u3 - 8); - let F3, e3, s2; - if (u3 >= 232) F3 = ((u3 - 232) * 10 + 8) / 255, e3 = F3, s2 = F3; - else { - u3 -= 16; - const i3 = u3 % 36; - F3 = Math.floor(u3 / 36) / 5, e3 = Math.floor(i3 / 6) / 5, s2 = i3 % 6 / 5; - } - const C3 = Math.max(F3, e3, s2) * 2; - if (C3 === 0) return 30; - let D4 = 30 + (Math.round(s2) << 2 | Math.round(e3) << 1 | Math.round(F3)); - return C3 === 2 && (D4 += 60), D4; - }, enumerable: false }, rgbToAnsi: { value: (u3, F3, e3) => r.ansi256ToAnsi(r.rgbToAnsi256(u3, F3, e3)), enumerable: false }, hexToAnsi: { value: (u3) => r.ansi256ToAnsi(r.hexToAnsi256(u3)), enumerable: false } }), r; -} -var eD = tD(); -var CD = "]"; -var w = `${CD}8;;`; -var V = Symbol("clack:cancel"); -var PD = globalThis.process.platform.startsWith("win"); -function WD({ input: t2 = import_node_process.stdin, output: u3 = import_node_process.stdout, overwrite: F3 = true, hideCursor: e3 = true } = {}) { - const s2 = f.createInterface({ input: t2, output: u3, prompt: "", tabSize: 1 }); - f.emitKeypressEvents(t2, s2), t2.isTTY && t2.setRawMode(true); - const C3 = (D4, { name: i3 }) => { - if (String(D4) === "" && process.exit(0), !F3) return; - let n2 = i3 === "return" ? 0 : -1, E3 = i3 === "return" ? -1 : 0; - f.moveCursor(u3, n2, E3, () => { - f.clearLine(u3, 1, () => { - t2.once("keypress", C3); - }); +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +var httpAuthSchemeEndpointRuleSetMiddlewareOptions, getHttpAuthSchemeEndpointRuleSetPlugin; +var init_getHttpAuthSchemeEndpointRuleSetPlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"() { + init_httpAuthSchemeMiddleware(); + httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware" + }; + getHttpAuthSchemeEndpointRuleSetPlugin = (config6, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config6, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeEndpointRuleSetMiddlewareOptions); + } }); - }; - return e3 && process.stdout.write(import_sisteransi.cursor.hide), t2.once("keypress", C3), () => { - t2.off("keypress", C3), e3 && process.stdout.write(import_sisteransi.cursor.show), t2.isTTY && !PD && t2.setRawMode(false), s2.terminal = false, s2.close(); - }; -} + } +}); + +// node_modules/@smithy/middleware-serde/dist-cjs/index.js +var require_dist_cjs8 = __commonJS({ + "node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + deserializerMiddleware: () => deserializerMiddleware, + deserializerMiddlewareOption: () => deserializerMiddlewareOption, + getSerdePlugin: () => getSerdePlugin4, + serializerMiddleware: () => serializerMiddleware, + serializerMiddlewareOption: () => serializerMiddlewareOption2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context2) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed + }; + } catch (error) { + Object.defineProperty(error, "$response", { + value: response + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += "\n " + hint; + } catch (e5) { + if (!context2.logger || context2.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } else { + context2.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (import_protocol_http15.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries) + }; + } + } catch (e5) { + } + } + throw error; + } + }, "deserializerMiddleware"); + var findHeader = /* @__PURE__ */ __name((pattern, headers) => { + return (headers.find(([k6]) => { + return k6.match(pattern); + }) || [void 0, void 0])[1]; + }, "findHeader"); + var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context2) => async (args) => { + const endpointConfig = options; + const endpoint = context2.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context2.endpointV2.url) : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request3 = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request: request3 + }); + }, "serializerMiddleware"); + var deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true + }; + var serializerMiddlewareOption2 = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true + }; + function getSerdePlugin4(config6, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config6, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config6, serializer), serializerMiddlewareOption2); + } + }; + } + __name(getSerdePlugin4, "getSerdePlugin"); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +var import_middleware_serde, httpAuthSchemeMiddlewareOptions, getHttpAuthSchemePlugin; +var init_getHttpAuthSchemePlugin = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js"() { + import_middleware_serde = __toESM(require_dist_cjs8()); + init_httpAuthSchemeMiddleware(); + httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name + }; + getHttpAuthSchemePlugin = (config6, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpAuthSchemeMiddleware(config6, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), httpAuthSchemeMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js +var init_middleware_http_auth_scheme = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/index.js"() { + init_httpAuthSchemeMiddleware(); + init_getHttpAuthSchemeEndpointRuleSetPlugin(); + init_getHttpAuthSchemePlugin(); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js +var import_protocol_http, import_types3, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware; +var init_httpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() { + import_protocol_http = __toESM(require_dist_cjs2()); + import_types3 = __toESM(require_dist_cjs()); + import_util_middleware2 = __toESM(require_dist_cjs7()); + defaultErrorHandler = (signingProperties) => (error) => { + throw error; + }; + defaultSuccessHandler = (httpResponse, signingProperties) => { + }; + httpSigningMiddleware = (config6) => (next, context2) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = (0, import_util_middleware2.getSmithyContext)(context2); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; + }; + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js +var httpSigningMiddlewareOptions, getHttpSigningPlugin; +var init_getHttpSigningMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"() { + init_httpSigningMiddleware(); + httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: "retryMiddleware" + }; + getHttpSigningPlugin = (config6) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config6), httpSigningMiddlewareOptions); + } + }); + } +}); + +// node_modules/@smithy/core/dist-es/middleware-http-signing/index.js +var init_middleware_http_signing = __esm({ + "node_modules/@smithy/core/dist-es/middleware-http-signing/index.js"() { + init_httpSigningMiddleware(); + init_getHttpSigningMiddleware(); + } +}); + +// node_modules/@smithy/core/dist-es/normalizeProvider.js +var normalizeProvider; +var init_normalizeProvider = __esm({ + "node_modules/@smithy/core/dist-es/normalizeProvider.js"() { + normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; + }; + } +}); + +// node_modules/@smithy/core/dist-es/pagination/createPaginator.js +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config6, input, ...additionalArguments) { + const _input = input; + let token = config6.startingToken ?? _input[inputTokenName]; + let hasNext = true; + let page; + while (hasNext) { + _input[inputTokenName] = token; + if (pageSizeTokenName) { + _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config6.pageSize; + } + if (config6.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config6.client, input, config6.withCommand, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config6.stopOnSameToken || token !== prevToken)); + } + return void 0; + }; +} +var makePagedClientRequest, get; +var init_createPaginator = __esm({ + "node_modules/@smithy/core/dist-es/pagination/createPaginator.js"() { + makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_4) => _4, ...args) => { + let command = new CommandCtor(input); + command = withCommand(command) ?? command; + return await client.send(command, ...args); + }; + get = (fromObject, path2) => { + let cursor = fromObject; + const pathComponents = path2.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; + }; + } +}); + +// node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs9 = __commonJS({ + "node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isArrayBuffer: () => isArrayBuffer3 + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer3 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs10 = __commonJS({ + "node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs9(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); + }, "fromArrayBuffer"); + var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); + }, "fromString"); + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +var require_fromBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/fromBase64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs10(); + var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; + var fromBase647 = (input) => { + if (input.length * 3 % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); + } + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); + } + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + }; + exports2.fromBase64 = fromBase647; + } +}); + +// node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs11 = __commonJS({ + "node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromUtf8: () => fromUtf84, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf86 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs10(); + var fromUtf84 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }, "fromUtf8"); + var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf86 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }, "toUtf8"); + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/toBase64.js +var require_toBase64 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/toBase64.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toBase64 = void 0; + var util_buffer_from_1 = require_dist_cjs10(); + var util_utf8_1 = require_dist_cjs11(); + var toBase647 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); + }; + exports2.toBase64 = toBase647; + } +}); + +// node_modules/@smithy/util-base64/dist-cjs/index.js +var require_dist_cjs12 = __commonJS({ + "node_modules/@smithy/util-base64/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_fromBase64(), module2.exports); + __reExport(src_exports, require_toBase64(), module2.exports); + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +var require_ChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var util_base64_1 = require_dist_cjs12(); + var stream_1 = require("stream"); + var ChecksumStream2 = class extends stream_1.Duplex { + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) { + var _a6, _b2; + super(); + if (typeof source.pipe === "function") { + this.source = source; + } else { + throw new Error(`@smithy/util-stream: unsupported source type ${(_b2 = (_a6 = source === null || source === void 0 ? void 0 : source.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) !== null && _b2 !== void 0 ? _b2 : source} in ChecksumStream.`); + } + this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.pipe(this); + } + _read(size) { + } + _write(chunk, encoding, callback) { + try { + this.checksum.update(chunk); + this.push(chunk); + } catch (e5) { + return callback(e5); + } + return callback(); + } + async _final(callback) { + try { + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}" in response header "${this.checksumSourceLocation}".`)); + } + } catch (e5) { + return callback(e5); + } + this.push(null); + return callback(); + } + }; + exports2.ChecksumStream = ChecksumStream2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +var require_stream_type_check = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBlob = exports2.isReadableStream = void 0; + var isReadableStream6 = (stream4) => { + var _a6; + return typeof ReadableStream === "function" && (((_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) === ReadableStream.name || stream4 instanceof ReadableStream); + }; + exports2.isReadableStream = isReadableStream6; + var isBlob5 = (blob) => { + var _a6; + return typeof Blob === "function" && (((_a6 = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) === Blob.name || blob instanceof Blob); + }; + exports2.isBlob = isBlob5; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +var require_ChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChecksumStream = void 0; + var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() { + }; + var ChecksumStream2 = class extends ReadableStreamRef { + }; + exports2.ChecksumStream = ChecksumStream2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +var require_createChecksumStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createChecksumStream = void 0; + var util_base64_1 = require_dist_cjs12(); + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_browser_1 = require_ChecksumStream_browser(); + var createChecksumStream2 = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => { + var _a6, _b2; + if (!(0, stream_type_check_1.isReadableStream)(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${(_b2 = (_a6 = source === null || source === void 0 ? void 0 : source.constructor) === null || _a6 === void 0 ? void 0 : _a6.name) !== null && _b2 !== void 0 ? _b2 : source} in ChecksumStream.`); + } + const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); + } + const transform = new TransformStream({ + start() { + }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder(digest); + if (expectedChecksum !== received) { + const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}" in response header "${checksumSourceLocation}".`); + controller.error(error); + } else { + controller.terminate(); + } + } + }); + source.pipeThrough(transform); + const readable = transform.readable; + Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); + return readable; + }; + exports2.createChecksumStream = createChecksumStream2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +var require_createChecksumStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createChecksumStream = createChecksumStream2; + var stream_type_check_1 = require_stream_type_check(); + var ChecksumStream_1 = require_ChecksumStream(); + var createChecksumStream_browser_1 = require_createChecksumStream_browser(); + function createChecksumStream2(init) { + if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { + return (0, createChecksumStream_browser_1.createChecksumStream)(init); + } + return new ChecksumStream_1.ChecksumStream(init); + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +var require_ByteArrayCollector = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ByteArrayCollector = void 0; + var ByteArrayCollector = class { + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; + this.byteLength = 0; + this.byteArrays = []; + } + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; + } + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i5 = 0; i5 < this.byteArrays.length; ++i5) { + const bytes = this.byteArrays[i5]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } + }; + exports2.ByteArrayCollector = ByteArrayCollector; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +var require_createBufferedReadableStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = void 0; + exports2.createBufferedReadableStream = createBufferedReadableStream; + exports2.merge = merge2; + exports2.flush = flush; + exports2.sizeOf = sizeOf; + exports2.modeOf = modeOf; + var ByteArrayCollector_1 = require_ByteArrayCollector(); + function createBufferedReadableStream(upstream, size, logger5) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))]; + let mode = -1; + const pull = async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } + } + controller.close(); + } else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } else { + const newSize = merge2(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger5 === null || logger5 === void 0 ? void 0 : logger5.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } else { + await pull(controller); + } + } + } + }; + return new ReadableStream({ + pull + }); + } + exports2.createBufferedReadable = createBufferedReadableStream; + function merge2(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); + } + } + function flush(buffers, mode) { + switch (mode) { + case 0: + const s4 = buffers[0]; + buffers[0] = ""; + return s4; + case 1: + case 2: + return buffers[mode].flush(); + } + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); + } + function sizeOf(chunk) { + var _a6, _b2; + return (_b2 = (_a6 = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a6 !== void 0 ? _a6 : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b2 !== void 0 ? _b2 : 0; + } + function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; + } + if (chunk instanceof Uint8Array) { + return 1; + } + if (typeof chunk === "string") { + return 0; + } + return -1; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +var require_createBufferedReadable = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBufferedReadable = createBufferedReadable2; + var node_stream_1 = require("node:stream"); + var ByteArrayCollector_1 = require_ByteArrayCollector(); + var createBufferedReadableStream_1 = require_createBufferedReadableStream(); + var stream_type_check_1 = require_stream_type_check(); + function createBufferedReadable2(upstream, size, logger5) { + if ((0, stream_type_check_1.isReadableStream)(upstream)) { + return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger5); + } + const downstream = new node_stream_1.Readable({ read() { + } }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)), + new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2))) + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); + bytesSeen += chunkSize; + const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } else { + const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger5 === null || logger5 === void 0 ? void 0 : logger5.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + } + } + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); + if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { + downstream.push(remainder); + } + } + downstream.push(null); + }); + return downstream; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +var require_getAwsChunkedEncodingStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAwsChunkedEncodingStream = void 0; + var stream_1 = require("stream"); + var getAwsChunkedEncodingStream2 = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { + } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r +`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r +`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r +`); + awsChunkedEncodingStream.push(`\r +`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; + }; + exports2.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +var require_headStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = headStream2; + async function headStream2(stream4, bytes) { + var _a6; + let byteLengthCounter = 0; + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += (_a6 = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a6 !== void 0 ? _a6 : 0; + } + if (byteLengthCounter >= bytes) { + break; + } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; + } else { + collected.set(chunk, offset); + } + offset += chunk.length; + } + return collected; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/headStream.js +var require_headStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/headStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.headStream = void 0; + var stream_1 = require("stream"); + var headStream_browser_1 = require_headStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + var headStream2 = (stream4, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream4)) { + return (0, headStream_browser_1.headStream)(stream4, bytes); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream4.pipe(collector); + stream4.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes2 = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes2); + }); + }); + }; + exports2.headStream = headStream2; + var Collector = class extends stream_1.Writable { + constructor() { + super(...arguments); + this.buffers = []; + this.limit = Infinity; + this.bytesBuffered = 0; + } + _write(chunk, encoding, callback) { + var _a6; + this.buffers.push(chunk); + this.bytesBuffered += (_a6 = chunk.byteLength) !== null && _a6 !== void 0 ? _a6 : 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); + } + callback(); + } + }; + } +}); + +// node_modules/@smithy/util-uri-escape/dist-cjs/index.js +var require_dist_cjs13 = __commonJS({ + "node_modules/@smithy/util-uri-escape/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + escapeUri: () => escapeUri, + escapeUriPath: () => escapeUriPath + }); + module2.exports = __toCommonJS2(src_exports); + var escapeUri = /* @__PURE__ */ __name((uri) => ( + // AWS percent-encodes some extra non-standard characters in a URI + encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode) + ), "escapeUri"); + var hexEncode = /* @__PURE__ */ __name((c4) => `%${c4.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode"); + var escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath"); + } +}); + +// node_modules/@smithy/querystring-builder/dist-cjs/index.js +var require_dist_cjs14 = __commonJS({ + "node_modules/@smithy/querystring-builder/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + buildQueryString: () => buildQueryString + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_uri_escape = require_dist_cjs13(); + function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, import_util_uri_escape.escapeUri)(key); + if (Array.isArray(value)) { + for (let i5 = 0, iLen = value.length; i5 < iLen; i5++) { + parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i5])}`); + } + } else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`; + } + parts.push(qsEntry); + } + } + return parts.join("&"); + } + __name(buildQueryString, "buildQueryString"); + } +}); + +// node_modules/@smithy/node-http-handler/dist-cjs/index.js +var require_dist_cjs15 = __commonJS({ + "node_modules/@smithy/node-http-handler/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT, + NodeHttp2Handler: () => NodeHttp2Handler, + NodeHttpHandler: () => NodeHttpHandler, + streamCollector: () => streamCollector3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs14(); + var import_http3 = require("http"); + var import_https2 = require("https"); + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + var getTransformedHeaders = /* @__PURE__ */ __name((headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; + }, "getTransformedHeaders"); + var timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId) + }; + var DEFER_EVENT_LISTENER_TIME = 1e3; + var setConnectionTimeout = /* @__PURE__ */ __name((request3, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeoutId = timing.setTimeout(() => { + request3.destroy(); + reject( + Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError" + }) + ); + }, timeoutInMs - offset); + const doWithSocket = /* @__PURE__ */ __name((socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } else { + timing.clearTimeout(timeoutId); + } + }, "doWithSocket"); + if (request3.socket) { + doWithSocket(request3.socket); + } else { + request3.on("socket", doWithSocket); + } + }, "registerTimeout"); + if (timeoutInMs < 2e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); + }, "setConnectionTimeout"); + var DEFER_EVENT_LISTENER_TIME2 = 3e3; + var setSocketKeepAlive = /* @__PURE__ */ __name((request3, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = /* @__PURE__ */ __name(() => { + if (request3.socket) { + request3.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } else { + request3.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }, "registerListener"); + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); + }, "setSocketKeepAlive"); + var DEFER_EVENT_LISTENER_TIME3 = 3e3; + var setSocketTimeout = /* @__PURE__ */ __name((request3, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { + const registerTimeout = /* @__PURE__ */ __name((offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = /* @__PURE__ */ __name(() => { + request3.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }, "onTimeout"); + if (request3.socket) { + request3.socket.setTimeout(timeout, onTimeout); + request3.on("close", () => request3.socket?.removeListener("timeout", onTimeout)); + } else { + request3.setTimeout(timeout, onTimeout); + } + }, "registerTimeout"); + if (0 < timeoutInMs && timeoutInMs < 6e3) { + registerTimeout(0); + return 0; + } + return timing.setTimeout( + registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), + DEFER_EVENT_LISTENER_TIME3 + ); + }, "setSocketTimeout"); + var import_stream5 = require("stream"); + var MIN_WAIT_TIME = 6e3; + async function writeRequestBody(httpRequest, request3, maxContinueTimeoutMs = MIN_WAIT_TIME) { + const headers = request3.headers ?? {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let sendBody = true; + if (expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }) + ]); + } + if (sendBody) { + writeBody(httpRequest, request3.body); + } + } + __name(writeRequestBody, "writeRequestBody"); + function writeBody(httpRequest, body) { + if (body instanceof import_stream5.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); + } + __name(writeBody, "writeBody"); + var DEFAULT_REQUEST_TIMEOUT = 0; + var NodeHttpHandler = class _NodeHttpHandler { + constructor(options) { + this.socketWarningTimestamp = 0; + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }).catch(reject); + } else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + static { + __name(this, "NodeHttpHandler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttpHandler(instanceOrOptions); + } + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @param socketWarningTimestamp - last socket usage check timestamp. + * @param logger - channel for the warning. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp, logger5 = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin2 in sockets) { + const socketsInUse = sockets[origin2]?.length ?? 0; + const requestsEnqueued = requests[origin2]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger5?.warn?.( + `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.` + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout ?? socketTimeout, + socketAcquisitionWarningTimeout, + httpAgent: (() => { + if (httpAgent instanceof import_http3.Agent || typeof httpAgent?.destroy === "function") { + return httpAgent; + } + return new import_http3.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https2.Agent || typeof httpsAgent?.destroy === "function") { + return httpsAgent; + } + return new import_https2.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request3, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + let writeRequestBodyPromise = void 0; + const timeouts = []; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }, "reject"); + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request3.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + timeouts.push( + timing.setTimeout( + () => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage( + agent, + this.socketWarningTimestamp, + this.config.logger + ); + }, + this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3) + ) + ); + const queryString = (0, import_querystring_builder.buildQueryString)(request3.query || {}); + let auth = void 0; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}`; + } + let path2 = request3.path; + if (queryString) { + path2 += `?${queryString}`; + } + if (request3.fragment) { + path2 += `#${request3.fragment}`; + } + let hostname = request3.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request3.hostname.slice(1, -1); + } else { + hostname = request3.hostname; + } + const nodeHttpsOptions = { + headers: request3.headers, + host: hostname, + method: request3.method, + path: path2, + port: request3.port, + agent, + auth + }; + const requestFunc = isSSL ? import_https2.request : import_http3.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new import_protocol_http15.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); + timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push( + setSocketKeepAlive(req, { + // @ts-expect-error keepAlive is not public on httpAgent. + keepAlive: httpAgent.keepAlive, + // @ts-expect-error keepAliveMsecs is not public on httpAgent. + keepAliveMsecs: httpAgent.keepAliveMsecs + }) + ); + } + writeRequestBodyPromise = writeRequestBody(req, request3, effectiveRequestTimeout).catch((e5) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e5); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config6) => { + return { + ...config6, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + var import_http22 = require("http2"); + var import_http23 = __toESM2(require("http2")); + var NodeHttp2ConnectionPool = class { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions ?? []; + } + static { + __name(this, "NodeHttp2ConnectionPool"); + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s4) => s4 !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } + }; + var NodeHttp2ConnectionManager = class { + constructor(config6) { + this.sessionCache = /* @__PURE__ */ new Map(); + this.config = config6; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + static { + __name(this, "NodeHttp2ConnectionManager"); + } + lease(requestContext, connectionConfiguration) { + const url2 = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url2); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = import_http23.default.connect(url2); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error( + "Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString() + ); + } + }); + } + session.unref(); + const destroySessionCb = /* @__PURE__ */ __name(() => { + session.destroy(); + this.deleteSession(url2, session); + }, "destroySessionCb"); + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url2, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url2) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url2, connectionPool); + return session; + } + /** + * Delete a session from the connection pool. + * @param authority The authority of the session to delete. + * @param session The session to delete. + */ + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request3) { + return request3.destination.toString(); + } + }; + var NodeHttp2Handler = class _NodeHttp2Handler { + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options().then((opts) => { + resolve(opts || {}); + }).catch(reject); + } else { + resolve(options || {}); + } + }); + } + static { + __name(this, "NodeHttp2Handler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _NodeHttp2Handler(instanceOrOptions); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request3, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = void 0; + const resolve = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }, "resolve"); + const reject = /* @__PURE__ */ __name(async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }, "reject"); + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request3; + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false + }); + const rejectWithDestroy = /* @__PURE__ */ __name((err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }, "rejectWithDestroy"); + const queryString = (0, import_querystring_builder.buildQueryString)(query || {}); + let path2 = request3.path; + if (queryString) { + path2 += `?${queryString}`; + } + if (request3.fragment) { + path2 += `#${request3.fragment}`; + } + const req = session.request({ + ...request3.headers, + [import_http22.constants.HTTP2_HEADER_PATH]: path2, + [import_http22.constants.HTTP2_HEADER_METHOD]: method + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new import_protocol_http15.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = /* @__PURE__ */ __name(() => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type2, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type2} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy( + new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`) + ); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request3, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config6) => { + return { + ...config6, + [key]: value + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Destroys a session. + * @param session - the session to destroy. + */ + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } + }; + var Collector = class extends import_stream5.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + static { + __name(this, "Collector"); + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } + }; + var streamCollector3 = /* @__PURE__ */ __name((stream4) => { + if (isReadableStreamInstance(stream4)) { + return collectReadableStream(stream4); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream4.pipe(collector); + stream4.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function() { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); + }, "streamCollector"); + var isReadableStreamInstance = /* @__PURE__ */ __name((stream4) => typeof ReadableStream === "function" && stream4 instanceof ReadableStream, "isReadableStreamInstance"); + async function collectReadableStream(stream4) { + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectReadableStream, "collectReadableStream"); + } +}); + +// node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +var require_dist_cjs16 = __commonJS({ + "node_modules/@smithy/fetch-http-handler/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + FetchHttpHandler: () => FetchHttpHandler, + keepAliveSupport: () => keepAliveSupport, + streamCollector: () => streamCollector3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_querystring_builder = require_dist_cjs14(); + function createRequest(url2, requestOptions) { + return new Request(url2, requestOptions); + } + __name(createRequest, "createRequest"); + function requestTimeout(timeoutInMs = 0) { + return new Promise((resolve, reject) => { + if (timeoutInMs) { + setTimeout(() => { + const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`); + timeoutError.name = "TimeoutError"; + reject(timeoutError); + }, timeoutInMs); + } + }); + } + __name(requestTimeout, "requestTimeout"); + var keepAliveSupport = { + supported: void 0 + }; + var FetchHttpHandler = class _FetchHttpHandler { + static { + __name(this, "FetchHttpHandler"); + } + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _FetchHttpHandler(instanceOrOptions); + } + constructor(options) { + if (typeof options === "function") { + this.configProvider = options().then((opts) => opts || {}); + } else { + this.config = options ?? {}; + this.configProvider = Promise.resolve(this.config); + } + if (keepAliveSupport.supported === void 0) { + keepAliveSupport.supported = Boolean( + typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]") + ); + } + } + destroy() { + } + async handle(request3, { abortSignal, requestTimeout: requestTimeout2 } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout; + const keepAlive = this.config.keepAlive === true; + const credentials = this.config.credentials; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + return Promise.reject(abortError); + } + let path2 = request3.path; + const queryString = (0, import_querystring_builder.buildQueryString)(request3.query || {}); + if (queryString) { + path2 += `?${queryString}`; + } + if (request3.fragment) { + path2 += `#${request3.fragment}`; + } + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + const { port, method } = request3; + const url2 = `${request3.protocol}//${auth}${request3.hostname}${port ? `:${port}` : ""}${path2}`; + const body = method === "GET" || method === "HEAD" ? void 0 : request3.body; + const requestOptions = { + body, + headers: new Headers(request3.headers), + method, + credentials + }; + if (this.config?.cache) { + requestOptions.cache = this.config.cache; + } + if (body) { + requestOptions.duplex = "half"; + } + if (typeof AbortController !== "undefined") { + requestOptions.signal = abortSignal; + } + if (keepAliveSupport.supported) { + requestOptions.keepalive = keepAlive; + } + if (typeof this.config.requestInit === "function") { + Object.assign(requestOptions, this.config.requestInit(request3)); + } + let removeSignalEventListener = /* @__PURE__ */ __name(() => { + }, "removeSignalEventListener"); + const fetchRequest = createRequest(url2, requestOptions); + const raceOfPromises = [ + fetch(fetchRequest).then((response) => { + const fetchHeaders = response.headers; + const transformedHeaders = {}; + for (const pair of fetchHeaders.entries()) { + transformedHeaders[pair[0]] = pair[1]; + } + const hasReadableStream = response.body != void 0; + if (!hasReadableStream) { + return response.blob().then((body2) => ({ + response: new import_protocol_http15.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: body2 + }) + })); + } + return { + response: new import_protocol_http15.HttpResponse({ + headers: transformedHeaders, + reason: response.statusText, + statusCode: response.status, + body: response.body + }) + }; + }), + requestTimeout(requestTimeoutInMs) + ]; + if (abortSignal) { + raceOfPromises.push( + new Promise((resolve, reject) => { + const onAbort = /* @__PURE__ */ __name(() => { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }, "onAbort"); + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener("abort", onAbort), "removeSignalEventListener"); + } else { + abortSignal.onabort = onAbort; + } + }) + ); + } + return Promise.race(raceOfPromises).finally(removeSignalEventListener); + } + updateHttpClientConfig(key, value) { + this.config = void 0; + this.configProvider = this.configProvider.then((config6) => { + config6[key] = value; + return config6; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + }; + var import_util_base648 = require_dist_cjs12(); + var streamCollector3 = /* @__PURE__ */ __name(async (stream4) => { + if (typeof Blob === "function" && stream4 instanceof Blob || stream4.constructor?.name === "Blob") { + if (Blob.prototype.arrayBuffer !== void 0) { + return new Uint8Array(await stream4.arrayBuffer()); + } + return collectBlob(stream4); + } + return collectStream(stream4); + }, "streamCollector"); + async function collectBlob(blob) { + const base64 = await readToBase64(blob); + const arrayBuffer = (0, import_util_base648.fromBase64)(base64); + return new Uint8Array(arrayBuffer); + } + __name(collectBlob, "collectBlob"); + async function collectStream(stream4) { + const chunks = []; + const reader = stream4.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; + } + __name(collectStream, "collectStream"); + function readToBase64(blob) { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => { + if (reader.readyState !== 2) { + return reject(new Error("Reader aborted too early")); + } + const result = reader.result ?? ""; + const commaIndex = result.indexOf(","); + const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length; + resolve(result.substring(dataOffset)); + }; + reader.onabort = () => reject(new Error("Read aborted")); + reader.onerror = () => reject(reader.error); + reader.readAsDataURL(blob); + }); + } + __name(readToBase64, "readToBase64"); + } +}); + +// node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +var require_dist_cjs17 = __commonJS({ + "node_modules/@smithy/util-hex-encoding/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromHex: () => fromHex, + toHex: () => toHex + }); + module2.exports = __toCommonJS2(src_exports); + var SHORT_TO_HEX = {}; + var HEX_TO_SHORT = {}; + for (let i5 = 0; i5 < 256; i5++) { + let encodedByte = i5.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i5] = encodedByte; + HEX_TO_SHORT[encodedByte] = i5; + } + function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i5 = 0; i5 < encoded.length; i5 += 2) { + const encodedByte = encoded.slice(i5, i5 + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i5 / 2] = HEX_TO_SHORT[encodedByte]; + } else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; + } + __name(fromHex, "fromHex"); + function toHex(bytes) { + let out = ""; + for (let i5 = 0; i5 < bytes.byteLength; i5++) { + out += SHORT_TO_HEX[bytes[i5]]; + } + return out; + } + __name(toHex, "toHex"); + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +var require_sdk_stream_mixin_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var fetch_http_handler_1 = require_dist_cjs16(); + var util_base64_1 = require_dist_cjs12(); + var util_hex_encoding_1 = require_dist_cjs17(); + var util_utf8_1 = require_dist_cjs11(); + var stream_type_check_1 = require_stream_type_check(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin3 = (stream4) => { + var _a6, _b2; + if (!isBlobInstance(stream4) && !(0, stream_type_check_1.isReadableStream)(stream4)) { + const name = ((_b2 = (_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.__proto__) === null || _a6 === void 0 ? void 0 : _a6.constructor) === null || _b2 === void 0 ? void 0 : _b2.name) || stream4; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream4); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream4, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream4)) { + return blobToWebStream(stream4); + } else if ((0, stream_type_check_1.isReadableStream)(stream4)) { + return stream4; + } else { + throw new Error(`Cannot transform payload to web stream, got ${stream4}`); + } + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin3; + var isBlobInstance = (stream4) => typeof Blob === "function" && stream4 instanceof Blob; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +var require_sdk_stream_mixin = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sdkStreamMixin = void 0; + var node_http_handler_1 = require_dist_cjs15(); + var util_buffer_from_1 = require_dist_cjs10(); + var stream_1 = require("stream"); + var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser(); + var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; + var sdkStreamMixin3 = (stream4) => { + var _a6, _b2; + if (!(stream4 instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream4); + } catch (e5) { + const name = ((_b2 = (_a6 = stream4 === null || stream4 === void 0 ? void 0 : stream4.__proto__) === null || _a6 === void 0 ? void 0 : _a6.constructor) === null || _b2 === void 0 ? void 0 : _b2.name) || stream4; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); + } + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream4); + }; + return Object.assign(stream4, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === void 0 || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } else { + const decoder = new TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream4.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream4); + } + }); + }; + exports2.sdkStreamMixin = sdkStreamMixin3; + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +var require_splitStream_browser = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream2; + async function splitStream2(stream4) { + if (typeof stream4.stream === "function") { + stream4 = stream4.stream(); + } + const readableStream = stream4; + return readableStream.tee(); + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/splitStream.js +var require_splitStream = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/splitStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.splitStream = splitStream2; + var stream_1 = require("stream"); + var splitStream_browser_1 = require_splitStream_browser(); + var stream_type_check_1 = require_stream_type_check(); + async function splitStream2(stream4) { + if ((0, stream_type_check_1.isReadableStream)(stream4) || (0, stream_type_check_1.isBlob)(stream4)) { + return (0, splitStream_browser_1.splitStream)(stream4); + } + const stream1 = new stream_1.PassThrough(); + const stream22 = new stream_1.PassThrough(); + stream4.pipe(stream1); + stream4.pipe(stream22); + return [stream1, stream22]; + } + } +}); + +// node_modules/@smithy/util-stream/dist-cjs/index.js +var require_dist_cjs18 = __commonJS({ + "node_modules/@smithy/util-stream/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter2 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_base648 = require_dist_cjs12(); + var import_util_utf86 = require_dist_cjs11(); + function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, import_util_base648.toBase64)(payload); + } + return (0, import_util_utf86.toUtf8)(payload); + } + __name(transformToString, "transformToString"); + function transformFromString(str2, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter2.mutate((0, import_util_base648.fromBase64)(str2)); + } + return Uint8ArrayBlobAdapter2.mutate((0, import_util_utf86.fromUtf8)(str2)); + } + __name(transformFromString, "transformFromString"); + var Uint8ArrayBlobAdapter2 = class _Uint8ArrayBlobAdapter extends Uint8Array { + static { + __name(this, "Uint8ArrayBlobAdapter"); + } + /** + * @param source - such as a string or Stream. + * @returns a new Uint8ArrayBlobAdapter extending Uint8Array. + */ + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return transformFromString(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + } + /** + * @param source - Uint8Array to be mutated. + * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter. + */ + static mutate(source) { + Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype); + return source; + } + /** + * @param encoding - default 'utf-8'. + * @returns the blob as string. + */ + transformToString(encoding = "utf-8") { + return transformToString(this, encoding); + } + }; + __reExport(src_exports, require_ChecksumStream(), module2.exports); + __reExport(src_exports, require_createChecksumStream(), module2.exports); + __reExport(src_exports, require_createBufferedReadable(), module2.exports); + __reExport(src_exports, require_getAwsChunkedEncodingStream(), module2.exports); + __reExport(src_exports, require_headStream(), module2.exports); + __reExport(src_exports, require_sdk_stream_mixin(), module2.exports); + __reExport(src_exports, require_splitStream(), module2.exports); + __reExport(src_exports, require_stream_type_check(), module2.exports); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js +var import_util_stream, collectBody2; +var init_collect_stream_body = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() { + import_util_stream = __toESM(require_dist_cjs18()); + collectBody2 = async (streamBody = new Uint8Array(), context2) => { + if (streamBody instanceof Uint8Array) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context2.streamCollector(streamBody); + return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js +function extendedEncodeURIComponent2(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c4) { + return "%" + c4.charCodeAt(0).toString(16).toUpperCase(); + }); +} +var init_extended_encode_uri_component = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/deref.js +var deref; +var init_deref = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/deref.js"() { + deref = (schemaRef) => { + if (typeof schemaRef === "function") { + return schemaRef(); + } + return schemaRef; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +var import_protocol_http2, import_util_middleware3; +var init_schemaDeserializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js"() { + import_protocol_http2 = __toESM(require_dist_cjs2()); + import_util_middleware3 = __toESM(require_dist_cjs7()); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +var import_util_middleware4; +var init_schemaSerializationMiddleware = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() { + import_util_middleware4 = __toESM(require_dist_cjs7()); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js +var init_getSchemaSerdePlugin = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"() { + init_schemaDeserializationMiddleware(); + init_schemaSerializationMiddleware(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +var TypeRegistry; +var init_TypeRegistry = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() { + TypeRegistry = class _TypeRegistry { + constructor(namespace, schemas = /* @__PURE__ */ new Map()) { + this.namespace = namespace; + this.schemas = schemas; + } + static for(namespace) { + if (!_TypeRegistry.registries.has(namespace)) { + _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace)); + } + return _TypeRegistry.registries.get(namespace); + } + register(shapeId, schema) { + const qualifiedName = this.normalizeShapeId(shapeId); + const registry = _TypeRegistry.for(this.getNamespace(shapeId)); + registry.schemas.set(qualifiedName, schema); + } + getSchema(shapeId) { + const id = this.normalizeShapeId(shapeId); + if (!this.schemas.has(id)) { + throw new Error(`@smithy/core/schema - schema not found for ${id}`); + } + return this.schemas.get(id); + } + getBaseException() { + for (const [id, schema] of this.schemas.entries()) { + if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) { + return schema; + } + } + return void 0; + } + find(predicate) { + return [...this.schemas.values()].find(predicate); + } + destroy() { + _TypeRegistry.registries.delete(this.namespace); + this.schemas.clear(); + } + normalizeShapeId(shapeId) { + if (shapeId.includes("#")) { + return shapeId; + } + return this.namespace + "#" + shapeId; + } + getNamespace(shapeId) { + return this.normalizeShapeId(shapeId).split("#")[0]; + } + }; + TypeRegistry.registries = /* @__PURE__ */ new Map(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +var Schema; +var init_Schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() { + Schema = class { + constructor(name, traits) { + this.name = name; + this.traits = traits; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +var ListSchema; +var init_ListSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js"() { + init_TypeRegistry(); + init_Schema(); + ListSchema = class _ListSchema extends Schema { + constructor(name, traits, valueSchema) { + super(name, traits); + this.name = name; + this.traits = traits; + this.valueSchema = valueSchema; + this.symbol = _ListSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _ListSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const list = lhs; + return list.symbol === _ListSchema.symbol; + } + return isPrototype; + } + }; + ListSchema.symbol = Symbol.for("@smithy/core/schema::ListSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +var MapSchema; +var init_MapSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js"() { + init_TypeRegistry(); + init_Schema(); + MapSchema = class _MapSchema extends Schema { + constructor(name, traits, keySchema, valueSchema) { + super(name, traits); + this.name = name; + this.traits = traits; + this.keySchema = keySchema; + this.valueSchema = valueSchema; + this.symbol = _MapSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _MapSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const map2 = lhs; + return map2.symbol === _MapSchema.symbol; + } + return isPrototype; + } + }; + MapSchema.symbol = Symbol.for("@smithy/core/schema::MapSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +var init_OperationSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js"() { + init_TypeRegistry(); + init_Schema(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +var StructureSchema; +var init_StructureSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js"() { + init_TypeRegistry(); + init_Schema(); + StructureSchema = class _StructureSchema extends Schema { + constructor(name, traits, memberNames, memberList) { + super(name, traits); + this.name = name; + this.traits = traits; + this.memberNames = memberNames; + this.memberList = memberList; + this.symbol = _StructureSchema.symbol; + this.members = {}; + for (let i5 = 0; i5 < memberNames.length; ++i5) { + this.members[memberNames[i5]] = Array.isArray(memberList[i5]) ? memberList[i5] : [memberList[i5], 0]; + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _StructureSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const struct = lhs; + return struct.symbol === _StructureSchema.symbol; + } + return isPrototype; + } + }; + StructureSchema.symbol = Symbol.for("@smithy/core/schema::StructureSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +var ErrorSchema; +var init_ErrorSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js"() { + init_TypeRegistry(); + init_StructureSchema(); + ErrorSchema = class _ErrorSchema extends StructureSchema { + constructor(name, traits, memberNames, memberList, ctor) { + super(name, traits, memberNames, memberList); + this.name = name; + this.traits = traits; + this.memberNames = memberNames; + this.memberList = memberList; + this.ctor = ctor; + this.symbol = _ErrorSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _ErrorSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const err = lhs; + return err.symbol === _ErrorSchema.symbol; + } + return isPrototype; + } + }; + ErrorSchema.symbol = Symbol.for("@smithy/core/schema::ErrorSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +var SCHEMA; +var init_sentinels = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js"() { + SCHEMA = { + BLOB: 21, + STREAMING_BLOB: 42, + BOOLEAN: 2, + STRING: 0, + NUMERIC: 1, + BIG_INTEGER: 17, + BIG_DECIMAL: 19, + DOCUMENT: 15, + TIMESTAMP_DEFAULT: 4, + TIMESTAMP_DATE_TIME: 5, + TIMESTAMP_HTTP_DATE: 6, + TIMESTAMP_EPOCH_SECONDS: 7, + LIST_MODIFIER: 64, + MAP_MODIFIER: 128 + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +var SimpleSchema; +var init_SimpleSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() { + init_TypeRegistry(); + init_Schema(); + SimpleSchema = class _SimpleSchema extends Schema { + constructor(name, schemaRef, traits) { + super(name, traits); + this.name = name; + this.schemaRef = schemaRef; + this.traits = traits; + this.symbol = _SimpleSchema.symbol; + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _SimpleSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const sim = lhs; + return sim.symbol === _SimpleSchema.symbol; + } + return isPrototype; + } + }; + SimpleSchema.symbol = Symbol.for("@smithy/core/schema::SimpleSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +var NormalizedSchema; +var init_NormalizedSchema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js"() { + init_deref(); + init_ListSchema(); + init_MapSchema(); + init_sentinels(); + init_SimpleSchema(); + init_StructureSchema(); + NormalizedSchema = class _NormalizedSchema { + constructor(ref, memberName) { + this.ref = ref; + this.memberName = memberName; + this.symbol = _NormalizedSchema.symbol; + const traitStack = []; + let _ref = ref; + let schema = ref; + this._isMemberSchema = false; + while (Array.isArray(_ref)) { + traitStack.push(_ref[1]); + _ref = _ref[0]; + schema = deref(_ref); + this._isMemberSchema = true; + } + if (traitStack.length > 0) { + this.memberTraits = {}; + for (let i5 = traitStack.length - 1; i5 >= 0; --i5) { + const traitSet = traitStack[i5]; + Object.assign(this.memberTraits, _NormalizedSchema.translateTraits(traitSet)); + } + } else { + this.memberTraits = 0; + } + if (schema instanceof _NormalizedSchema) { + this.name = schema.name; + this.traits = schema.traits; + this._isMemberSchema = schema._isMemberSchema; + this.schema = schema.schema; + this.memberTraits = Object.assign({}, schema.getMemberTraits(), this.getMemberTraits()); + this.normalizedTraits = void 0; + this.ref = schema.ref; + this.memberName = memberName ?? schema.memberName; + return; + } + this.schema = deref(schema); + if (this.schema && typeof this.schema === "object") { + this.traits = this.schema?.traits ?? {}; + } else { + this.traits = 0; + } + this.name = (typeof this.schema === "object" ? this.schema?.name : void 0) ?? this.memberName ?? this.getSchemaName(); + if (this._isMemberSchema && !memberName) { + throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`); + } + } + static [Symbol.hasInstance](lhs) { + const isPrototype = _NormalizedSchema.prototype.isPrototypeOf(lhs); + if (!isPrototype && typeof lhs === "object" && lhs !== null) { + const ns = lhs; + return ns.symbol === _NormalizedSchema.symbol; + } + return isPrototype; + } + static of(ref, memberName) { + if (ref instanceof _NormalizedSchema) { + return ref; + } + return new _NormalizedSchema(ref, memberName); + } + static translateTraits(indicator) { + if (typeof indicator === "object") { + return indicator; + } + indicator = indicator | 0; + const traits = {}; + if ((indicator & 1) === 1) { + traits.httpLabel = 1; + } + if ((indicator >> 1 & 1) === 1) { + traits.idempotent = 1; + } + if ((indicator >> 2 & 1) === 1) { + traits.idempotencyToken = 1; + } + if ((indicator >> 3 & 1) === 1) { + traits.sensitive = 1; + } + if ((indicator >> 4 & 1) === 1) { + traits.httpPayload = 1; + } + if ((indicator >> 5 & 1) === 1) { + traits.httpResponseCode = 1; + } + if ((indicator >> 6 & 1) === 1) { + traits.httpQueryParams = 1; + } + return traits; + } + static memberFrom(memberSchema, memberName) { + if (memberSchema instanceof _NormalizedSchema) { + memberSchema.memberName = memberName; + memberSchema._isMemberSchema = true; + return memberSchema; + } + return new _NormalizedSchema(memberSchema, memberName); + } + getSchema() { + if (this.schema instanceof _NormalizedSchema) { + return this.schema = this.schema.getSchema(); + } + if (this.schema instanceof SimpleSchema) { + return deref(this.schema.schemaRef); + } + return deref(this.schema); + } + getName(withNamespace = false) { + if (!withNamespace) { + if (this.name && this.name.includes("#")) { + return this.name.split("#")[1]; + } + } + return this.name || void 0; + } + getMemberName() { + if (!this.isMemberSchema()) { + throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(true)}`); + } + return this.memberName; + } + isMemberSchema() { + return this._isMemberSchema; + } + isUnitSchema() { + return this.getSchema() === "unit"; + } + isListSchema() { + const inner = this.getSchema(); + if (typeof inner === "number") { + return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER; + } + return inner instanceof ListSchema; + } + isMapSchema() { + const inner = this.getSchema(); + if (typeof inner === "number") { + return inner >= SCHEMA.MAP_MODIFIER && inner <= 255; + } + return inner instanceof MapSchema; + } + isDocumentSchema() { + return this.getSchema() === SCHEMA.DOCUMENT; + } + isStructSchema() { + const inner = this.getSchema(); + return inner !== null && typeof inner === "object" && "members" in inner || inner instanceof StructureSchema; + } + isBlobSchema() { + return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB; + } + isTimestampSchema() { + const schema = this.getSchema(); + return typeof schema === "number" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS; + } + isStringSchema() { + return this.getSchema() === SCHEMA.STRING; + } + isBooleanSchema() { + return this.getSchema() === SCHEMA.BOOLEAN; + } + isNumericSchema() { + return this.getSchema() === SCHEMA.NUMERIC; + } + isBigIntegerSchema() { + return this.getSchema() === SCHEMA.BIG_INTEGER; + } + isBigDecimalSchema() { + return this.getSchema() === SCHEMA.BIG_DECIMAL; + } + isStreaming() { + const streaming = !!this.getMergedTraits().streaming; + if (streaming) { + return true; + } + return this.getSchema() === SCHEMA.STREAMING_BLOB; + } + getMergedTraits() { + if (this.normalizedTraits) { + return this.normalizedTraits; + } + this.normalizedTraits = { + ...this.getOwnTraits(), + ...this.getMemberTraits() + }; + return this.normalizedTraits; + } + getMemberTraits() { + return _NormalizedSchema.translateTraits(this.memberTraits); + } + getOwnTraits() { + return _NormalizedSchema.translateTraits(this.traits); + } + getKeySchema() { + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], "key"); + } + if (!this.isMapSchema()) { + throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(true)}`); + } + const schema = this.getSchema(); + if (typeof schema === "number") { + return _NormalizedSchema.memberFrom([63 & schema, 0], "key"); + } + return _NormalizedSchema.memberFrom([schema.keySchema, 0], "key"); + } + getValueSchema() { + const schema = this.getSchema(); + if (typeof schema === "number") { + if (this.isMapSchema()) { + return _NormalizedSchema.memberFrom([63 & schema, 0], "value"); + } else if (this.isListSchema()) { + return _NormalizedSchema.memberFrom([63 & schema, 0], "member"); + } + } + if (schema && typeof schema === "object") { + if (this.isStructSchema()) { + throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(true)}`); + } + const collection = schema; + if ("valueSchema" in collection) { + if (this.isMapSchema()) { + return _NormalizedSchema.memberFrom([collection.valueSchema, 0], "value"); + } else if (this.isListSchema()) { + return _NormalizedSchema.memberFrom([collection.valueSchema, 0], "member"); + } + } + } + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], "value"); + } + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a value member.`); + } + getMemberSchema(member) { + if (this.isStructSchema()) { + const struct = this.getSchema(); + if (!(member in struct.members)) { + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a member with name=${member}.`); + } + return _NormalizedSchema.memberFrom(struct.members[member], member); + } + if (this.isDocumentSchema()) { + return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], member); + } + throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have members.`); + } + getMemberSchemas() { + const { schema } = this; + const struct = schema; + if (!struct || typeof struct !== "object") { + return {}; + } + if ("members" in struct) { + const buffer = {}; + for (const member of struct.memberNames) { + buffer[member] = this.getMemberSchema(member); + } + return buffer; + } + return {}; + } + *structIterator() { + if (this.isUnitSchema()) { + return; + } + if (!this.isStructSchema()) { + throw new Error("@smithy/core/schema - cannot acquire structIterator on non-struct schema."); + } + const struct = this.getSchema(); + for (let i5 = 0; i5 < struct.memberNames.length; ++i5) { + yield [struct.memberNames[i5], _NormalizedSchema.memberFrom([struct.memberList[i5], 0], struct.memberNames[i5])]; + } + } + getSchemaName() { + const schema = this.getSchema(); + if (typeof schema === "number") { + const _schema = 63 & schema; + const container = 192 & schema; + const type2 = Object.entries(SCHEMA).find(([, value]) => { + return value === _schema; + })?.[0] ?? "Unknown"; + switch (container) { + case SCHEMA.MAP_MODIFIER: + return `${type2}Map`; + case SCHEMA.LIST_MODIFIER: + return `${type2}List`; + case 0: + return type2; + } + } + return "Unknown"; + } + }; + NormalizedSchema.symbol = Symbol.for("@smithy/core/schema::NormalizedSchema"); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/schema/index.js +var init_schema = __esm({ + "node_modules/@smithy/core/dist-es/submodules/schema/index.js"() { + init_deref(); + init_getSchemaSerdePlugin(); + init_ListSchema(); + init_MapSchema(); + init_OperationSchema(); + init_ErrorSchema(); + init_NormalizedSchema(); + init_Schema(); + init_SimpleSchema(); + init_StructureSchema(); + init_sentinels(); + init_TypeRegistry(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js +var copyDocumentWithTransform2; +var init_copyDocumentWithTransform = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/copyDocumentWithTransform.js"() { + init_schema(); + copyDocumentWithTransform2 = (source, schemaRef, transform = (_4) => _4) => { + const ns = NormalizedSchema.of(schemaRef); + switch (typeof source) { + case "undefined": + case "boolean": + case "number": + case "string": + case "bigint": + case "symbol": + return transform(source, ns); + case "function": + case "object": + if (source === null) { + return transform(null, ns); + } + if (Array.isArray(source)) { + const newArray = new Array(source.length); + let i5 = 0; + for (const item of source) { + newArray[i5++] = copyDocumentWithTransform2(item, ns.getValueSchema(), transform); + } + return transform(newArray, ns); + } + if ("byteLength" in source) { + const newBytes = new Uint8Array(source.byteLength); + newBytes.set(source, 0); + return transform(newBytes, ns); + } + if (source instanceof Date) { + return transform(source, ns); + } + const newObject = {}; + if (ns.isMapSchema()) { + for (const key of Object.keys(source)) { + newObject[key] = copyDocumentWithTransform2(source[key], ns.getValueSchema(), transform); + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + newObject[key] = copyDocumentWithTransform2(source[key], memberSchema, transform); + } + } else if (ns.isDocumentSchema()) { + for (const key of Object.keys(source)) { + newObject[key] = copyDocumentWithTransform2(source[key], ns.getValueSchema(), transform); + } + } + return transform(newObject, ns); + default: + return transform(source, ns); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +var parseBoolean2, expectBoolean2, expectNumber2, MAX_FLOAT, expectFloat322, expectLong2, expectInt2, expectInt322, expectShort2, expectByte2, expectSizedInt, castInt, expectNonNull2, expectObject2, expectString2, expectUnion2, strictParseDouble2, strictParseFloat2, strictParseFloat322, NUMBER_REGEX, parseNumber, limitedParseDouble2, handleFloat2, limitedParseFloat2, limitedParseFloat322, parseFloatString, strictParseLong2, strictParseInt2, strictParseInt322, strictParseShort2, strictParseByte2, stackTraceWarning, logger4; +var init_parse_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js"() { + parseBoolean2 = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); + } + }; + expectBoolean2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; + } + } + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; + } + } + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); + }; + expectNumber2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + logger4.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; + } + } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); + }; + MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); + expectFloat322 = (value) => { + const expected = expectNumber2(value); + if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; + }; + expectLong2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); + }; + expectInt2 = expectLong2; + expectInt322 = (value) => expectSizedInt(value, 32); + expectShort2 = (value) => expectSizedInt(value, 16); + expectByte2 = (value) => expectSizedInt(value, 8); + expectSizedInt = (value, size) => { + const expected = expectLong2(value); + if (expected !== void 0 && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; + }; + castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } + }; + expectNonNull2 = (value, location) => { + if (value === null || value === void 0) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; + }; + expectObject2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); + }; + expectString2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + logger4.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); + }; + expectUnion2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + const asObject = expectObject2(value); + const setKeys = Object.entries(asObject).filter(([, v7]) => v7 != null).map(([k6]) => k6); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; + }; + strictParseDouble2 = (value) => { + if (typeof value == "string") { + return expectNumber2(parseNumber(value)); + } + return expectNumber2(value); + }; + strictParseFloat2 = strictParseDouble2; + strictParseFloat322 = (value) => { + if (typeof value == "string") { + return expectFloat322(parseNumber(value)); + } + return expectFloat322(value); + }; + NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; + parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); + }; + limitedParseDouble2 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectNumber2(value); + }; + handleFloat2 = limitedParseDouble2; + limitedParseFloat2 = limitedParseDouble2; + limitedParseFloat322 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return expectFloat322(value); + }; + parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } + }; + strictParseLong2 = (value) => { + if (typeof value === "string") { + return expectLong2(parseNumber(value)); + } + return expectLong2(value); + }; + strictParseInt2 = strictParseLong2; + strictParseInt322 = (value) => { + if (typeof value === "string") { + return expectInt322(parseNumber(value)); + } + return expectInt322(value); + }; + strictParseShort2 = (value) => { + if (typeof value === "string") { + return expectShort2(parseNumber(value)); + } + return expectShort2(value); + }; + strictParseByte2 = (value) => { + if (typeof value === "string") { + return expectByte2(parseNumber(value)); + } + return expectByte2(value); + }; + stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s4) => !s4.includes("stackTraceWarning")).join("\n"); + }; + logger4 = { + warn: console.warn + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js +function dateToUtcString2(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; +} +var DAYS, MONTHS, RFC3339, parseRfc3339DateTime2, RFC3339_WITH_OFFSET, parseRfc3339DateTimeWithOffset2, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, parseRfc7231DateTime2, parseEpochTimestamp2, buildDate, parseTwoDigitYear, FIFTY_YEARS_IN_MILLIS, adjustRfc850Year, parseMonthByShortName, DAYS_IN_MONTH, validateDayOfMonth, isLeapYear, parseDateValue, parseMilliseconds, parseOffsetToMilliseconds, stripLeadingZeroes; +var init_date_utils = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"() { + init_parse_utils(); + DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); + parseRfc3339DateTime2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_4, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = strictParseShort2(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + }; + RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); + parseRfc3339DateTimeWithOffset2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); + } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); + } + const [_4, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = strictParseShort2(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); + } + return date; + }; + IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); + ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); + parseRfc7231DateTime2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); + } + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_4, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate(strictParseShort2(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + match = RFC_850_DATE.exec(value); + if (match) { + const [_4, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds + })); + } + match = ASC_TIME.exec(value); + if (match) { + const [_4, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate(strictParseShort2(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); + } + throw new TypeError("Invalid RFC-7231 date-time value"); + }; + parseEpochTimestamp2 = (value) => { + if (value === null || value === void 0) { + return void 0; + } + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } else if (typeof value === "string") { + valueAsDouble = strictParseDouble2(value); + } else if (typeof value === "object" && value.tag === 1) { + valueAsDouble = value.value; + } else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1e3)); + }; + buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); + }; + parseTwoDigitYear = (value) => { + const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort2(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; + }; + FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3; + adjustRfc850Year = (input) => { + if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; + }; + parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; + }; + DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } + }; + isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + }; + parseDateValue = (value, type2, lower, upper) => { + const dateVal = strictParseByte2(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type2} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; + }; + parseMilliseconds = (value) => { + if (value === null || value === void 0) { + return 0; + } + return strictParseFloat322("0." + value) * 1e3; + }; + parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } else if (directionStr == "-") { + direction = -1; + } else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1e3; + }; + stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js +var LazyJsonString2; +var init_lazy_json = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js"() { + LazyJsonString2 = function LazyJsonString3(val) { + const str2 = Object.assign(new String(val), { + deserializeJSON() { + return JSON.parse(String(val)); + }, + toString() { + return String(val); + }, + toJSON() { + return String(val); + } + }); + return str2; + }; + LazyJsonString2.from = (object) => { + if (object && typeof object === "object" && (object instanceof LazyJsonString2 || "deserializeJSON" in object)) { + return object; + } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) { + return LazyJsonString2(String(object)); + } + return LazyJsonString2(JSON.stringify(object)); + }; + LazyJsonString2.fromObject = LazyJsonString2.from; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js +function quoteHeader2(part) { + if (part.includes(",") || part.includes('"')) { + part = `"${part.replace(/"/g, '\\"')}"`; + } + return part; +} +var init_quote_header = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/quote-header.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/split-every.js +function splitEvery2(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i5 = 0; i5 < segments.length; i5++) { + if (currentSegment === "") { + currentSegment = segments[i5]; + } else { + currentSegment += delimiter + segments[i5]; + } + if ((i5 + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; +} +var init_split_every = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/split-every.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/split-header.js +var splitHeader2; +var init_split_header = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() { + splitHeader2 = (value) => { + const z4 = value.length; + const values = []; + let withinQuotes = false; + let prevChar = void 0; + let anchor = 0; + for (let i5 = 0; i5 < z4; ++i5) { + const char = value[i5]; + switch (char) { + case `"`: + if (prevChar !== "\\") { + withinQuotes = !withinQuotes; + } + break; + case ",": + if (!withinQuotes) { + values.push(value.slice(anchor, i5)); + anchor = i5 + 1; + } + break; + default: + } + prevChar = char; + } + values.push(value.slice(anchor)); + return values.map((v7) => { + v7 = v7.trim(); + const z5 = v7.length; + if (z5 < 2) { + return v7; + } + if (v7[0] === `"` && v7[z5 - 1] === `"`) { + v7 = v7.slice(1, z5 - 1); + } + return v7.replace(/\\"/g, '"'); + }); + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +function nv2(input) { + return new NumericValue2(String(input), "bigDecimal"); +} +var NumericValue2; +var init_NumericValue = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js"() { + NumericValue2 = class { + constructor(string, type2) { + this.string = string; + this.type = type2; + let dot = 0; + for (let i5 = 0; i5 < string.length; ++i5) { + const char = string.charCodeAt(i5); + if (i5 === 0 && char === 45) { + continue; + } + if (char === 46) { + if (dot) { + throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point."); + } + dot = 1; + continue; + } + if (char < 48 || char > 57) { + throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`); + } + } + } + toString() { + return this.string; + } + [Symbol.hasInstance](object) { + if (!object || typeof object !== "object") { + return false; + } + const _nv = object; + if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") { + return true; + } + return false; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/serde/index.js +var serde_exports = {}; +__export(serde_exports, { + LazyJsonString: () => LazyJsonString2, + NumericValue: () => NumericValue2, + copyDocumentWithTransform: () => copyDocumentWithTransform2, + dateToUtcString: () => dateToUtcString2, + expectBoolean: () => expectBoolean2, + expectByte: () => expectByte2, + expectFloat32: () => expectFloat322, + expectInt: () => expectInt2, + expectInt32: () => expectInt322, + expectLong: () => expectLong2, + expectNonNull: () => expectNonNull2, + expectNumber: () => expectNumber2, + expectObject: () => expectObject2, + expectShort: () => expectShort2, + expectString: () => expectString2, + expectUnion: () => expectUnion2, + handleFloat: () => handleFloat2, + limitedParseDouble: () => limitedParseDouble2, + limitedParseFloat: () => limitedParseFloat2, + limitedParseFloat32: () => limitedParseFloat322, + logger: () => logger4, + nv: () => nv2, + parseBoolean: () => parseBoolean2, + parseEpochTimestamp: () => parseEpochTimestamp2, + parseRfc3339DateTime: () => parseRfc3339DateTime2, + parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset2, + parseRfc7231DateTime: () => parseRfc7231DateTime2, + quoteHeader: () => quoteHeader2, + splitEvery: () => splitEvery2, + splitHeader: () => splitHeader2, + strictParseByte: () => strictParseByte2, + strictParseDouble: () => strictParseDouble2, + strictParseFloat: () => strictParseFloat2, + strictParseFloat32: () => strictParseFloat322, + strictParseInt: () => strictParseInt2, + strictParseInt32: () => strictParseInt322, + strictParseLong: () => strictParseLong2, + strictParseShort: () => strictParseShort2 +}); +var init_serde = __esm({ + "node_modules/@smithy/core/dist-es/submodules/serde/index.js"() { + init_copyDocumentWithTransform(); + init_date_utils(); + init_lazy_json(); + init_parse_utils(); + init_quote_header(); + init_split_every(); + init_split_header(); + init_NumericValue(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +var import_protocol_http3, import_util_stream2, HttpProtocol; +var init_HttpProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"() { + init_schema(); + init_serde(); + import_protocol_http3 = __toESM(require_dist_cjs2()); + import_util_stream2 = __toESM(require_dist_cjs18()); + init_collect_stream_body(); + HttpProtocol = class { + constructor(options) { + this.options = options; + } + getRequestType() { + return import_protocol_http3.HttpRequest; + } + getResponseType() { + return import_protocol_http3.HttpResponse; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + if (this.getPayloadCodec()) { + this.getPayloadCodec().setSerdeContext(serdeContext); + } + } + updateServiceEndpoint(request3, endpoint) { + if ("url" in endpoint) { + request3.protocol = endpoint.url.protocol; + request3.hostname = endpoint.url.hostname; + request3.port = endpoint.url.port ? Number(endpoint.url.port) : void 0; + request3.path = endpoint.url.pathname; + request3.fragment = endpoint.url.hash || void 0; + request3.username = endpoint.url.username || void 0; + request3.password = endpoint.url.password || void 0; + for (const [k6, v7] of endpoint.url.searchParams.entries()) { + if (!request3.query) { + request3.query = {}; + } + request3.query[k6] = v7; + } + return request3; + } else { + request3.protocol = endpoint.protocol; + request3.hostname = endpoint.hostname; + request3.port = endpoint.port ? Number(endpoint.port) : void 0; + request3.path = endpoint.path; + request3.query = { + ...endpoint.query + }; + return request3; + } + } + setHostPrefix(request3, operationSchema, input) { + const operationNs = NormalizedSchema.of(operationSchema); + const inputNs = NormalizedSchema.of(operationSchema.input); + if (operationNs.getMergedTraits().endpoint) { + let hostPrefix = operationNs.getMergedTraits().endpoint?.[0]; + if (typeof hostPrefix === "string") { + const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel); + for (const [name] of hostLabelInputs) { + const replacement = input[name]; + if (typeof replacement !== "string") { + throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`); + } + hostPrefix = hostPrefix.replace(`{${name}}`, replacement); + } + request3.hostname = hostPrefix + request3.hostname; + } + } + } + deserializeMetadata(output) { + return { + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }; + } + async deserializeHttpMessage(schema, context2, response, arg4, arg5) { + let dataObject; + if (arg4 instanceof Set) { + dataObject = arg5; + } else { + dataObject = arg4; + } + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(schema); + const nonHttpBindingMembers = []; + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMemberTraits(); + if (memberTraits.httpPayload) { + const isStreaming = memberSchema.isStreaming(); + if (isStreaming) { + const isEventStream = memberSchema.isStructSchema(); + if (isEventStream) { + const context3 = this.serdeContext; + if (!context3.eventStreamMarshaller) { + throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext."); + } + const memberSchemas = memberSchema.getMemberSchemas(); + dataObject[memberName] = context3.eventStreamMarshaller.deserialize(response.body, async (event) => { + const unionMember = Object.keys(event).find((key) => { + return key !== "__type"; + }) ?? ""; + if (unionMember in memberSchemas) { + const eventStreamSchema = memberSchemas[unionMember]; + return { + [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body) + }; + } else { + return { + $unknown: event + }; + } + }); + } else { + dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body); + } + } else if (response.body) { + const bytes = await collectBody2(response.body, context2); + if (bytes.byteLength > 0) { + dataObject[memberName] = await deserializer.read(memberSchema, bytes); + } + } + } else if (memberTraits.httpHeader) { + const key = String(memberTraits.httpHeader).toLowerCase(); + const value = response.headers[key]; + if (null != value) { + if (memberSchema.isListSchema()) { + const headerListValueSchema = memberSchema.getValueSchema(); + let sections; + if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === SCHEMA.TIMESTAMP_DEFAULT) { + sections = splitEvery2(value, ",", 2); + } else { + sections = splitHeader2(value); + } + const list = []; + for (const section of sections) { + list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim())); + } + dataObject[memberName] = list; + } else { + dataObject[memberName] = await deserializer.read(memberSchema, value); + } + } + } else if (memberTraits.httpPrefixHeaders !== void 0) { + dataObject[memberName] = {}; + for (const [header, value] of Object.entries(response.headers)) { + if (header.startsWith(memberTraits.httpPrefixHeaders)) { + dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read([memberSchema.getValueSchema(), { httpHeader: header }], value); + } + } + } else if (memberTraits.httpResponseCode) { + dataObject[memberName] = response.statusCode; + } else { + nonHttpBindingMembers.push(memberName); + } + } + return nonHttpBindingMembers; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +var import_protocol_http4, HttpBindingProtocol; +var init_HttpBindingProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"() { + init_schema(); + import_protocol_http4 = __toESM(require_dist_cjs2()); + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpProtocol(); + HttpBindingProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, _input, context2) { + const input = { + ..._input ?? {} + }; + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context2.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const schema = ns.getSchema(); + let hasNonHttpBindingMember = false; + let payload; + const request3 = new import_protocol_http4.HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request3, endpoint); + this.setHostPrefix(request3, operationSchema, input); + const opTraits = NormalizedSchema.translateTraits(operationSchema.traits); + if (opTraits.http) { + request3.method = opTraits.http[0]; + const [path2, search] = opTraits.http[1].split("?"); + if (request3.path == "/") { + request3.path = path2; + } else { + request3.path += path2; + } + const traitSearchParams = new URLSearchParams(search ?? ""); + Object.assign(query, Object.fromEntries(traitSearchParams)); + } + } + for (const [memberName, memberNs] of ns.structIterator()) { + const memberTraits = memberNs.getMergedTraits() ?? {}; + const inputMemberValue = input[memberName]; + if (inputMemberValue == null) { + continue; + } + if (memberTraits.httpPayload) { + const isStreaming = memberNs.isStreaming(); + if (isStreaming) { + const isEventStream = memberNs.isStructSchema(); + if (isEventStream) { + throw new Error("serialization of event streams is not yet implemented"); + } else { + payload = inputMemberValue; + } + } else { + serializer.write(memberNs, inputMemberValue); + payload = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpLabel) { + serializer.write(memberNs, inputMemberValue); + const replacement = serializer.flush(); + if (request3.path.includes(`{${memberName}+}`)) { + request3.path = request3.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent2).join("/")); + } else if (request3.path.includes(`{${memberName}}`)) { + request3.path = request3.path.replace(`{${memberName}}`, extendedEncodeURIComponent2(replacement)); + } + delete input[memberName]; + } else if (memberTraits.httpHeader) { + serializer.write(memberNs, inputMemberValue); + headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush()); + delete input[memberName]; + } else if (typeof memberTraits.httpPrefixHeaders === "string") { + for (const [key, val] of Object.entries(inputMemberValue)) { + const amalgam = memberTraits.httpPrefixHeaders + key; + serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val); + headers[amalgam.toLowerCase()] = serializer.flush(); + } + delete input[memberName]; + } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) { + this.serializeQuery(memberNs, inputMemberValue, query); + delete input[memberName]; + } else { + hasNonHttpBindingMember = true; + } + } + if (hasNonHttpBindingMember && input) { + serializer.write(schema, input); + payload = serializer.flush(); + } + request3.headers = headers; + request3.query = query; + request3.body = payload; + return request3; + } + serializeQuery(ns, data, query) { + const serializer = this.serializer; + const traits = ns.getMergedTraits(); + if (traits.httpQueryParams) { + for (const [key, val] of Object.entries(data)) { + if (!(key in query)) { + this.serializeQuery(NormalizedSchema.of([ + ns.getValueSchema(), + { + ...traits, + httpQuery: key, + httpQueryParams: void 0 + } + ]), val, query); + } + } + return; + } + if (ns.isListSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const buffer = []; + for (const item of data) { + serializer.write([ns.getValueSchema(), traits], item); + const serializable = serializer.flush(); + if (sparse || serializable !== void 0) { + buffer.push(serializable); + } + } + query[traits.httpQuery] = buffer; + } else { + serializer.write([ns, traits], data); + query[traits.httpQuery] = serializer.flush(); + } + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes = await collectBody2(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context2, response, dataObject); + if (nonHttpBindingMembers.length) { + const bytes = await collectBody2(response.body, context2); + if (bytes.byteLength > 0) { + const dataFromBody = await deserializer.read(ns, bytes); + for (const member of nonHttpBindingMembers) { + dataObject[member] = dataFromBody[member]; + } + } + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +var import_protocol_http5, RpcProtocol; +var init_RpcProtocol = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js"() { + init_schema(); + import_protocol_http5 = __toESM(require_dist_cjs2()); + init_collect_stream_body(); + init_HttpProtocol(); + RpcProtocol = class extends HttpProtocol { + async serializeRequest(operationSchema, input, context2) { + const serializer = this.serializer; + const query = {}; + const headers = {}; + const endpoint = await context2.endpoint(); + const ns = NormalizedSchema.of(operationSchema?.input); + const schema = ns.getSchema(); + let payload; + const request3 = new import_protocol_http5.HttpRequest({ + protocol: "", + hostname: "", + port: void 0, + path: "/", + fragment: void 0, + query, + headers, + body: void 0 + }); + if (endpoint) { + this.updateServiceEndpoint(request3, endpoint); + this.setHostPrefix(request3, operationSchema, input); + } + const _input = { + ...input + }; + if (input) { + serializer.write(schema, _input); + payload = serializer.flush(); + } + request3.headers = headers; + request3.query = query; + request3.body = payload; + request3.method = "POST"; + return request3; + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes2 = await collectBody2(response.body, context2); + if (bytes2.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes2)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw."); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const bytes = await collectBody2(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes)); + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +var resolvedPath2; +var init_resolve_path = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js"() { + init_extended_encode_uri_component(); + resolvedPath2 = (resolvedPath3, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== void 0) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); + } + resolvedPath3 = resolvedPath3.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment) => extendedEncodeURIComponent2(segment)).join("/") : extendedEncodeURIComponent2(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath3; + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +function requestBuilder(input, context2) { + return new RequestBuilder(input, context2); +} +var import_protocol_http6, RequestBuilder; +var init_requestBuilder = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js"() { + import_protocol_http6 = __toESM(require_dist_cjs2()); + init_resolve_path(); + RequestBuilder = class { + constructor(input, context2) { + this.input = input; + this.context = context2; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new import_protocol_http6.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); + } + hn(hostname) { + this.hostname = hostname; + return this; + } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path2) => { + this.path = resolvedPath2(path2, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + h(headers) { + this.headers = headers; + return this; + } + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +function determineTimestampFormat(ns, settings) { + if (settings.timestampFormat.useTrait) { + if (ns.isTimestampSchema() && (ns.getSchema() === SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === SCHEMA.TIMESTAMP_EPOCH_SECONDS)) { + return ns.getSchema(); + } + } + const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits(); + const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? SCHEMA.TIMESTAMP_DATE_TIME : void 0 : void 0; + return bindingFormat ?? settings.timestampFormat.default; +} +var init_determineTimestampFormat = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js"() { + init_schema(); + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +var import_util_base64, import_util_utf8, FromStringShapeDeserializer; +var init_FromStringShapeDeserializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js"() { + init_schema(); + init_serde(); + import_util_base64 = __toESM(require_dist_cjs12()); + import_util_utf8 = __toESM(require_dist_cjs11()); + init_determineTimestampFormat(); + FromStringShapeDeserializer = class { + constructor(settings) { + this.settings = settings; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + read(_schema, data) { + const ns = NormalizedSchema.of(_schema); + if (ns.isListSchema()) { + return splitHeader2(data).map((item) => this.read(ns.getValueSchema(), item)); + } + if (ns.isBlobSchema()) { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data); + } + if (ns.isTimestampSchema()) { + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return parseRfc3339DateTimeWithOffset2(data); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return parseRfc7231DateTime2(data); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return parseEpochTimestamp2(data); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", data); + return new Date(data); + } + } + if (ns.isStringSchema()) { + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = data; + if (mediaType) { + if (ns.getMergedTraits().httpHeader) { + intermediateValue = this.base64ToUtf8(intermediateValue); + } + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString2.from(intermediateValue); + } + return intermediateValue; + } + } + switch (true) { + case ns.isNumericSchema(): + return Number(data); + case ns.isBigIntegerSchema(): + return BigInt(data); + case ns.isBigDecimalSchema(): + return new NumericValue2(data, "bigDecimal"); + case ns.isBooleanSchema(): + return String(data).toLowerCase() === "true"; + } + return data; + } + base64ToUtf8(base64String) { + return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String)); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +var import_util_utf82, HttpInterceptingShapeDeserializer; +var init_HttpInterceptingShapeDeserializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js"() { + init_schema(); + import_util_utf82 = __toESM(require_dist_cjs11()); + init_FromStringShapeDeserializer(); + HttpInterceptingShapeDeserializer = class { + constructor(codecDeserializer, codecSettings) { + this.codecDeserializer = codecDeserializer; + this.stringDeserializer = new FromStringShapeDeserializer(codecSettings); + } + setSerdeContext(serdeContext) { + this.stringDeserializer.setSerdeContext(serdeContext); + this.codecDeserializer.setSerdeContext(serdeContext); + this.serdeContext = serdeContext; + } + read(schema, data) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + const toString3 = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8; + if (traits.httpHeader || traits.httpResponseCode) { + return this.stringDeserializer.read(ns, toString3(data)); + } + if (traits.httpPayload) { + if (ns.isBlobSchema()) { + const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.fromUtf8; + if (typeof data === "string") { + return toBytes(data); + } + return data; + } else if (ns.isStringSchema()) { + if ("byteLength" in data) { + return toString3(data); + } + return data; + } + } + return this.codecDeserializer.read(ns, data); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +var import_util_base642, ToStringShapeSerializer; +var init_ToStringShapeSerializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js"() { + init_schema(); + init_serde(); + import_util_base642 = __toESM(require_dist_cjs12()); + init_determineTimestampFormat(); + ToStringShapeSerializer = class { + constructor(settings) { + this.settings = settings; + this.stringBuffer = ""; + this.serdeContext = void 0; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + switch (typeof value) { + case "object": + if (value === null) { + this.stringBuffer = "null"; + return; + } + if (ns.isTimestampSchema()) { + if (!(value instanceof Date)) { + throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`); + } + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + this.stringBuffer = value.toISOString().replace(".000Z", "Z"); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + this.stringBuffer = dateToUtcString2(value); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + this.stringBuffer = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + this.stringBuffer = String(value.getTime() / 1e3); + } + return; + } + if (ns.isBlobSchema() && "byteLength" in value) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value); + return; + } + if (ns.isListSchema() && Array.isArray(value)) { + let buffer = ""; + for (const item of value) { + this.write([ns.getValueSchema(), ns.getMergedTraits()], item); + const headerItem = this.flush(); + const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader2(headerItem); + if (buffer !== "") { + buffer += ", "; + } + buffer += serialized; + } + this.stringBuffer = buffer; + return; + } + this.stringBuffer = JSON.stringify(value, null, 2); + break; + case "string": + const mediaType = ns.getMergedTraits().mediaType; + let intermediateValue = value; + if (mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + intermediateValue = LazyJsonString2.from(intermediateValue); + } + if (ns.getMergedTraits().httpHeader) { + this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString()); + return; + } + } + this.stringBuffer = value; + break; + default: + this.stringBuffer = String(value); + } + } + flush() { + const buffer = this.stringBuffer; + this.stringBuffer = ""; + return buffer; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +var HttpInterceptingShapeSerializer; +var init_HttpInterceptingShapeSerializer = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js"() { + init_schema(); + init_ToStringShapeSerializer(); + HttpInterceptingShapeSerializer = class { + constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) { + this.codecSerializer = codecSerializer; + this.stringSerializer = stringSerializer; + } + setSerdeContext(serdeContext) { + this.codecSerializer.setSerdeContext(serdeContext); + this.stringSerializer.setSerdeContext(serdeContext); + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + const traits = ns.getMergedTraits(); + if (traits.httpHeader || traits.httpLabel || traits.httpQuery) { + this.stringSerializer.write(ns, value); + this.buffer = this.stringSerializer.flush(); + return; + } + return this.codecSerializer.write(ns, value); + } + flush() { + if (this.buffer !== void 0) { + const buffer = this.buffer; + this.buffer = void 0; + return buffer; + } + return this.codecSerializer.flush(); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/submodules/protocols/index.js +var protocols_exports = {}; +__export(protocols_exports, { + FromStringShapeDeserializer: () => FromStringShapeDeserializer, + HttpBindingProtocol: () => HttpBindingProtocol, + HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, + HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer, + RequestBuilder: () => RequestBuilder, + RpcProtocol: () => RpcProtocol, + ToStringShapeSerializer: () => ToStringShapeSerializer, + collectBody: () => collectBody2, + determineTimestampFormat: () => determineTimestampFormat, + extendedEncodeURIComponent: () => extendedEncodeURIComponent2, + requestBuilder: () => requestBuilder, + resolvedPath: () => resolvedPath2 +}); +var init_protocols = __esm({ + "node_modules/@smithy/core/dist-es/submodules/protocols/index.js"() { + init_collect_stream_body(); + init_extended_encode_uri_component(); + init_HttpBindingProtocol(); + init_RpcProtocol(); + init_requestBuilder(); + init_resolve_path(); + init_FromStringShapeDeserializer(); + init_HttpInterceptingShapeDeserializer(); + init_HttpInterceptingShapeSerializer(); + init_ToStringShapeSerializer(); + init_determineTimestampFormat(); + } +}); + +// node_modules/@smithy/core/dist-es/protocols/requestBuilder.js +var init_requestBuilder2 = __esm({ + "node_modules/@smithy/core/dist-es/protocols/requestBuilder.js"() { + init_protocols(); + } +}); + +// node_modules/@smithy/core/dist-es/setFeature.js +function setFeature(context2, feature, value) { + if (!context2.__smithy_context) { + context2.__smithy_context = { + features: {} + }; + } else if (!context2.__smithy_context.features) { + context2.__smithy_context.features = {}; + } + context2.__smithy_context.features[feature] = value; +} +var init_setFeature = __esm({ + "node_modules/@smithy/core/dist-es/setFeature.js"() { + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +var DefaultIdentityProviderConfig; +var init_DefaultIdentityProviderConfig = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"() { + DefaultIdentityProviderConfig = class { + constructor(config6) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config6)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +var import_protocol_http7, import_types4, HttpApiKeyAuthSigner; +var init_httpApiKeyAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() { + import_protocol_http7 = __toESM(require_dist_cjs2()); + import_types4 = __toESM(require_dist_cjs()); + HttpApiKeyAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = import_protocol_http7.HttpRequest.clone(httpRequest); + if (signingProperties.in === import_types4.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types4.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; + } else { + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`"); + } + return clonedRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +var import_protocol_http8, HttpBearerAuthSigner; +var init_httpBearerAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js"() { + import_protocol_http8 = __toESM(require_dist_cjs2()); + HttpBearerAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = import_protocol_http8.HttpRequest.clone(httpRequest); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js +var NoAuthSigner; +var init_noAuth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/noAuth.js"() { + NoAuthSigner = class { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; + } + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js +var init_httpAuthSchemes = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/index.js"() { + init_httpApiKeyAuth(); + init_httpBearerAuth(); + init_noAuth(); + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +var createIsIdentityExpiredFunction, EXPIRATION_MS, isIdentityExpired, doesIdentityRequireRefresh, memoizeIdentityProvider; +var init_memoizeIdentityProvider = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js"() { + createIsIdentityExpiredFunction = (expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs; + EXPIRATION_MS = 3e5; + isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); + doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0; + memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; + } + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }; + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; + }; + } +}); + +// node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js +var init_util_identity_and_auth = __esm({ + "node_modules/@smithy/core/dist-es/util-identity-and-auth/index.js"() { + init_DefaultIdentityProviderConfig(); + init_httpAuthSchemes(); + init_memoizeIdentityProvider(); + } +}); + +// node_modules/@smithy/core/dist-es/index.js +var dist_es_exports = {}; +__export(dist_es_exports, { + DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, + EXPIRATION_MS: () => EXPIRATION_MS, + HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, + HttpBearerAuthSigner: () => HttpBearerAuthSigner, + NoAuthSigner: () => NoAuthSigner, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder, + setFeature: () => setFeature +}); +var init_dist_es = __esm({ + "node_modules/@smithy/core/dist-es/index.js"() { + init_getSmithyContext(); + init_middleware_http_auth_scheme(); + init_middleware_http_signing(); + init_normalizeProvider(); + init_createPaginator(); + init_requestBuilder2(); + init_setFeature(); + init_util_identity_and_auth(); + } +}); + +// node_modules/@smithy/util-endpoints/dist-cjs/index.js +var require_dist_cjs19 = __commonJS({ + "node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EndpointCache: () => EndpointCache3, + EndpointError: () => EndpointError2, + customEndpointFunctions: () => customEndpointFunctions3, + isIpAddress: () => isIpAddress2, + isValidHostLabel: () => isValidHostLabel, + resolveEndpoint: () => resolveEndpoint4 + }); + module2.exports = __toCommonJS2(src_exports); + var EndpointCache3 = class { + /** + * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed + * before keys are dropped. + * @param [params] - list of params to consider as part of the cache key. + * + * If the params list is not populated, no caching will happen. + * This may be out of order depending on how the object is created and arrives to this class. + */ + constructor({ size, params }) { + this.data = /* @__PURE__ */ new Map(); + this.parameters = []; + this.capacity = size ?? 50; + if (params) { + this.parameters = params; + } + } + static { + __name(this, "EndpointCache"); + } + /** + * @param endpointParams - query for endpoint. + * @param resolver - provider of the value if not present. + * @returns endpoint corresponding to the query. + */ + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i5 = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i5 > 10) { + break; + } + } + } + this.data.set(key, resolver()); + } + return this.data.get(key); + } + size() { + return this.data.size; + } + /** + * @returns cache key or false if not cachable. + */ + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; + } + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; + } + }; + var IP_V4_REGEX = new RegExp( + `^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$` + ); + var isIpAddress2 = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress"); + var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); + var isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } + } + return true; + }, "isValidHostLabel"); + var customEndpointFunctions3 = {}; + var debugId = "endpoints"; + function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; + } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; + } + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); + } + __name(toDebugString, "toDebugString"); + var EndpointError2 = class extends Error { + static { + __name(this, "EndpointError"); + } + constructor(message) { + super(message); + this.name = "EndpointError"; + } + }; + var booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "booleanEquals"); + var getAttrPathList = /* @__PURE__ */ __name((path2) => { + const parts = path2.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError2(`Path: '${path2}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path2}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } else { + pathList.push(part); + } + } + return pathList; + }, "getAttrPathList"); + var getAttr = /* @__PURE__ */ __name((value, path2) => getAttrPathList(path2).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError2(`Index '${index}' in '${path2}' not found in '${JSON.stringify(value)}'`); + } else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; + }, value), "getAttr"); + var isSet = /* @__PURE__ */ __name((value) => value != null, "isSet"); + var not = /* @__PURE__ */ __name((value) => !value, "not"); + var import_types32 = require_dist_cjs(); + var DEFAULT_PORTS = { + [import_types32.EndpointURLScheme.HTTP]: 80, + [import_types32.EndpointURLScheme.HTTPS]: 443 + }; + var parseURL = /* @__PURE__ */ __name((value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname: hostname2, port, protocol: protocol2 = "", path: path2 = "", query = {} } = value; + const url2 = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path2}`); + url2.search = Object.entries(query).map(([k6, v7]) => `${k6}=${v7}`).join("&"); + return url2; + } + return new URL(value); + } catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(import_types32.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress2(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp + }; + }, "parseURL"); + var stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, "stringEquals"); + var substring = /* @__PURE__ */ __name((input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); + }, "substring"); + var uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c4) => `%${c4.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode"); + var endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode + }; + var evaluateTemplate = /* @__PURE__ */ __name((template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); + }, "evaluateTemplate"); + var getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord + }; + return referenceRecord[ref]; + }, "getReferenceValue"); + var evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } else if (obj["fn"]) { + return callFunction(obj, options); + } else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`); + }, "evaluateExpression"); + var callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => { + const evaluatedArgs = argv.map( + (arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options) + ); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions3 && fnSegments[1] != null) { + return customEndpointFunctions3[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); + }, "callFunction"); + var evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError2(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...assign != null && { toAssign: { name: assign, value } } + }; + }, "evaluateCondition"); + var evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord + } + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; + }, "evaluateConditions"); + var getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce( + (acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }) + }), + {} + ), "getEndpointHeaders"); + var getEndpointProperty = /* @__PURE__ */ __name((property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError2(`Unexpected endpoint property: ${property}`); + } + return getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`); + } + }, "getEndpointProperty"); + var getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce( + (acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: getEndpointProperty(propertyVal, options) + }), + {} + ), "getEndpointProperties"); + var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`); + }, "getEndpointUrl"); + var evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }; + const { url: url2, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...headers != void 0 && { + headers: getEndpointHeaders(headers, endpointRuleOptions) + }, + ...properties != void 0 && { + properties: getEndpointProperties(properties, endpointRuleOptions) + }, + url: getEndpointUrl(url2, endpointRuleOptions) + }; + }, "evaluateEndpointRule"); + var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + throw new EndpointError2( + evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }) + ); + }, "evaluateErrorRule"); + var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; + } + return evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord } + }); + }, "evaluateTreeRule"); + var evaluateRules = /* @__PURE__ */ __name((rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else if (rule.type === "error") { + evaluateErrorRule(rule, options); + } else if (rule.type === "tree") { + const endpointOrUndefined = evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } else { + throw new EndpointError2(`Unknown endpoint rule: ${rule}`); + } + } + throw new EndpointError2(`Rules evaluation failed`); + }, "evaluateRules"); + var resolveEndpoint4 = /* @__PURE__ */ __name((ruleSetObject, options) => { + const { endpointParams, logger: logger5 } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters).filter(([, v7]) => v7.default != null).map(([k6, v7]) => [k6, v7.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters).filter(([, v7]) => v7.required).map(([k6]) => k6); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError2(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = evaluateRules(rules, { endpointParams, logger: logger5, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; + }, "resolveEndpoint"); + } +}); + +// node_modules/@smithy/querystring-parser/dist-cjs/index.js +var require_dist_cjs20 = __commonJS({ + "node_modules/@smithy/querystring-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseQueryString: () => parseQueryString + }); + module2.exports = __toCommonJS2(src_exports); + function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } else if (Array.isArray(query[key])) { + query[key].push(value); + } else { + query[key] = [query[key], value]; + } + } + } + return query; + } + __name(parseQueryString, "parseQueryString"); + } +}); + +// node_modules/@smithy/url-parser/dist-cjs/index.js +var require_dist_cjs21 = __commonJS({ + "node_modules/@smithy/url-parser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + parseUrl: () => parseUrl3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_querystring_parser = require_dist_cjs20(); + var parseUrl3 = /* @__PURE__ */ __name((url2) => { + if (typeof url2 === "string") { + return parseUrl3(new URL(url2)); + } + const { hostname, pathname, port, protocol, search } = url2; + let query; + if (search) { + query = (0, import_querystring_parser.parseQueryString)(search); + } + return { + hostname, + port: port ? parseInt(port) : void 0, + protocol, + path: pathname, + query + }; + }, "parseUrl"); + } +}); + +// node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +var require_dist_cjs22 = __commonJS({ + "node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + ConditionObject: () => import_util_endpoints5.ConditionObject, + DeprecatedObject: () => import_util_endpoints5.DeprecatedObject, + EndpointError: () => import_util_endpoints5.EndpointError, + EndpointObject: () => import_util_endpoints5.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints5.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints5.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints5.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints5.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints5.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints5.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints5.EvaluateOptions, + Expression: () => import_util_endpoints5.Expression, + FunctionArgv: () => import_util_endpoints5.FunctionArgv, + FunctionObject: () => import_util_endpoints5.FunctionObject, + FunctionReturn: () => import_util_endpoints5.FunctionReturn, + ParameterObject: () => import_util_endpoints5.ParameterObject, + ReferenceObject: () => import_util_endpoints5.ReferenceObject, + ReferenceRecord: () => import_util_endpoints5.ReferenceRecord, + RuleSetObject: () => import_util_endpoints5.RuleSetObject, + RuleSetRules: () => import_util_endpoints5.RuleSetRules, + TreeRuleObject: () => import_util_endpoints5.TreeRuleObject, + awsEndpointFunctions: () => awsEndpointFunctions3, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints5.isIpAddress, + partition: () => partition3, + resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig, + resolveEndpoint: () => import_util_endpoints5.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + toEndpointV1: () => toEndpointV1, + useDefaultPartitionInfo: () => useDefaultPartitionInfo + }); + module2.exports = __toCommonJS2(index_exports); + var import_util_endpoints5 = require_dist_cjs19(); + var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!(0, import_util_endpoints5.isValidHostLabel)(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, import_util_endpoints5.isIpAddress)(value)) { + return false; + } + return true; + }, "isVirtualHostableS3Bucket"); + var ARN_DELIMITER = ":"; + var RESOURCE_DELIMITER = "/"; + var parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) return null; + const [arn, partition22, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition22 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition: partition22, + service, + region, + accountId, + resourceId + }; + }, "parseArn"); + var partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "AWS Standard global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "AWS China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "AWS ISOE (Europe) global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "AWS ISOF global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "amazonaws.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "EU (Germany)" + } + } + }], + version: "1.1" + }; + var selectedPartitionsInfo = partitions_default; + var selectedUserAgentPrefix = ""; + var partition3 = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition22 of partitions) { + const { regions, outputs } = partition22; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } + } + for (const partition22 of partitions) { + const { regionRegex, outputs } = partition22; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition22) => partition22.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error( + "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." + ); + } + return { + ...DEFAULT_PARTITION.outputs + }; + }, "partition"); + var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; + }, "setPartitionInfo"); + var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); + }, "useDefaultPartitionInfo"); + var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); + var awsEndpointFunctions3 = { + isVirtualHostableS3Bucket, + parseArn, + partition: partition3 + }; + import_util_endpoints5.customEndpointFunctions.aws = awsEndpointFunctions3; + var import_url_parser3 = require_dist_cjs21(); + var resolveDefaultAwsRegionalEndpointsConfig = /* @__PURE__ */ __name((input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === void 0) { + input.endpoint = async () => { + return toEndpointV1( + input.endpointProvider( + { + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: void 0 + }, + { logger: input.logger } + ) + ); + }; + } + return input; + }, "resolveDefaultAwsRegionalEndpointsConfig"); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => (0, import_url_parser3.parseUrl)(endpoint.url), "toEndpointV1"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +var state2, emitWarningIfUnsupportedVersion; +var init_emitWarningIfUnsupportedVersion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"() { + state2 = { + warningEmitted: false + }; + emitWarningIfUnsupportedVersion = (version4) => { + if (version4 && !state2.warningEmitted && parseInt(version4.substring(1, version4.indexOf("."))) < 18) { + state2.warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 16.x on January 6, 2025. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to a supported Node.js LTS version. + +More information can be found at: https://a.co/74kJMmI`); + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js +function setCredentialFeature(credentials, feature, value) { + if (!credentials.$source) { + credentials.$source = {}; + } + credentials.$source[feature] = value; + return credentials; +} +var init_setCredentialFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +function setFeature2(context2, feature, value) { + if (!context2.__aws_sdk_context) { + context2.__aws_sdk_context = { + features: {} + }; + } else if (!context2.__aws_sdk_context.features) { + context2.__aws_sdk_context.features = {}; + } + context2.__aws_sdk_context.features[feature] = value; +} +var init_setFeature2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +function setTokenFeature(token, feature, value) { + if (!token.$source) { + token.$source = {}; + } + token.$source[feature] = value; + return token; +} +var init_setTokenFeature = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js"() { + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +var client_exports = {}; +__export(client_exports, { + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + setCredentialFeature: () => setCredentialFeature, + setFeature: () => setFeature2, + setTokenFeature: () => setTokenFeature, + state: () => state2 +}); +var init_client = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/client/index.js"() { + init_emitWarningIfUnsupportedVersion(); + init_setCredentialFeature(); + init_setFeature2(); + init_setTokenFeature(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +var import_protocol_http9, getDateHeader; +var init_getDateHeader = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js"() { + import_protocol_http9 = __toESM(require_dist_cjs2()); + getDateHeader = (response) => import_protocol_http9.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js +var getSkewCorrectedDate; +var init_getSkewCorrectedDate = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js"() { + getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +var isClockSkewed; +var init_isClockSkewed = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js"() { + init_getSkewCorrectedDate(); + isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +var getUpdatedSystemClockOffset; +var init_getUpdatedSystemClockOffset = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js"() { + init_isClockSkewed(); + getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +var init_utils = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() { + init_getDateHeader(); + init_getSkewCorrectedDate(); + init_getUpdatedSystemClockOffset(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +var import_protocol_http10, throwSigningPropertyError, validateSigningProperties, AwsSdkSigV4Signer, AWSSDKSigV4Signer; +var init_AwsSdkSigV4Signer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() { + import_protocol_http10 = __toESM(require_dist_cjs2()); + init_utils(); + throwSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; + }; + validateSigningProperties = async (signingProperties) => { + const context2 = throwSigningPropertyError("context", signingProperties.context); + const config6 = throwSigningPropertyError("config", signingProperties.config); + const authScheme = context2.endpointV2?.properties?.authSchemes?.[0]; + const signerFunction = throwSigningPropertyError("signer", config6.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties?.signingRegion; + const signingRegionSet = signingProperties?.signingRegionSet; + const signingName = signingProperties?.signingName; + return { + config: config6, + signer, + signingRegion, + signingRegionSet, + signingName + }; + }; + AwsSdkSigV4Signer = class { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http10.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const validatedProps = await validateSigningProperties(signingProperties); + const { config: config6, signer } = validatedProps; + let { signingRegion, signingName } = validatedProps; + const handlerExecutionContext = signingProperties.context; + if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) { + const [first, second] = handlerExecutionContext.authSchemes; + if (first?.name === "sigv4a" && second?.name === "sigv4") { + signingRegion = second?.signingRegion ?? signingRegion; + signingName = second?.signingName ?? signingName; + } + } + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config6.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; + } + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config6 = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config6.systemClockOffset; + config6.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config6.systemClockOffset); + const clockSkewCorrected = config6.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; + } + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config6 = throwSigningPropertyError("config", signingProperties.config); + config6.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config6.systemClockOffset); + } + } + }; + AWSSDKSigV4Signer = AwsSdkSigV4Signer; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +var import_protocol_http11, AwsSdkSigV4ASigner; +var init_AwsSdkSigV4ASigner = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js"() { + import_protocol_http11 = __toESM(require_dist_cjs2()); + init_utils(); + init_AwsSdkSigV4Signer(); + AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http11.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config: config6, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties); + const configResolvedSigningRegionSet = await config6.sigv4aSigningRegionSet?.(); + const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(","); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config6.systemClockOffset), + signingRegion: multiRegionOverride, + signingService: signingName + }); + return signedRequest; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js +var getArrayForCommaSeparatedString; +var init_getArrayForCommaSeparatedString = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js"() { + getArrayForCommaSeparatedString = (str2) => typeof str2 === "string" && str2.length > 0 ? str2.split(",").map((item) => item.trim()) : []; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js +var getBearerTokenEnvKey; +var init_getBearerTokenEnvKey = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js"() { + getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY, NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; +var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"() { + init_getArrayForCommaSeparatedString(); + init_getBearerTokenEnvKey(); + NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; + NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { + environmentVariableSelector: (env2, options) => { + if (options?.signingName) { + const bearerTokenKey = getBearerTokenEnvKey(options.signingName); + if (bearerTokenKey in env2) + return ["httpBearerAuth"]; + } + if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2)) + return void 0; + return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); + }, + configFileSelector: (profile) => { + if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) + return void 0; + return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]); + }, + default: [] + }; + } +}); + +// node_modules/@smithy/property-provider/dist-cjs/index.js +var require_dist_cjs23 = __commonJS({ + "node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CredentialsProviderError: () => CredentialsProviderError, + ProviderError: () => ProviderError2, + TokenProviderError: () => TokenProviderError, + chain: () => chain, + fromStatic: () => fromStatic, + memoize: () => memoize + }); + module2.exports = __toCommonJS2(src_exports); + var ProviderError2 = class _ProviderError extends Error { + constructor(message, options = true) { + let logger5; + let tryNextLink = true; + if (typeof options === "boolean") { + logger5 = void 0; + tryNextLink = options; + } else if (options != null && typeof options === "object") { + logger5 = options.logger; + tryNextLink = options.tryNextLink ?? true; + } + super(message); + this.name = "ProviderError"; + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, _ProviderError.prototype); + logger5?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); + } + static { + __name(this, "ProviderError"); + } + /** + * @deprecated use new operator. + */ + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); + } + }; + var CredentialsProviderError = class _CredentialsProviderError extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, _CredentialsProviderError.prototype); + } + static { + __name(this, "CredentialsProviderError"); + } + }; + var TokenProviderError = class _TokenProviderError extends ProviderError2 { + /** + * @override + */ + constructor(message, options = true) { + super(message, options); + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, _TokenProviderError.prototype); + } + static { + __name(this, "TokenProviderError"); + } + }; + var chain = /* @__PURE__ */ __name((...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError2("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; + }, "chain"); + var fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic"); + var memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; + } + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; + }, "memoize"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js +var import_property_provider, resolveAwsSdkSigV4AConfig, NODE_SIGV4A_CONFIG_OPTIONS; +var init_resolveAwsSdkSigV4AConfig = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js"() { + init_dist_es(); + import_property_provider = __toESM(require_dist_cjs23()); + resolveAwsSdkSigV4AConfig = (config6) => { + config6.sigv4aSigningRegionSet = normalizeProvider(config6.sigv4aSigningRegionSet); + return config6; + }; + NODE_SIGV4A_CONFIG_OPTIONS = { + environmentVariableSelector(env2) { + if (env2.AWS_SIGV4A_SIGNING_REGION_SET) { + return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_4) => _4.trim()); + } + throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { + tryNextLink: true + }); + }, + configFileSelector(profile) { + if (profile.sigv4a_signing_region_set) { + return (profile.sigv4a_signing_region_set ?? "").split(",").map((_4) => _4.trim()); + } + throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", { + tryNextLink: true + }); + }, + default: void 0 + }; + } +}); + +// node_modules/@smithy/signature-v4/dist-cjs/index.js +var require_dist_cjs24 = __commonJS({ + "node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + ALGORITHM_IDENTIFIER: () => ALGORITHM_IDENTIFIER, + ALGORITHM_IDENTIFIER_V4A: () => ALGORITHM_IDENTIFIER_V4A, + ALGORITHM_QUERY_PARAM: () => ALGORITHM_QUERY_PARAM, + ALWAYS_UNSIGNABLE_HEADERS: () => ALWAYS_UNSIGNABLE_HEADERS, + AMZ_DATE_HEADER: () => AMZ_DATE_HEADER, + AMZ_DATE_QUERY_PARAM: () => AMZ_DATE_QUERY_PARAM, + AUTH_HEADER: () => AUTH_HEADER, + CREDENTIAL_QUERY_PARAM: () => CREDENTIAL_QUERY_PARAM, + DATE_HEADER: () => DATE_HEADER, + EVENT_ALGORITHM_IDENTIFIER: () => EVENT_ALGORITHM_IDENTIFIER, + EXPIRES_QUERY_PARAM: () => EXPIRES_QUERY_PARAM, + GENERATED_HEADERS: () => GENERATED_HEADERS, + HOST_HEADER: () => HOST_HEADER, + KEY_TYPE_IDENTIFIER: () => KEY_TYPE_IDENTIFIER, + MAX_CACHE_SIZE: () => MAX_CACHE_SIZE, + MAX_PRESIGNED_TTL: () => MAX_PRESIGNED_TTL, + PROXY_HEADER_PATTERN: () => PROXY_HEADER_PATTERN, + REGION_SET_PARAM: () => REGION_SET_PARAM, + SEC_HEADER_PATTERN: () => SEC_HEADER_PATTERN, + SHA256_HEADER: () => SHA256_HEADER, + SIGNATURE_HEADER: () => SIGNATURE_HEADER, + SIGNATURE_QUERY_PARAM: () => SIGNATURE_QUERY_PARAM, + SIGNED_HEADERS_QUERY_PARAM: () => SIGNED_HEADERS_QUERY_PARAM, + SignatureV4: () => SignatureV42, + SignatureV4Base: () => SignatureV4Base, + TOKEN_HEADER: () => TOKEN_HEADER, + TOKEN_QUERY_PARAM: () => TOKEN_QUERY_PARAM, + UNSIGNABLE_PATTERNS: () => UNSIGNABLE_PATTERNS, + UNSIGNED_PAYLOAD: () => UNSIGNED_PAYLOAD, + clearCredentialCache: () => clearCredentialCache, + createScope: () => createScope, + getCanonicalHeaders: () => getCanonicalHeaders, + getCanonicalQuery: () => getCanonicalQuery, + getPayloadHash: () => getPayloadHash, + getSigningKey: () => getSigningKey, + hasHeader: () => hasHeader, + moveHeadersToQuery: () => moveHeadersToQuery, + prepareRequest: () => prepareRequest, + signatureV4aContainer: () => signatureV4aContainer + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_utf852 = require_dist_cjs11(); + var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; + var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; + var AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; + var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; + var EXPIRES_QUERY_PARAM = "X-Amz-Expires"; + var SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; + var TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; + var REGION_SET_PARAM = "X-Amz-Region-Set"; + var AUTH_HEADER = "authorization"; + var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); + var DATE_HEADER = "date"; + var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; + var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); + var SHA256_HEADER = "x-amz-content-sha256"; + var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); + var HOST_HEADER = "host"; + var ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true + }; + var PROXY_HEADER_PATTERN = /^proxy-/; + var SEC_HEADER_PATTERN = /^sec-/; + var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; + var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; + var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; + var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; + var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; + var MAX_CACHE_SIZE = 50; + var KEY_TYPE_IDENTIFIER = "aws4_request"; + var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + var import_util_hex_encoding = require_dist_cjs17(); + var import_util_utf86 = require_dist_cjs11(); + var signingKeyCache = {}; + var cacheQueue = []; + var createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope"); + var getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return signingKeyCache[cacheKey] = key; + }, "getSigningKey"); + var clearCredentialCache = /* @__PURE__ */ __name(() => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); + }, "clearCredentialCache"); + var hmac = /* @__PURE__ */ __name((ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, import_util_utf86.toUint8Array)(data)); + return hash.digest(); + }, "hmac"); + var getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == void 0) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) { + continue; + } + } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); + } + return canonical; + }, "getCanonicalHeaders"); + var import_is_array_buffer = require_dist_cjs9(); + var import_util_utf822 = require_dist_cjs11(); + var getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == void 0) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, import_util_utf822.toUint8Array)(body)); + return (0, import_util_hex_encoding.toHex)(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; + }, "getPayloadHash"); + var import_util_utf832 = require_dist_cjs11(); + var HeaderFormatter = class { + static { + __name(this, "HeaderFormatter"); + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = (0, import_util_utf832.fromUtf8)(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8( + 0, + 6 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = (0, import_util_utf832.fromUtf8)(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + }; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static { + __name(this, "Int64"); + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { + bytes[i5] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + function negate(bytes) { + for (let i5 = 0; i5 < 8; i5++) { + bytes[i5] ^= 255; + } + for (let i5 = 7; i5 > -1; i5--) { + bytes[i5]++; + if (bytes[i5] !== 0) + break; + } + } + __name(negate, "negate"); + var hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; + }, "hasHeader"); + var import_protocol_http15 = require_dist_cjs2(); + var moveHeadersToQuery = /* @__PURE__ */ __name((request3, options = {}) => { + const { headers, query = {} } = import_protocol_http15.HttpRequest.clone(request3); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request3, + headers, + query + }; + }, "moveHeadersToQuery"); + var prepareRequest = /* @__PURE__ */ __name((request3) => { + request3 = import_protocol_http15.HttpRequest.clone(request3); + for (const headerName of Object.keys(request3.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request3.headers[headerName]; + } + } + return request3; + }, "prepareRequest"); + var import_util_middleware7 = require_dist_cjs7(); + var import_util_utf842 = require_dist_cjs11(); + var import_util_uri_escape = require_dist_cjs13(); + var getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; + } + const encodedKey = (0, import_util_uri_escape.escapeUri)(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value)}`; + } else if (Array.isArray(value)) { + serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join("&"); + } + } + return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&"); + }, "getCanonicalQuery"); + var iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601"); + var toDate = /* @__PURE__ */ __name((time) => { + if (typeof time === "number") { + return new Date(time * 1e3); + } + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1e3); + } + return new Date(time); + } + return time; + }, "toDate"); + var SignatureV4Base = class { + static { + __name(this, "SignatureV4Base"); + } + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, import_util_middleware7.normalizeProvider)(region); + this.credentialProvider = (0, import_util_middleware7.normalizeProvider)(credentials); + } + createCanonicalRequest(request3, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request3.method} +${this.getCanonicalPath(request3)} +${getCanonicalQuery(request3)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} + +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash = new this.sha256(); + hash.update((0, import_util_utf842.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${(0, import_util_hex_encoding.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path: path2 }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path2.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${path2?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path2?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path2; + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339) + typeof credentials.accessKeyId !== "string" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339) + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8) + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } + }; + var SignatureV42 = class extends SignatureV4Base { + constructor({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath = true + }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath + }); + this.headerFormatter = new HeaderFormatter(); + } + static { + __name(this, "SignatureV4"); + } + async presign(originalRequest, options = {}) { + const { + signingDate = /* @__PURE__ */ new Date(), + expiresIn = 3600, + unsignableHeaders, + unhoistableHeaders, + signableHeaders, + hoistableHeaders, + signingRegion, + signingService + } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject( + "Signature version 4 presigned URLs must have an expiration date less than one week in the future" + ); + } + const scope = createScope(shortDate, region, signingService ?? this.service); + const request3 = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request3.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; + } + request3.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request3.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request3.query[AMZ_DATE_QUERY_PARAM] = longDate; + request3.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request3, unsignableHeaders, signableHeaders); + request3.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request3.query[SIGNATURE_QUERY_PARAM] = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request3, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)) + ); + return request3; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); + } else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); + } else if (toSign.message) { + return this.signMessage(toSign, options); + } else { + return this.signRequest(toSign, options); + } + } + async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? await this.regionProvider(); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) { + const promise = this.signEvent( + { + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body + }, + { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature + } + ); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const { shortDate } = this.formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, import_util_utf852.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + async signRequest(requestToSign, { + signingDate = /* @__PURE__ */ new Date(), + signableHeaders, + unsignableHeaders, + signingRegion, + signingService + } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? await this.regionProvider(); + const request3 = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request3.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request3.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request3, this.sha256); + if (!hasHeader(SHA256_HEADER, request3.headers) && this.applyChecksum) { + request3.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request3, unsignableHeaders, signableHeaders); + const signature = await this.getSignature( + longDate, + scope, + this.getSigningKey(credentials, region, shortDate, signingService), + this.createCanonicalRequest(request3, canonicalHeaders, payloadHash) + ); + request3.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`; + return request3; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign( + longDate, + credentialScope, + canonicalRequest, + ALGORITHM_IDENTIFIER + ); + const hash = new this.sha256(await keyPromise); + hash.update((0, import_util_utf852.toUint8Array)(stringToSign)); + return (0, import_util_hex_encoding.toHex)(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } + }; + var signatureV4aContainer = { + SignatureV4a: null + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +function normalizeCredentialProvider(config6, { credentials, credentialDefaultProvider }) { + let credentialsProvider; + if (credentials) { + if (!credentials?.memoized) { + credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); + } else { + credentialsProvider = credentials; + } + } else { + if (credentialDefaultProvider) { + credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config6, { + parentClientConfig: config6 + }))); + } else { + credentialsProvider = async () => { + throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured."); + }; + } + } + credentialsProvider.memoized = true; + return credentialsProvider; +} +function bindCallerConfig(config6, credentialsProvider) { + if (credentialsProvider.configBound) { + return credentialsProvider; + } + const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config6 }); + fn.memoized = credentialsProvider.memoized; + fn.configBound = true; + return fn; +} +var import_signature_v4, resolveAwsSdkSigV4Config, resolveAWSSDKSigV4Config; +var init_resolveAwsSdkSigV4Config = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"() { + init_client(); + init_dist_es(); + import_signature_v4 = __toESM(require_dist_cjs24()); + resolveAwsSdkSigV4Config = (config6) => { + let inputCredentials = config6.credentials; + let isUserSupplied = !!config6.credentials; + let resolvedCredentials = void 0; + Object.defineProperty(config6, "credentials", { + set(credentials) { + if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) { + isUserSupplied = true; + } + inputCredentials = credentials; + const memoizedProvider = normalizeCredentialProvider(config6, { + credentials: inputCredentials, + credentialDefaultProvider: config6.credentialDefaultProvider + }); + const boundProvider = bindCallerConfig(config6, memoizedProvider); + if (isUserSupplied && !boundProvider.attributed) { + resolvedCredentials = async (options) => boundProvider(options).then((creds) => setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + resolvedCredentials.memoized = boundProvider.memoized; + resolvedCredentials.configBound = boundProvider.configBound; + resolvedCredentials.attributed = true; + } else { + resolvedCredentials = boundProvider; + } + }, + get() { + return resolvedCredentials; + }, + enumerable: true, + configurable: true + }); + config6.credentials = inputCredentials; + const { signingEscapePath = true, systemClockOffset = config6.systemClockOffset || 0, sha256 } = config6; + let signer; + if (config6.signer) { + signer = normalizeProvider(config6.signer); + } else if (config6.regionInfoProvider) { + signer = () => normalizeProvider(config6.region)().then(async (region) => [ + await config6.regionInfoProvider(region, { + useFipsEndpoint: await config6.useFipsEndpoint(), + useDualstackEndpoint: await config6.useDualstackEndpoint() + }) || {}, + region + ]).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config6.signingRegion = config6.signingRegion || signingRegion || region; + config6.signingName = config6.signingName || signingService || config6.serviceId; + const params = { + ...config6, + credentials: config6.credentials, + region: config6.signingRegion, + service: config6.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config6.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }); + } else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config6.signingName || config6.defaultSigningName, + signingRegion: await normalizeProvider(config6.region)(), + properties: {} + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config6.signingRegion = config6.signingRegion || signingRegion; + config6.signingName = config6.signingName || signingService || config6.serviceId; + const params = { + ...config6, + credentials: config6.credentials, + region: config6.signingRegion, + service: config6.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config6.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }; + } + const resolvedConfig = Object.assign(config6, { + systemClockOffset, + signingEscapePath, + signer + }); + return resolvedConfig; + }; + resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +var init_aws_sdk = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js"() { + init_AwsSdkSigV4Signer(); + init_AwsSdkSigV4ASigner(); + init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS(); + init_resolveAwsSdkSigV4AConfig(); + init_resolveAwsSdkSigV4Config(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +var httpAuthSchemes_exports = {}; +__export(httpAuthSchemes_exports, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + getBearerTokenEnvKey: () => getBearerTokenEnvKey, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + validateSigningProperties: () => validateSigningProperties +}); +var init_httpAuthSchemes2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js"() { + init_aws_sdk(); + init_getBearerTokenEnvKey(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js +var _toStr, _toBool, _toNum; +var init_coercing_serializers = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"() { + _toStr = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; + }; + _toBool = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number") { + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; + }; + _toNum = (val) => { + if (val == null) { + return val; + } + if (typeof val === "boolean") { + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; + }; + } +}); + +// node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +var require_dist_cjs25 = __commonJS({ + "node_modules/@smithy/util-body-length-browser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + calculateBodyLength: () => calculateBodyLength7 + }); + module2.exports = __toCommonJS2(src_exports); + var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; + var calculateBodyLength7 = /* @__PURE__ */ __name((body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; + } + let len = body.length; + for (let i5 = len - 1; i5 >= 0; i5--) { + const code = body.charCodeAt(i5); + if (code > 127 && code <= 2047) + len++; + else if (code > 2047 && code <= 65535) + len += 2; + if (code >= 56320 && code <= 57343) + i5--; + } + return len; + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +var SerdeContextConfig; +var init_ConfigurableSerdeContext = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"() { + SerdeContextConfig = class { + serdeContext; + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +function jsonReviver(key, value, context2) { + if (context2?.source) { + const numericString = context2.source; + if (typeof value === "number") { + if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) { + const isFractional = numericString.includes("."); + if (isFractional) { + return new NumericValue2(numericString, "bigDecimal"); + } else { + return BigInt(numericString); + } + } + } + } + return value; +} +var init_jsonReviver = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js"() { + init_serde(); + } +}); + +// node_modules/@smithy/middleware-stack/dist-cjs/index.js +var require_dist_cjs26 = __commonJS({ + "node_modules/@smithy/middleware-stack/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + constructStack: () => constructStack + }); + module2.exports = __toCommonJS2(src_exports); + var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; + }, "getAllAliases"); + var getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + }, "getMiddlewareNameWithAliases"); + var constructStack = /* @__PURE__ */ __name(() => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = /* @__PURE__ */ new Set(); + const sort = /* @__PURE__ */ __name((entries) => entries.sort( + (a5, b5) => stepWeights[b5.step] - stepWeights[a5.step] || priorityWeights[b5.priority || "normal"] - priorityWeights[a5.priority || "normal"] + ), "sort"); + const removeByName = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByName"); + const removeByReference = /* @__PURE__ */ __name((toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, "removeByReference"); + const cloneTo = /* @__PURE__ */ __name((toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }, "cloneTo"); + const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }, "expandRelativeMiddlewareList"); + const getMiddlewareList = /* @__PURE__ */ __name((debug3 = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [] + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === void 0) { + if (debug3) { + return; + } + throw new Error( + `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}` + ); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce( + (wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, + [] + ); + return mainChain; + }, "getMiddlewareList"); + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex( + (entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias) + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.` + ); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex( + (entry2) => entry2.name === alias || entry2.aliases?.some((a5) => a5 === alias) + ); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error( + `"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.` + ); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = /* @__PURE__ */ __name((entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }, "filterCb"); + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve( + identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) + ); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? mw.relation + " " + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context2) => { + for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { + handler = middleware(handler, context2); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + } + }; + return stack; + }, "constructStack"); + var stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1 + }; + var priorityWeights = { + high: 3, + normal: 2, + low: 1 + }; + } +}); + +// node_modules/@smithy/smithy-client/dist-cjs/index.js +var require_dist_cjs27 = __commonJS({ + "node_modules/@smithy/smithy-client/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Client: () => Client, + Command: () => Command, + NoOpLogger: () => NoOpLogger3, + SENSITIVE_STRING: () => SENSITIVE_STRING3, + ServiceException: () => ServiceException, + _json: () => _json2, + collectBody: () => import_protocols8.collectBody, + convertMap: () => convertMap, + createAggregatedClient: () => createAggregatedClient3, + decorateServiceException: () => decorateServiceException, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion4, + extendedEncodeURIComponent: () => import_protocols8.extendedEncodeURIComponent, + getArrayIfSingleItem: () => getArrayIfSingleItem, + getDefaultClientConfiguration: () => getDefaultClientConfiguration, + getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration3, + getValueFromTextNode: () => getValueFromTextNode3, + isSerializableHeaderValue: () => isSerializableHeaderValue, + loadConfigsForDefaultMode: () => loadConfigsForDefaultMode3, + map: () => map2, + resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig3, + resolvedPath: () => import_protocols8.resolvedPath, + serializeDateTime: () => serializeDateTime, + serializeFloat: () => serializeFloat, + take: () => take2, + throwDefaultError: () => throwDefaultError3, + withBaseException: () => withBaseException3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_middleware_stack = require_dist_cjs26(); + var Client = class { + constructor(config6) { + this.config = config6; + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + static { + __name(this, "Client"); + } + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = /* @__PURE__ */ new WeakMap(); + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler = handlers.get(command.constructor); + } else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler); + } + } else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command).then( + (result) => callback(null, result.output), + (err) => callback(err) + ).catch( + // prevent any errors thrown in the callback from triggering an + // unhandled promise rejection + () => { + } + ); + } else { + return handler(command).then((result) => result.output); + } + } + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; + } + }; + var import_protocols8 = (init_protocols(), __toCommonJS(protocols_exports)); + var import_types6 = require_dist_cjs(); + var Command = class { + constructor() { + this.middlewareStack = (0, import_middleware_stack.constructStack)(); + } + static { + __name(this, "Command"); + } + /** + * Factory for Command ClassBuilder. + * @internal + */ + static classBuilder() { + return new ClassBuilder(); + } + /** + * @internal + */ + resolveMiddlewareWithContext(clientStack, configuration, options, { + middlewareFn, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + smithyContext, + additionalContext, + CommandCtor + }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger: logger5 } = configuration; + const handlerExecutionContext = { + logger: logger5, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [import_types6.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext + }, + ...additionalContext + }; + const { requestHandler } = configuration; + return stack.resolve( + (request3) => requestHandler.handle(request3.request, options || {}), + handlerExecutionContext + ); + } + }; + var ClassBuilder = class { + constructor() { + this._init = () => { + }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_4) => _4; + this._outputFilterSensitiveLog = (_4) => _4; + this._serializer = null; + this._deserializer = null; + } + static { + __name(this, "ClassBuilder"); + } + /** + * Optional init callback. + */ + init(cb) { + this._init = cb; + } + /** + * Set the endpoint parameter instructions. + */ + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; + } + /** + * Add any number of middleware. + */ + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + /** + * Set the initial handler execution context Smithy field. + */ + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext + }; + return this; + } + /** + * Set the initial handler execution context. + */ + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; + } + /** + * Set constant string identifiers for the operation. + */ + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + /** + * Set the input and output sensistive log filters. + */ + f(inputFilter = (_4) => _4, outputFilter = (_4) => _4) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + /** + * Sets the serializer. + */ + ser(serializer) { + this._serializer = serializer; + return this; + } + /** + * Sets the deserializer. + */ + de(deserializer) { + this._deserializer = deserializer; + return this; + } + /** + * Sets input/output schema for the operation. + */ + sc(operation) { + this._operationSchema = operation; + this._smithyContext.operationSchema = operation; + return this; + } + /** + * @returns a Command class with the classBuilder properties. + */ + build() { + const closure = this; + let CommandRef; + return CommandRef = class extends Command { + /** + * @public + */ + constructor(...[input]) { + super(); + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; + } + static { + __name(this, "CommandRef"); + } + /** + * @public + */ + static getEndpointParameterInstructions() { + return closure._ep; + } + /** + * @internal + */ + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext + }); + } + }; + } + }; + var SENSITIVE_STRING3 = "***SensitiveInformation***"; + var createAggregatedClient3 = /* @__PURE__ */ __name((commands3, Client2) => { + for (const command of Object.keys(commands3)) { + const CommandCtor = commands3[command]; + const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) { + const command2 = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command2, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command2, optionsOrCb || {}, cb); + } else { + return this.send(command2, optionsOrCb); + } + }, "methodImpl"); + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client2.prototype[methodName] = methodImpl; + } + }, "createAggregatedClient"); + var ServiceException = class _ServiceException extends Error { + static { + __name(this, "ServiceException"); + } + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + /** + * Checks if a value is an instance of ServiceException (duck typed) + */ + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); + } + /** + * Custom instanceof check to support the operator for ServiceException base class + */ + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === _ServiceException) { + return _ServiceException.isInstance(instance); + } + if (_ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); + } + return false; + } + }; + var decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => { + Object.entries(additions).filter(([, v7]) => v7 !== void 0).forEach(([k6, v7]) => { + if (exception[k6] == void 0 || exception[k6] === "") { + exception[k6] = v7; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; + }, "decorateServiceException"); + var throwDefaultError3 = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata3(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata + }); + throw decorateServiceException(response, parsedBody); + }, "throwDefaultError"); + var withBaseException3 = /* @__PURE__ */ __name((ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError3({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; + }, "withBaseException"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var loadConfigsForDefaultMode3 = /* @__PURE__ */ __name((mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100 + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100 + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 3e4 + }; + default: + return {}; + } + }, "loadConfigsForDefaultMode"); + var warningEmitted = false; + var emitWarningIfUnsupportedVersion4 = /* @__PURE__ */ __name((version4) => { + if (version4 && !warningEmitted && parseInt(version4.substring(1, version4.indexOf("."))) < 16) { + warningEmitted = true; + } + }, "emitWarningIfUnsupportedVersion"); + var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in import_types6.AlgorithmId) { + const algorithmId = import_types6.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === void 0) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId] + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + } + }; + }, "getChecksumConfiguration"); + var resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; + }, "resolveChecksumRuntimeConfig"); + var getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + } + }; + }, "getRetryConfiguration"); + var resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; + }, "resolveRetryRuntimeConfig"); + var getDefaultExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); + }, "getDefaultExtensionConfiguration"); + var getDefaultClientConfiguration = getDefaultExtensionConfiguration3; + var resolveDefaultRuntimeConfig3 = /* @__PURE__ */ __name((config6) => { + return Object.assign(resolveChecksumRuntimeConfig(config6), resolveRetryRuntimeConfig(config6)); + }, "resolveDefaultRuntimeConfig"); + var getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem"); + var getValueFromTextNode3 = /* @__PURE__ */ __name((obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) { + obj[key] = obj[key][textNodeName]; + } else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode3(obj[key]); + } + } + return obj; + }, "getValueFromTextNode"); + var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => { + return value != null; + }, "isSerializableHeaderValue"); + var NoOpLogger3 = class { + static { + __name(this, "NoOpLogger"); + } + trace() { + } + debug() { + } + info() { + } + warn() { + } + error() { + } + }; + function map2(arg0, arg1, arg2) { + let target; + let filter2; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } else { + target = arg0; + if (typeof arg1 === "function") { + filter2 = arg1; + instructions = arg2; + return mapWithFilter(target, filter2, instructions); + } else { + instructions = arg1; + } + } + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); + } + return target; + } + __name(map2, "map"); + var convertMap = /* @__PURE__ */ __name((target) => { + const output = {}; + for (const [k6, v7] of Object.entries(target || {})) { + output[k6] = [, v7]; + } + return output; + }, "convertMap"); + var take2 = /* @__PURE__ */ __name((source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; + }, "take"); + var mapWithFilter = /* @__PURE__ */ __name((target, filter2, instructions) => { + return map2( + target, + Object.entries(instructions).reduce( + (_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } else { + if (typeof value === "function") { + _instructions[key] = [filter2, value()]; + } else { + _instructions[key] = [filter2, value]; + } + } + return _instructions; + }, + {} + ) + ); + }, "mapWithFilter"); + var applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter22 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if (typeof filter22 === "function" && filter22(source[sourceKey]) || typeof filter22 !== "function" && !!filter22) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter2, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter2 === void 0 && (_value = value()) != null; + const customFilterPassed = typeof filter2 === "function" && !!filter2(void 0) || typeof filter2 !== "function" && !!filter2; + if (defaultFilterPassed) { + target[targetKey] = _value; + } else if (customFilterPassed) { + target[targetKey] = value(); + } + } else { + const defaultFilterPassed = filter2 === void 0 && value != null; + const customFilterPassed = typeof filter2 === "function" && !!filter2(value) || typeof filter2 !== "function" && !!filter2; + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } + } + }, "applyInstruction"); + var nonNullish = /* @__PURE__ */ __name((_4) => _4 != null, "nonNullish"); + var pass = /* @__PURE__ */ __name((_4) => _4, "pass"); + var serializeFloat = /* @__PURE__ */ __name((value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } + }, "serializeFloat"); + var serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(".000Z", "Z"), "serializeDateTime"); + var _json2 = /* @__PURE__ */ __name((obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_4) => _4 != null).map(_json2); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json2(obj[key]); + } + return target; + } + return obj; + }, "_json"); + __reExport(src_exports, (init_serde(), __toCommonJS(serde_exports)), module2.exports); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js +var import_smithy_client, collectBodyString; +var init_common = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() { + import_smithy_client = __toESM(require_dist_cjs27()); + collectBodyString = (streamBody, context2) => (0, import_smithy_client.collectBody)(streamBody, context2).then((body) => context2.utf8Encoder(body)); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode; +var init_parseJsonBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() { + init_common(); + parseJsonBody = (streamBody, context2) => collectBodyString(streamBody, context2).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e5) { + if (e5?.name === "SyntaxError") { + Object.defineProperty(e5, "$responseBodyText", { + value: encoded + }); + } + throw e5; + } + } + return {}; + }); + parseJsonErrorBody = async (errorBody, context2) => { + const value = await parseJsonBody(errorBody, context2); + value.message = value.message ?? value.Message; + return value; + }; + loadRestJsonErrorCode = (output, data) => { + const findKey2 = (object, key) => Object.keys(object).find((k6) => k6.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey2(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); + } + if (data && typeof data === "object") { + const codeKey = findKey2(data, "code"); + if (codeKey && data[codeKey] !== void 0) { + return sanitizeErrorCode(data[codeKey]); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); + } + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +var import_util_base643, JsonShapeDeserializer; +var init_JsonShapeDeserializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js"() { + init_schema(); + init_serde(); + import_util_base643 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + init_jsonReviver(); + init_parseJsonBody(); + JsonShapeDeserializer = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + async read(schema, data) { + return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext)); + } + readObject(schema, data) { + return this._read(schema, data); + } + _read(schema, value) { + const isObject3 = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject3) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject3) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const deserializedValue = this._read(memberSchema, value[fromKey]); + if (deserializedValue != null) { + out[memberName] = deserializedValue; + } + } + return out; + } + if (ns.isBlobSchema() && typeof value === "string") { + return (0, import_util_base643.fromBase64)(value); + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString2.from(value); + } + } + if (ns.isTimestampSchema()) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return parseRfc3339DateTimeWithOffset2(value); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return parseRfc7231DateTime2(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return parseEpochTimestamp2(value); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value); + } + } + if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) { + return BigInt(value); + } + if (ns.isBigDecimalSchema() && value != void 0) { + if (value instanceof NumericValue2) { + return value; + } + return new NumericValue2(String(value), "bigDecimal"); + } + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } + } + return value; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +var NUMERIC_CONTROL_CHAR, JsonReplacer; +var init_jsonReplacer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js"() { + init_serde(); + NUMERIC_CONTROL_CHAR = String.fromCharCode(925); + JsonReplacer = class { + values = /* @__PURE__ */ new Map(); + counter = 0; + stage = 0; + createReplacer() { + if (this.stage === 1) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer already created."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 1; + return (key, value) => { + if (value instanceof NumericValue2) { + const v7 = `${NUMERIC_CONTROL_CHAR + +"nv" + this.counter++}_` + value.string; + this.values.set(`"${v7}"`, value.string); + return v7; + } + if (typeof value === "bigint") { + const s4 = value.toString(); + const v7 = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s4; + this.values.set(`"${v7}"`, s4); + return v7; + } + return value; + }; + } + replaceInJson(json) { + if (this.stage === 0) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet."); + } + if (this.stage === 2) { + throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted."); + } + this.stage = 2; + if (this.counter === 0) { + return json; + } + for (const [key, value] of this.values) { + json = json.replace(key, value); + } + return json; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +var JsonShapeSerializer; +var init_JsonShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js"() { + init_schema(); + init_serde(); + init_serde(); + init_ConfigurableSerdeContext(); + init_jsonReplacer(); + JsonShapeSerializer = class extends SerdeContextConfig { + settings; + buffer; + rootSchema; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + this.rootSchema = NormalizedSchema.of(schema); + this.buffer = this._write(this.rootSchema, value); + } + flush() { + if (this.rootSchema?.isStructSchema() || this.rootSchema?.isDocumentSchema()) { + const replacer = new JsonReplacer(); + return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); + } + return this.buffer; + } + _write(schema, value, container) { + const isObject3 = value !== null && typeof value === "object"; + const ns = NormalizedSchema.of(schema); + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject3) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject3) { + const out = {}; + for (const [memberName, memberSchema] of ns.structIterator()) { + const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const serializableValue = this._write(memberSchema, value[memberName], ns); + if (serializableValue !== void 0) { + out[targetKey] = serializableValue; + } + } + return out; + } + if (value === null && container?.isStructSchema()) { + return void 0; + } + if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) { + if (ns === this.rootSchema) { + return value; + } + if (!this.serdeContext?.base64Encoder) { + throw new Error("Missing base64Encoder in serdeContext"); + } + return this.serdeContext?.base64Encoder(value); + } + if (ns.isTimestampSchema() && value instanceof Date) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return value.toISOString().replace(".000Z", "Z"); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return dateToUtcString2(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return value.getTime() / 1e3; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1e3; + } + } + if (ns.isNumericSchema() && typeof value === "number") { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + } + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString2.from(value); + } + } + return value; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js +var JsonCodec; +var init_JsonCodec = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"() { + init_ConfigurableSerdeContext(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + JsonCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new JsonShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new JsonShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +var import_util_body_length_browser, AwsJsonRpcProtocol; +var init_AwsJsonRpcProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser = __toESM(require_dist_cjs25()); + init_JsonCodec(); + init_parseJsonBody(); + AwsJsonRpcProtocol = class extends RpcProtocol { + serializer; + deserializer; + codec; + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + this.codec = new JsonCodec({ + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS + }, + jsonName: false + }); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + } + async serializeRequest(operationSchema, input, context2) { + const request3 = await super.serializeRequest(operationSchema, input, context2); + if (!request3.path.endsWith("/")) { + request3.path += "/"; + } + Object.assign(request3.headers, { + "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, + "x-amz-target": (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) + NormalizedSchema.of(operationSchema).getName() + }); + if (deref(operationSchema.input) === "unit" || !request3.body) { + request3.body = "{}"; + } + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(request3.body)); + } catch (e5) { + } + return request3; + } + getPayloadCodec() { + return this.codec; + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js +var AwsJson1_0Protocol; +var init_AwsJson1_0Protocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"() { + init_AwsJsonRpcProtocol(); + AwsJson1_0Protocol = class extends AwsJsonRpcProtocol { + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + } + getShapeId() { + return "aws.protocols#awsJson1_0"; + } + getJsonRpcVersion() { + return "1.0"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js +var AwsJson1_1Protocol; +var init_AwsJson1_1Protocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"() { + init_AwsJsonRpcProtocol(); + AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + } + getShapeId() { + return "aws.protocols#awsJson1_1"; + } + getJsonRpcVersion() { + return "1.1"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +var import_util_body_length_browser2, AwsRestJsonProtocol; +var init_AwsRestJsonProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser2 = __toESM(require_dist_cjs25()); + init_JsonCodec(); + init_parseJsonBody(); + AwsRestJsonProtocol = class extends HttpBindingProtocol { + serializer; + deserializer; + codec; + constructor({ defaultNamespace }) { + super({ + defaultNamespace + }); + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS + }, + httpBindings: true, + jsonName: true + }; + this.codec = new JsonCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getShapeId() { + return "aws.protocols#restJson1"; + } + getPayloadCodec() { + return this.codec; + } + setSerdeContext(serdeContext) { + this.codec.setSerdeContext(serdeContext); + super.setSerdeContext(serdeContext); + } + async serializeRequest(operationSchema, input, context2) { + const request3 = await super.serializeRequest(operationSchema, input, context2); + const inputSchema = NormalizedSchema.of(operationSchema.input); + const members = inputSchema.getMemberSchemas(); + if (!request3.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m6) => { + return !!m6.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + request3.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request3.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request3.headers["content-type"] = "application/octet-stream"; + } else { + request3.headers["content-type"] = "application/json"; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m6) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m6.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request3.headers["content-type"] = "application/json"; + } + } + } + if (request3.headers["content-type"] && !request3.body) { + request3.body = "{}"; + } + if (request3.body) { + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser2.calculateBodyLength)(request3.body)); + } catch (e5) { + } + } + return request3; + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js +var import_smithy_client2, awsExpectUnion; +var init_awsExpectUnion = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"() { + import_smithy_client2 = __toESM(require_dist_cjs27()); + awsExpectUnion = (value) => { + if (value == null) { + return void 0; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, import_smithy_client2.expectUnion)(value); + }; + } +}); + +// node_modules/fast-xml-parser/src/util.js +function getAllMatches(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + allmatches.startIndex = regex.lastIndex - match[0].length; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; +} +function isExist(v7) { + return typeof v7 !== "undefined"; +} +var nameStartChar, nameChar, nameRegexp, regexName, isName; +var init_util = __esm({ + "node_modules/fast-xml-parser/src/util.js"() { + "use strict"; + nameStartChar = ":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"; + nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; + regexName = new RegExp("^" + nameRegexp + "$"); + isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === "undefined"); + }; + } +}); + +// node_modules/fast-xml-parser/src/validator.js +function validate2(xmlData, options) { + options = Object.assign({}, defaultOptions2, options); + const tags = []; + let tagFound = false; + let reachedRoot = false; + if (xmlData[0] === "\uFEFF") { + xmlData = xmlData.substr(1); + } + for (let i5 = 0; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<" && xmlData[i5 + 1] === "?") { + i5 += 2; + i5 = readPI(xmlData, i5); + if (i5.err) return i5; + } else if (xmlData[i5] === "<") { + let tagStartPos = i5; + i5++; + if (xmlData[i5] === "!") { + i5 = readCommentAndCDATA(xmlData, i5); + continue; + } else { + let closingTag = false; + if (xmlData[i5] === "/") { + closingTag = true; + i5++; + } + let tagName = ""; + for (; i5 < xmlData.length && xmlData[i5] !== ">" && xmlData[i5] !== " " && xmlData[i5] !== " " && xmlData[i5] !== "\n" && xmlData[i5] !== "\r"; i5++) { + tagName += xmlData[i5]; + } + tagName = tagName.trim(); + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substring(0, tagName.length - 1); + i5--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "Invalid space after '<'."; + } else { + msg = "Tag '" + tagName + "' is an invalid name."; + } + return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i5)); + } + const result = readAttributeStr(xmlData, i5); + if (result === false) { + return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i5)); + } + let attrStr = result.value; + i5 = result.index; + if (attrStr[attrStr.length - 1] === "/") { + const attrStrStart = i5 - attrStr.length; + attrStr = attrStr.substring(0, attrStr.length - 1); + const isValid = validateAttributeString(attrStr, options); + if (isValid === true) { + tagFound = true; + } else { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); + } + } else if (closingTag) { + if (!result.tagClosed) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i5)); + } else if (attrStr.trim().length > 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); + } else if (tags.length === 0) { + return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); + } else { + const otg = tags.pop(); + if (tagName !== otg.tagName) { + let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); + return getErrorObject( + "InvalidTag", + "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", + getLineNumberForPosition(xmlData, tagStartPos) + ); + } + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i5 - attrStr.length + isValid.err.line)); + } + if (reachedRoot === true) { + return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i5)); + } else if (options.unpairedTags.indexOf(tagName) !== -1) { + } else { + tags.push({ tagName, tagStartPos }); + } + tagFound = true; + } + for (i5++; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + if (xmlData[i5 + 1] === "!") { + i5++; + i5 = readCommentAndCDATA(xmlData, i5); + continue; + } else if (xmlData[i5 + 1] === "?") { + i5 = readPI(xmlData, ++i5); + if (i5.err) return i5; + } else { + break; + } + } else if (xmlData[i5] === "&") { + const afterAmp = validateAmpersand(xmlData, i5); + if (afterAmp == -1) + return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i5)); + i5 = afterAmp; + } else { + if (reachedRoot === true && !isWhiteSpace(xmlData[i5])) { + return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i5)); + } + } + } + if (xmlData[i5] === "<") { + i5--; + } + } + } else { + if (isWhiteSpace(xmlData[i5])) { + continue; + } + return getErrorObject("InvalidChar", "char '" + xmlData[i5] + "' is not expected.", getLineNumberForPosition(xmlData, i5)); + } + } + if (!tagFound) { + return getErrorObject("InvalidXml", "Start tag expected.", 1); + } else if (tags.length == 1) { + return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); + } else if (tags.length > 0) { + return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t4) => t4.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); + } + return true; +} +function isWhiteSpace(char) { + return char === " " || char === " " || char === "\n" || char === "\r"; +} +function readPI(xmlData, i5) { + const start = i5; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] == "?" || xmlData[i5] == " ") { + const tagname = xmlData.substr(start, i5 - start); + if (i5 > 5 && tagname === "xml") { + return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i5)); + } else if (xmlData[i5] == "?" && xmlData[i5 + 1] == ">") { + i5++; + break; + } else { + continue; + } + } + } + return i5; +} +function readCommentAndCDATA(xmlData, i5) { + if (xmlData.length > i5 + 5 && xmlData[i5 + 1] === "-" && xmlData[i5 + 2] === "-") { + for (i5 += 3; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "-" && xmlData[i5 + 1] === "-" && xmlData[i5 + 2] === ">") { + i5 += 2; + break; + } + } + } else if (xmlData.length > i5 + 8 && xmlData[i5 + 1] === "D" && xmlData[i5 + 2] === "O" && xmlData[i5 + 3] === "C" && xmlData[i5 + 4] === "T" && xmlData[i5 + 5] === "Y" && xmlData[i5 + 6] === "P" && xmlData[i5 + 7] === "E") { + let angleBracketsCount = 1; + for (i5 += 8; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + angleBracketsCount++; + } else if (xmlData[i5] === ">") { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } + } + } else if (xmlData.length > i5 + 9 && xmlData[i5 + 1] === "[" && xmlData[i5 + 2] === "C" && xmlData[i5 + 3] === "D" && xmlData[i5 + 4] === "A" && xmlData[i5 + 5] === "T" && xmlData[i5 + 6] === "A" && xmlData[i5 + 7] === "[") { + for (i5 += 8; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "]" && xmlData[i5 + 1] === "]" && xmlData[i5 + 2] === ">") { + i5 += 2; + break; + } + } + } + return i5; +} +function readAttributeStr(xmlData, i5) { + let attrStr = ""; + let startChar = ""; + let tagClosed = false; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === doubleQuote || xmlData[i5] === singleQuote) { + if (startChar === "") { + startChar = xmlData[i5]; + } else if (startChar !== xmlData[i5]) { + } else { + startChar = ""; + } + } else if (xmlData[i5] === ">") { + if (startChar === "") { + tagClosed = true; + break; + } + } + attrStr += xmlData[i5]; + } + if (startChar !== "") { + return false; + } + return { + value: attrStr, + index: i5, + tagClosed + }; +} +function validateAttributeString(attrStr, options) { + const matches = getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + for (let i5 = 0; i5 < matches.length; i5++) { + if (matches[i5][1].length === 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i5][2] + "' has no space in starting.", getPositionFromMatch(matches[i5])); + } else if (matches[i5][3] !== void 0 && matches[i5][4] === void 0) { + return getErrorObject("InvalidAttr", "Attribute '" + matches[i5][2] + "' is without value.", getPositionFromMatch(matches[i5])); + } else if (matches[i5][3] === void 0 && !options.allowBooleanAttributes) { + return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i5][2] + "' is not allowed.", getPositionFromMatch(matches[i5])); + } + const attrName = matches[i5][2]; + if (!validateAttrName(attrName)) { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i5])); + } + if (!attrNames.hasOwnProperty(attrName)) { + attrNames[attrName] = 1; + } else { + return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i5])); + } + } + return true; +} +function validateNumberAmpersand(xmlData, i5) { + let re2 = /\d/; + if (xmlData[i5] === "x") { + i5++; + re2 = /[\da-fA-F]/; + } + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === ";") + return i5; + if (!xmlData[i5].match(re2)) + break; + } + return -1; +} +function validateAmpersand(xmlData, i5) { + i5++; + if (xmlData[i5] === ";") + return -1; + if (xmlData[i5] === "#") { + i5++; + return validateNumberAmpersand(xmlData, i5); + } + let count = 0; + for (; i5 < xmlData.length; i5++, count++) { + if (xmlData[i5].match(/\w/) && count < 20) + continue; + if (xmlData[i5] === ";") + break; + return -1; + } + return i5; +} +function getErrorObject(code, message, lineNumber) { + return { + err: { + code, + msg: message, + line: lineNumber.line || lineNumber, + col: lineNumber.col + } + }; +} +function validateAttrName(attrName) { + return isName(attrName); +} +function validateTagName(tagname) { + return isName(tagname); +} +function getLineNumberForPosition(xmlData, index) { + const lines = xmlData.substring(0, index).split(/\r?\n/); + return { + line: lines.length, + // column number is last line's length + 1, because column numbering starts at 1: + col: lines[lines.length - 1].length + 1 + }; +} +function getPositionFromMatch(match) { + return match.startIndex + match[1].length; +} +var defaultOptions2, doubleQuote, singleQuote, validAttrStrRegxp; +var init_validator = __esm({ + "node_modules/fast-xml-parser/src/validator.js"() { + "use strict"; + init_util(); + defaultOptions2 = { + allowBooleanAttributes: false, + //A tag can have attributes without any value + unpairedTags: [] + }; + doubleQuote = '"'; + singleQuote = "'"; + validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +var defaultOptions3, buildOptions; +var init_OptionsBuilder = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"() { + defaultOptions3 = { + preserveOrder: false, + attributeNamePrefix: "@_", + attributesGroupName: false, + textNodeName: "#text", + ignoreAttributes: true, + removeNSPrefix: false, + // remove NS from tag name or attribute name if true + allowBooleanAttributes: false, + //a tag can have attributes without any value + //ignoreRootElement : false, + parseTagValue: true, + parseAttributeValue: false, + trimValues: true, + //Trim string values of tag and attributes + cdataPropName: false, + numberParseOptions: { + hex: true, + leadingZeros: true, + eNotation: true + }, + tagValueProcessor: function(tagName, val) { + return val; + }, + attributeValueProcessor: function(attrName, val) { + return val; + }, + stopNodes: [], + //nested tags will not be parsed even for errors + alwaysCreateTextNode: false, + isArray: () => false, + commentPropName: false, + unpairedTags: [], + processEntities: true, + htmlEntities: false, + ignoreDeclaration: false, + ignorePiTags: false, + transformTagName: false, + transformAttributeName: false, + updateTag: function(tagName, jPath, attrs) { + return tagName; + }, + // skipEmptyListItem: false + captureMetaData: false + }; + buildOptions = function(options) { + return Object.assign({}, defaultOptions3, options); + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +var METADATA_SYMBOL, XmlNode; +var init_xmlNode = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"() { + "use strict"; + if (typeof Symbol !== "function") { + METADATA_SYMBOL = "@@xmlMetadata"; + } else { + METADATA_SYMBOL = Symbol("XML Node Metadata"); + } + XmlNode = class { + constructor(tagname) { + this.tagname = tagname; + this.child = []; + this[":@"] = {}; + } + add(key, val) { + if (key === "__proto__") key = "#__proto__"; + this.child.push({ [key]: val }); + } + addChild(node, startIndex) { + if (node.tagname === "__proto__") node.tagname = "#__proto__"; + if (node[":@"] && Object.keys(node[":@"]).length > 0) { + this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); + } else { + this.child.push({ [node.tagname]: node.child }); + } + if (startIndex !== void 0) { + this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex }; + } + } + /** symbol used for metadata */ + static getMetaDataSymbol() { + return METADATA_SYMBOL; + } + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +function readDocType(xmlData, i5) { + const entities = {}; + if (xmlData[i5 + 3] === "O" && xmlData[i5 + 4] === "C" && xmlData[i5 + 5] === "T" && xmlData[i5 + 6] === "Y" && xmlData[i5 + 7] === "P" && xmlData[i5 + 8] === "E") { + i5 = i5 + 9; + let angleBracketsCount = 1; + let hasBody = false, comment = false; + let exp = ""; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<" && !comment) { + if (hasBody && hasSeq(xmlData, "!ENTITY", i5)) { + i5 += 7; + let entityName, val; + [entityName, val, i5] = readEntityExp(xmlData, i5 + 1); + if (val.indexOf("&") === -1) + entities[entityName] = { + regx: RegExp(`&${entityName};`, "g"), + val + }; + } else if (hasBody && hasSeq(xmlData, "!ELEMENT", i5)) { + i5 += 8; + const { index } = readElementExp(xmlData, i5 + 1); + i5 = index; + } else if (hasBody && hasSeq(xmlData, "!ATTLIST", i5)) { + i5 += 8; + } else if (hasBody && hasSeq(xmlData, "!NOTATION", i5)) { + i5 += 9; + const { index } = readNotationExp(xmlData, i5 + 1); + i5 = index; + } else if (hasSeq(xmlData, "!--", i5)) comment = true; + else throw new Error(`Invalid DOCTYPE`); + angleBracketsCount++; + exp = ""; + } else if (xmlData[i5] === ">") { + if (comment) { + if (xmlData[i5 - 1] === "-" && xmlData[i5 - 2] === "-") { + comment = false; + angleBracketsCount--; + } + } else { + angleBracketsCount--; + } + if (angleBracketsCount === 0) { + break; + } + } else if (xmlData[i5] === "[") { + hasBody = true; + } else { + exp += xmlData[i5]; + } + } + if (angleBracketsCount !== 0) { + throw new Error(`Unclosed DOCTYPE`); + } + } else { + throw new Error(`Invalid Tag instead of DOCTYPE`); + } + return { entities, i: i5 }; +} +function readEntityExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let entityName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5]) && xmlData[i5] !== '"' && xmlData[i5] !== "'") { + entityName += xmlData[i5]; + i5++; + } + validateEntityName(entityName); + i5 = skipWhitespace(xmlData, i5); + if (xmlData.substring(i5, i5 + 6).toUpperCase() === "SYSTEM") { + throw new Error("External entities are not supported"); + } else if (xmlData[i5] === "%") { + throw new Error("Parameter entities are not supported"); + } + let entityValue = ""; + [i5, entityValue] = readIdentifierVal(xmlData, i5, "entity"); + i5--; + return [entityName, entityValue, i5]; +} +function readNotationExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let notationName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5])) { + notationName += xmlData[i5]; + i5++; + } + validateEntityName(notationName); + i5 = skipWhitespace(xmlData, i5); + const identifierType = xmlData.substring(i5, i5 + 6).toUpperCase(); + if (identifierType !== "SYSTEM" && identifierType !== "PUBLIC") { + throw new Error(`Expected SYSTEM or PUBLIC, found "${identifierType}"`); + } + i5 += identifierType.length; + i5 = skipWhitespace(xmlData, i5); + let publicIdentifier = null; + let systemIdentifier = null; + if (identifierType === "PUBLIC") { + [i5, publicIdentifier] = readIdentifierVal(xmlData, i5, "publicIdentifier"); + i5 = skipWhitespace(xmlData, i5); + if (xmlData[i5] === '"' || xmlData[i5] === "'") { + [i5, systemIdentifier] = readIdentifierVal(xmlData, i5, "systemIdentifier"); + } + } else if (identifierType === "SYSTEM") { + [i5, systemIdentifier] = readIdentifierVal(xmlData, i5, "systemIdentifier"); + if (!systemIdentifier) { + throw new Error("Missing mandatory system identifier for SYSTEM notation"); + } + } + return { notationName, publicIdentifier, systemIdentifier, index: --i5 }; +} +function readIdentifierVal(xmlData, i5, type2) { + let identifierVal = ""; + const startChar = xmlData[i5]; + if (startChar !== '"' && startChar !== "'") { + throw new Error(`Expected quoted string, found "${startChar}"`); + } + i5++; + while (i5 < xmlData.length && xmlData[i5] !== startChar) { + identifierVal += xmlData[i5]; + i5++; + } + if (xmlData[i5] !== startChar) { + throw new Error(`Unterminated ${type2} value`); + } + i5++; + return [i5, identifierVal]; +} +function readElementExp(xmlData, i5) { + i5 = skipWhitespace(xmlData, i5); + let elementName = ""; + while (i5 < xmlData.length && !/\s/.test(xmlData[i5])) { + elementName += xmlData[i5]; + i5++; + } + if (!validateEntityName(elementName)) { + throw new Error(`Invalid element name: "${elementName}"`); + } + i5 = skipWhitespace(xmlData, i5); + let contentModel = ""; + if (xmlData[i5] === "E" && hasSeq(xmlData, "MPTY", i5)) i5 += 4; + else if (xmlData[i5] === "A" && hasSeq(xmlData, "NY", i5)) i5 += 2; + else if (xmlData[i5] === "(") { + i5++; + while (i5 < xmlData.length && xmlData[i5] !== ")") { + contentModel += xmlData[i5]; + i5++; + } + if (xmlData[i5] !== ")") { + throw new Error("Unterminated content model"); + } + } else { + throw new Error(`Invalid Element Expression, found "${xmlData[i5]}"`); + } + return { + elementName, + contentModel: contentModel.trim(), + index: i5 + }; +} +function hasSeq(data, seq, i5) { + for (let j6 = 0; j6 < seq.length; j6++) { + if (seq[j6] !== data[i5 + j6 + 1]) return false; + } + return true; +} +function validateEntityName(name) { + if (isName(name)) + return name; + else + throw new Error(`Invalid entity name ${name}`); +} +var skipWhitespace; +var init_DocTypeReader = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"() { + init_util(); + skipWhitespace = (data, index) => { + while (index < data.length && /\s/.test(data[index])) { + index++; + } + return index; + }; + } +}); + +// node_modules/strnum/strnum.js +function toNumber(str2, options = {}) { + options = Object.assign({}, consider, options); + if (!str2 || typeof str2 !== "string") return str2; + let trimmedStr = str2.trim(); + if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; + else if (str2 === "0") return 0; + else if (options.hex && hexRegex.test(trimmedStr)) { + return parse_int(trimmedStr, 16); + } else if (trimmedStr.search(/.+[eE].+/) !== -1) { + return resolveEnotation(str2, trimmedStr, options); + } else { + const match = numRegex.exec(trimmedStr); + if (match) { + const sign = match[1] || ""; + const leadingZeros = match[2]; + let numTrimmedByZeros = trimZeros(match[3]); + const decimalAdjacentToLeadingZeros = sign ? ( + // 0., -00., 000. + str2[leadingZeros.length + 1] === "." + ) : str2[leadingZeros.length] === "."; + if (!options.leadingZeros && (leadingZeros.length > 1 || leadingZeros.length === 1 && !decimalAdjacentToLeadingZeros)) { + return str2; + } else { + const num = Number(trimmedStr); + const parsedStr = String(num); + if (num === 0) return num; + if (parsedStr.search(/[eE]/) !== -1) { + if (options.eNotation) return num; + else return str2; + } else if (trimmedStr.indexOf(".") !== -1) { + if (parsedStr === "0") return num; + else if (parsedStr === numTrimmedByZeros) return num; + else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num; + else return str2; + } + let n4 = leadingZeros ? numTrimmedByZeros : trimmedStr; + if (leadingZeros) { + return n4 === parsedStr || sign + n4 === parsedStr ? num : str2; + } else { + return n4 === parsedStr || n4 === sign + parsedStr ? num : str2; + } + } + } else { + return str2; + } + } +} +function resolveEnotation(str2, trimmedStr, options) { + if (!options.eNotation) return str2; + const notation = trimmedStr.match(eNotationRegx); + if (notation) { + let sign = notation[1] || ""; + const eChar = notation[3].indexOf("e") === -1 ? "E" : "e"; + const leadingZeros = notation[2]; + const eAdjacentToLeadingZeros = sign ? ( + // 0E. + str2[leadingZeros.length + 1] === eChar + ) : str2[leadingZeros.length] === eChar; + if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str2; + else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) { + return Number(trimmedStr); + } else if (options.leadingZeros && !eAdjacentToLeadingZeros) { + trimmedStr = (notation[1] || "") + notation[3]; + return Number(trimmedStr); + } else return str2; + } else { + return str2; + } +} +function trimZeros(numStr) { + if (numStr && numStr.indexOf(".") !== -1) { + numStr = numStr.replace(/0+$/, ""); + if (numStr === ".") numStr = "0"; + else if (numStr[0] === ".") numStr = "0" + numStr; + else if (numStr[numStr.length - 1] === ".") numStr = numStr.substring(0, numStr.length - 1); + return numStr; + } + return numStr; +} +function parse_int(numStr, base) { + if (parseInt) return parseInt(numStr, base); + else if (Number.parseInt) return Number.parseInt(numStr, base); + else if (window && window.parseInt) return window.parseInt(numStr, base); + else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); +} +var hexRegex, numRegex, consider, eNotationRegx; +var init_strnum = __esm({ + "node_modules/strnum/strnum.js"() { + hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; + numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/; + consider = { + hex: true, + // oct: false, + leadingZeros: true, + decimalPoint: ".", + eNotation: true + //skipLike: /regex/ + }; + eNotationRegx = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + } +}); + +// node_modules/fast-xml-parser/src/ignoreAttributes.js +function getIgnoreAttributesFn(ignoreAttributes) { + if (typeof ignoreAttributes === "function") { + return ignoreAttributes; + } + if (Array.isArray(ignoreAttributes)) { + return (attrName) => { + for (const pattern of ignoreAttributes) { + if (typeof pattern === "string" && attrName === pattern) { + return true; + } + if (pattern instanceof RegExp && pattern.test(attrName)) { + return true; + } + } + }; + } + return () => false; +} +var init_ignoreAttributes = __esm({ + "node_modules/fast-xml-parser/src/ignoreAttributes.js"() { + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +function addExternalEntities(externalEntities) { + const entKeys = Object.keys(externalEntities); + for (let i5 = 0; i5 < entKeys.length; i5++) { + const ent = entKeys[i5]; + this.lastEntities[ent] = { + regex: new RegExp("&" + ent + ";", "g"), + val: externalEntities[ent] + }; + } +} +function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + if (val !== void 0) { + if (this.options.trimValues && !dontTrim) { + val = val.trim(); + } + if (val.length > 0) { + if (!escapeEntities) val = this.replaceEntitiesValue(val); + const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); + if (newval === null || newval === void 0) { + return val; + } else if (typeof newval !== typeof val || newval !== val) { + return newval; + } else if (this.options.trimValues) { + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + } else { + const trimmedVal = val.trim(); + if (trimmedVal === val) { + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + } else { + return val; + } + } + } + } +} +function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(":"); + const prefix = tagname.charAt(0) === "/" ? "/" : ""; + if (tags[0] === "xmlns") { + return ""; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; +} +function buildAttributesMap(attrStr, jPath, tagName) { + if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { + const matches = getAllMatches(attrStr, attrsRegx); + const len = matches.length; + const attrs = {}; + for (let i5 = 0; i5 < len; i5++) { + const attrName = this.resolveNameSpace(matches[i5][1]); + if (this.ignoreAttributesFn(attrName, jPath)) { + continue; + } + let oldVal = matches[i5][4]; + let aName = this.options.attributeNamePrefix + attrName; + if (attrName.length) { + if (this.options.transformAttributeName) { + aName = this.options.transformAttributeName(aName); + } + if (aName === "__proto__") aName = "#__proto__"; + if (oldVal !== void 0) { + if (this.options.trimValues) { + oldVal = oldVal.trim(); + } + oldVal = this.replaceEntitiesValue(oldVal); + const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); + if (newVal === null || newVal === void 0) { + attrs[aName] = oldVal; + } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { + attrs[aName] = newVal; + } else { + attrs[aName] = parseValue( + oldVal, + this.options.parseAttributeValue, + this.options.numberParseOptions + ); + } + } else if (this.options.allowBooleanAttributes) { + attrs[aName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (this.options.attributesGroupName) { + const attrCollection = {}; + attrCollection[this.options.attributesGroupName] = attrs; + return attrCollection; + } + return attrs; + } +} +function addChild(currentNode, childNode, jPath, startIndex) { + if (!this.options.captureMetaData) startIndex = void 0; + const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); + if (result === false) { + } else if (typeof result === "string") { + childNode.tagname = result; + currentNode.addChild(childNode, startIndex); + } else { + currentNode.addChild(childNode, startIndex); + } +} +function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { + if (textData) { + if (isLeafNode === void 0) isLeafNode = currentNode.child.length === 0; + textData = this.parseTextData( + textData, + currentNode.tagname, + jPath, + false, + currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, + isLeafNode + ); + if (textData !== void 0 && textData !== "") + currentNode.add(this.options.textNodeName, textData); + textData = ""; + } + return textData; +} +function isItStopNode(stopNodes, jPath, currentTagName) { + const allNodesExp = "*." + currentTagName; + for (const stopNodePath in stopNodes) { + const stopNodeExp = stopNodes[stopNodePath]; + if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; + } + return false; +} +function tagExpWithClosingIndex(xmlData, i5, closingChar = ">") { + let attrBoundary; + let tagExp = ""; + for (let index = i5; index < xmlData.length; index++) { + let ch = xmlData[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = ""; + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === closingChar[0]) { + if (closingChar[1]) { + if (xmlData[index + 1] === closingChar[1]) { + return { + data: tagExp, + index + }; + } + } else { + return { + data: tagExp, + index + }; + } + } else if (ch === " ") { + ch = " "; + } + tagExp += ch; + } +} +function findClosingIndex(xmlData, str2, i5, errMsg) { + const closingIndex = xmlData.indexOf(str2, i5); + if (closingIndex === -1) { + throw new Error(errMsg); + } else { + return closingIndex + str2.length - 1; + } +} +function readTagExp(xmlData, i5, removeNSPrefix, closingChar = ">") { + const result = tagExpWithClosingIndex(xmlData, i5 + 1, closingChar); + if (!result) return; + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.search(/\s/); + let tagName = tagExp; + let attrExpPresent = true; + if (separatorIndex !== -1) { + tagName = tagExp.substring(0, separatorIndex); + tagExp = tagExp.substring(separatorIndex + 1).trimStart(); + } + const rawTagName = tagName; + if (removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + attrExpPresent = tagName !== result.data.substr(colonIndex + 1); + } + } + return { + tagName, + tagExp, + closeIndex, + attrExpPresent, + rawTagName + }; +} +function readStopNodeData(xmlData, tagName, i5) { + const startIndex = i5; + let openTagCount = 1; + for (; i5 < xmlData.length; i5++) { + if (xmlData[i5] === "<") { + if (xmlData[i5 + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i5, `${tagName} is not closed`); + let closeTagName = xmlData.substring(i5 + 2, closeIndex).trim(); + if (closeTagName === tagName) { + openTagCount--; + if (openTagCount === 0) { + return { + tagContent: xmlData.substring(startIndex, i5), + i: closeIndex + }; + } + } + i5 = closeIndex; + } else if (xmlData[i5 + 1] === "?") { + const closeIndex = findClosingIndex(xmlData, "?>", i5 + 1, "StopNode is not closed."); + i5 = closeIndex; + } else if (xmlData.substr(i5 + 1, 3) === "!--") { + const closeIndex = findClosingIndex(xmlData, "-->", i5 + 3, "StopNode is not closed."); + i5 = closeIndex; + } else if (xmlData.substr(i5 + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i5, "StopNode is not closed.") - 2; + i5 = closeIndex; + } else { + const tagData = readTagExp(xmlData, i5, ">"); + if (tagData) { + const openTagName = tagData && tagData.tagName; + if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { + openTagCount++; + } + i5 = tagData.closeIndex; + } + } + } + } +} +function parseValue(val, shouldParse, options) { + if (shouldParse && typeof val === "string") { + const newval = val.trim(); + if (newval === "true") return true; + else if (newval === "false") return false; + else return toNumber(val, options); + } else { + if (isExist(val)) { + return val; + } else { + return ""; + } + } +} +var OrderedObjParser, attrsRegx, parseXml, replaceEntitiesValue; +var init_OrderedObjParser = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"() { + "use strict"; + init_util(); + init_xmlNode(); + init_DocTypeReader(); + init_strnum(); + init_ignoreAttributes(); + OrderedObjParser = class { + constructor(options) { + this.options = options; + 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: " " }, + // "lt" : { regex: /&(lt|#60);/g, val: "<" }, + // "gt" : { regex: /&(gt|#62);/g, val: ">" }, + // "amp" : { regex: /&(amp|#38);/g, val: "&" }, + // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, + // "apos" : { regex: /&(apos|#39);/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: (_4, str2) => String.fromCodePoint(Number.parseInt(str2, 10)) }, + "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_4, str2) => String.fromCodePoint(Number.parseInt(str2, 16)) } + }; + this.addExternalEntities = addExternalEntities; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; + this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); + } + }; + attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + parseXml = function(xmlData) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); + const xmlObj = new XmlNode("!xml"); + let currentNode = xmlObj; + let textData = ""; + let jPath = ""; + for (let i5 = 0; i5 < xmlData.length; i5++) { + const ch = xmlData[i5]; + if (ch === "<") { + if (xmlData[i5 + 1] === "/") { + const closeIndex = findClosingIndex(xmlData, ">", i5, "Closing Tag is not closed."); + let tagName = xmlData.substring(i5 + 2, closeIndex).trim(); + if (this.options.removeNSPrefix) { + const colonIndex = tagName.indexOf(":"); + if (colonIndex !== -1) { + tagName = tagName.substr(colonIndex + 1); + } + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode) { + textData = this.saveTextToParentTag(textData, currentNode, jPath); + } + const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); + if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { + throw new Error(`Unpaired tag can not be used as closing tag: `); + } + let propIndex = 0; + if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { + propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); + this.tagsNodeStack.pop(); + } else { + propIndex = jPath.lastIndexOf("."); + } + jPath = jPath.substring(0, propIndex); + currentNode = this.tagsNodeStack.pop(); + textData = ""; + i5 = closeIndex; + } else if (xmlData[i5 + 1] === "?") { + let tagData = readTagExp(xmlData, i5, false, "?>"); + if (!tagData) throw new Error("Pi Tag is not closed."); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { + } else { + const childNode = new XmlNode(tagData.tagName); + childNode.add(this.options.textNodeName, ""); + if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); + } + this.addChild(currentNode, childNode, jPath, i5); + } + i5 = tagData.closeIndex + 1; + } else if (xmlData.substr(i5 + 1, 3) === "!--") { + const endIndex = findClosingIndex(xmlData, "-->", i5 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const comment = xmlData.substring(i5 + 4, endIndex - 2); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); + } + i5 = endIndex; + } else if (xmlData.substr(i5 + 1, 2) === "!D") { + const result = readDocType(xmlData, i5); + this.docTypeEntities = result.entities; + i5 = result.i; + } else if (xmlData.substr(i5 + 1, 2) === "![") { + const closeIndex = findClosingIndex(xmlData, "]]>", i5, "CDATA is not closed.") - 2; + const tagExp = xmlData.substring(i5 + 9, closeIndex); + textData = this.saveTextToParentTag(textData, currentNode, jPath); + let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); + if (val == void 0) val = ""; + if (this.options.cdataPropName) { + currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); + } else { + currentNode.add(this.options.textNodeName, val); + } + i5 = closeIndex + 2; + } else { + let result = readTagExp(xmlData, i5, this.options.removeNSPrefix); + let tagName = result.tagName; + const rawTagName = result.rawTagName; + let tagExp = result.tagExp; + let attrExpPresent = result.attrExpPresent; + let closeIndex = result.closeIndex; + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + if (currentNode && textData) { + if (currentNode.tagname !== "!xml") { + textData = this.saveTextToParentTag(textData, currentNode, jPath, false); + } + } + const lastTag = currentNode; + if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { + currentNode = this.tagsNodeStack.pop(); + jPath = jPath.substring(0, jPath.lastIndexOf(".")); + } + if (tagName !== xmlObj.tagname) { + jPath += jPath ? "." + tagName : tagName; + } + const startIndex = i5; + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { + let tagContent = ""; + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + i5 = result.closeIndex; + } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { + i5 = result.closeIndex; + } else { + const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); + if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); + i5 = result2.i; + tagContent = result2.tagContent; + } + const childNode = new XmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + if (tagContent) { + tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); + } + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + childNode.add(this.options.textNodeName, tagContent); + this.addChild(currentNode, childNode, jPath, startIndex); + } else { + if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { + if (tagName[tagName.length - 1] === "/") { + tagName = tagName.substr(0, tagName.length - 1); + jPath = jPath.substr(0, jPath.length - 1); + tagExp = tagName; + } else { + tagExp = tagExp.substr(0, tagExp.length - 1); + } + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + const childNode = new XmlNode(tagName); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath, startIndex); + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + } else { + const childNode = new XmlNode(tagName); + this.tagsNodeStack.push(currentNode); + if (tagName !== tagExp && attrExpPresent) { + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath, startIndex); + currentNode = childNode; + } + textData = ""; + i5 = closeIndex; + } + } + } else { + textData += xmlData[i5]; + } + } + return xmlObj.child; + }; + replaceEntitiesValue = function(val) { + if (this.options.processEntities) { + for (let entityName in this.docTypeEntities) { + const entity = this.docTypeEntities[entityName]; + val = val.replace(entity.regx, entity.val); + } + for (let entityName in this.lastEntities) { + const entity = this.lastEntities[entityName]; + val = val.replace(entity.regex, entity.val); + } + if (this.options.htmlEntities) { + for (let entityName in this.htmlEntities) { + const entity = this.htmlEntities[entityName]; + val = val.replace(entity.regex, entity.val); + } + } + val = val.replace(this.ampEntity.regex, this.ampEntity.val); + } + return val; + }; + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/node2json.js +function prettify(node, options) { + return compress(node, options); +} +function compress(arr, options, jPath) { + let text; + const compressedObj = {}; + for (let i5 = 0; i5 < arr.length; i5++) { + const tagObj = arr[i5]; + const property = propName(tagObj); + let newJpath = ""; + if (jPath === void 0) newJpath = property; + else newJpath = jPath + "." + property; + if (property === options.textNodeName) { + if (text === void 0) text = tagObj[property]; + else text += "" + tagObj[property]; + } else if (property === void 0) { + continue; + } else if (tagObj[property]) { + let val = compress(tagObj[property], options, newJpath); + const isLeaf = isLeafTag(val, options); + if (tagObj[METADATA_SYMBOL2] !== void 0) { + val[METADATA_SYMBOL2] = tagObj[METADATA_SYMBOL2]; + } + if (tagObj[":@"]) { + assignAttributes(val, tagObj[":@"], newJpath, options); + } else if (Object.keys(val).length === 1 && val[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { + val = val[options.textNodeName]; + } else if (Object.keys(val).length === 0) { + if (options.alwaysCreateTextNode) val[options.textNodeName] = ""; + else val = ""; + } + if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { + if (!Array.isArray(compressedObj[property])) { + compressedObj[property] = [compressedObj[property]]; + } + compressedObj[property].push(val); + } else { + if (options.isArray(property, newJpath, isLeaf)) { + compressedObj[property] = [val]; + } else { + compressedObj[property] = val; + } + } + } + } + if (typeof text === "string") { + if (text.length > 0) compressedObj[options.textNodeName] = text; + } else if (text !== void 0) compressedObj[options.textNodeName] = text; + return compressedObj; +} +function propName(obj) { + const keys = Object.keys(obj); + for (let i5 = 0; i5 < keys.length; i5++) { + const key = keys[i5]; + if (key !== ":@") return key; + } +} +function assignAttributes(obj, attrMap, jpath, options) { + if (attrMap) { + const keys = Object.keys(attrMap); + const len = keys.length; + for (let i5 = 0; i5 < len; i5++) { + const atrrName = keys[i5]; + if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { + obj[atrrName] = [attrMap[atrrName]]; + } else { + obj[atrrName] = attrMap[atrrName]; + } + } + } +} +function isLeafTag(obj, options) { + const { textNodeName } = options; + const propCount = Object.keys(obj).length; + if (propCount === 0) { + return true; + } + if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { + return true; + } + return false; +} +var METADATA_SYMBOL2; +var init_node2json = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/node2json.js"() { + "use strict"; + init_xmlNode(); + METADATA_SYMBOL2 = XmlNode.getMetaDataSymbol(); + } +}); + +// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +var XMLParser; +var init_XMLParser = __esm({ + "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"() { + init_OptionsBuilder(); + init_OrderedObjParser(); + init_node2json(); + init_validator(); + init_xmlNode(); + XMLParser = class { + constructor(options) { + this.externalEntities = {}; + this.options = buildOptions(options); + } + /** + * Parse XML dats to JS object + * @param {string|Buffer} xmlData + * @param {boolean|Object} validationOption + */ + parse(xmlData, validationOption) { + if (typeof xmlData === "string") { + } else if (xmlData.toString) { + xmlData = xmlData.toString(); + } else { + throw new Error("XML data is accepted in String or Bytes[] form."); + } + if (validationOption) { + if (validationOption === true) validationOption = {}; + const result = validate2(xmlData, validationOption); + if (result !== true) { + throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); + } + } + const orderedObjParser = new OrderedObjParser(this.options); + orderedObjParser.addExternalEntities(this.externalEntities); + const orderedResult = orderedObjParser.parseXml(xmlData); + if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; + else return prettify(orderedResult, this.options); + } + /** + * Add Entity which is not by default supported by this library + * @param {string} key + * @param {string} value + */ + addEntity(key, value) { + if (value.indexOf("&") !== -1) { + throw new Error("Entity value can't have '&'"); + } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { + throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + } else if (value === "&") { + throw new Error("An entity with value '&' is not permitted"); + } else { + this.externalEntities[key] = value; + } + } + /** + * Returns a Symbol that can be used to access the metadata + * property on a node. + * + * If Symbol is not available in the environment, an ordinary property is used + * and the name of the property is here returned. + * + * The XMLMetaData property is only present when `captureMetaData` + * is true in the options. + */ + static getMetaDataSymbol() { + return XmlNode.getMetaDataSymbol(); + } + }; + } +}); + +// node_modules/fast-xml-parser/src/fxp.js +var init_fxp = __esm({ + "node_modules/fast-xml-parser/src/fxp.js"() { + "use strict"; + init_XMLParser(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +var import_smithy_client3, import_util_utf83, XmlShapeDeserializer; +var init_XmlShapeDeserializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"() { + init_protocols(); + init_schema(); + import_smithy_client3 = __toESM(require_dist_cjs27()); + import_util_utf83 = __toESM(require_dist_cjs11()); + init_fxp(); + init_ConfigurableSerdeContext(); + XmlShapeDeserializer = class extends SerdeContextConfig { + settings; + stringDeserializer; + constructor(settings) { + super(); + this.settings = settings; + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + read(schema, bytes, key) { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + if (isEventPayload) { + const output = {}; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf83.toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + readSchema(_schema, value) { + const ns = NormalizedSchema.of(_schema); + const traits = ns.getMergedTraits(); + const schema = ns.getSchema(); + if (ns.isListSchema() && !Array.isArray(value)) { + return this.readSchema(schema, [value]); + } + if (value == null) { + return value; + } + if (typeof value === "object") { + const sparse = !!traits.sparse; + const flat = !!traits.xmlFlattened; + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer2 = []; + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + const sourceArray = Array.isArray(source) ? source : [source]; + for (const v7 of sourceArray) { + if (v7 != null || sparse) { + buffer2.push(this.readSchema(listValue, v7)); + } + } + return buffer2; + } + const buffer = {}; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value2 = entry[valueProperty]; + if (value2 != null || sparse) { + buffer[key] = this.readSchema(memberNs, value2); + } + } + return buffer; + } + if (ns.isStructSchema()) { + for (const [memberName, memberSchema] of ns.structIterator()) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + return buffer; + } + if (ns.isDocumentSchema()) { + return value; + } + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } else { + if (ns.isListSchema()) { + return []; + } else if (ns.isMapSchema() || ns.isStructSchema()) { + return {}; + } + return this.stringDeserializer.read(ns, value); + } + } + parseXml(xml) { + if (xml.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_4, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(xml, true); + } catch (e5) { + if (e5 && typeof e5 === "object") { + Object.defineProperty(e5, "$responseBodyText", { + value: xml + }); + } + throw e5; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn); + } + return {}; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +var import_smithy_client4, import_util_base644, QueryShapeSerializer; +var init_QueryShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js"() { + init_protocols(); + init_schema(); + init_serde(); + import_smithy_client4 = __toESM(require_dist_cjs27()); + import_util_base644 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + QueryShapeSerializer = class extends SerdeContextConfig { + settings; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value, prefix = "") { + if (this.buffer === void 0) { + this.buffer = ""; + } + const ns = NormalizedSchema.of(schema); + if (prefix && !prefix.endsWith(".")) { + prefix += "."; + } + if (ns.isBlobSchema()) { + if (typeof value === "string" || value instanceof Uint8Array) { + this.writeKey(prefix); + this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base644.toBase64)(value)); + } + } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigIntegerSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigDecimalSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(value instanceof NumericValue2 ? value.string : String(value)); + } + } else if (ns.isTimestampSchema()) { + if (value instanceof Date) { + this.writeKey(prefix); + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + this.writeValue(value.toISOString().replace(".000Z", "Z")); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + this.writeValue((0, import_smithy_client4.dateToUtcString)(value)); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + this.writeValue(String(value.getTime() / 1e3)); + break; + } + } + } else if (ns.isDocumentSchema()) { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + } else if (ns.isListSchema()) { + if (Array.isArray(value)) { + if (value.length === 0) { + if (this.settings.serializeEmptyLists) { + this.writeKey(prefix); + this.writeValue(""); + } + } else { + const member = ns.getValueSchema(); + const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened; + let i5 = 1; + for (const item of value) { + if (item == null) { + continue; + } + const suffix = this.getKey("member", member.getMergedTraits().xmlName); + const key = flat ? `${prefix}${i5}` : `${prefix}${suffix}.${i5}`; + this.write(member, item, key); + ++i5; + } + } + } + } else if (ns.isMapSchema()) { + if (value && typeof value === "object") { + const keySchema = ns.getKeySchema(); + const memberSchema = ns.getValueSchema(); + const flat = ns.getMergedTraits().xmlFlattened; + let i5 = 1; + for (const [k6, v7] of Object.entries(value)) { + if (v7 == null) { + continue; + } + const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); + const key = flat ? `${prefix}${i5}.${keySuffix}` : `${prefix}entry.${i5}.${keySuffix}`; + const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); + const valueKey = flat ? `${prefix}${i5}.${valueSuffix}` : `${prefix}entry.${i5}.${valueSuffix}`; + this.write(keySchema, k6, key); + this.write(memberSchema, v7, valueKey); + ++i5; + } + } + } else if (ns.isStructSchema()) { + if (value && typeof value === "object") { + for (const [memberName, member] of ns.structIterator()) { + if (value[memberName] == null) { + continue; + } + const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); + const key = `${prefix}${suffix}`; + this.write(member, value[memberName], key); + } + } + } else if (ns.isUnitSchema()) { + } else { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); + } + } + flush() { + if (this.buffer === void 0) { + throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer."); + } + const str2 = this.buffer; + delete this.buffer; + return str2; + } + getKey(memberName, xmlName) { + const key = xmlName ?? memberName; + if (this.settings.capitalizeKeys) { + return key[0].toUpperCase() + key.slice(1); + } + return key; + } + writeKey(key) { + if (key.endsWith(".")) { + key = key.slice(0, key.length - 1); + } + this.buffer += `&${extendedEncodeURIComponent2(key)}=`; + } + writeValue(value) { + this.buffer += extendedEncodeURIComponent2(value); + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +var import_util_body_length_browser3, AwsQueryProtocol; +var init_AwsQueryProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser3 = __toESM(require_dist_cjs25()); + init_XmlShapeDeserializer(); + init_QueryShapeSerializer(); + AwsQueryProtocol = class extends RpcProtocol { + options; + serializer; + deserializer; + constructor(options) { + super({ + defaultNamespace: options.defaultNamespace + }); + this.options = options; + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME + }, + httpBindings: false, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace, + serializeEmptyLists: true + }; + this.serializer = new QueryShapeSerializer(settings); + this.deserializer = new XmlShapeDeserializer(settings); + } + getShapeId() { + return "aws.protocols#awsQuery"; + } + setSerdeContext(serdeContext) { + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + } + getPayloadCodec() { + throw new Error("AWSQuery protocol has no payload codec."); + } + async serializeRequest(operationSchema, input, context2) { + const request3 = await super.serializeRequest(operationSchema, input, context2); + if (!request3.path.endsWith("/")) { + request3.path += "/"; + } + Object.assign(request3.headers, { + "content-type": `application/x-www-form-urlencoded` + }); + if (deref(operationSchema.input) === "unit" || !request3.body) { + request3.body = ""; + } + request3.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request3.body; + if (request3.body.endsWith("&")) { + request3.body = request3.body.slice(-1); + } + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser3.calculateBodyLength)(request3.body)); + } catch (e5) { + } + return request3; + } + async deserializeResponse(operationSchema, context2, response) { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + const dataObject = {}; + if (response.statusCode >= 300) { + const bytes2 = await collectBody2(response.body, context2); + if (bytes2.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes2)); + } + await this.handleError(operationSchema, context2, response, dataObject, this.deserializeMetadata(response)); + } + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : void 0; + const bytes = await collectBody2(response.body, context2); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); + } + const output = { + $metadata: this.deserializeMetadata(response), + ...dataObject + }; + return output; + } + useNestedResult() { + return true; + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorDataSource = this.loadQueryError(dataObject); + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName); + if (!errorSchema) { + errorSchema = registry.getSchema(errorIdentifier); + } + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), errorDataSource); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = this.loadQueryErrorMessage(dataObject); + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = errorDataSource[target] ?? dataObject[target]; + output[name] = this.deserializer.readSchema(member, value); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + loadQueryErrorCode(output, data) { + const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code; + if (code !== void 0) { + return code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + } + loadQueryError(data) { + return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error; + } + loadQueryErrorMessage(data) { + const errorData = this.loadQueryError(data); + return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown"; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +var AwsEc2QueryProtocol; +var init_AwsEc2QueryProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"() { + init_AwsQueryProtocol(); + AwsEc2QueryProtocol = class extends AwsQueryProtocol { + options; + constructor(options) { + super(options); + this.options = options; + const ec2Settings = { + capitalizeKeys: true, + flattenLists: true, + serializeEmptyLists: false + }; + Object.assign(this.serializer.settings, ec2Settings); + } + useNestedResult() { + return false; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js +var import_smithy_client5, parseXmlBody, parseXmlErrorBody, loadRestXmlErrorCode; +var init_parseXmlBody = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"() { + import_smithy_client5 = __toESM(require_dist_cjs27()); + init_fxp(); + init_common(); + parseXmlBody = (streamBody, context2) => collectBodyString(streamBody, context2).then((encoded) => { + if (encoded.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_4, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + let parsedObj; + try { + parsedObj = parser.parse(encoded, true); + } catch (e5) { + if (e5 && typeof e5 === "object") { + Object.defineProperty(e5, "$responseBodyText", { + value: encoded + }); + } + throw e5; + } + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return (0, import_smithy_client5.getValueFromTextNode)(parsedObjToReturn); + } + return {}; + }); + parseXmlErrorBody = async (errorBody, context2) => { + const value = await parseXmlBody(errorBody, context2); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; + }; + loadRestXmlErrorCode = (output, data) => { + if (data?.Error?.Code !== void 0) { + return data.Error.Code; + } + if (data?.Code !== void 0) { + return data.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +var require_dist_cjs28 = __commonJS({ + "node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + XmlNode: () => XmlNode3, + XmlText: () => XmlText2 + }); + module2.exports = __toCommonJS2(index_exports); + function escapeAttribute(value) { + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); + } + __name(escapeAttribute, "escapeAttribute"); + function escapeElement(value) { + return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, " ").replace(/\n/g, " ").replace(/\u0085/g, "…").replace(/\u2028/, "
"); + } + __name(escapeElement, "escapeElement"); + var XmlText2 = class { + constructor(value) { + this.value = value; + } + static { + __name(this, "XmlText"); + } + toString() { + return escapeElement("" + this.value); + } + }; + var XmlNode3 = class _XmlNode { + constructor(name, children = []) { + this.name = name; + this.children = children; + } + static { + __name(this, "XmlNode"); + } + attributes = {}; + static of(name, childText, withName) { + const node = new _XmlNode(name); + if (childText !== void 0) { + node.addChildNode(new XmlText2(childText)); + } + if (withName !== void 0) { + node.withName(withName); + } + return node; + } + withName(name) { + this.name = name; + return this; + } + addAttribute(name, value) { + this.attributes[name] = value; + return this; + } + addChildNode(child) { + this.children.push(child); + return this; + } + removeAttribute(name) { + delete this.attributes[name]; + return this; + } + /** + * @internal + * Alias of {@link XmlNode#withName(string)} for codegen brevity. + */ + n(name) { + this.name = name; + return this; + } + /** + * @internal + * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity. + */ + c(child) { + this.children.push(child); + return this; + } + /** + * @internal + * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity. + */ + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + /** + * Create a child node. + * Used in serialization of string fields. + * @internal + */ + cc(input, field, withName = field) { + if (input[field] != null) { + const node = _XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + /** + * Creates list child nodes. + * @internal + */ + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + /** + * Creates list child nodes with container. + * @internal + */ + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new _XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } + toString() { + const hasChildren = Boolean(this.children.length); + let xmlText = `<${this.name}`; + const attributes = this.attributes; + for (const attributeName of Object.keys(attributes)) { + const attribute = attributes[attributeName]; + if (attribute != null) { + xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`; + } + } + return xmlText += !hasChildren ? "/>" : `>${this.children.map((c4) => c4.toString()).join("")}`; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +var import_xml_builder, import_smithy_client6, import_util_base645, XmlShapeSerializer; +var init_XmlShapeSerializer = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"() { + import_xml_builder = __toESM(require_dist_cjs28()); + init_schema(); + init_serde(); + import_smithy_client6 = __toESM(require_dist_cjs27()); + import_util_base645 = __toESM(require_dist_cjs12()); + init_ConfigurableSerdeContext(); + XmlShapeSerializer = class extends SerdeContextConfig { + settings; + stringBuffer; + byteBuffer; + buffer; + constructor(settings) { + super(); + this.settings = settings; + } + write(schema, value) { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value; + } else if (ns.isBlobSchema()) { + this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base645.fromBase64)(value); + } else { + this.buffer = this.writeStruct(ns, value, void 0); + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()); + } + } + } + flush() { + if (this.byteBuffer !== void 0) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== void 0) { + const str2 = this.stringBuffer; + delete this.stringBuffer; + return str2; + } + const buffer = this.buffer; + if (this.settings.xmlNamespace) { + if (!buffer?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + writeStruct(ns, value, parentXmlns) { + const traits = ns.getMergedTraits(); + const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName(); + if (!name || !ns.isStructSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`); + } + const structXmlNode = import_xml_builder.XmlNode.of(name); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const val = value[memberName]; + if (val != null) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val)); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = import_xml_builder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + return structXmlNode; + } + writeList(listMember, array, container, parentXmlns) { + if (!listMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + const writeItem = (container2, value) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value, container2, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member")); + } else { + const listItemNode = import_xml_builder.XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container2.addChildNode(listItemNode); + } + }; + if (flat) { + for (const value of array) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = import_xml_builder.XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr, xmlns); + } + for (const value of array) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + writeMap(mapMember, map2, container, parentXmlns, containerIsMap = false) { + if (!mapMember.isMemberSchema()) { + throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`); + } + const mapTraits = mapMember.getMergedTraits(); + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + const addKeyValue = (entry, key, val) => { + const keyNode = import_xml_builder.XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr, keyXmlns); + } + entry.addChildNode(keyNode); + let valueNode = import_xml_builder.XmlNode.of(valueTag); + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + entry.addChildNode(valueNode); + }; + if (flat) { + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode; + if (!containerIsMap) { + mapNode = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr, xmlns); + } + container.addChildNode(mapNode); + } + for (const [key, val] of Object.entries(map2)) { + if (sparse || val != null) { + const entry = import_xml_builder.XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode).addChildNode(entry); + } + } + } + } + writeSimple(_schema, value) { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents = null; + if (value && typeof value === "object") { + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base645.toBase64)(value); + } else if (ns.isTimestampSchema() && value instanceof Date) { + const options = this.settings.timestampFormat; + const format = options.useTrait ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + nodeContents = (0, import_smithy_client6.dateToUtcString)(value); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + nodeContents = String(value.getTime() / 1e3); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = (0, import_smithy_client6.dateToUtcString)(value); + break; + } + } else if (ns.isBigDecimalSchema() && value) { + if (value instanceof NumericValue2) { + return value.string; + } + return String(value); + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."); + } else { + throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`); + } + } + if (ns.isStringSchema() || ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) { + nodeContents = String(value); + } + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + return nodeContents; + } + writeSimpleInto(_schema, value, into, parentXmlns) { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + const content = new import_xml_builder.XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr, xmlns); + } + into.addChildNode(content); + } + getXmlnsAttribute(ns, parentXmlns) { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js +var XmlCodec; +var init_XmlCodec = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlCodec.js"() { + init_ConfigurableSerdeContext(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + XmlCodec = class extends SerdeContextConfig { + settings; + constructor(settings) { + super(); + this.settings = settings; + } + createSerializer() { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +var import_util_body_length_browser4, AwsRestXmlProtocol; +var init_AwsRestXmlProtocol = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js"() { + init_protocols(); + init_schema(); + import_util_body_length_browser4 = __toESM(require_dist_cjs25()); + init_parseXmlBody(); + init_XmlCodec(); + AwsRestXmlProtocol = class extends HttpBindingProtocol { + codec; + serializer; + deserializer; + constructor(options) { + super(options); + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + getPayloadCodec() { + return this.codec; + } + getShapeId() { + return "aws.protocols#restXml"; + } + async serializeRequest(operationSchema, input, context2) { + const request3 = await super.serializeRequest(operationSchema, input, context2); + const ns = NormalizedSchema.of(operationSchema.input); + const members = ns.getMemberSchemas(); + request3.path = String(request3.path).split("/").filter((segment) => { + return segment !== "{Bucket}"; + }).join("/") || "/"; + if (!request3.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m6) => { + return !!m6.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + request3.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request3.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request3.headers["content-type"] = "application/octet-stream"; + } else { + request3.headers["content-type"] = "application/xml"; + } + } else if (!ns.isUnitSchema()) { + const hasBody = Object.values(members).find((m6) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m6.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request3.headers["content-type"] = "application/xml"; + } + } + } + if (request3.headers["content-type"] === "application/xml") { + if (typeof request3.body === "string") { + request3.body = '' + request3.body; + } + } + if (request3.body) { + try { + request3.headers["content-length"] = String((0, import_util_body_length_browser4.calculateBodyLength)(request3.body)); + } catch (e5) { + } + } + return request3; + } + async deserializeResponse(operationSchema, context2, response) { + return super.deserializeResponse(operationSchema, context2, response); + } + async handleError(operationSchema, context2, response, dataObject, metadata) { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const registry = TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier); + } catch (e5) { + const baseExceptionSchema = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + await this.deserializeHttpMessage(errorSchema, context2, response, dataObject); + const output = {}; + for (const [name, member] of ns.structIterator()) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member, value); + } + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output + }); + throw exception; + } + }; + } +}); + +// node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +var init_protocols2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"() { + init_coercing_serializers(); + init_AwsJson1_0Protocol(); + init_AwsJson1_1Protocol(); + init_AwsJsonRpcProtocol(); + init_AwsRestJsonProtocol(); + init_JsonCodec(); + init_JsonShapeDeserializer(); + init_JsonShapeSerializer(); + init_awsExpectUnion(); + init_parseJsonBody(); + init_AwsEc2QueryProtocol(); + init_AwsQueryProtocol(); + init_AwsRestXmlProtocol(); + init_XmlCodec(); + init_XmlShapeDeserializer(); + init_XmlShapeSerializer(); + init_parseXmlBody(); + } +}); + +// node_modules/@aws-sdk/core/dist-es/index.js +var dist_es_exports2 = {}; +__export(dist_es_exports2, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsEc2QueryProtocol: () => AwsEc2QueryProtocol, + AwsJson1_0Protocol: () => AwsJson1_0Protocol, + AwsJson1_1Protocol: () => AwsJson1_1Protocol, + AwsJsonRpcProtocol: () => AwsJsonRpcProtocol, + AwsQueryProtocol: () => AwsQueryProtocol, + AwsRestJsonProtocol: () => AwsRestJsonProtocol, + AwsRestXmlProtocol: () => AwsRestXmlProtocol, + AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + JsonCodec: () => JsonCodec, + JsonShapeDeserializer: () => JsonShapeDeserializer, + JsonShapeSerializer: () => JsonShapeSerializer, + NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, + NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS, + XmlCodec: () => XmlCodec, + XmlShapeDeserializer: () => XmlShapeDeserializer, + XmlShapeSerializer: () => XmlShapeSerializer, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + getBearerTokenEnvKey: () => getBearerTokenEnvKey, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config, + setCredentialFeature: () => setCredentialFeature, + setFeature: () => setFeature2, + setTokenFeature: () => setTokenFeature, + state: () => state2, + validateSigningProperties: () => validateSigningProperties +}); +var init_dist_es2 = __esm({ + "node_modules/@aws-sdk/core/dist-es/index.js"() { + init_client(); + init_httpAuthSchemes2(); + init_protocols2(); + } +}); + +// node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +var require_dist_cjs29 = __commonJS({ + "node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID, + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin3, + resolveUserAgentConfig: () => resolveUserAgentConfig3, + userAgentMiddleware: () => userAgentMiddleware + }); + module2.exports = __toCommonJS2(index_exports); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var DEFAULT_UA_APP_ID = void 0; + function isValidUserAgentAppId(appId) { + if (appId === void 0) { + return true; + } + return typeof appId === "string" && appId.length <= 50; + } + __name(isValidUserAgentAppId, "isValidUserAgentAppId"); + function resolveUserAgentConfig3(input) { + const normalizedAppIdProvider = (0, import_core39.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID); + const { customUserAgent } = input; + return Object.assign(input, { + customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent, + userAgentAppId: /* @__PURE__ */ __name(async () => { + const appId = await normalizedAppIdProvider(); + if (!isValidUserAgentAppId(appId)) { + const logger5 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger; + if (typeof appId !== "string") { + logger5?.warn("userAgentAppId must be a string or undefined."); + } else if (appId.length > 50) { + logger5?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."); + } + } + return appId; + }, "userAgentAppId") + }); + } + __name(resolveUserAgentConfig3, "resolveUserAgentConfig"); + var import_util_endpoints5 = require_dist_cjs22(); + var import_protocol_http15 = require_dist_cjs2(); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/; + async function checkFeatures(context2, config6, args) { + const request3 = args.request; + if (request3?.headers?.["smithy-protocol"] === "rpc-v2-cbor") { + (0, import_core210.setFeature)(context2, "PROTOCOL_RPC_V2_CBOR", "M"); + } + if (typeof config6.retryStrategy === "function") { + const retryStrategy = await config6.retryStrategy(); + if (typeof retryStrategy.acquireInitialRetryToken === "function") { + if (retryStrategy.constructor?.name?.includes("Adaptive")) { + (0, import_core210.setFeature)(context2, "RETRY_MODE_ADAPTIVE", "F"); + } else { + (0, import_core210.setFeature)(context2, "RETRY_MODE_STANDARD", "E"); + } + } else { + (0, import_core210.setFeature)(context2, "RETRY_MODE_LEGACY", "D"); + } + } + if (typeof config6.accountIdEndpointMode === "function") { + const endpointV2 = context2.endpointV2; + if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) { + (0, import_core210.setFeature)(context2, "ACCOUNT_ID_ENDPOINT", "O"); + } + switch (await config6.accountIdEndpointMode?.()) { + case "disabled": + (0, import_core210.setFeature)(context2, "ACCOUNT_ID_MODE_DISABLED", "Q"); + break; + case "preferred": + (0, import_core210.setFeature)(context2, "ACCOUNT_ID_MODE_PREFERRED", "P"); + break; + case "required": + (0, import_core210.setFeature)(context2, "ACCOUNT_ID_MODE_REQUIRED", "R"); + break; + } + } + const identity = context2.__smithy_context?.selectedHttpAuthScheme?.identity; + if (identity?.$source) { + const credentials = identity; + if (credentials.accountId) { + (0, import_core210.setFeature)(context2, "RESOLVED_ACCOUNT_ID", "T"); + } + for (const [key, value] of Object.entries(credentials.$source ?? {})) { + (0, import_core210.setFeature)(context2, key, value); + } + } + } + __name(checkFeatures, "checkFeatures"); + var USER_AGENT = "user-agent"; + var X_AMZ_USER_AGENT = "x-amz-user-agent"; + var SPACE = " "; + var UA_NAME_SEPARATOR = "/"; + var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; + var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; + var UA_ESCAPE_CHAR = "-"; + var BYTE_LIMIT = 1024; + function encodeFeatures(features) { + let buffer = ""; + for (const key in features) { + const val = features[key]; + if (buffer.length + val.length + 1 <= BYTE_LIMIT) { + if (buffer.length) { + buffer += "," + val; + } else { + buffer += val; + } + continue; + } + break; + } + return buffer; + } + __name(encodeFeatures, "encodeFeatures"); + var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + const { request: request3 } = args; + if (!import_protocol_http15.HttpRequest.isInstance(request3)) { + return next(args); + } + const { headers } = request3; + const userAgent = context2?.userAgent?.map(escapeUserAgent) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + await checkFeatures(context2, options, args); + const awsContext = context2; + defaultUserAgent.push( + `m/${encodeFeatures( + Object.assign({}, context2.__smithy_context?.features, awsContext.__aws_sdk_context?.features) + )}` + ); + const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || []; + const appId = await options.userAgentAppId(); + if (appId) { + defaultUserAgent.push(escapeUserAgent([`app/${appId}`])); + } + const prefix = (0, import_util_endpoints5.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; + } + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request: request3 + }); + }, "userAgentMiddleware"); + var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version4 = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version4].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); + }, "escapeUserAgent"); + var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true + }; + var getUserAgentPlugin3 = /* @__PURE__ */ __name((config6) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.add(userAgentMiddleware(config6), getUserAgentMiddlewareOptions); + }, "applyToStack") + }), "getUserAgentPlugin"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +var require_dist_cjs30 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isArrayBuffer: () => isArrayBuffer3 + }); + module2.exports = __toCommonJS2(src_exports); + var isArrayBuffer3 = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +var require_dist_cjs31 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromArrayBuffer: () => fromArrayBuffer, + fromString: () => fromString + }); + module2.exports = __toCommonJS2(src_exports); + var import_is_array_buffer = require_dist_cjs30(); + var import_buffer = require("buffer"); + var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { + if (!(0, import_is_array_buffer.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return import_buffer.Buffer.from(input, offset, length); + }, "fromArrayBuffer"); + var fromString = /* @__PURE__ */ __name((input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input); + }, "fromString"); + } +}); + +// node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +var require_dist_cjs32 = __commonJS({ + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + fromUtf8: () => fromUtf84, + toUint8Array: () => toUint8Array, + toUtf8: () => toUtf86 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs31(); + var fromUtf84 = /* @__PURE__ */ __name((input) => { + const buf = (0, import_util_buffer_from.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + }, "fromUtf8"); + var toUint8Array = /* @__PURE__ */ __name((data) => { + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + }, "toUint8Array"); + var toUtf86 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); + }, "toUtf8"); + } +}); + +// node_modules/@aws-crypto/util/build/main/convertToBuffer.js +var require_convertToBuffer = __commonJS({ + "node_modules/@aws-crypto/util/build/main/convertToBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertToBuffer = void 0; + var util_utf8_1 = require_dist_cjs32(); + var fromUtf84 = typeof Buffer !== "undefined" && Buffer.from ? function(input) { + return Buffer.from(input, "utf8"); + } : util_utf8_1.fromUtf8; + function convertToBuffer(data) { + if (data instanceof Uint8Array) + return data; + if (typeof data === "string") { + return fromUtf84(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); + } + exports2.convertToBuffer = convertToBuffer; + } +}); + +// node_modules/@aws-crypto/util/build/main/isEmptyData.js +var require_isEmptyData = __commonJS({ + "node_modules/@aws-crypto/util/build/main/isEmptyData.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmptyData = void 0; + function isEmptyData(data) { + if (typeof data === "string") { + return data.length === 0; + } + return data.byteLength === 0; + } + exports2.isEmptyData = isEmptyData; + } +}); + +// node_modules/@aws-crypto/util/build/main/numToUint8.js +var require_numToUint8 = __commonJS({ + "node_modules/@aws-crypto/util/build/main/numToUint8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.numToUint8 = void 0; + function numToUint8(num) { + return new Uint8Array([ + (num & 4278190080) >> 24, + (num & 16711680) >> 16, + (num & 65280) >> 8, + num & 255 + ]); + } + exports2.numToUint8 = numToUint8; + } +}); + +// node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +var require_uint32ArrayFrom = __commonJS({ + "node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint32ArrayFrom = void 0; + function uint32ArrayFrom(a_lookUpTable) { + if (!Uint32Array.from) { + var return_array = new Uint32Array(a_lookUpTable.length); + var a_index = 0; + while (a_index < a_lookUpTable.length) { + return_array[a_index] = a_lookUpTable[a_index]; + a_index += 1; + } + return return_array; + } + return Uint32Array.from(a_lookUpTable); + } + exports2.uint32ArrayFrom = uint32ArrayFrom; + } +}); + +// node_modules/@aws-crypto/util/build/main/index.js +var require_main3 = __commonJS({ + "node_modules/@aws-crypto/util/build/main/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint32ArrayFrom = exports2.numToUint8 = exports2.isEmptyData = exports2.convertToBuffer = void 0; + var convertToBuffer_1 = require_convertToBuffer(); + Object.defineProperty(exports2, "convertToBuffer", { enumerable: true, get: function() { + return convertToBuffer_1.convertToBuffer; + } }); + var isEmptyData_1 = require_isEmptyData(); + Object.defineProperty(exports2, "isEmptyData", { enumerable: true, get: function() { + return isEmptyData_1.isEmptyData; + } }); + var numToUint8_1 = require_numToUint8(); + Object.defineProperty(exports2, "numToUint8", { enumerable: true, get: function() { + return numToUint8_1.numToUint8; + } }); + var uint32ArrayFrom_1 = require_uint32ArrayFrom(); + Object.defineProperty(exports2, "uint32ArrayFrom", { enumerable: true, get: function() { + return uint32ArrayFrom_1.uint32ArrayFrom; + } }); + } +}); + +// node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +var require_aws_crc32 = __commonJS({ + "node_modules/@aws-crypto/crc32/build/main/aws_crc32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AwsCrc32 = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var util_1 = require_main3(); + var index_1 = require_main4(); + var AwsCrc32 = ( + /** @class */ + function() { + function AwsCrc322() { + this.crc32 = new index_1.Crc32(); + } + AwsCrc322.prototype.update = function(toHash) { + if ((0, util_1.isEmptyData)(toHash)) + return; + this.crc32.update((0, util_1.convertToBuffer)(toHash)); + }; + AwsCrc322.prototype.digest = function() { + return tslib_1.__awaiter(this, void 0, void 0, function() { + return tslib_1.__generator(this, function(_a6) { + return [2, (0, util_1.numToUint8)(this.crc32.digest())]; + }); + }); + }; + AwsCrc322.prototype.reset = function() { + this.crc32 = new index_1.Crc32(); + }; + return AwsCrc322; + }() + ); + exports2.AwsCrc32 = AwsCrc32; + } +}); + +// node_modules/@aws-crypto/crc32/build/main/index.js +var require_main4 = __commonJS({ + "node_modules/@aws-crypto/crc32/build/main/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AwsCrc32 = exports2.Crc32 = exports2.crc32 = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var util_1 = require_main3(); + function crc32(data) { + return new Crc32().update(data).digest(); + } + exports2.crc32 = crc32; + var Crc32 = ( + /** @class */ + function() { + function Crc322() { + this.checksum = 4294967295; + } + Crc322.prototype.update = function(data) { + var e_1, _a6; + try { + for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + var byte = data_1_1.value; + this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255]; + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (data_1_1 && !data_1_1.done && (_a6 = data_1.return)) _a6.call(data_1); + } finally { + if (e_1) throw e_1.error; + } + } + return this; + }; + Crc322.prototype.digest = function() { + return (this.checksum ^ 4294967295) >>> 0; + }; + return Crc322; + }() + ); + exports2.Crc32 = Crc32; + var a_lookUpTable = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); + var aws_crc32_1 = require_aws_crc32(); + Object.defineProperty(exports2, "AwsCrc32", { enumerable: true, get: function() { + return aws_crc32_1.AwsCrc32; + } }); + } +}); + +// node_modules/@smithy/eventstream-codec/dist-cjs/index.js +var require_dist_cjs33 = __commonJS({ + "node_modules/@smithy/eventstream-codec/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamCodec: () => EventStreamCodec, + HeaderMarshaller: () => HeaderMarshaller, + Int64: () => Int64, + MessageDecoderStream: () => MessageDecoderStream, + MessageEncoderStream: () => MessageEncoderStream, + SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, + SmithyMessageEncoderStream: () => SmithyMessageEncoderStream + }); + module2.exports = __toCommonJS2(src_exports); + var import_crc322 = require_main4(); + var import_util_hex_encoding = require_dist_cjs17(); + var Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static { + __name(this, "Int64"); + } + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i5 = 7, remaining = Math.abs(Math.round(number)); i5 > -1 && remaining > 0; i5--, remaining /= 256) { + bytes[i5] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); + } + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } + }; + function negate(bytes) { + for (let i5 = 0; i5 < 8; i5++) { + bytes[i5] ^= 255; + } + for (let i5 = 7; i5 > -1; i5--) { + bytes[i5]++; + if (bytes[i5] !== 0) + break; + } + } + __name(negate, "negate"); + var HeaderMarshaller = class { + constructor(toUtf86, fromUtf84) { + this.toUtf8 = toUtf86; + this.fromUtf8 = fromUtf84; + } + static { + __name(this, "HeaderMarshaller"); + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([ + header.value ? 0 : 1 + /* boolFalse */ + ]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8( + 0, + 3 + /* short */ + ); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8( + 0, + 4 + /* integer */ + ); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8( + 0, + 6 + /* byteArray */ + ); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8( + 0, + 7 + /* string */ + ); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( + uuidBytes.subarray(6, 8) + )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } + }; + var BOOLEAN_TAG = "boolean"; + var BYTE_TAG = "byte"; + var SHORT_TAG = "short"; + var INT_TAG = "integer"; + var LONG_TAG = "long"; + var BINARY_TAG = "binary"; + var STRING_TAG = "string"; + var TIMESTAMP_TAG = "timestamp"; + var UUID_TAG = "uuid"; + var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; + var import_crc32 = require_main4(); + var PRELUDE_MEMBER_LENGTH = 4; + var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; + var CHECKSUM_LENGTH = 4; + var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; + function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error( + `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` + ); + } + checksummer.update( + new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) + ); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error( + `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` + ); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array( + buffer, + byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, + messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) + ) + }; + } + __name(splitMessage, "splitMessage"); + var EventStreamCodec = class { + static { + __name(this, "EventStreamCodec"); + } + constructor(toUtf86, fromUtf84) { + this.headerMarshaller = new HeaderMarshaller(toUtf86, fromUtf84); + this.messageBuffer = []; + this.isEndOfStream = false; + } + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. + */ + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new import_crc322.Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); + } + }; + var MessageDecoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "MessageDecoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } + }; + var MessageEncoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "MessageEncoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } + }; + var SmithyMessageDecoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "SmithyMessageDecoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === void 0) + continue; + yield deserialized; + } + } + }; + var SmithyMessageEncoderStream = class { + constructor(options) { + this.options = options; + } + static { + __name(this, "SmithyMessageEncoderStream"); + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } + }; + } +}); + +// node_modules/@aws-sdk/util-format-url/dist-cjs/index.js +var require_dist_cjs34 = __commonJS({ + "node_modules/@aws-sdk/util-format-url/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + formatUrl: () => formatUrl + }); + module2.exports = __toCommonJS2(index_exports); + var import_querystring_builder = require_dist_cjs14(); + function formatUrl(request3) { + const { port, query } = request3; + let { protocol, path: path2, hostname } = request3; + if (protocol && protocol.slice(-1) !== ":") { + protocol += ":"; + } + if (port) { + hostname += `:${port}`; + } + if (path2 && path2.charAt(0) !== "/") { + path2 = `/${path2}`; + } + let queryString = query ? (0, import_querystring_builder.buildQueryString)(query) : ""; + if (queryString && queryString[0] !== "?") { + queryString = `?${queryString}`; + } + let auth = ""; + if (request3.username != null || request3.password != null) { + const username = request3.username ?? ""; + const password = request3.password ?? ""; + auth = `${username}:${password}@`; + } + let fragment = ""; + if (request3.fragment) { + fragment = `#${request3.fragment}`; + } + return `${protocol}//${auth}${hostname}${path2}${queryString}${fragment}`; + } + __name(formatUrl, "formatUrl"); + } +}); + +// node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +var require_dist_cjs35 = __commonJS({ + "node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_codec = require_dist_cjs33(); + function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = /* @__PURE__ */ __name((size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }, "allocateMessage"); + const iterator2 = /* @__PURE__ */ __name(async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min( + 4 - currentMessagePendingLength, + // remaining bytes to fill the messageLengthBuffer + bytesRemaining + // bytes left in chunk + ); + messageLengthBuffer.set( + // @ts-ignore error TS2532: Object is possibly 'undefined' for value + value.slice(currentOffset, currentOffset + numBytesForTotal), + currentMessagePendingLength + ); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min( + currentMessageTotalLength - currentMessagePendingLength, + // number of bytes left to complete message + chunkLength - currentOffset + // number of bytes left in the original chunk + ); + currentMessage.set( + // @ts-ignore error TS2532: Object is possibly 'undefined' for value + value.slice(currentOffset, currentOffset + numBytesToWrite), + currentMessagePendingLength + ); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }, "iterator"); + return { + [Symbol.asyncIterator]: iterator2 + }; + } + __name(getChunkedStream, "getChunkedStream"); + function getMessageUnmarshaller(deserializer, toUtf86) { + return async function(message) { + const { value: messageType } = message.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message.headers[":error-code"].value; + throw unmodeledError; + } else if (messageType === "exception") { + const code = message.headers[":exception-type"].value; + const exception = { [code]: message }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error = new Error(toUtf86(message.body)); + error.name = code; + throw error; + } + throw deserializedException[code]; + } else if (messageType === "event") { + const event = { + [message.headers[":event-type"].value]: message + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } else { + throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); + } + }; + } + __name(getMessageUnmarshaller, "getMessageUnmarshaller"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; + } + deserialize(body, deserializer) { + const inputStream = getChunkedStream(body); + return new import_eventstream_codec.SmithyMessageDecoderStream({ + messageStream: new import_eventstream_codec.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + // @ts-expect-error Type 'T' is not assignable to type 'Record' + deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder) + }); + } + serialize(inputStream, serializer) { + return new import_eventstream_codec.MessageEncoderStream({ + messageStream: new import_eventstream_codec.SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true + }); + } + }; + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js +var require_dist_cjs36 = __commonJS({ + "node_modules/@smithy/eventstream-serde-browser/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider, + iterableToReadableStream: () => iterableToReadableStream, + readableStreamtoIterable: () => readableStreamtoIterable + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_serde_universal = require_dist_cjs35(); + var readableStreamtoIterable = /* @__PURE__ */ __name((readableStream) => ({ + [Symbol.asyncIterator]: async function* () { + const reader = readableStream.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) + return; + yield value; + } + } finally { + reader.releaseLock(); + } + } + }), "readableStreamtoIterable"); + var iterableToReadableStream = /* @__PURE__ */ __name((asyncIterable) => { + const iterator2 = asyncIterable[Symbol.asyncIterator](); + return new ReadableStream({ + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + return controller.close(); + } + controller.enqueue(value); + } + }); + }, "iterableToReadableStream"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = isReadableStream6(body) ? readableStreamtoIterable(body) : body; + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + /** + * Generate a stream that serialize events into stream of binary chunks; + * + * Caveat is that streaming request payload doesn't work on browser with native + * xhr or fetch handler currently because they don't support upload streaming. + * reference: + * * https://bugs.chromium.org/p/chromium/issues/detail?id=688906 + * * https://bugzilla.mozilla.org/show_bug.cgi?id=1387483 + * + */ + serialize(input, serializer) { + const serialziedIterable = this.universalMarshaller.serialize(input, serializer); + return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable; + } + }; + var isReadableStream6 = /* @__PURE__ */ __name((body) => typeof ReadableStream === "function" && body instanceof ReadableStream, "isReadableStream"); + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +var require_dist_cjs37 = __commonJS({ + "node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + WebSocketFetchHandler: () => WebSocketFetchHandler, + eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider, + getWebSocketPlugin: () => getWebSocketPlugin, + resolveWebSocketConfig: () => resolveWebSocketConfig + }); + module2.exports = __toCommonJS2(index_exports); + var import_eventstream_codec = require_dist_cjs33(); + var import_util_hex_encoding = require_dist_cjs17(); + var getEventSigningTransformStream = /* @__PURE__ */ __name((initialSignature, messageSigner, eventStreamCodec, systemClockOffsetProvider) => { + let priorSignature = initialSignature; + const transformer = { + start() { + }, + async transform(chunk, controller) { + try { + const now = new Date(Date.now() + await systemClockOffsetProvider()); + const dateHeader = { + ":date": { type: "timestamp", value: now } + }; + const signedMessage = await messageSigner.sign( + { + message: { + body: chunk, + headers: dateHeader + }, + priorSignature + }, + { + signingDate: now + } + ); + priorSignature = signedMessage.signature; + const serializedSigned = eventStreamCodec.encode({ + headers: { + ...dateHeader, + ":chunk-signature": { + type: "binary", + value: (0, import_util_hex_encoding.fromHex)(signedMessage.signature) + } + }, + body: chunk + }); + controller.enqueue(serializedSigned); + } catch (error) { + controller.error(error); + } + } + }; + return new TransformStream({ ...transformer }); + }, "getEventSigningTransformStream"); + var EventStreamPayloadHandler = class { + static { + __name(this, "EventStreamPayloadHandler"); + } + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + this.messageSigner = options.messageSigner; + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder); + this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0; + } + async handle(next, args, context2 = {}) { + const request3 = args.request; + const { body: payload, headers, query } = request3; + if (!(payload instanceof ReadableStream)) { + throw new Error("Eventstream payload must be a ReadableStream."); + } + const placeHolderStream = new TransformStream(); + request3.body = placeHolderStream.readable; + let result; + try { + result = await next(args); + } catch (e5) { + request3.body.cancel(); + throw e5; + } + const match = (headers["authorization"] || "").match(/Signature=([\w]+)$/); + const priorSignature = (match || [])[1] || query && query["X-Amz-Signature"] || ""; + const signingStream = getEventSigningTransformStream( + priorSignature, + await this.messageSigner(), + this.eventStreamCodec, + this.systemClockOffsetProvider + ); + const signedPayload = payload.pipeThrough(signingStream); + signedPayload.pipeThrough(placeHolderStream); + return result; + } + }; + var eventStreamPayloadHandlerProvider = /* @__PURE__ */ __name((options) => new EventStreamPayloadHandler(options), "eventStreamPayloadHandlerProvider"); + var injectSessionIdMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const requestParams = { + ...args.input + }; + const response = await next(args); + const output = response.output; + if (requestParams.SessionId && output.SessionId == null) { + output.SessionId = requestParams.SessionId; + } + return response; + }, "injectSessionIdMiddleware"); + var injectSessionIdMiddlewareOptions = { + step: "initialize", + name: "injectSessionIdMiddleware", + tags: ["WEBSOCKET", "EVENT_STREAM"], + override: true + }; + var import_protocol_http15 = require_dist_cjs2(); + var websocketEndpointMiddleware = /* @__PURE__ */ __name((config6, options) => (next) => (args) => { + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3) && config6.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")) { + request3.protocol = "wss:"; + request3.method = "GET"; + request3.path = `${request3.path}-websocket`; + const { headers } = request3; + delete headers["content-type"]; + delete headers["x-amz-content-sha256"]; + for (const name of Object.keys(headers)) { + if (name.indexOf(options.headerPrefix) === 0) { + const chunkedName = name.replace(options.headerPrefix, ""); + request3.query[chunkedName] = headers[name]; + } + } + if (headers["x-amz-user-agent"]) { + request3.query["user-agent"] = headers["x-amz-user-agent"]; + } + request3.headers = { host: headers.host ?? request3.hostname }; + } + return next(args); + }, "websocketEndpointMiddleware"); + var websocketEndpointMiddlewareOptions = { + name: "websocketEndpointMiddleware", + tags: ["WEBSOCKET", "EVENT_STREAM"], + relation: "after", + toMiddleware: "eventStreamHeaderMiddleware", + override: true + }; + var getWebSocketPlugin = /* @__PURE__ */ __name((config6, options) => ({ + applyToStack: /* @__PURE__ */ __name((clientStack) => { + clientStack.addRelativeTo(websocketEndpointMiddleware(config6, options), websocketEndpointMiddlewareOptions); + clientStack.add(injectSessionIdMiddleware(), injectSessionIdMiddlewareOptions); + }, "applyToStack") + }), "getWebSocketPlugin"); + var isWebSocketRequest = /* @__PURE__ */ __name((request3) => request3.protocol === "ws:" || request3.protocol === "wss:", "isWebSocketRequest"); + var WebsocketSignatureV4 = class { + static { + __name(this, "WebsocketSignatureV4"); + } + signer; + constructor(options) { + this.signer = options.signer; + } + presign(originalRequest, options = {}) { + return this.signer.presign(originalRequest, options); + } + async sign(toSign, options) { + if (import_protocol_http15.HttpRequest.isInstance(toSign) && isWebSocketRequest(toSign)) { + const signedRequest = await this.signer.presign( + { ...toSign, body: "" }, + { + ...options, + // presigned url must be expired within 1 min. + expiresIn: 60, + // Not to sign headers. Transcribe-streaming WebSocket + // request omits headers except for required 'host' header. If we sign + // the other headers, the signature could be mismatch. + unsignableHeaders: new Set(Object.keys(toSign.headers).filter((header) => header !== "host")) + } + ); + return { + ...signedRequest, + body: toSign.body + }; + } else { + return this.signer.sign(toSign, options); + } + } + }; + var resolveWebSocketConfig = /* @__PURE__ */ __name((input) => { + const { signer } = input; + return Object.assign(input, { + signer: /* @__PURE__ */ __name(async (authScheme) => { + const signerObj = await signer(authScheme); + if (validateSigner(signerObj)) { + return new WebsocketSignatureV4({ signer: signerObj }); + } + throw new Error("Expected WebsocketSignatureV4 signer, please check the client constructor."); + }, "signer") + }); + }, "resolveWebSocketConfig"); + var validateSigner = /* @__PURE__ */ __name((signer) => !!signer, "validateSigner"); + var import_util_format_url = require_dist_cjs34(); + var import_eventstream_serde_browser = require_dist_cjs36(); + var import_fetch_http_handler = require_dist_cjs16(); + var DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2e3; + var WebSocketFetchHandler = class _WebSocketFetchHandler { + static { + __name(this, "WebSocketFetchHandler"); + } + metadata = { + handlerProtocol: "websocket/h1.1" + }; + config; + configPromise; + httpHandler; + sockets = {}; + /** + * @returns the input if it is an HttpHandler of any class, + * or instantiates a new instance of this handler. + */ + static create(instanceOrOptions, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new _WebSocketFetchHandler( + instanceOrOptions, + httpHandler + ); + } + constructor(options, httpHandler = new import_fetch_http_handler.FetchHttpHandler()) { + this.httpHandler = httpHandler; + if (typeof options === "function") { + this.config = {}; + this.configPromise = options().then((opts) => this.config = opts ?? {}); + } else { + this.config = options ?? {}; + this.configPromise = Promise.resolve(this.config); + } + } + /** + * Destroys the WebSocketHandler. + * Closes all sockets from the socket pool. + */ + destroy() { + for (const [key, sockets] of Object.entries(this.sockets)) { + for (const socket of sockets) { + socket.close(1e3, `Socket closed through destroy() call`); + } + delete this.sockets[key]; + } + } + async handle(request3) { + if (!isWebSocketRequest(request3)) { + return this.httpHandler.handle(request3); + } + const url2 = (0, import_util_format_url.formatUrl)(request3); + const socket = new WebSocket(url2); + if (!this.sockets[url2]) { + this.sockets[url2] = []; + } + this.sockets[url2].push(socket); + socket.binaryType = "arraybuffer"; + this.config = await this.configPromise; + const { connectionTimeout = DEFAULT_WS_CONNECTION_TIMEOUT_MS } = this.config; + await this.waitForReady(socket, connectionTimeout); + const { body } = request3; + const bodyStream = getIterator(body); + const asyncIterable = this.connect(socket, bodyStream); + const outputPayload = toReadableStream(asyncIterable); + return { + response: new import_protocol_http15.HttpResponse({ + statusCode: 200, + // indicates connection success + body: outputPayload + }) + }; + } + updateHttpClientConfig(key, value) { + this.configPromise = this.configPromise.then((config6) => { + config6[key] = value; + return config6; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + /** + * Removes all closing/closed sockets from the socket pool for URL. + */ + removeNotUsableSockets(url2) { + this.sockets[url2] = (this.sockets[url2] ?? []).filter( + (socket) => ![WebSocket.CLOSING, WebSocket.CLOSED].includes(socket.readyState) + ); + } + waitForReady(socket, connectionTimeout) { + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + this.removeNotUsableSockets(socket.url); + reject({ + $metadata: { + httpStatusCode: 500 + } + }); + }, connectionTimeout); + socket.onopen = () => { + clearTimeout(timeout); + resolve(); + }; + }); + } + connect(socket, data) { + let streamError = void 0; + let socketErrorOccurred = false; + let reject = /* @__PURE__ */ __name(() => { + }, "reject"); + let resolve = /* @__PURE__ */ __name(() => { + }, "resolve"); + socket.onmessage = (event) => { + resolve({ + done: false, + value: new Uint8Array(event.data) + }); + }; + socket.onerror = (error) => { + socketErrorOccurred = true; + socket.close(); + reject(error); + }; + socket.onclose = () => { + this.removeNotUsableSockets(socket.url); + if (socketErrorOccurred) return; + if (streamError) { + reject(streamError); + } else { + resolve({ + done: true, + value: void 0 + // unchecked because done=true. + }); + } + }; + const outputStream = { + [Symbol.asyncIterator]: () => ({ + next: /* @__PURE__ */ __name(() => { + return new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }, "next") + }) + }; + const send = /* @__PURE__ */ __name(async () => { + try { + for await (const inputChunk of data) { + socket.send(inputChunk); + } + } catch (err) { + streamError = err; + } finally { + socket.close(1e3); + } + }, "send"); + send(); + return outputStream; + } + }; + var getIterator = /* @__PURE__ */ __name((stream4) => { + if (stream4[Symbol.asyncIterator]) { + return stream4; + } + if (isReadableStream6(stream4)) { + return (0, import_eventstream_serde_browser.readableStreamtoIterable)(stream4); + } + return { + [Symbol.asyncIterator]: async function* () { + yield stream4; + } + }; + }, "getIterator"); + var toReadableStream = /* @__PURE__ */ __name((asyncIterable) => typeof ReadableStream === "function" ? (0, import_eventstream_serde_browser.iterableToReadableStream)(asyncIterable) : asyncIterable, "toReadableStream"); + var isReadableStream6 = /* @__PURE__ */ __name((payload) => typeof ReadableStream === "function" && payload instanceof ReadableStream, "isReadableStream"); + } +}); + +// node_modules/@smithy/util-config-provider/dist-cjs/index.js +var require_dist_cjs38 = __commonJS({ + "node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + SelectorType: () => SelectorType, + booleanSelector: () => booleanSelector, + numberSelector: () => numberSelector + }); + module2.exports = __toCommonJS2(src_exports); + var booleanSelector = /* @__PURE__ */ __name((obj, key, type2) => { + if (!(key in obj)) + return void 0; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type2} "${key}". Expected "true" or "false", got ${obj[key]}.`); + }, "booleanSelector"); + var numberSelector = /* @__PURE__ */ __name((obj, key, type2) => { + if (!(key in obj)) + return void 0; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type2} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; + }, "numberSelector"); + var SelectorType = /* @__PURE__ */ ((SelectorType2) => { + SelectorType2["ENV"] = "env"; + SelectorType2["CONFIG"] = "shared config entry"; + return SelectorType2; + })(SelectorType || {}); + } +}); + +// node_modules/@smithy/config-resolver/dist-cjs/index.js +var require_dist_cjs39 = __commonJS({ + "node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS3, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS3, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, + resolveRegionConfig: () => resolveRegionConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_config_provider = require_dist_cjs38(); + var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; + var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; + var DEFAULT_USE_DUALSTACK_ENDPOINT = false; + var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; + var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; + var DEFAULT_USE_FIPS_ENDPOINT = false; + var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false + }; + var import_util_middleware7 = require_dist_cjs7(); + var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { tls, endpoint, urlParser, useDualstackEndpoint } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: (0, import_util_middleware7.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware7.normalizeProvider)(useDualstackEndpoint ?? false) + }); + }, "resolveCustomEndpointsConfig"); + var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); + }, "getEndpointFromRegion"); + var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware7.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser, tls } = input; + return Object.assign(input, { + tls: tls ?? true, + endpoint: endpoint ? (0, import_util_middleware7.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint + }); + }, "resolveEndpointsConfig"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => env2[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } + }; + var NODE_REGION_CONFIG_FILE_OPTIONS3 = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig3 = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }); + }, "resolveRegionConfig"); + var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )?.hostname, "getHostnameFromVariants"); + var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } + }, "getResolvedSigningRegion"); + var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash + }) => { + const partition3 = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : partitionHash[partition3]?.endpoint ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants(partitionHash[partition3]?.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: regionHash[resolvedRegion]?.signingRegion, + regionRegex: partitionHash[partition3].regionRegex, + useFipsEndpoint + }); + return { + partition: partition3, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...regionHash[resolvedRegion]?.signingService && { + signingService: regionHash[resolvedRegion].signingService + } + }; + }, "getRegionInfo"); + } +}); + +// node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +var require_dist_cjs40 = __commonJS({ + "node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig + }); + module2.exports = __toCommonJS2(src_exports); + var resolveEventStreamSerdeConfig = /* @__PURE__ */ __name((input) => Object.assign(input, { + eventStreamMarshaller: input.eventStreamSerdeProvider(input) + }), "resolveEventStreamSerdeConfig"); + } +}); + +// node_modules/@smithy/middleware-content-length/dist-cjs/index.js +var require_dist_cjs41 = __commonJS({ + "node_modules/@smithy/middleware-content-length/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var CONTENT_LENGTH_HEADER = "content-length"; + function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request3 = args.request; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + const { body, headers } = request3; + if (body && Object.keys(headers).map((str2) => str2.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request3.headers = { + ...request3.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { + } + } + } + return next({ + ...args, + request: request3 + }); + }; + } + __name(contentLengthMiddleware, "contentLengthMiddleware"); + var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true + }; + var getContentLengthPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } + }), "getContentLengthPlugin"); + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +var require_getHomeDir = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHomeDir = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var homeDirCache = {}; + var getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; + }; + var getHomeDir2 = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; + }; + exports2.getHomeDir = getHomeDir2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +var require_getSSOTokenFilepath = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFilepath = void 0; + var crypto_1 = require("crypto"); + var path_1 = require("path"); + var getHomeDir_1 = require_getHomeDir(); + var getSSOTokenFilepath2 = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); + }; + exports2.getSSOTokenFilepath = getSSOTokenFilepath2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +var require_getSSOTokenFromFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSSOTokenFromFile = void 0; + var fs_1 = require("fs"); + var getSSOTokenFilepath_1 = require_getSSOTokenFilepath(); + var { readFile } = fs_1.promises; + var getSSOTokenFromFile2 = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); + }; + exports2.getSSOTokenFromFile = getSSOTokenFromFile2; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +var require_slurpFile = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.slurpFile = void 0; + var fs_1 = require("fs"); + var { readFile } = fs_1.promises; + var filePromisesHash = {}; + var slurpFile = (path2, options) => { + if (!filePromisesHash[path2] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path2] = readFile(path2, "utf8"); + } + return filePromisesHash[path2]; + }; + exports2.slurpFile = slurpFile; + } +}); + +// node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +var require_dist_cjs42 = __commonJS({ + "node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, + DEFAULT_PROFILE: () => DEFAULT_PROFILE, + ENV_PROFILE: () => ENV_PROFILE, + getProfileName: () => getProfileName, + loadSharedConfigFiles: () => loadSharedConfigFiles, + loadSsoSessionData: () => loadSsoSessionData, + parseKnownFiles: () => parseKnownFiles + }); + module2.exports = __toCommonJS2(src_exports); + __reExport(src_exports, require_getHomeDir(), module2.exports); + var ENV_PROFILE = "AWS_PROFILE"; + var DEFAULT_PROFILE = "default"; + var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); + __reExport(src_exports, require_getSSOTokenFilepath(), module2.exports); + __reExport(src_exports, require_getSSOTokenFromFile(), module2.exports); + var import_types6 = require_dist_cjs(); + var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; + } + return Object.values(import_types6.IniSectionType).includes(key.substring(0, indexOfSeparator)); + }).reduce( + (acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === import_types6.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; + }, + { + // Populate default profile, if present. + ...data.default && { default: data.default } + } + ), "getConfigData"); + var import_path4 = require("path"); + var import_getHomeDir = require_getHomeDir(); + var ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; + var getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path4.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath"); + var import_getHomeDir2 = require_getHomeDir(); + var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; + var getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path4.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath"); + var import_getHomeDir3 = require_getHomeDir(); + var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; + var profileNameBlockList = ["__proto__", "profile __proto__"]; + var parseIni = /* @__PURE__ */ __name((iniData) => { + const map2 = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = void 0; + currentSubSection = void 0; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(import_types6.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } + } else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim() + ]; + if (value === "") { + currentSubSection = name; + } else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = void 0; + } + map2[currentSection] = map2[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map2[currentSection][key] = value; + } + } + } + } + return map2; + }, "parseIni"); + var import_slurpFile = require_slurpFile(); + var swallowError = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var CONFIG_PREFIX_SEPARATOR = "."; + var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = (0, import_getHomeDir3.getHomeDir)(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = (0, import_path4.join)(homeDir, filepath.slice(2)); + } + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = (0, import_path4.join)(homeDir, configFilepath.slice(2)); + } + const parsedFiles = await Promise.all([ + (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).then(getConfigData).catch(swallowError), + (0, import_slurpFile.slurpFile)(resolvedFilepath, { + ignoreCache: init.ignoreCache + }).then(parseIni).catch(swallowError) + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1] + }; + }, "loadSharedConfigFiles"); + var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types6.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); + var import_slurpFile2 = require_slurpFile(); + var swallowError2 = /* @__PURE__ */ __name(() => ({}), "swallowError"); + var loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData"); + var mergeConfigFiles = /* @__PURE__ */ __name((...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== void 0) { + Object.assign(merged[key], values); + } else { + merged[key] = values; + } + } + } + return merged; + }, "mergeConfigFiles"); + var parseKnownFiles = /* @__PURE__ */ __name(async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); + }, "parseKnownFiles"); + } +}); + +// node_modules/@smithy/node-config-provider/dist-cjs/index.js +var require_dist_cjs43 = __commonJS({ + "node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + loadConfig: () => loadConfig + }); + module2.exports = __toCommonJS2(src_exports); + var import_property_provider2 = require_dist_cjs23(); + function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); + } catch (e5) { + return functionString; + } + } + __name(getSelectorName, "getSelectorName"); + var fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => { + try { + const config6 = envVarSelector(process.env, options); + if (config6 === void 0) { + throw new Error(); + } + return config6; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError( + e5.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, + { logger: options?.logger } + ); + } + }, "fromEnv"); + var import_shared_ini_file_loader = require_dist_cjs42(); + var fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, import_shared_ini_file_loader.getProfileName)(init); + const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === void 0) { + throw new Error(); + } + return configValue; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError( + e5.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, + { logger: init.logger } + ); + } + }, "fromSharedConfigFiles"); + var isFunction4 = /* @__PURE__ */ __name((func) => typeof func === "function", "isFunction"); + var fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction4(defaultValue) ? async () => await defaultValue() : (0, import_property_provider2.fromStatic)(defaultValue), "fromStatic"); + var loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger: logger5 } = configuration; + const envOptions = { signingName, logger: logger5 }; + return (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + fromEnv(environmentVariableSelector, envOptions), + fromSharedConfigFiles(configFileSelector, configuration), + fromStatic(defaultValue) + ) + ); + }, "loadConfig"); + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +var require_getEndpointUrlConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointUrlConfig = void 0; + var shared_ini_file_loader_1 = require_dist_cjs42(); + var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; + var CONFIG_ENDPOINT_URL = "endpoint_url"; + var getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env2) => { + const serviceSuffixParts = serviceId.split(" ").map((w6) => w6.toUpperCase()); + const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env2[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + configFileSelector: (profile, config6) => { + if (config6 && profile.services) { + const servicesSection = config6[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w6) => w6.toLowerCase()); + const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl2) + return endpointUrl2; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return void 0; + }, + default: void 0 + }); + exports2.getEndpointUrlConfig = getEndpointUrlConfig; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +var require_getEndpointFromConfig = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getEndpointFromConfig = void 0; + var node_config_provider_1 = require_dist_cjs43(); + var getEndpointUrlConfig_1 = require_getEndpointUrlConfig(); + var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : ""))(); + exports2.getEndpointFromConfig = getEndpointFromConfig; + } +}); + +// node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +var require_dist_cjs44 = __commonJS({ + "node_modules/@smithy/middleware-endpoint/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin4, + resolveEndpointConfig: () => resolveEndpointConfig3, + resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 + }); + module2.exports = __toCommonJS2(src_exports); + var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; + }, "resolveParamsForS3"); + var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; + var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; + var DOTS_PATTERN = /\.\./; + var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); + var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition3, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition3 && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; + }, "isArnBucketName"); + var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config6) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config6[configKey] ?? config6[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config6.credentials === "function" ? await config6.credentials() : config6.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config6.credentials === "function" ? await config6.credentials() : config6.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config6.isCustomEndpoint === false) { + return void 0; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path: path2 } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path2}`; + } + } + return endpoint; + }; + } + return configProvider; + }, "createConfigValueProvider"); + var import_getEndpointFromConfig = require_getEndpointFromConfig(); + var import_url_parser3 = require_dist_cjs21(); + var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser3.parseUrl)(endpoint.url); + } + return endpoint; + } + return (0, import_url_parser3.parseUrl)(endpoint); + }, "toEndpointV1"); + var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context2) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } else { + endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context2); + return endpoint; + }, "getEndpointFromInstructions"); + var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; + }, "resolveParams"); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_util_middleware7 = require_dist_cjs7(); + var endpointMiddleware = /* @__PURE__ */ __name(({ + config: config6, + instructions + }) => { + return (next, context2) => async (args) => { + if (config6.isCustomEndpoint) { + (0, import_core39.setFeature)(context2, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; + } + }, + { ...config6 }, + context2 + ); + context2.endpointV2 = endpoint; + context2.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context2.authSchemes?.[0]; + if (authScheme) { + context2["signing_region"] = authScheme.signingRegion; + context2["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware7.getSmithyContext)(context2); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); + } + } + return next({ + ...args + }); + }; + }, "endpointMiddleware"); + var import_middleware_serde5 = require_dist_cjs8(); + var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde5.serializerMiddlewareOption.name + }; + var getEndpointPlugin4 = /* @__PURE__ */ __name((config6, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config: config6, + instructions + }), + endpointMiddlewareOptions + ); + } + }), "getEndpointPlugin"); + var import_getEndpointFromConfig2 = require_getEndpointFromConfig(); + var resolveEndpointConfig3 = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware7.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware7.normalizeProvider)(useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware7.normalizeProvider)(useFipsEndpoint ?? false) + }); + let configuredEndpointPromise = void 0; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; + }, "resolveEndpointConfig"); + var resolveEndpointRequiredConfig = /* @__PURE__ */ __name((input) => { + const { endpoint } = input; + if (endpoint === void 0) { + input.endpoint = async () => { + throw new Error( + "@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint." + ); + }; + } + return input; + }, "resolveEndpointRequiredConfig"); + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js +function rng2() { + if (poolPtr2 > rnds8Pool2.length - 16) { + import_crypto6.default.randomFillSync(rnds8Pool2); + poolPtr2 = 0; + } + return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); +} +var import_crypto6, rnds8Pool2, poolPtr2; +var init_rng2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto6 = __toESM(require("crypto")); + rnds8Pool2 = new Uint8Array(256); + poolPtr2 = rnds8Pool2.length; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js +var regex_default2; +var init_regex2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js +function validate3(uuid) { + return typeof uuid === "string" && regex_default2.test(uuid); +} +var validate_default2; +var init_validate2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex2(); + validate_default2 = validate3; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify(arr, offset = 0) { + return byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]; +} +function stringify3(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); + if (!validate_default2(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex2, stringify_default2; +var init_stringify2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate2(); + byteToHex2 = []; + for (let i5 = 0; i5 < 256; ++i5) { + byteToHex2.push((i5 + 256).toString(16).slice(1)); + } + stringify_default2 = stringify3; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js +function v12(options, buf, offset) { + let i5 = buf && offset || 0; + const b5 = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId2; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng2)(); + if (node == null) { + node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; + const dt2 = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; + if (dt2 < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt2 < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs2 = msecs; + _lastNSecs2 = nsecs; + _clockseq2 = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b5[i5++] = tl >>> 24 & 255; + b5[i5++] = tl >>> 16 & 255; + b5[i5++] = tl >>> 8 & 255; + b5[i5++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b5[i5++] = tmh >>> 8 & 255; + b5[i5++] = tmh & 255; + b5[i5++] = tmh >>> 24 & 15 | 16; + b5[i5++] = tmh >>> 16 & 255; + b5[i5++] = clockseq >>> 8 | 128; + b5[i5++] = clockseq & 255; + for (let n4 = 0; n4 < 6; ++n4) { + b5[i5 + n4] = node[n4]; + } + return buf || unsafeStringify(b5); +} +var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; +var init_v12 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng2(); + init_stringify2(); + _lastMSecs2 = 0; + _lastNSecs2 = 0; + v1_default2 = v12; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js +function parse2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + let v7; + const arr = new Uint8Array(16); + arr[0] = (v7 = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v7 >>> 16 & 255; + arr[2] = v7 >>> 8 & 255; + arr[3] = v7 & 255; + arr[4] = (v7 = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v7 & 255; + arr[6] = (v7 = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v7 & 255; + arr[8] = (v7 = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v7 & 255; + arr[10] = (v7 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v7 / 4294967296 & 255; + arr[12] = v7 >>> 24 & 255; + arr[13] = v7 >>> 16 & 255; + arr[14] = v7 >>> 8 & 255; + arr[15] = v7 & 255; + return arr; +} +var parse_default2; +var init_parse2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate2(); + parse_default2 = parse2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes2(str2) { + str2 = unescape(encodeURIComponent(str2)); + const bytes = []; + for (let i5 = 0; i5 < str2.length; ++i5) { + bytes.push(str2.charCodeAt(i5)); + } + return bytes; +} +function v35(name, version4, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes2(value); + } + if (typeof namespace === "string") { + namespace = parse_default2(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version4; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = bytes[i5]; + } + return buf; + } + return unsafeStringify(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS2; + generateUUID.URL = URL3; + return generateUUID; +} +var DNS2, URL3; +var init_v352 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify2(); + init_parse2(); + DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js +function md52(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto7.default.createHash("md5").update(bytes).digest(); +} +var import_crypto7, md5_default2; +var init_md52 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto7 = __toESM(require("crypto")); + md5_default2 = md52; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js +var v32, v3_default2; +var init_v32 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v3.js"() { + init_v352(); + init_md52(); + v32 = v35("v3", 48, md5_default2); + v3_default2 = v32; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js +var import_crypto8, native_default; +var init_native = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/native.js"() { + import_crypto8 = __toESM(require("crypto")); + native_default = { + randomUUID: import_crypto8.default.randomUUID + }; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js +function v42(options, buf, offset) { + if (native_default.randomUUID && !buf && !options) { + return native_default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng2)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = rnds[i5]; + } + return buf; + } + return unsafeStringify(rnds); +} +var v4_default2; +var init_v42 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v4.js"() { + init_native(); + init_rng2(); + init_stringify2(); + v4_default2 = v42; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js +function sha12(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto9.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto9, sha1_default2; +var init_sha12 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto9 = __toESM(require("crypto")); + sha1_default2 = sha12; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js +var v52, v5_default2; +var init_v52 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/v5.js"() { + init_v352(); + init_sha12(); + v52 = v35("v5", 80, sha1_default2); + v5_default2 = v52; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js +var nil_default2; +var init_nil2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default2 = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js +function version2(uuid) { + if (!validate_default2(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default2; +var init_version2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/version.js"() { + init_validate2(); + version_default2 = version2; + } +}); + +// node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports2 = {}; +__export(esm_node_exports2, { + NIL: () => nil_default2, + parse: () => parse_default2, + stringify: () => stringify_default2, + v1: () => v1_default2, + v3: () => v3_default2, + v4: () => v4_default2, + v5: () => v5_default2, + validate: () => validate_default2, + version: () => version_default2 +}); +var init_esm_node2 = __esm({ + "node_modules/@smithy/middleware-retry/node_modules/uuid/dist/esm-node/index.js"() { + init_v12(); + init_v32(); + init_v42(); + init_v52(); + init_nil2(); + init_version2(); + init_validate2(); + init_stringify2(); + init_parse2(); + } +}); + +// node_modules/@smithy/service-error-classification/dist-cjs/index.js +var require_dist_cjs45 = __commonJS({ + "node_modules/@smithy/service-error-classification/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + isBrowserNetworkError: () => isBrowserNetworkError, + isClockSkewCorrectedError: () => isClockSkewCorrectedError, + isClockSkewError: () => isClockSkewError, + isRetryableByTrait: () => isRetryableByTrait, + isServerError: () => isServerError, + isThrottlingError: () => isThrottlingError, + isTransientError: () => isTransientError + }); + module2.exports = __toCommonJS2(src_exports); + var CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch" + ]; + var THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException" + // DynamoDB + ]; + var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; + var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; + var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); + var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); + var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => error.$metadata?.clockSkewCorrected, "isClockSkewCorrectedError"); + var isBrowserNetworkError = /* @__PURE__ */ __name((error) => { + const errorMessages = /* @__PURE__ */ new Set([ + "Failed to fetch", + // Chrome + "NetworkError when attempting to fetch resource", + // Firefox + "The Internet connection appears to be offline", + // Safari 16 + "Load failed", + // Safari 17+ + "Network request failed" + // `cross-fetch` + ]); + const isValid = error && error instanceof TypeError; + if (!isValid) { + return false; + } + return errorMessages.has(error.message); + }, "isBrowserNetworkError"); + var isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, "isThrottlingError"); + var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), "isTransientError"); + var isServerError = /* @__PURE__ */ __name((error) => { + if (error.$metadata?.httpStatusCode !== void 0) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; + } + return false; + } + return false; + }, "isServerError"); + } +}); + +// node_modules/@smithy/util-retry/dist-cjs/index.js +var require_dist_cjs46 = __commonJS({ + "node_modules/@smithy/util-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, + DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, + DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE, + DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE3, + DefaultRateLimiter: () => DefaultRateLimiter, + INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS, + INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER, + MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY, + NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT, + REQUEST_HEADER: () => REQUEST_HEADER, + RETRY_COST: () => RETRY_COST, + RETRY_MODES: () => RETRY_MODES, + StandardRetryStrategy: () => StandardRetryStrategy, + THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, + TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST + }); + module2.exports = __toCommonJS2(src_exports); + var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { + RETRY_MODES2["STANDARD"] = "standard"; + RETRY_MODES2["ADAPTIVE"] = "adaptive"; + return RETRY_MODES2; + })(RETRY_MODES || {}); + var DEFAULT_MAX_ATTEMPTS = 3; + var DEFAULT_RETRY_MODE3 = "standard"; + var import_service_error_classification = require_dist_cjs45(); + var DefaultRateLimiter = class _DefaultRateLimiter { + constructor(options) { + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + static { + __name(this, "DefaultRateLimiter"); + } + static { + this.setTimeoutFn = setTimeout; + } + getCurrentTimeInSeconds() { + return Date.now() / 1e3; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay4 = (amount - this.currentCapacity) / this.fillRate * 1e3; + await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay4)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, import_service_error_classification.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise( + this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate + ); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t4 = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t4 * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } + }; + var DEFAULT_RETRY_DELAY_BASE = 100; + var MAXIMUM_RETRY_DELAY = 20 * 1e3; + var THROTTLING_RETRY_DELAY_BASE = 500; + var INITIAL_RETRY_TOKENS = 500; + var RETRY_COST = 5; + var TIMEOUT_RETRY_COST = 10; + var NO_RETRY_INCREMENT = 1; + var INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; + var REQUEST_HEADER = "amz-sdk-request"; + var getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }, "computeNextBackoffDelay"); + const setDelayBase = /* @__PURE__ */ __name((delay4) => { + delayBase = delay4; + }, "setDelayBase"); + return { + computeNextBackoffDelay, + setDelayBase + }; + }, "getDefaultRetryBackoffStrategy"); + var createDefaultRetryToken = /* @__PURE__ */ __name(({ + retryDelay, + retryCount, + retryCost + }) => { + const getRetryCount = /* @__PURE__ */ __name(() => retryCount, "getRetryCount"); + const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay"); + const getRetryCost = /* @__PURE__ */ __name(() => retryCost, "getRetryCost"); + return { + getRetryCount, + getRetryDelay, + getRetryCost + }; + }, "createDefaultRetryToken"); + var StandardRetryStrategy = class { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = "standard"; + this.capacity = INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + static { + __name(this, "StandardRetryStrategy"); + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0 + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase( + errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE + ); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + /** + * @returns the current available retry capacity. + * + * This number decreases when retries are executed and refills when requests or retries succeed. + */ + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } + }; + var AdaptiveRetryStrategy = class { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = "adaptive"; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); + } + static { + __name(this, "AdaptiveRetryStrategy"); + } + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } + }; + var ConfiguredRetryStrategy = class extends StandardRetryStrategy { + static { + __name(this, "ConfiguredRetryStrategy"); + } + /** + * @param maxAttempts - the maximum number of retry attempts allowed. + * e.g., if set to 3, then 4 total requests are possible. + * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt + * and returns the delay. + * + * @example exponential backoff. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2) + * }); + * ``` + * @example constant delay. + * ```js + * new Client({ + * retryStrategy: new ConfiguredRetryStrategy(3, 2000) + * }); + * ``` + */ + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } + }; + } +}); + +// node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +var require_isStreamingPayload = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isStreamingPayload = void 0; + var stream_1 = require("stream"); + var isStreamingPayload = (request3) => (request3 === null || request3 === void 0 ? void 0 : request3.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request3 === null || request3 === void 0 ? void 0 : request3.body) instanceof ReadableStream; + exports2.isStreamingPayload = isStreamingPayload; + } +}); + +// node_modules/@smithy/middleware-retry/dist-cjs/index.js +var require_dist_cjs47 = __commonJS({ + "node_modules/@smithy/middleware-retry/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS3, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS3, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin3, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig3, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions + }); + module2.exports = __toCommonJS2(src_exports); + var import_protocol_http15 = require_dist_cjs2(); + var import_uuid = (init_esm_node2(), __toCommonJS(esm_node_exports2)); + var import_util_retry3 = require_dist_cjs46(); + var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry3.NO_RETRY_INCREMENT; + const retryCost = options?.retryCost ?? import_util_retry3.RETRY_COST; + const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry3.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); + }, "getDefaultRetryQuota"); + var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry3.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + var import_service_error_classification = require_dist_cjs45(); + var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); + }, "defaultRetryDecider"); + var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); + }, "asSdkError"); + var StandardRetryStrategy = class { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry3.RETRY_MODES.STANDARD; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(import_util_retry3.INITIAL_RETRY_TOKENS); + } + static { + __name(this, "StandardRetryStrategy"); + } + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry3.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; + } + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + request3.headers[import_util_retry3.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + request3.headers[import_util_retry3.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e5) { + const err = asSdkError(e5); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry3.THROTTLING_RETRY_DELAY_BASE : import_util_retry3.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay4 = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay4; + await new Promise((resolve) => setTimeout(resolve, delay4)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } + } + }; + var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http15.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); + }, "getDelayFromRetryAfterHeader"); + var AdaptiveRetryStrategy = class extends StandardRetryStrategy { + static { + __name(this, "AdaptiveRetryStrategy"); + } + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry3.DefaultRateLimiter(); + this.mode = import_util_retry3.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); + } + }; + var import_util_middleware7 = require_dist_cjs7(); + var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; + var CONFIG_MAX_ATTEMPTS = "max_attempts"; + var NODE_MAX_ATTEMPT_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => { + const value = env2[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: import_util_retry3.DEFAULT_MAX_ATTEMPTS + }; + var resolveRetryConfig3 = /* @__PURE__ */ __name((input) => { + const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; + const maxAttempts = (0, import_util_middleware7.normalizeProvider)(_maxAttempts ?? import_util_retry3.DEFAULT_MAX_ATTEMPTS); + return Object.assign(input, { + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware7.normalizeProvider)(_retryMode)(); + if (retryMode === import_util_retry3.RETRY_MODES.ADAPTIVE) { + return new import_util_retry3.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry3.StandardRetryStrategy(maxAttempts); + } + }); + }, "resolveRetryConfig"); + var ENV_RETRY_MODE = "AWS_RETRY_MODE"; + var CONFIG_RETRY_MODE = "retry_mode"; + var NODE_RETRY_MODE_CONFIG_OPTIONS3 = { + environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry3.DEFAULT_RETRY_MODE + }; + var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request: request3 } = args; + if (import_protocol_http15.HttpRequest.isInstance(request3)) { + delete request3.headers[import_util_retry3.INVOCATION_ID_HEADER]; + delete request3.headers[import_util_retry3.REQUEST_HEADER]; + } + return next(args); + }, "omitRetryHeadersMiddleware"); + var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true + }; + var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + } + }), "getOmitRetryHeadersPlugin"); + var import_smithy_client28 = require_dist_cjs27(); + var import_isStreamingPayload = require_isStreamingPayload(); + var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context2) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context2["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request: request3 } = args; + const isRequest2 = import_protocol_http15.HttpRequest.isInstance(request3); + if (isRequest2) { + request3.headers[import_util_retry3.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest2) { + request3.headers[import_util_retry3.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e5) { + const retryErrorInfo = getRetryErrorInfo(e5); + lastError = asSdkError(e5); + if (isRequest2 && (0, import_isStreamingPayload.isStreamingPayload)(request3)) { + (context2.logger instanceof import_smithy_client28.NoOpLogger ? console : context2.logger)?.warn( + "An error was encountered in a non-retryable streaming request." + ); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay4 = retryToken.getRetryDelay(); + totalRetryDelay += delay4; + await new Promise((resolve) => setTimeout(resolve, delay4)); + } + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context2.userAgent = [...context2.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } + }, "retryMiddleware"); + var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); + var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; + }, "getRetryErrorInfo"); + var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; + }, "getRetryErrorType"); + var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true + }; + var getRetryPlugin3 = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + } + }), "getRetryPlugin"); + var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http15.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; + }, "getRetryAfterHint"); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultBedrockRuntimeHttpAuthSchemeProvider = exports2.defaultBedrockRuntimeHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var util_middleware_1 = require_dist_cjs7(); + var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config6, context2, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context2).operation, + region: await (0, util_middleware_1.normalizeProvider)(config6.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultBedrockRuntimeHttpAuthSchemeParametersProvider = defaultBedrockRuntimeHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption3(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "bedrock", + region: authParameters.region + }, + propertiesExtractor: (config6, context2) => ({ + signingProperties: { + config: config6, + context: context2 + } + }) + }; + } + function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#httpBearerAuth", + propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context2) => ({ + identityProperties: { + profile, + filepath, + configFilepath, + ignoreCache + } + }) + }; + } + var defaultBedrockRuntimeHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption3(authParameters)); + options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters)); + } + } + return options; + }; + exports2.defaultBedrockRuntimeHttpAuthSchemeProvider = defaultBedrockRuntimeHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig3 = (config6) => { + const token = (0, core_2.memoizeIdentityProvider)(config6.token, core_2.isIdentityExpired, core_2.doesIdentityRequireRefresh); + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config6); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config6.authSchemePreference ?? []), + token + }); + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/package.json +var require_package2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-bedrock-runtime", + description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native", + version: "3.844.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo bedrock-runtime" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/credential-provider-node": "3.844.0", + "@aws-sdk/eventstream-handler-node": "3.840.0", + "@aws-sdk/middleware-eventstream": "3.840.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/middleware-websocket": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/token-providers": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/eventstream-serde-browser": "^4.0.4", + "@smithy/eventstream-serde-config-resolver": "^4.1.2", + "@smithy/eventstream-serde-node": "^4.0.4", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-stream": "^4.2.3", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + tslib: "^2.6.2", + uuid: "^9.0.1" + }, + devDependencies: { + "@tsconfig/node18": "18.2.4", + "@types/node": "^18.19.69", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + engines: { + node: ">=18.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-bedrock-runtime" + } + }; + } +}); + +// node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +var require_dist_cjs48 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv + }); + module2.exports = __toCommonJS2(index_exports); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_property_provider2 = require_dist_cjs23(); + var ENV_KEY = "AWS_ACCESS_KEY_ID"; + var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; + var ENV_SESSION = "AWS_SESSION_TOKEN"; + var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; + var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; + var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; + var fromEnv = /* @__PURE__ */ __name((init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new import_property_provider2.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); + }, "fromEnv"); + } +}); + +// node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +var require_dist_cjs49 = __commonJS({ + "node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit + }); + module2.exports = __toCommonJS2(src_exports); + var import_url2 = require("url"); + var import_property_provider2 = require_dist_cjs23(); + var import_buffer = require("buffer"); + var import_http3 = require("http"); + function httpRequest(options) { + return new Promise((resolve, reject) => { + const req = (0, import_http3.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider2.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider2.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider2.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); + } + __name(httpRequest, "httpRequest"); + var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); + var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), + ...creds.AccountId && { accountId: creds.AccountId } + }), "fromImdsCredentials"); + var DEFAULT_TIMEOUT = 1e3; + var DEFAULT_MAX_RETRIES = 0; + var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT + }) => ({ maxRetries, timeout }), "providerConfigFromInit"); + var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i5 = 0; i5 < maxRetries; i5++) { + promise = promise.catch(toRetry); + } + return promise; + }, "retry"); + var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri({ logger: init.logger }); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credsResponse); + }, maxRetries); + }, "fromContainerMetadata"); + var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); + }, "requestFromEcsImds"); + var CMDS_IP = "169.254.170.2"; + var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true + }; + var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true + }; + var getCmdsUri = /* @__PURE__ */ __name(async ({ logger: logger5 }) => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; + } + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url2.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, { + tryNextLink: false, + logger: logger5 + }); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider2.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, { + tryNextLink: false, + logger: logger5 + }); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; + } + throw new import_property_provider2.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + { + tryNextLink: false, + logger: logger5 + } + ); + }, "getCmdsUri"); + var InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider2.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); + } + static { + __name(this, "InstanceMetadataV1FallbackError"); + } + }; + var import_node_config_provider3 = require_dist_cjs43(); + var import_url_parser3 = require_dist_cjs21(); + var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; + })(Endpoint || {}); + var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; + var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; + var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 + }; + var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; + })(EndpointMode || {}); + var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; + var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; + var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" + /* IPv4 */ + }; + var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser3.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); + var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider3.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); + var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider3.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4": + return "http://169.254.169.254"; + case "IPv6": + return "http://[fd00:ec2::254]"; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); + } + }, "getFromEndpointModeConfig"); + var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; + var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; + var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; + var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger5) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger5.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration + }; + }, "getExtendedInstanceMetadataCredentials"); + var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger5 = options?.logger || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger5); + } + } catch (e5) { + if (pastCredentials) { + logger5.warn("Credential renew failed: ", e5); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger5); + } else { + throw e5; + } + } + pastCredentials = credentials; + return credentials; + }; + }, "staticStabilityProvider"); + var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; + var IMDS_TOKEN_PATH = "/latest/api/token"; + var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; + var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; + var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; + var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), "fromInstanceMetadata"); + var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { + let disableFetchToken = false; + const { logger: logger5, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider3.loadConfig)( + { + environmentVariableSelector: (env2) => { + const envValue = env2[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider2.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, + { logger: init.logger } + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile + } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } + } + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options, init); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger5?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if (error?.statusCode === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger5?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); + } + }; + }, "getInstanceMetadataProvider"); + var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } + }), "getMetadataToken"); + var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); + var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => { + const credentialsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credentialsResponse)) { + throw new import_property_provider2.CredentialsProviderError("Invalid response received from instance metadata service.", { + logger: init.logger + }); + } + return fromImdsCredentials(credentialsResponse); + }, "getCredentialsFromProfile"); + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +var require_checkUrl = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkUrl = void 0; + var property_provider_1 = require_dist_cjs23(); + var ECS_CONTAINER_HOST = "169.254.170.2"; + var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; + var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; + var checkUrl = (url2, logger5) => { + if (url2.protocol === "https:") { + return; + } + if (url2.hostname === ECS_CONTAINER_HOST || url2.hostname === EKS_CONTAINER_HOST_IPv4 || url2.hostname === EKS_CONTAINER_HOST_IPv6) { + return; + } + if (url2.hostname.includes("[")) { + if (url2.hostname === "[::1]" || url2.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } + } else { + if (url2.hostname === "localhost") { + return; + } + const ipComponents = url2.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) { + return; + } + } + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger5 }); + }; + exports2.checkUrl = checkUrl; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +var require_requestHelpers = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createGetRequest = createGetRequest; + exports2.getCredentials = getCredentials; + var property_provider_1 = require_dist_cjs23(); + var protocol_http_1 = require_dist_cjs2(); + var smithy_client_1 = require_dist_cjs27(); + var util_stream_1 = require_dist_cjs18(); + function createGetRequest(url2) { + return new protocol_http_1.HttpRequest({ + protocol: url2.protocol, + hostname: url2.hostname, + port: Number(url2.port), + path: url2.pathname, + query: Array.from(url2.searchParams.entries()).reduce((acc, [k6, v7]) => { + acc[k6] = v7; + return acc; + }, {}), + fragment: url2.hash + }); + } + async function getCredentials(response, logger5) { + const stream4 = (0, util_stream_1.sdkStreamMixin)(response.body); + const str2 = await stream4.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str2); + if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger5 }); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration) + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str2); + } catch (e5) { + } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger5 }), { + Code: parsedBody.Code, + Message: parsedBody.Message + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger5 }); + } + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +var require_retry_wrapper = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWrapper = void 0; + var retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i5 = 0; i5 < maxRetries; ++i5) { + try { + return await toRetry(); + } catch (e5) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); + }; + }; + exports2.retryWrapper = retryWrapper; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +var require_fromHttp = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var client_1 = (init_client(), __toCommonJS(client_exports)); + var node_http_handler_1 = require_dist_cjs15(); + var property_provider_1 = require_dist_cjs23(); + var promises_1 = tslib_1.__importDefault(require("fs/promises")); + var checkUrl_1 = require_checkUrl(); + var requestHelpers_1 = require_requestHelpers(); + var retry_wrapper_1 = require_retry_wrapper(); + var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; + var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; + var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; + var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; + var fromHttp = (options = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp"); + let host; + const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + if (relative && full) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger }); + } + const url2 = new URL(host); + (0, checkUrl_1.checkUrl)(url2, options.logger); + const requestHandler = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: options.timeout ?? 1e3, + connectionTimeout: options.timeout ?? 1e3 + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request3 = (0, requestHelpers_1.createGetRequest)(url2); + if (token) { + request3.headers.Authorization = token; + } else if (tokenFile) { + request3.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request3); + return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z")); + } catch (e5) { + throw new property_provider_1.CredentialsProviderError(String(e5), { logger: options.logger }); + } + }, options.maxRetries ?? 3, options.timeout ?? 1e3); + }; + exports2.fromHttp = fromHttp; + } +}); + +// node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +var require_dist_cjs50 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromHttp = void 0; + var fromHttp_1 = require_fromHttp(); + Object.defineProperty(exports2, "fromHttp", { enumerable: true, get: function() { + return fromHttp_1.fromHttp; + } }); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js +var require_httpAuthSchemeProvider2 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_middleware_1 = require_dist_cjs7(); + var defaultSSOHttpAuthSchemeParametersProvider = async (config6, context2, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context2).operation, + region: await (0, util_middleware_1.normalizeProvider)(config6.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + exports2.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; + function createAwsAuthSigv4HttpAuthOption3(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region + }, + propertiesExtractor: (config6, context2) => ({ + signingProperties: { + config: config6, + context: context2 + } + }) + }; + } + function createSmithyApiNoAuthHttpAuthOption3(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; + } + var defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption3(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption3(authParameters)); + } + } + return options; + }; + exports2.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; + var resolveHttpAuthSchemeConfig3 = (config6) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config6); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config6.authSchemePreference ?? []) + }); + }; + exports2.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig3; + } +}); + +// node_modules/@aws-sdk/client-sso/package.json +var require_package3 = __commonJS({ + "node_modules/@aws-sdk/client-sso/package.json"(exports2, module2) { + module2.exports = { + name: "@aws-sdk/client-sso", + description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", + version: "3.844.0", + scripts: { + build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline client-sso", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo sso" + }, + main: "./dist-cjs/index.js", + types: "./dist-types/index.d.ts", + module: "./dist-es/index.js", + sideEffects: false, + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + "@tsconfig/node18": "18.2.4", + "@types/node": "^18.19.69", + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + engines: { + node: ">=18.0.0" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "dist-*/**" + ], + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + browser: { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "clients/client-sso" + } + }; + } +}); + +// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +var require_dist_cjs51 = __commonJS({ + "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS3, + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + createDefaultUserAgentProvider: () => createDefaultUserAgentProvider3, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent + }); + module2.exports = __toCommonJS2(index_exports); + var import_os2 = require("os"); + var import_process = require("process"); + var crtAvailability = { + isCrtAvailable: false + }; + var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; + }, "isCrtAvailable"); + var createDefaultUserAgentProvider3 = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + return async (config6) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.1"], + // os-metadata + [`os/${(0, import_os2.platform)()}`, (0, import_os2.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); + } + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); + } + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); + } + const appId = await config6?.userAgentAppId?.(); + const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + return resolvedUserAgent; + }; + }, "createDefaultUserAgentProvider"); + var defaultUserAgent = createDefaultUserAgentProvider3; + var import_middleware_user_agent3 = require_dist_cjs29(); + var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; + var UA_APP_ID_INI_NAME = "sdk_ua_app_id"; + var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id"; + var NODE_APP_ID_CONFIG_OPTIONS3 = { + environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"), + default: import_middleware_user_agent3.DEFAULT_UA_APP_ID + }; + } +}); + +// node_modules/@smithy/hash-node/dist-cjs/index.js +var require_dist_cjs52 = __commonJS({ + "node_modules/@smithy/hash-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + Hash: () => Hash3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_util_buffer_from = require_dist_cjs10(); + var import_util_utf86 = require_dist_cjs11(); + var import_buffer = require("buffer"); + var import_crypto16 = require("crypto"); + var Hash3 = class { + static { + __name(this, "Hash"); + } + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update((0, import_util_utf86.toUint8Array)(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret ? (0, import_crypto16.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto16.createHash)(this.algorithmIdentifier); + } + }; + function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); + } + __name(castSourceData, "castSourceData"); + } +}); + +// node_modules/@smithy/util-body-length-node/dist-cjs/index.js +var require_dist_cjs53 = __commonJS({ + "node_modules/@smithy/util-body-length-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + calculateBodyLength: () => calculateBodyLength7 + }); + module2.exports = __toCommonJS2(src_exports); + var import_fs4 = require("fs"); + var calculateBodyLength7 = /* @__PURE__ */ __name((body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.byteLength(body); + } else if (typeof body.byteLength === "number") { + return body.byteLength; + } else if (typeof body.size === "number") { + return body.size; + } else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, import_fs4.lstatSync)(body.path).size; + } else if (typeof body.fd === "number") { + return (0, import_fs4.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); + }, "calculateBodyLength"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js +var require_ruleset = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var u5 = "required"; + var v7 = "fn"; + var w6 = "argv"; + var x4 = "ref"; + var a5 = true; + var b5 = "isSet"; + var c4 = "booleanEquals"; + var d7 = "error"; + var e5 = "endpoint"; + var f6 = "tree"; + var g4 = "PartitionResult"; + var h5 = "getAttr"; + var i5 = { [u5]: false, "type": "String" }; + var j6 = { [u5]: true, "default": false, "type": "Boolean" }; + var k6 = { [x4]: "Endpoint" }; + var l5 = { [v7]: c4, [w6]: [{ [x4]: "UseFIPS" }, true] }; + var m6 = { [v7]: c4, [w6]: [{ [x4]: "UseDualStack" }, true] }; + var n4 = {}; + var o5 = { [v7]: h5, [w6]: [{ [x4]: g4 }, "supportsFIPS"] }; + var p5 = { [x4]: g4 }; + var q5 = { [v7]: c4, [w6]: [true, { [v7]: h5, [w6]: [p5, "supportsDualStack"] }] }; + var r5 = [l5]; + var s4 = [m6]; + var t4 = [{ [x4]: "Region" }]; + var _data3 = { version: "1.0", parameters: { Region: i5, UseDualStack: j6, UseFIPS: j6, Endpoint: i5 }, rules: [{ conditions: [{ [v7]: b5, [w6]: [k6] }], rules: [{ conditions: r5, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d7 }, { conditions: s4, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d7 }, { endpoint: { url: k6, properties: n4, headers: n4 }, type: e5 }], type: f6 }, { conditions: [{ [v7]: b5, [w6]: t4 }], rules: [{ conditions: [{ [v7]: "aws.partition", [w6]: t4, assign: g4 }], rules: [{ conditions: [l5, m6], rules: [{ conditions: [{ [v7]: c4, [w6]: [a5, o5] }, q5], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d7 }], type: f6 }, { conditions: r5, rules: [{ conditions: [{ [v7]: c4, [w6]: [o5, a5] }], rules: [{ conditions: [{ [v7]: "stringEquals", [w6]: [{ [v7]: h5, [w6]: [p5, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n4, headers: n4 }, type: e5 }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d7 }], type: f6 }, { conditions: s4, rules: [{ conditions: [q5], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d7 }], type: f6 }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n4, headers: n4 }, type: e5 }], type: f6 }], type: f6 }, { error: "Invalid Configuration: Missing Region", type: d7 }] }; + exports2.ruleSet = _data3; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs22(); + var util_endpoints_2 = require_dist_cjs19(); + var ruleset_1 = require_ruleset(); + var cache3 = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver3 = (endpointParams, context2 = {}) => { + return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context2.logger + })); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver3; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs27(); + var url_parser_1 = require_dist_cjs21(); + var util_base64_1 = require_dist_cjs12(); + var util_utf8_1 = require_dist_cjs11(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2(); + var endpointResolver_1 = require_endpointResolver(); + var getRuntimeConfig5 = (config6) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config6?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config6?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config6?.disableHostPrefix ?? false, + endpointProvider: config6?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config6?.extensions ?? [], + httpAuthSchemeProvider: config6?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner() + } + ], + logger: config6?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config6?.serviceId ?? "SSO", + urlParser: config6?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config6?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config6?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +var require_dist_cjs54 = __commonJS({ + "node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js"(exports2, module2) { + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + resolveDefaultsModeConfig: () => resolveDefaultsModeConfig3 + }); + module2.exports = __toCommonJS2(src_exports); + var import_config_resolver5 = require_dist_cjs39(); + var import_node_config_provider3 = require_dist_cjs43(); + var import_property_provider2 = require_dist_cjs23(); + var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; + var AWS_REGION_ENV = "AWS_REGION"; + var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; + var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; + var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; + var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env2) => { + return env2[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy" + }; + var resolveDefaultsModeConfig3 = /* @__PURE__ */ __name(({ + region = (0, import_node_config_provider3.loadConfig)(import_config_resolver5.NODE_REGION_CONFIG_OPTIONS), + defaultsMode = (0, import_node_config_provider3.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) + } = {}) => (0, import_property_provider2.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case void 0: + return Promise.resolve("legacy"); + default: + throw new Error( + `Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}` + ); + } + }), "resolveDefaultsModeConfig"); + var resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } else { + return "cross-region"; + } + } + return "standard"; + }, "resolveNodeDefaultsModeAuto"); + var inferPhysicalRegion = /* @__PURE__ */ __name(async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } catch (e5) { + } + } + }, "inferPhysicalRegion"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js +var require_runtimeConfig = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package3()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var util_user_agent_node_1 = require_dist_cjs51(); + var config_resolver_1 = require_dist_cjs39(); + var hash_node_1 = require_dist_cjs52(); + var middleware_retry_1 = require_dist_cjs47(); + var node_config_provider_1 = require_dist_cjs43(); + var node_http_handler_1 = require_dist_cjs15(); + var util_body_length_node_1 = require_dist_cjs53(); + var util_retry_1 = require_dist_cjs46(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared(); + var smithy_client_1 = require_dist_cjs27(); + var util_defaults_mode_node_1 = require_dist_cjs54(); + var smithy_client_2 = require_dist_cjs27(); + var getRuntimeConfig5 = (config6) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config6); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config6); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config6?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config6, + runtime: "node", + defaultsMode, + authSchemePreference: config6?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config6?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config6?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config6?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config6), + region: config6?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config6?.requestHandler ?? defaultConfigProvider), + retryMode: config6?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }, config6), + sha256: config6?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config6?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config6?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config6?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config6?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +var require_dist_cjs55 = __commonJS({ + "node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS3, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS3, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration3, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration3, + resolveRegionConfig: () => resolveRegionConfig3 + }); + module2.exports = __toCommonJS2(index_exports); + var getAwsRegionExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + return { + setRegion(region) { + runtimeConfig.region = region; + }, + region() { + return runtimeConfig.region; + } + }; + }, "getAwsRegionExtensionConfiguration"); + var resolveAwsRegionExtensionConfiguration3 = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; + }, "resolveAwsRegionExtensionConfiguration"); + var REGION_ENV_NAME = "AWS_REGION"; + var REGION_INI_NAME = "region"; + var NODE_REGION_CONFIG_OPTIONS3 = { + environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[REGION_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), + default: /* @__PURE__ */ __name(() => { + throw new Error("Region is missing"); + }, "default") + }; + var NODE_REGION_CONFIG_FILE_OPTIONS3 = { + preferredFile: "credentials" + }; + var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); + var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); + var resolveRegionConfig3 = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return Object.assign(input, { + region: /* @__PURE__ */ __name(async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, "region"), + useFipsEndpoint: /* @__PURE__ */ __name(async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, "useFipsEndpoint") + }); + }, "resolveRegionConfig"); + } +}); + +// node_modules/@aws-sdk/client-sso/dist-cjs/index.js +var require_dist_cjs56 = __commonJS({ + "node_modules/@aws-sdk/client-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + GetRoleCredentialsCommand: () => GetRoleCredentialsCommand, + GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog, + GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog, + InvalidRequestException: () => InvalidRequestException2, + ListAccountRolesCommand: () => ListAccountRolesCommand, + ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog, + ListAccountsCommand: () => ListAccountsCommand, + ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog, + LogoutCommand: () => LogoutCommand, + LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog, + SSO: () => SSO, + SSOClient: () => SSOClient, + SSOServiceException: () => SSOServiceException, + TooManyRequestsException: () => TooManyRequestsException, + UnauthorizedException: () => UnauthorizedException, + __Client: () => import_smithy_client28.Client, + paginateListAccountRoles: () => paginateListAccountRoles, + paginateListAccounts: () => paginateListAccounts + }); + module2.exports = __toCommonJS2(index_exports); + var import_middleware_host_header3 = require_dist_cjs4(); + var import_middleware_logger3 = require_dist_cjs5(); + var import_middleware_recursion_detection3 = require_dist_cjs6(); + var import_middleware_user_agent3 = require_dist_cjs29(); + var import_config_resolver5 = require_dist_cjs39(); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_middleware_content_length3 = require_dist_cjs41(); + var import_middleware_endpoint6 = require_dist_cjs44(); + var import_middleware_retry5 = require_dist_cjs47(); + var import_httpAuthSchemeProvider5 = require_httpAuthSchemeProvider2(); + var resolveClientEndpointParameters3 = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal" + }); + }, "resolveClientEndpointParameters"); + var commonParams3 = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig5 = require_runtimeConfig(); + var import_region_config_resolver3 = require_dist_cjs55(); + var import_protocol_http15 = require_dist_cjs2(); + var import_smithy_client28 = require_dist_cjs27(); + var getHttpAuthExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig3 = /* @__PURE__ */ __name((config6) => { + return { + httpAuthSchemes: config6.httpAuthSchemes(), + httpAuthSchemeProvider: config6.httpAuthSchemeProvider(), + credentials: config6.credentials() + }; + }, "resolveHttpAuthRuntimeConfig"); + var resolveRuntimeExtensions3 = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign( + (0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), + (0, import_smithy_client28.getDefaultExtensionConfiguration)(runtimeConfig), + (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), + getHttpAuthExtensionConfiguration3(runtimeConfig) + ); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign( + runtimeConfig, + (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + (0, import_smithy_client28.resolveDefaultRuntimeConfig)(extensionConfiguration), + (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + resolveHttpAuthRuntimeConfig3(extensionConfiguration) + ); + }, "resolveRuntimeExtensions"); + var SSOClient = class extends import_smithy_client28.Client { + static { + __name(this, "SSOClient"); + } + /** + * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}. + */ + config; + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig5.getRuntimeConfig)(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters3(_config_0); + const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry5.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver5.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint6.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider5.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry5.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core39.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider5.defaultSSOHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: /* @__PURE__ */ __name(async (config6) => new import_core39.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config6.credentials + }), "identityProviderConfigProvider") + }) + ); + this.middlewareStack.use((0, import_core39.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + }; + var import_middleware_serde5 = require_dist_cjs8(); + var SSOServiceException = class _SSOServiceException extends import_smithy_client28.ServiceException { + static { + __name(this, "SSOServiceException"); + } + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOServiceException.prototype); + } + }; + var InvalidRequestException2 = class _InvalidRequestException extends SSOServiceException { + static { + __name(this, "InvalidRequestException"); + } + name = "InvalidRequestException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + } + }; + var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException { + static { + __name(this, "ResourceNotFoundException"); + } + name = "ResourceNotFoundException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + } + }; + var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException { + static { + __name(this, "TooManyRequestsException"); + } + name = "TooManyRequestsException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "TooManyRequestsException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _TooManyRequestsException.prototype); + } + }; + var UnauthorizedException = class _UnauthorizedException extends SSOServiceException { + static { + __name(this, "UnauthorizedException"); + } + name = "UnauthorizedException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "UnauthorizedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnauthorizedException.prototype); + } + }; + var GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "GetRoleCredentialsRequestFilterSensitiveLog"); + var RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.secretAccessKey && { secretAccessKey: import_smithy_client28.SENSITIVE_STRING }, + ...obj.sessionToken && { sessionToken: import_smithy_client28.SENSITIVE_STRING } + }), "RoleCredentialsFilterSensitiveLog"); + var GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) } + }), "GetRoleCredentialsResponseFilterSensitiveLog"); + var ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "ListAccountRolesRequestFilterSensitiveLog"); + var ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "ListAccountsRequestFilterSensitiveLog"); + var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client28.SENSITIVE_STRING } + }), "LogoutRequestFilterSensitiveLog"); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b5.bp("/federation/credentials"); + const query = (0, import_smithy_client28.map)({ + [_rn]: [, (0, import_smithy_client28.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, import_smithy_client28.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b5.m("GET").h(headers).q(query).b(body); + return b5.build(); + }, "se_GetRoleCredentialsCommand"); + var se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b5.bp("/assignment/roles"); + const query = (0, import_smithy_client28.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, import_smithy_client28.expectNonNull)(input[_aI], `accountId`)] + }); + let body; + b5.m("GET").h(headers).q(query).b(body); + return b5.build(); + }, "se_ListAccountRolesCommand"); + var se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b5.bp("/assignment/accounts"); + const query = (0, import_smithy_client28.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()] + }); + let body; + b5.m("GET").h(headers).q(query).b(body); + return b5.build(); + }, "se_ListAccountsCommand"); + var se_LogoutCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_xasbt]: input[_aT] + }); + b5.bp("/logout"); + let body; + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_LogoutCommand"); + var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + roleCredentials: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_GetRoleCredentialsCommand"); + var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + nextToken: import_smithy_client28.expectString, + roleList: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountRolesCommand"); + var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + accountList: import_smithy_client28._json, + nextToken: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAccountsCommand"); + var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + await (0, import_smithy_client28.collectBody)(output.body, context2); + return contents; + }, "de_LogoutCommand"); + var de_CommandError3 = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonErrorBody)(output.body, context2) + }; + const errorCode = (0, import_core210.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "InvalidRequestException": + case "com.amazonaws.sso#InvalidRequestException": + throw await de_InvalidRequestExceptionRes2(parsedOutput, context2); + case "ResourceNotFoundException": + case "com.amazonaws.sso#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context2); + case "TooManyRequestsException": + case "com.amazonaws.sso#TooManyRequestsException": + throw await de_TooManyRequestsExceptionRes(parsedOutput, context2); + case "UnauthorizedException": + case "com.amazonaws.sso#UnauthorizedException": + throw await de_UnauthorizedExceptionRes(parsedOutput, context2); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError3({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError3 = (0, import_smithy_client28.withBaseException)(SSOServiceException); + var de_InvalidRequestExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_InvalidRequestExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new TooManyRequestsException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_TooManyRequestsExceptionRes"); + var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_UnauthorizedExceptionRes"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var _aI = "accountId"; + var _aT = "accessToken"; + var _ai = "account_id"; + var _mR = "maxResults"; + var _mr = "max_result"; + var _nT = "nextToken"; + var _nt = "next_token"; + var _rN = "roleName"; + var _rn = "role_name"; + var _xasbt = "x-amz-sso_bearer_token"; + var GetRoleCredentialsCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() { + static { + __name(this, "GetRoleCredentialsCommand"); + } + }; + var ListAccountRolesCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() { + static { + __name(this, "ListAccountRolesCommand"); + } + }; + var ListAccountsCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() { + static { + __name(this, "ListAccountsCommand"); + } + }; + var LogoutCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() { + static { + __name(this, "LogoutCommand"); + } + }; + var commands3 = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand + }; + var SSO = class extends SSOClient { + static { + __name(this, "SSO"); + } + }; + (0, import_smithy_client28.createAggregatedClient)(commands3, SSO); + var paginateListAccountRoles = (0, import_core39.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + var paginateListAccounts = (0, import_core39.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region + }, + propertiesExtractor: (config6, context2) => ({ + signingProperties: { + config: config6, + context: context2 + } + }) + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; +} +var import_util_middleware5, defaultSSOOIDCHttpAuthSchemeParametersProvider, defaultSSOOIDCHttpAuthSchemeProvider, resolveHttpAuthSchemeConfig; +var init_httpAuthSchemeProvider = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() { + init_dist_es2(); + import_util_middleware5 = __toESM(require_dist_cjs7()); + defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config6, context2, input) => { + return { + operation: (0, import_util_middleware5.getSmithyContext)(context2).operation, + region: await (0, import_util_middleware5.normalizeProvider)(config6.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; + }; + resolveHttpAuthSchemeConfig = (config6) => { + const config_0 = resolveAwsSdkSigV4Config(config6); + return Object.assign(config_0, { + authSchemePreference: (0, import_util_middleware5.normalizeProvider)(config6.authSchemePreference ?? []) + }); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js +var resolveClientEndpointParameters, commonParams; +var init_EndpointParameters = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"() { + resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }); + }; + commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/package.json +var package_default; +var init_package = __esm({ + "node_modules/@aws-sdk/nested-clients/package.json"() { + package_default = { + name: "@aws-sdk/nested-clients", + version: "3.844.0", + description: "Nested clients for AWS SDK packages.", + main: "./dist-cjs/index.js", + module: "./dist-es/index.js", + types: "./dist-types/index.d.ts", + scripts: { + build: "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "node ../../scripts/compilation/inline nested-clients", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + clean: "rimraf ./dist-* && rimraf *.tsbuildinfo", + lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients", + test: "yarn g:vitest run", + "test:watch": "yarn g:vitest watch" + }, + engines: { + node: ">=18.0.0" + }, + author: { + name: "AWS SDK for JavaScript Team", + url: "https://aws.amazon.com/javascript/" + }, + license: "Apache-2.0", + dependencies: { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + tslib: "^2.6.2" + }, + devDependencies: { + concurrently: "7.0.0", + "downlevel-dts": "0.10.1", + rimraf: "3.0.2", + typescript: "~5.8.3" + }, + typesVersions: { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + files: [ + "./sso-oidc.d.ts", + "./sso-oidc.js", + "./sts.d.ts", + "./sts.js", + "dist-*/**" + ], + browser: { + "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser", + "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser" + }, + "react-native": {}, + homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients", + repository: { + type: "git", + url: "https://github.com/aws/aws-sdk-js-v3.git", + directory: "packages/nested-clients" + }, + exports: { + "./sso-oidc": { + types: "./dist-types/submodules/sso-oidc/index.d.ts", + module: "./dist-es/submodules/sso-oidc/index.js", + node: "./dist-cjs/submodules/sso-oidc/index.js", + import: "./dist-es/submodules/sso-oidc/index.js", + require: "./dist-cjs/submodules/sso-oidc/index.js" + }, + "./sts": { + types: "./dist-types/submodules/sts/index.d.ts", + module: "./dist-es/submodules/sts/index.js", + node: "./dist-cjs/submodules/sts/index.js", + import: "./dist-es/submodules/sts/index.js", + require: "./dist-cjs/submodules/sts/index.js" + } + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js +var u3, v2, w4, x2, a3, b3, c2, d5, e3, f4, g2, h3, i3, j4, k4, l3, m4, n2, o3, p3, q3, r3, s2, t2, _data, ruleSet; +var init_ruleset = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js"() { + u3 = "required"; + v2 = "fn"; + w4 = "argv"; + x2 = "ref"; + a3 = true; + b3 = "isSet"; + c2 = "booleanEquals"; + d5 = "error"; + e3 = "endpoint"; + f4 = "tree"; + g2 = "PartitionResult"; + h3 = "getAttr"; + i3 = { [u3]: false, "type": "String" }; + j4 = { [u3]: true, "default": false, "type": "Boolean" }; + k4 = { [x2]: "Endpoint" }; + l3 = { [v2]: c2, [w4]: [{ [x2]: "UseFIPS" }, true] }; + m4 = { [v2]: c2, [w4]: [{ [x2]: "UseDualStack" }, true] }; + n2 = {}; + o3 = { [v2]: h3, [w4]: [{ [x2]: g2 }, "supportsFIPS"] }; + p3 = { [x2]: g2 }; + q3 = { [v2]: c2, [w4]: [true, { [v2]: h3, [w4]: [p3, "supportsDualStack"] }] }; + r3 = [l3]; + s2 = [m4]; + t2 = [{ [x2]: "Region" }]; + _data = { version: "1.0", parameters: { Region: i3, UseDualStack: j4, UseFIPS: j4, Endpoint: i3 }, rules: [{ conditions: [{ [v2]: b3, [w4]: [k4] }], rules: [{ conditions: r3, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d5 }, { conditions: s2, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d5 }, { endpoint: { url: k4, properties: n2, headers: n2 }, type: e3 }], type: f4 }, { conditions: [{ [v2]: b3, [w4]: t2 }], rules: [{ conditions: [{ [v2]: "aws.partition", [w4]: t2, assign: g2 }], rules: [{ conditions: [l3, m4], rules: [{ conditions: [{ [v2]: c2, [w4]: [a3, o3] }, q3], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d5 }], type: f4 }, { conditions: r3, rules: [{ conditions: [{ [v2]: c2, [w4]: [o3, a3] }], rules: [{ conditions: [{ [v2]: "stringEquals", [w4]: [{ [v2]: h3, [w4]: [p3, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n2, headers: n2 }, type: e3 }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d5 }], type: f4 }, { conditions: s2, rules: [{ conditions: [q3], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d5 }], type: f4 }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n2, headers: n2 }, type: e3 }], type: f4 }], type: f4 }, { error: "Invalid Configuration: Missing Region", type: d5 }] }; + ruleSet = _data; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +var import_util_endpoints, import_util_endpoints2, cache, defaultEndpointResolver; +var init_endpointResolver = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js"() { + import_util_endpoints = __toESM(require_dist_cjs22()); + import_util_endpoints2 = __toESM(require_dist_cjs19()); + init_ruleset(); + cache = new import_util_endpoints2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + defaultEndpointResolver = (endpointParams, context2 = {}) => { + return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, { + endpointParams, + logger: context2.logger + })); + }; + import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +var import_smithy_client7, import_url_parser, import_util_base646, import_util_utf84, getRuntimeConfig; +var init_runtimeConfig_shared = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client7 = __toESM(require_dist_cjs27()); + import_url_parser = __toESM(require_dist_cjs21()); + import_util_base646 = __toESM(require_dist_cjs12()); + import_util_utf84 = __toESM(require_dist_cjs11()); + init_httpAuthSchemeProvider(); + init_endpointResolver(); + getRuntimeConfig = (config6) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config6?.base64Decoder ?? import_util_base646.fromBase64, + base64Encoder: config6?.base64Encoder ?? import_util_base646.toBase64, + disableHostPrefix: config6?.disableHostPrefix ?? false, + endpointProvider: config6?.endpointProvider ?? defaultEndpointResolver, + extensions: config6?.extensions ?? [], + httpAuthSchemeProvider: config6?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + logger: config6?.logger ?? new import_smithy_client7.NoOpLogger(), + serviceId: config6?.serviceId ?? "SSO OIDC", + urlParser: config6?.urlParser ?? import_url_parser.parseUrl, + utf8Decoder: config6?.utf8Decoder ?? import_util_utf84.fromUtf8, + utf8Encoder: config6?.utf8Encoder ?? import_util_utf84.toUtf8 + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +var import_util_user_agent_node, import_config_resolver, import_hash_node, import_middleware_retry, import_node_config_provider, import_node_http_handler, import_util_body_length_node, import_util_retry, import_smithy_client8, import_util_defaults_mode_node, import_smithy_client9, getRuntimeConfig2; +var init_runtimeConfig = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js"() { + init_package(); + init_dist_es2(); + import_util_user_agent_node = __toESM(require_dist_cjs51()); + import_config_resolver = __toESM(require_dist_cjs39()); + import_hash_node = __toESM(require_dist_cjs52()); + import_middleware_retry = __toESM(require_dist_cjs47()); + import_node_config_provider = __toESM(require_dist_cjs43()); + import_node_http_handler = __toESM(require_dist_cjs15()); + import_util_body_length_node = __toESM(require_dist_cjs53()); + import_util_retry = __toESM(require_dist_cjs46()); + init_runtimeConfig_shared(); + import_smithy_client8 = __toESM(require_dist_cjs27()); + import_util_defaults_mode_node = __toESM(require_dist_cjs54()); + import_smithy_client9 = __toESM(require_dist_cjs27()); + getRuntimeConfig2 = (config6) => { + (0, import_smithy_client9.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node.resolveDefaultsModeConfig)(config6); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client8.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig(config6); + emitWarningIfUnsupportedVersion(process.version); + const loaderConfig = { + profile: config6?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config6, + runtime: "node", + defaultsMode, + authSchemePreference: config6?.authSchemePreference ?? (0, import_node_config_provider.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config6?.bodyLengthChecker ?? import_util_body_length_node.calculateBodyLength, + defaultUserAgentProvider: config6?.defaultUserAgentProvider ?? (0, import_util_user_agent_node.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: config6?.maxAttempts ?? (0, import_node_config_provider.loadConfig)(import_middleware_retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config6), + region: config6?.region ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: import_node_http_handler.NodeHttpHandler.create(config6?.requestHandler ?? defaultConfigProvider), + retryMode: config6?.retryMode ?? (0, import_node_config_provider.loadConfig)({ + ...import_middleware_retry.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry.DEFAULT_RETRY_MODE + }, config6), + sha256: config6?.sha256 ?? import_hash_node.Hash.bind(null, "sha256"), + streamCollector: config6?.streamCollector ?? import_node_http_handler.streamCollector, + useDualstackEndpoint: config6?.useDualstackEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config6?.useFipsEndpoint ?? (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config6?.userAgentAppId ?? (0, import_node_config_provider.loadConfig)(import_util_user_agent_node.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig; +var init_httpAuthExtensionConfiguration = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js"() { + getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + resolveHttpAuthRuntimeConfig = (config6) => { + return { + httpAuthSchemes: config6.httpAuthSchemes(), + httpAuthSchemeProvider: config6.httpAuthSchemeProvider(), + credentials: config6.credentials() + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js +var import_region_config_resolver, import_protocol_http12, import_smithy_client10, resolveRuntimeExtensions; +var init_runtimeExtensions = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js"() { + import_region_config_resolver = __toESM(require_dist_cjs55()); + import_protocol_http12 = __toESM(require_dist_cjs2()); + import_smithy_client10 = __toESM(require_dist_cjs27()); + init_httpAuthExtensionConfiguration(); + resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client10.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http12.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client10.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http12.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js +var import_middleware_host_header, import_middleware_logger, import_middleware_recursion_detection, import_middleware_user_agent, import_config_resolver2, import_middleware_content_length, import_middleware_endpoint, import_middleware_retry2, import_smithy_client11, SSOOIDCClient; +var init_SSOOIDCClient = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js"() { + import_middleware_host_header = __toESM(require_dist_cjs4()); + import_middleware_logger = __toESM(require_dist_cjs5()); + import_middleware_recursion_detection = __toESM(require_dist_cjs6()); + import_middleware_user_agent = __toESM(require_dist_cjs29()); + import_config_resolver2 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_middleware_content_length = __toESM(require_dist_cjs41()); + import_middleware_endpoint = __toESM(require_dist_cjs44()); + import_middleware_retry2 = __toESM(require_dist_cjs47()); + import_smithy_client11 = __toESM(require_dist_cjs27()); + init_httpAuthSchemeProvider(); + init_EndpointParameters(); + init_runtimeConfig(); + init_runtimeExtensions(); + SSOOIDCClient = class extends import_smithy_client11.Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry2.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver2.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry2.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config6) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config6.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +var import_smithy_client12, SSOOIDCServiceException; +var init_SSOOIDCServiceException = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js"() { + import_smithy_client12 = __toESM(require_dist_cjs27()); + SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client12.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js +var import_smithy_client13, AccessDeniedException, AuthorizationPendingException, CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidGrantException, InvalidRequestException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException; +var init_models_0 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js"() { + import_smithy_client13 = __toESM(require_dist_cjs27()); + init_SSOOIDCServiceException(); + AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { + name = "AccessDeniedException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { + name = "AuthorizationPendingException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + CreateTokenRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.clientSecret && { clientSecret: import_smithy_client13.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.codeVerifier && { codeVerifier: import_smithy_client13.SENSITIVE_STRING } + }); + CreateTokenResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.accessToken && { accessToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.refreshToken && { refreshToken: import_smithy_client13.SENSITIVE_STRING }, + ...obj.idToken && { idToken: import_smithy_client13.SENSITIVE_STRING } + }); + ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InternalServerException = class _InternalServerException extends SSOOIDCServiceException { + name = "InternalServerException"; + $fault = "server"; + error; + error_description; + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { + name = "InvalidClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { + name = "InvalidGrantException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { + name = "InvalidRequestException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { + name = "InvalidScopeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + SlowDownException = class _SlowDownException extends SSOOIDCServiceException { + name = "SlowDownException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { + name = "UnauthorizedClientException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { + name = "UnsupportedGrantTypeException"; + $fault = "client"; + error; + error_description; + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js +var import_smithy_client14, se_CreateTokenCommand, de_CreateTokenCommand, de_CommandError, throwDefaultError, de_AccessDeniedExceptionRes, de_AuthorizationPendingExceptionRes, de_ExpiredTokenExceptionRes, de_InternalServerExceptionRes, de_InvalidClientExceptionRes, de_InvalidGrantExceptionRes, de_InvalidRequestExceptionRes, de_InvalidScopeExceptionRes, de_SlowDownExceptionRes, de_UnauthorizedClientExceptionRes, de_UnsupportedGrantTypeExceptionRes, deserializeMetadata; +var init_Aws_restJson1 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client14 = __toESM(require_dist_cjs27()); + init_models_0(); + init_SSOOIDCServiceException(); + se_CreateTokenCommand = async (input, context2) => { + const b5 = requestBuilder(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/token"); + let body; + body = JSON.stringify((0, import_smithy_client14.take)(input, { + clientId: [], + clientSecret: [], + code: [], + codeVerifier: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_4) => (0, import_smithy_client14._json)(_4) + })); + b5.m("POST").h(headers).b(body); + return b5.build(); + }; + de_CreateTokenCommand = async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context2); + } + const contents = (0, import_smithy_client14.map)({ + $metadata: deserializeMetadata(output) + }); + const data = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context2)), "body"); + const doc = (0, import_smithy_client14.take)(data, { + accessToken: import_smithy_client14.expectString, + expiresIn: import_smithy_client14.expectInt32, + idToken: import_smithy_client14.expectString, + refreshToken: import_smithy_client14.expectString, + tokenType: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + return contents; + }; + de_CommandError = async (output, context2) => { + const parsedOutput = { + ...output, + body: await parseJsonErrorBody(output.body, context2) + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context2); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context2); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context2); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context2); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context2); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context2); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context2); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context2); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context2); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context2); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context2); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode + }); + } + }; + throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException); + de_AccessDeniedExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_AuthorizationPendingExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_ExpiredTokenExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InternalServerExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidClientExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidGrantExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidRequestExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_InvalidScopeExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_SlowDownExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_UnauthorizedClientExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context2) => { + const contents = (0, import_smithy_client14.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client14.take)(data, { + error: import_smithy_client14.expectString, + error_description: import_smithy_client14.expectString + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents + }); + return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body); + }; + deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +var import_middleware_endpoint2, import_middleware_serde2, import_smithy_client15, CreateTokenCommand; +var init_CreateTokenCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js"() { + import_middleware_endpoint2 = __toESM(require_dist_cjs44()); + import_middleware_serde2 = __toESM(require_dist_cjs8()); + import_smithy_client15 = __toESM(require_dist_cjs27()); + init_EndpointParameters(); + init_models_0(); + init_Aws_restJson1(); + CreateTokenCommand = class extends import_smithy_client15.Command.classBuilder().ep(commonParams).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde2.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint2.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js +var import_smithy_client16, commands, SSOOIDC; +var init_SSOOIDC = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js"() { + import_smithy_client16 = __toESM(require_dist_cjs27()); + init_CreateTokenCommand(); + init_SSOOIDCClient(); + commands = { + CreateTokenCommand + }; + SSOOIDC = class extends SSOOIDCClient { + }; + (0, import_smithy_client16.createAggregatedClient)(commands, SSOOIDC); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js +var init_commands = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/index.js"() { + init_CreateTokenCommand(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js +var init_models = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/index.js"() { + init_models_0(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js +var sso_oidc_exports = {}; +__export(sso_oidc_exports, { + $Command: () => import_smithy_client15.Command, + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidGrantException: () => InvalidGrantException, + InvalidRequestException: () => InvalidRequestException, + InvalidScopeException: () => InvalidScopeException, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client11.Client +}); +var init_sso_oidc = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/index.js"() { + init_SSOOIDCClient(); + init_SSOOIDC(); + init_commands(); + init_models(); + init_SSOOIDCServiceException(); + } +}); + +// node_modules/@aws-sdk/token-providers/dist-cjs/index.js +var require_dist_cjs57 = __commonJS({ + "node_modules/@aws-sdk/token-providers/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromEnvSigningName: () => fromEnvSigningName, + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports)); + var import_property_provider2 = require_dist_cjs23(); + var fromEnvSigningName = /* @__PURE__ */ __name(({ logger: logger5, signingName } = {}) => async () => { + logger5?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"); + if (!signingName) { + throw new import_property_provider2.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger5 }); + } + const bearerTokenKey = (0, import_httpAuthSchemes.getBearerTokenEnvKey)(signingName); + if (!(bearerTokenKey in process.env)) { + throw new import_property_provider2.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger5 }); + } + const token = { token: process.env[bearerTokenKey] }; + (0, import_client3.setTokenFeature)(token, "BEARER_SERVICE_ENV_VARS", "3"); + return token; + }, "fromEnvSigningName"); + var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; + var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => { + const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => __toESM2((init_sso_oidc(), __toCommonJS(sso_oidc_exports)))); + const ssoOidcClient = new SSOOIDCClient2( + Object.assign({}, init.clientConfig ?? {}, { + region: ssoRegion ?? init.clientConfig?.region, + logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger + }) + ); + return ssoOidcClient; + }, "getSsoOidcClient"); + var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => { + const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => __toESM2((init_sso_oidc(), __toCommonJS(sso_oidc_exports)))); + const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); + return ssoOidcClient.send( + new CreateTokenCommand2({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); + }, "getNewSsoOidcToken"); + var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider2.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + } + }, "validateTokenExpiry"); + var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider2.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } + }, "validateTokenKey"); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_fs4 = require("fs"); + var { writeFile } = import_fs4.promises; + var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); + }, "writeSSOTokenToFile"); + var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); + var fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig + } + }; + init.logger?.debug("@aws-sdk/token-providers - fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider2.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, + false + ); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new import_property_provider2.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e5) { + throw new import_property_provider2.TokenProviderError( + `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, + false + ); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } + }, "fromSso"); + var fromStatic = /* @__PURE__ */ __name(({ token, logger: logger5 }) => async () => { + logger5?.debug("@aws-sdk/token-providers - fromStatic"); + if (!token || !token.token) { + throw new import_property_provider2.TokenProviderError(`Please pass a valid token to fromStatic`, false); + } + return token; + }, "fromStatic"); + var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)(fromSso(init), async () => { + throw new import_property_provider2.TokenProviderError("Could not load token from any providers", false); + }), + (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, + (token) => token.expiration !== void 0 + ), "nodeProvider"); + } +}); + +// node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +var require_dist_cjs58 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __esm2 = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res; + }; + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var loadSso_exports = {}; + __export2(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient + }); + var import_client_sso; + var init_loadSso = __esm2({ + "src/loadSso.ts"() { + "use strict"; + import_client_sso = require_dist_cjs56(); + } + }); + var index_exports = {}; + __export2(index_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile + }); + module2.exports = __toCommonJS2(index_exports); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_token_providers = require_dist_cjs57(); + var import_property_provider2 = require_dist_cjs23(); + var import_shared_ini_file_loader = require_dist_cjs42(); + var SHOULD_FAIL_CREDENTIAL_CHAIN = false; + var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + parentClientConfig, + profile, + logger: logger5 + }) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(e5.message, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider2.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + logger: clientConfig?.logger ?? parentClientConfig?.logger, + region: clientConfig?.region ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e5) { + throw new import_property_provider2.CredentialsProviderError(e5, { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const { + roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} + } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider2.CredentialsProviderError("SSO returns an invalid temporary credential.", { + tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN, + logger: logger5 + }); + } + const credentials = { + accessKeyId, + secretAccessKey, + sessionToken, + expiration: new Date(expiration), + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + if (ssoSession) { + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s"); + } else { + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u"); + } + return credentials; + }, "resolveSSOCredentials"); + var validateSsoProfile = /* @__PURE__ */ __name((profile, logger5) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new import_property_provider2.CredentialsProviderError( + `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( + ", " + )} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, + { tryNextLink: false, logger: logger5 } + ); + } + return profile; + }, "validateSsoProfile"); + var fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger }); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, { + logger: init.logger + }); + } + if (profile?.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider2.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, { + tryNextLink: false, + logger: init.logger + }); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile( + profile, + init.logger + ); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider2.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', + { tryNextLink: false, logger: init.logger } + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + parentClientConfig: init.parentClientConfig, + profile: profileName + }); + } + }, "fromSSO"); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +function createAwsAuthSigv4HttpAuthOption2(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region + }, + propertiesExtractor: (config6, context2) => ({ + signingProperties: { + config: config6, + context: context2 + } + }) + }; +} +function createSmithyApiNoAuthHttpAuthOption2(authParameters) { + return { + schemeId: "smithy.api#noAuth" + }; +} +var import_util_middleware6, defaultSTSHttpAuthSchemeParametersProvider, defaultSTSHttpAuthSchemeProvider, resolveStsAuthConfig, resolveHttpAuthSchemeConfig2; +var init_httpAuthSchemeProvider2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js"() { + init_dist_es2(); + import_util_middleware6 = __toESM(require_dist_cjs7()); + init_STSClient(); + defaultSTSHttpAuthSchemeParametersProvider = async (config6, context2, input) => { + return { + operation: (0, import_util_middleware6.getSmithyContext)(context2).operation, + region: await (0, import_util_middleware6.normalizeProvider)(config6.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })() + }; + }; + defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption2(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption2(authParameters)); + } + } + return options; + }; + resolveStsAuthConfig = (input) => Object.assign(input, { + stsClientCtor: STSClient + }); + resolveHttpAuthSchemeConfig2 = (config6) => { + const config_0 = resolveStsAuthConfig(config6); + const config_1 = resolveAwsSdkSigV4Config(config_0); + return Object.assign(config_1, { + authSchemePreference: (0, import_util_middleware6.normalizeProvider)(config6.authSchemePreference ?? []) + }); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js +var resolveClientEndpointParameters2, commonParams2; +var init_EndpointParameters2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js"() { + resolveClientEndpointParameters2 = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts" + }); + }; + commonParams2 = { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js +var F3, G4, H3, I2, J4, a4, b4, c3, d6, e4, f5, g3, h4, i4, j5, k5, l4, m5, n3, o4, p4, q4, r4, s3, t3, u4, v6, w5, x3, y4, z3, A3, B2, C3, D4, E3, _data2, ruleSet2; +var init_ruleset2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js"() { + F3 = "required"; + G4 = "type"; + H3 = "fn"; + I2 = "argv"; + J4 = "ref"; + a4 = false; + b4 = true; + c3 = "booleanEquals"; + d6 = "stringEquals"; + e4 = "sigv4"; + f5 = "sts"; + g3 = "us-east-1"; + h4 = "endpoint"; + i4 = "https://sts.{Region}.{PartitionResult#dnsSuffix}"; + j5 = "tree"; + k5 = "error"; + l4 = "getAttr"; + m5 = { [F3]: false, [G4]: "String" }; + n3 = { [F3]: true, "default": false, [G4]: "Boolean" }; + o4 = { [J4]: "Endpoint" }; + p4 = { [H3]: "isSet", [I2]: [{ [J4]: "Region" }] }; + q4 = { [J4]: "Region" }; + r4 = { [H3]: "aws.partition", [I2]: [q4], "assign": "PartitionResult" }; + s3 = { [J4]: "UseFIPS" }; + t3 = { [J4]: "UseDualStack" }; + u4 = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e4, "signingName": f5, "signingRegion": g3 }] }, "headers": {} }; + v6 = {}; + w5 = { "conditions": [{ [H3]: d6, [I2]: [q4, "aws-global"] }], [h4]: u4, [G4]: h4 }; + x3 = { [H3]: c3, [I2]: [s3, true] }; + y4 = { [H3]: c3, [I2]: [t3, true] }; + z3 = { [H3]: l4, [I2]: [{ [J4]: "PartitionResult" }, "supportsFIPS"] }; + A3 = { [J4]: "PartitionResult" }; + B2 = { [H3]: c3, [I2]: [true, { [H3]: l4, [I2]: [A3, "supportsDualStack"] }] }; + C3 = [{ [H3]: "isSet", [I2]: [o4] }]; + D4 = [x3]; + E3 = [y4]; + _data2 = { version: "1.0", parameters: { Region: m5, UseDualStack: n3, UseFIPS: n3, Endpoint: m5, UseGlobalEndpoint: n3 }, rules: [{ conditions: [{ [H3]: c3, [I2]: [{ [J4]: "UseGlobalEndpoint" }, b4] }, { [H3]: "not", [I2]: C3 }, p4, r4, { [H3]: c3, [I2]: [s3, a4] }, { [H3]: c3, [I2]: [t3, a4] }], rules: [{ conditions: [{ [H3]: d6, [I2]: [q4, "ap-northeast-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "ap-south-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "ap-southeast-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "ap-southeast-2"] }], endpoint: u4, [G4]: h4 }, w5, { conditions: [{ [H3]: d6, [I2]: [q4, "ca-central-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "eu-central-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "eu-north-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "eu-west-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "eu-west-2"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "eu-west-3"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "sa-east-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, g3] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "us-east-2"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "us-west-1"] }], endpoint: u4, [G4]: h4 }, { conditions: [{ [H3]: d6, [I2]: [q4, "us-west-2"] }], endpoint: u4, [G4]: h4 }, { endpoint: { url: i4, properties: { authSchemes: [{ name: e4, signingName: f5, signingRegion: "{Region}" }] }, headers: v6 }, [G4]: h4 }], [G4]: j5 }, { conditions: C3, rules: [{ conditions: D4, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G4]: k5 }, { conditions: E3, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G4]: k5 }, { endpoint: { url: o4, properties: v6, headers: v6 }, [G4]: h4 }], [G4]: j5 }, { conditions: [p4], rules: [{ conditions: [r4], rules: [{ conditions: [x3, y4], rules: [{ conditions: [{ [H3]: c3, [I2]: [b4, z3] }, B2], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v6, headers: v6 }, [G4]: h4 }], [G4]: j5 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G4]: k5 }], [G4]: j5 }, { conditions: D4, rules: [{ conditions: [{ [H3]: c3, [I2]: [z3, b4] }], rules: [{ conditions: [{ [H3]: d6, [I2]: [{ [H3]: l4, [I2]: [A3, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v6, headers: v6 }, [G4]: h4 }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v6, headers: v6 }, [G4]: h4 }], [G4]: j5 }, { error: "FIPS is enabled but this partition does not support FIPS", [G4]: k5 }], [G4]: j5 }, { conditions: E3, rules: [{ conditions: [B2], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v6, headers: v6 }, [G4]: h4 }], [G4]: j5 }, { error: "DualStack is enabled but this partition does not support DualStack", [G4]: k5 }], [G4]: j5 }, w5, { endpoint: { url: i4, properties: v6, headers: v6 }, [G4]: h4 }], [G4]: j5 }], [G4]: j5 }, { error: "Invalid Configuration: Missing Region", [G4]: k5 }] }; + ruleSet2 = _data2; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js +var import_util_endpoints3, import_util_endpoints4, cache2, defaultEndpointResolver2; +var init_endpointResolver2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js"() { + import_util_endpoints3 = __toESM(require_dist_cjs22()); + import_util_endpoints4 = __toESM(require_dist_cjs19()); + init_ruleset2(); + cache2 = new import_util_endpoints4.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"] + }); + defaultEndpointResolver2 = (endpointParams, context2 = {}) => { + return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, { + endpointParams, + logger: context2.logger + })); + }; + import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +var import_smithy_client17, import_url_parser2, import_util_base647, import_util_utf85, getRuntimeConfig3; +var init_runtimeConfig_shared2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js"() { + init_dist_es2(); + init_dist_es(); + import_smithy_client17 = __toESM(require_dist_cjs27()); + import_url_parser2 = __toESM(require_dist_cjs21()); + import_util_base647 = __toESM(require_dist_cjs12()); + import_util_utf85 = __toESM(require_dist_cjs11()); + init_httpAuthSchemeProvider2(); + init_endpointResolver2(); + getRuntimeConfig3 = (config6) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config6?.base64Decoder ?? import_util_base647.fromBase64, + base64Encoder: config6?.base64Encoder ?? import_util_base647.toBase64, + disableHostPrefix: config6?.disableHostPrefix ?? false, + endpointProvider: config6?.endpointProvider ?? defaultEndpointResolver2, + extensions: config6?.extensions ?? [], + httpAuthSchemeProvider: config6?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + logger: config6?.logger ?? new import_smithy_client17.NoOpLogger(), + serviceId: config6?.serviceId ?? "STS", + urlParser: config6?.urlParser ?? import_url_parser2.parseUrl, + utf8Decoder: config6?.utf8Decoder ?? import_util_utf85.fromUtf8, + utf8Encoder: config6?.utf8Encoder ?? import_util_utf85.toUtf8 + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +var import_util_user_agent_node2, import_config_resolver3, import_hash_node2, import_middleware_retry3, import_node_config_provider2, import_node_http_handler2, import_util_body_length_node2, import_util_retry2, import_smithy_client18, import_util_defaults_mode_node2, import_smithy_client19, getRuntimeConfig4; +var init_runtimeConfig2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js"() { + init_package(); + init_dist_es2(); + import_util_user_agent_node2 = __toESM(require_dist_cjs51()); + import_config_resolver3 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_hash_node2 = __toESM(require_dist_cjs52()); + import_middleware_retry3 = __toESM(require_dist_cjs47()); + import_node_config_provider2 = __toESM(require_dist_cjs43()); + import_node_http_handler2 = __toESM(require_dist_cjs15()); + import_util_body_length_node2 = __toESM(require_dist_cjs53()); + import_util_retry2 = __toESM(require_dist_cjs46()); + init_runtimeConfig_shared2(); + import_smithy_client18 = __toESM(require_dist_cjs27()); + import_util_defaults_mode_node2 = __toESM(require_dist_cjs54()); + import_smithy_client19 = __toESM(require_dist_cjs27()); + getRuntimeConfig4 = (config6) => { + (0, import_smithy_client19.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, import_util_defaults_mode_node2.resolveDefaultsModeConfig)(config6); + const defaultConfigProvider = () => defaultsMode().then(import_smithy_client18.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig3(config6); + emitWarningIfUnsupportedVersion(process.version); + const loaderConfig = { + profile: config6?.profile, + logger: clientSharedValues.logger + }; + return { + ...clientSharedValues, + ...config6, + runtime: "node", + defaultsMode, + authSchemePreference: config6?.authSchemePreference ?? (0, import_node_config_provider2.loadConfig)(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config6?.bodyLengthChecker ?? import_util_body_length_node2.calculateBodyLength, + defaultUserAgentProvider: config6?.defaultUserAgentProvider ?? (0, import_util_user_agent_node2.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config6.credentialDefaultProvider(idProps?.__config || {})()), + signer: new AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new NoAuthSigner() + } + ], + maxAttempts: config6?.maxAttempts ?? (0, import_node_config_provider2.loadConfig)(import_middleware_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config6), + region: config6?.region ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_REGION_CONFIG_OPTIONS, { ...import_config_resolver3.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: import_node_http_handler2.NodeHttpHandler.create(config6?.requestHandler ?? defaultConfigProvider), + retryMode: config6?.retryMode ?? (0, import_node_config_provider2.loadConfig)({ + ...import_middleware_retry3.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || import_util_retry2.DEFAULT_RETRY_MODE + }, config6), + sha256: config6?.sha256 ?? import_hash_node2.Hash.bind(null, "sha256"), + streamCollector: config6?.streamCollector ?? import_node_http_handler2.streamCollector, + useDualstackEndpoint: config6?.useDualstackEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config6?.useFipsEndpoint ?? (0, import_node_config_provider2.loadConfig)(import_config_resolver3.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config6?.userAgentAppId ?? (0, import_node_config_provider2.loadConfig)(import_util_user_agent_node2.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js +var getHttpAuthExtensionConfiguration2, resolveHttpAuthRuntimeConfig2; +var init_httpAuthExtensionConfiguration2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js"() { + getHttpAuthExtensionConfiguration2 = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; + }; + resolveHttpAuthRuntimeConfig2 = (config6) => { + return { + httpAuthSchemes: config6.httpAuthSchemes(), + httpAuthSchemeProvider: config6.httpAuthSchemeProvider(), + credentials: config6.credentials() + }; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js +var import_region_config_resolver2, import_protocol_http13, import_smithy_client20, resolveRuntimeExtensions2; +var init_runtimeExtensions2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js"() { + import_region_config_resolver2 = __toESM(require_dist_cjs55()); + import_protocol_http13 = __toESM(require_dist_cjs2()); + import_smithy_client20 = __toESM(require_dist_cjs27()); + init_httpAuthExtensionConfiguration2(); + resolveRuntimeExtensions2 = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign((0, import_region_config_resolver2.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client20.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http13.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, (0, import_region_config_resolver2.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client20.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http13.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration)); + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +var import_middleware_host_header2, import_middleware_logger2, import_middleware_recursion_detection2, import_middleware_user_agent2, import_config_resolver4, import_middleware_content_length2, import_middleware_endpoint3, import_middleware_retry4, import_smithy_client21, STSClient; +var init_STSClient = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js"() { + import_middleware_host_header2 = __toESM(require_dist_cjs4()); + import_middleware_logger2 = __toESM(require_dist_cjs5()); + import_middleware_recursion_detection2 = __toESM(require_dist_cjs6()); + import_middleware_user_agent2 = __toESM(require_dist_cjs29()); + import_config_resolver4 = __toESM(require_dist_cjs39()); + init_dist_es(); + import_middleware_content_length2 = __toESM(require_dist_cjs41()); + import_middleware_endpoint3 = __toESM(require_dist_cjs44()); + import_middleware_retry4 = __toESM(require_dist_cjs47()); + import_smithy_client21 = __toESM(require_dist_cjs27()); + init_httpAuthSchemeProvider2(); + init_EndpointParameters2(); + init_runtimeConfig2(); + init_runtimeExtensions2(); + STSClient = class extends import_smithy_client21.Client { + config; + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig4(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters2(_config_0); + const _config_2 = (0, import_middleware_user_agent2.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry4.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver4.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header2.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint3.resolveEndpointConfig)(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig2(_config_6); + const _config_8 = resolveRuntimeExtensions2(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_user_agent2.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry4.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length2.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header2.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger2.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection2.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config6) => new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config6.credentials + }) + })); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +var import_smithy_client22, STSServiceException; +var init_STSServiceException = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js"() { + import_smithy_client22 = __toESM(require_dist_cjs27()); + STSServiceException = class _STSServiceException extends import_smithy_client22.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, _STSServiceException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js +var import_smithy_client23, CredentialsFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, ExpiredTokenException2, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, IDPRejectedClaimException, InvalidIdentityTokenException, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, IDPCommunicationErrorException; +var init_models_02 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js"() { + import_smithy_client23 = __toESM(require_dist_cjs27()); + init_STSServiceException(); + CredentialsFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client23.SENSITIVE_STRING } + }); + AssumeRoleResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }); + ExpiredTokenException2 = class _ExpiredTokenException extends STSServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + } + }; + MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException { + name = "MalformedPolicyDocumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype); + } + }; + PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException { + name = "PackedPolicyTooLargeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype); + } + }; + RegionDisabledException = class _RegionDisabledException extends STSServiceException { + name = "RegionDisabledException"; + $fault = "client"; + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _RegionDisabledException.prototype); + } + }; + IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException { + name = "IDPRejectedClaimException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype); + } + }; + InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException { + name = "InvalidIdentityTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype); + } + }; + AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client23.SENSITIVE_STRING } + }); + AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ + ...obj, + ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) } + }); + IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype); + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js +var import_protocol_http14, import_smithy_client24, se_AssumeRoleCommand, se_AssumeRoleWithWebIdentityCommand, de_AssumeRoleCommand, de_AssumeRoleWithWebIdentityCommand, de_CommandError2, de_ExpiredTokenExceptionRes2, de_IDPCommunicationErrorExceptionRes, de_IDPRejectedClaimExceptionRes, de_InvalidIdentityTokenExceptionRes, de_MalformedPolicyDocumentExceptionRes, de_PackedPolicyTooLargeExceptionRes, de_RegionDisabledExceptionRes, se_AssumeRoleRequest, se_AssumeRoleWithWebIdentityRequest, se_policyDescriptorListType, se_PolicyDescriptorType, se_ProvidedContext, se_ProvidedContextsListType, se_Tag, se_tagKeyListType, se_tagListType, de_AssumedRoleUser, de_AssumeRoleResponse, de_AssumeRoleWithWebIdentityResponse, de_Credentials, de_ExpiredTokenException, de_IDPCommunicationErrorException, de_IDPRejectedClaimException, de_InvalidIdentityTokenException, de_MalformedPolicyDocumentException, de_PackedPolicyTooLargeException, de_RegionDisabledException, deserializeMetadata2, throwDefaultError2, buildHttpRpcRequest, SHARED_HEADERS, _3, _A, _AKI, _AR, _ARI, _ARU, _ARWWI, _Ar, _Au, _C, _CA, _DS, _E, _EI, _K, _P, _PA, _PAr, _PC, _PI, _PPS, _Pr, _RA, _RSN, _SAK, _SFWIT, _SI, _SN, _ST, _T, _TC, _TTK, _V, _Va, _WIT, _a5, _m, buildFormUrlencodedString, loadQueryErrorCode; +var init_Aws_query = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js"() { + init_dist_es2(); + import_protocol_http14 = __toESM(require_dist_cjs2()); + import_smithy_client24 = __toESM(require_dist_cjs27()); + init_models_02(); + init_STSServiceException(); + se_AssumeRoleCommand = async (input, context2) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleRequest(input, context2), + [_A]: _AR, + [_V]: _3 + }); + return buildHttpRpcRequest(context2, headers, "/", void 0, body); + }; + se_AssumeRoleWithWebIdentityCommand = async (input, context2) => { + const headers = SHARED_HEADERS; + let body; + body = buildFormUrlencodedString({ + ...se_AssumeRoleWithWebIdentityRequest(input, context2), + [_A]: _ARWWI, + [_V]: _3 + }); + return buildHttpRpcRequest(context2, headers, "/", void 0, body); + }; + de_AssumeRoleCommand = async (output, context2) => { + if (output.statusCode >= 300) { + return de_CommandError2(output, context2); + } + const data = await parseXmlBody(output.body, context2); + let contents = {}; + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context2); + const response = { + $metadata: deserializeMetadata2(output), + ...contents + }; + return response; + }; + de_AssumeRoleWithWebIdentityCommand = async (output, context2) => { + if (output.statusCode >= 300) { + return de_CommandError2(output, context2); + } + const data = await parseXmlBody(output.body, context2); + let contents = {}; + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context2); + const response = { + $metadata: deserializeMetadata2(output), + ...contents + }; + return response; + }; + de_CommandError2 = async (output, context2) => { + const parsedOutput = { + ...output, + body: await parseXmlErrorBody(output.body, context2) + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ExpiredTokenException": + case "com.amazonaws.sts#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes2(parsedOutput, context2); + case "MalformedPolicyDocument": + case "com.amazonaws.sts#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context2); + case "PackedPolicyTooLarge": + case "com.amazonaws.sts#PackedPolicyTooLargeException": + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context2); + case "RegionDisabledException": + case "com.amazonaws.sts#RegionDisabledException": + throw await de_RegionDisabledExceptionRes(parsedOutput, context2); + case "IDPCommunicationError": + case "com.amazonaws.sts#IDPCommunicationErrorException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context2); + case "IDPRejectedClaim": + case "com.amazonaws.sts#IDPRejectedClaimException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context2); + case "InvalidIdentityToken": + case "com.amazonaws.sts#InvalidIdentityTokenException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context2); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError2({ + output, + parsedBody: parsedBody.Error, + errorCode + }); + } + }; + de_ExpiredTokenExceptionRes2 = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_ExpiredTokenException(body.Error, context2); + const exception = new ExpiredTokenException2({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_IDPCommunicationErrorException(body.Error, context2); + const exception = new IDPCommunicationErrorException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_IDPRejectedClaimExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_IDPRejectedClaimException(body.Error, context2); + const exception = new IDPRejectedClaimException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_InvalidIdentityTokenException(body.Error, context2); + const exception = new InvalidIdentityTokenException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_MalformedPolicyDocumentException(body.Error, context2); + const exception = new MalformedPolicyDocumentException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_PackedPolicyTooLargeException(body.Error, context2); + const exception = new PackedPolicyTooLargeException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + de_RegionDisabledExceptionRes = async (parsedOutput, context2) => { + const body = parsedOutput.body; + const deserialized = de_RegionDisabledException(body.Error, context2); + const exception = new RegionDisabledException({ + $metadata: deserializeMetadata2(parsedOutput), + ...deserialized + }); + return (0, import_smithy_client24.decorateServiceException)(exception, body); + }; + se_AssumeRoleRequest = (input, context2) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context2); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context2); + if (input[_T]?.length === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context2); + if (input[_TTK]?.length === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context2); + if (input[_PC]?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; + }; + se_AssumeRoleWithWebIdentityRequest = (input, context2) => { + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context2); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; + }; + se_policyDescriptorListType = (input, context2) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PolicyDescriptorType(entry, context2); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + se_PolicyDescriptorType = (input, context2) => { + const entries = {}; + if (input[_a5] != null) { + entries[_a5] = input[_a5]; + } + return entries; + }; + se_ProvidedContext = (input, context2) => { + const entries = {}; + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; + }; + se_ProvidedContextsListType = (input, context2) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context2); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + se_Tag = (input, context2) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; + }; + se_tagKeyListType = (input, context2) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; + }; + se_tagListType = (input, context2) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context2); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; + }; + de_AssumedRoleUser = (output, context2) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client24.expectString)(output[_Ar]); + } + return contents; + }; + de_AssumeRoleResponse = (output, context2) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context2); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context2); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client24.expectString)(output[_SI]); + } + return contents; + }; + de_AssumeRoleWithWebIdentityResponse = (output, context2) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context2); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context2); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]); + } + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client24.expectString)(output[_Pr]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client24.expectString)(output[_Au]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client24.expectString)(output[_SI]); + } + return contents; + }; + de_Credentials = (output, context2) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]); + } + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client24.expectString)(output[_SAK]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client24.expectString)(output[_ST]); + } + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client24.expectNonNull)((0, import_smithy_client24.parseRfc3339DateTimeWithOffset)(output[_E])); + } + return contents; + }; + de_ExpiredTokenException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_IDPCommunicationErrorException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_IDPRejectedClaimException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_InvalidIdentityTokenException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_MalformedPolicyDocumentException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_PackedPolicyTooLargeException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + de_RegionDisabledException = (output, context2) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client24.expectString)(output[_m]); + } + return contents; + }; + deserializeMetadata2 = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }); + throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException); + buildHttpRpcRequest = async (context2, headers, path2, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context2.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path2 : basePath + path2, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + } + return new import_protocol_http14.HttpRequest(contents); + }; + SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" + }; + _3 = "2011-06-15"; + _A = "Action"; + _AKI = "AccessKeyId"; + _AR = "AssumeRole"; + _ARI = "AssumedRoleId"; + _ARU = "AssumedRoleUser"; + _ARWWI = "AssumeRoleWithWebIdentity"; + _Ar = "Arn"; + _Au = "Audience"; + _C = "Credentials"; + _CA = "ContextAssertion"; + _DS = "DurationSeconds"; + _E = "Expiration"; + _EI = "ExternalId"; + _K = "Key"; + _P = "Policy"; + _PA = "PolicyArns"; + _PAr = "ProviderArn"; + _PC = "ProvidedContexts"; + _PI = "ProviderId"; + _PPS = "PackedPolicySize"; + _Pr = "Provider"; + _RA = "RoleArn"; + _RSN = "RoleSessionName"; + _SAK = "SecretAccessKey"; + _SFWIT = "SubjectFromWebIdentityToken"; + _SI = "SourceIdentity"; + _SN = "SerialNumber"; + _ST = "SessionToken"; + _T = "Tags"; + _TC = "TokenCode"; + _TTK = "TransitiveTagKeys"; + _V = "Version"; + _Va = "Value"; + _WIT = "WebIdentityToken"; + _a5 = "arn"; + _m = "message"; + buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client24.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client24.extendedEncodeURIComponent)(value)).join("&"); + loadQueryErrorCode = (output, data) => { + if (data.Error?.Code !== void 0) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js +var import_middleware_endpoint4, import_middleware_serde3, import_smithy_client25, AssumeRoleCommand; +var init_AssumeRoleCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js"() { + import_middleware_endpoint4 = __toESM(require_dist_cjs44()); + import_middleware_serde3 = __toESM(require_dist_cjs8()); + import_smithy_client25 = __toESM(require_dist_cjs27()); + init_EndpointParameters2(); + init_models_02(); + init_Aws_query(); + AssumeRoleCommand = class extends import_smithy_client25.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde3.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint4.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +var import_middleware_endpoint5, import_middleware_serde4, import_smithy_client26, AssumeRoleWithWebIdentityCommand; +var init_AssumeRoleWithWebIdentityCommand = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js"() { + import_middleware_endpoint5 = __toESM(require_dist_cjs44()); + import_middleware_serde4 = __toESM(require_dist_cjs8()); + import_smithy_client26 = __toESM(require_dist_cjs27()); + init_EndpointParameters2(); + init_models_02(); + init_Aws_query(); + AssumeRoleWithWebIdentityCommand = class extends import_smithy_client26.Command.classBuilder().ep(commonParams2).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde4.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint5.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js +var import_smithy_client27, commands2, STS; +var init_STS = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js"() { + import_smithy_client27 = __toESM(require_dist_cjs27()); + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + init_STSClient(); + commands2 = { + AssumeRoleCommand, + AssumeRoleWithWebIdentityCommand + }; + STS = class extends STSClient { + }; + (0, import_smithy_client27.createAggregatedClient)(commands2, STS); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js +var init_commands2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/index.js"() { + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/index.js +var init_models2 = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/index.js"() { + init_models_02(); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +var ASSUME_ROLE_DEFAULT_REGION, getAccountIdFromAssumedRoleUser, resolveRegion, getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity, isH2; +var init_defaultStsRoleAssumers = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js"() { + init_client(); + init_AssumeRoleCommand(); + init_AssumeRoleWithWebIdentityCommand(); + ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; + getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { + if (typeof assumedRoleUser?.Arn === "string") { + const arnComponents = assumedRoleUser.Arn.split(":"); + if (arnComponents.length > 4 && arnComponents[4] !== "") { + return arnComponents[4]; + } + } + return void 0; + }; + resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => { + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; + }; + getDefaultRoleAssumer = (stsOptions, STSClient2) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { logger: logger5 = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient2({ + profile: stsOptions?.parentClientConfig?.profile, + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger: logger5 + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i"); + return credentials; + }; + }; + getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => { + let stsClient; + return async (params) => { + if (!stsClient) { + const { logger: logger5 = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions; + const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger); + const isCompatibleRequestHandler = !isH2(requestHandler); + stsClient = new STSClient2({ + profile: stsOptions?.parentClientConfig?.profile, + region: resolvedRegion, + requestHandler: isCompatibleRequestHandler ? requestHandler : void 0, + logger: logger5 + }); + } + const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + } + const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser); + const credentials = { + accessKeyId: Credentials.AccessKeyId, + secretAccessKey: Credentials.SecretAccessKey, + sessionToken: Credentials.SessionToken, + expiration: Credentials.Expiration, + ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }, + ...accountId && { accountId } + }; + if (accountId) { + setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T"); + } + setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k"); + return credentials; + }; + }; + isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; + }; + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js +var getCustomizableStsClientCtor, getDefaultRoleAssumer2, getDefaultRoleAssumerWithWebIdentity2, decorateDefaultCredentialProvider; +var init_defaultRoleAssumers = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js"() { + init_defaultStsRoleAssumers(); + init_STSClient(); + getCustomizableStsClientCtor = (baseCtor, customizations) => { + if (!customizations) + return baseCtor; + else + return class CustomizableSTSClient extends baseCtor { + constructor(config6) { + super(config6); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }; + }; + getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins)); + decorateDefaultCredentialProvider = (provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input + }); + } +}); + +// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js +var sts_exports = {}; +__export(sts_exports, { + AssumeRoleCommand: () => AssumeRoleCommand, + AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog, + AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand, + AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog, + AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException2, + IDPCommunicationErrorException: () => IDPCommunicationErrorException, + IDPRejectedClaimException: () => IDPRejectedClaimException, + InvalidIdentityTokenException: () => InvalidIdentityTokenException, + MalformedPolicyDocumentException: () => MalformedPolicyDocumentException, + PackedPolicyTooLargeException: () => PackedPolicyTooLargeException, + RegionDisabledException: () => RegionDisabledException, + STS: () => STS, + STSClient: () => STSClient, + STSServiceException: () => STSServiceException, + __Client: () => import_smithy_client21.Client, + decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider, + getDefaultRoleAssumer: () => getDefaultRoleAssumer2, + getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2 +}); +var init_sts = __esm({ + "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/index.js"() { + init_STSClient(); + init_STS(); + init_commands2(); + init_models2(); + init_defaultRoleAssumers(); + init_STSServiceException(); + } +}); + +// node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +var require_dist_cjs59 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromProcess: () => fromProcess + }); + module2.exports = __toCommonJS2(index_exports); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_property_provider2 = require_dist_cjs23(); + var import_child_process = require("child_process"); + var import_util12 = require("util"); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + let accountId = data.AccountId; + if (!accountId && profiles?.[profileName]?.aws_account_id) { + accountId = profiles[profileName].aws_account_id; + } + const credentials = { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope }, + ...accountId && { accountId } + }; + (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w"); + return credentials; + }, "getValidatedProcessCredentials"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger5) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util12.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data, profiles); + } catch (error) { + throw new import_property_provider2.CredentialsProviderError(error.message, { logger: logger5 }); + } + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger5 }); + } + } else { + throw new import_property_provider2.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, { + logger: logger5 + }); + } + }, "resolveProcessCredentials"); + var fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => { + init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials( + (0, import_shared_ini_file_loader.getProfileName)({ + profile: init.profile ?? callerClientConfig?.profile + }), + profiles, + init.logger + ); + }, "fromProcess"); + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +var require_fromWebToken = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m6[k6]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; + }); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o5, v7) { + Object.defineProperty(o5, "default", { enumerable: true, value: v7 }); + } : function(o5, v7) { + o5["default"] = v7; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ function() { + var ownKeys = function(o5) { + ownKeys = Object.getOwnPropertyNames || function(o6) { + var ar2 = []; + for (var k6 in o6) if (Object.prototype.hasOwnProperty.call(o6, k6)) ar2[ar2.length] = k6; + return ar2; + }; + return ownKeys(o5); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k6 = ownKeys(mod), i5 = 0; i5 < k6.length; i5++) if (k6[i5] !== "default") __createBinding2(result, mod, k6[i5]); + } + __setModuleDefault2(result, mod); + return result; + }; + }(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromWebToken = void 0; + var fromWebToken2 = (init) => async (awsIdentityProperties) => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity3 } = await Promise.resolve().then(() => __importStar2((init_sts(), __toCommonJS(sts_exports)))); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity3({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: { + ...awsIdentityProperties?.callerClientConfig, + ...init.parentClientConfig + } + }, init.clientPlugins); + } + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds + }); + }; + exports2.fromWebToken = fromWebToken2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +var require_fromTokenFile = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromTokenFile = void 0; + var client_1 = (init_client(), __toCommonJS(client_exports)); + var property_provider_1 = require_dist_cjs23(); + var fs_1 = require("fs"); + var fromWebToken_1 = require_fromWebToken(); + var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; + var ENV_ROLE_ARN = "AWS_ROLE_ARN"; + var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; + var fromTokenFile2 = (init = {}) => async () => { + init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile"); + const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE]; + const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN]; + const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", { + logger: init.logger + }); + } + const credentials = await (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName + })(); + if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) { + (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h"); + } + return credentials; + }; + exports2.fromTokenFile = fromTokenFile2; + } +}); + +// node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +var require_dist_cjs60 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + module2.exports = __toCommonJS2(index_exports); + __reExport(index_exports, require_fromTokenFile(), module2.exports); + __reExport(index_exports, require_fromWebToken(), module2.exports); + } +}); + +// node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +var require_dist_cjs61 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + fromIni: () => fromIni + }); + module2.exports = __toCommonJS2(index_exports); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_client3 = (init_client(), __toCommonJS(client_exports)); + var import_property_provider2 = require_dist_cjs23(); + var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger5) => { + const sourceProvidersMap = { + EcsContainer: /* @__PURE__ */ __name(async (options) => { + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50())); + const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"); + return async () => (0, import_property_provider2.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider); + }, "EcsContainer"), + Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => { + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata"); + const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + return async () => fromInstanceMetadata(options)().then(setNamedProvider); + }, "Ec2InstanceMetadata"), + Environment: /* @__PURE__ */ __name(async (options) => { + logger5?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); + const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs48())); + return async () => fromEnv(options)().then(setNamedProvider); + }, "Environment") + }; + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider2.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, + { logger: logger5 } + ); + } + }, "resolveCredentialSource"); + var setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider"); + var isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = "default", logger: logger5 } = {}) => { + return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger5 }) || isCredentialSourceProfile(arg, { profile, logger: logger5 })); + }, "isAssumeRoleProfile"); + var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger5 }) => { + const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined"; + if (withSourceProfile) { + logger5?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`); + } + return withSourceProfile; + }, "isAssumeRoleWithSourceProfile"); + var isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger: logger5 }) => { + const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined"; + if (withProviderProfile) { + logger5?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`); + } + return withProviderProfile; + }, "isCredentialSourceProfile"); + var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); + const profileData = profiles[profileName]; + const { source_profile, region } = profileData; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer: getDefaultRoleAssumer3 } = await Promise.resolve().then(() => __toESM2((init_sts(), __toCommonJS(sts_exports)))); + options.roleAssumer = getDefaultRoleAssumer3( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: { + ...options?.parentClientConfig, + region: region ?? options?.parentClientConfig?.region + } + }, + options.clientPlugins + ); + } + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider2.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + { logger: options.logger } + ); + } + options.logger?.debug( + `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}` + ); + const sourceCredsProvider = source_profile ? resolveProfileData( + source_profile, + profiles, + options, + { + ...visitedProfiles, + [source_profile]: true + }, + isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {}) + ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))(); + if (isCredentialSourceWithoutRoleArn(profileData)) { + return sourceCredsProvider.then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o")); + } else { + const params = { + RoleArn: profileData.role_arn, + RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: profileData.external_id, + DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10) + }; + const { mfa_serial } = profileData; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider2.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + { logger: options.logger, tryNextLink: false } + ); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params).then( + (creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o") + ); + } + }, "resolveAssumeRoleCredentials"); + var isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => { + return !section.role_arn && !!section.credential_source; + }, "isCredentialSourceWithoutRoleArn"); + var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); + var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM2(require_dist_cjs59())).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })().then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v")) + ), "resolveProcessCredentials"); + var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs58())); + return fromSSO({ + profile, + logger: options.logger, + parentClientConfig: options.parentClientConfig, + clientConfig: options.clientConfig + })().then((creds) => { + if (profileData.sso_session) { + return (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r"); + } else { + return (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t"); + } + }); + }, "resolveSsoCredentials"); + var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile"); + var resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => { + options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"); + const credentials = { + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope }, + ...profile.aws_account_id && { accountId: profile.aws_account_id } + }; + return (0, import_client3.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n"); + }, "resolveStaticCredentials"); + var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); + var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM2(require_dist_cjs60())).then( + ({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })().then((creds) => (0, import_client3.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q")) + ), "resolveWebIdentityCredentials"); + var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); + } + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); + } + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); + } + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); + } + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, data, options); + } + throw new import_property_provider2.CredentialsProviderError( + `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, + { logger: options.logger } + ); + }, "resolveProfileData"); + var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => { + const init = { + ..._init, + parentClientConfig: { + ...callerClientConfig, + ..._init.parentClientConfig + } + }; + init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData( + (0, import_shared_ini_file_loader.getProfileName)({ + profile: _init.profile ?? callerClientConfig?.profile + }), + profiles, + init + ); + }, "fromIni"); + } +}); + +// node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +var require_dist_cjs62 = __commonJS({ + "node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_credential_provider_env = require_dist_cjs48(); + var import_shared_ini_file_loader = require_dist_cjs42(); + var import_property_provider2 = require_dist_cjs23(); + var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; + var remoteProvider = /* @__PURE__ */ __name(async (init) => { + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs49())); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50())); + return (0, import_property_provider2.chain)(fromHttp(init), fromContainerMetadata(init)); + } + if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") { + return async () => { + throw new import_property_provider2.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger }); + }; + } + init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); + }, "remoteProvider"); + var multipleCredentialSourceWarningEmitted = false; + var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider2.memoize)( + (0, import_property_provider2.chain)( + async () => { + const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE]; + if (profile) { + const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; + if (envStaticCredentialsAreSet) { + if (!multipleCredentialSourceWarningEmitted) { + const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn; + warnFn( + `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: + Multiple credential sources detected: + Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set. + This SDK will proceed with the AWS_PROFILE value. + + However, a future version may change this behavior to prefer the ENV static credentials. + Please ensure that your environment only sets either the AWS_PROFILE or the + AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair. +` + ); + multipleCredentialSourceWarningEmitted = true; + } + } + throw new import_property_provider2.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", { + logger: init.logger, + tryNextLink: true + }); + } + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"); + return (0, import_credential_provider_env.fromEnv)(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider2.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields).", + { logger: init.logger } + ); + } + const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs58())); + return fromSSO(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs61())); + return fromIni(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs59())); + return fromProcess(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); + const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs60())); + return fromTokenFile2(init)(); + }, + async () => { + init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider2.CredentialsProviderError("Could not load credentials from any providers", { + tryNextLink: false, + logger: init.logger + }); + } + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh + ), "defaultProvider"); + var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, "credentialsWillNeedRefresh"); + var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); + } +}); + +// node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +var require_dist_cjs63 = __commonJS({ + "node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandlerProvider + }); + module2.exports = __toCommonJS2(index_exports); + var import_eventstream_codec = require_dist_cjs33(); + var import_stream5 = require("stream"); + var EventSigningStream = class extends import_stream5.Transform { + static { + __name(this, "EventSigningStream"); + } + priorSignature; + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + super({ + autoDestroy: true, + readableObjectMode: true, + writableObjectMode: true, + ...options + }); + this.priorSignature = options.priorSignature; + this.eventStreamCodec = options.eventStreamCodec; + this.messageSigner = options.messageSigner; + this.systemClockOffsetProvider = options.systemClockOffsetProvider; + } + async _transform(chunk, encoding, callback) { + try { + const now = new Date(Date.now() + await this.systemClockOffsetProvider()); + const dateHeader = { + ":date": { type: "timestamp", value: now } + }; + const signedMessage = await this.messageSigner.sign( + { + message: { + body: chunk, + headers: dateHeader + }, + priorSignature: this.priorSignature + }, + { + signingDate: now + } + ); + this.priorSignature = signedMessage.signature; + const serializedSigned = this.eventStreamCodec.encode({ + headers: { + ...dateHeader, + ":chunk-signature": { + type: "binary", + value: getSignatureBinary(signedMessage.signature) + } + }, + body: chunk + }); + this.push(serializedSigned); + return callback(); + } catch (err) { + callback(err); + } + } + }; + function getSignatureBinary(signature) { + const buf = Buffer.from(signature, "hex"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + __name(getSignatureBinary, "getSignatureBinary"); + var EventStreamPayloadHandler = class { + static { + __name(this, "EventStreamPayloadHandler"); + } + messageSigner; + eventStreamCodec; + systemClockOffsetProvider; + constructor(options) { + this.messageSigner = options.messageSigner; + this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder); + this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0; + } + async handle(next, args, context2 = {}) { + const request3 = args.request; + const { body: payload, query } = request3; + if (!(payload instanceof import_stream5.Readable)) { + throw new Error("Eventstream payload must be a Readable stream."); + } + const payloadStream = payload; + request3.body = new import_stream5.PassThrough({ + objectMode: true + }); + const match = request3.headers?.authorization?.match(/Signature=([\w]+)$/); + const priorSignature = match?.[1] ?? query?.["X-Amz-Signature"] ?? ""; + const signingStream = new EventSigningStream({ + priorSignature, + eventStreamCodec: this.eventStreamCodec, + messageSigner: await this.messageSigner(), + systemClockOffsetProvider: this.systemClockOffsetProvider + }); + (0, import_stream5.pipeline)(payloadStream, signingStream, request3.body, (err) => { + if (err) { + throw err; + } + }); + let result; + try { + result = await next(args); + } catch (e5) { + request3.body.end(); + throw e5; + } + return result; + } + }; + var eventStreamPayloadHandlerProvider = /* @__PURE__ */ __name((options) => new EventStreamPayloadHandler(options), "eventStreamPayloadHandlerProvider"); + } +}); + +// node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +var require_dist_cjs64 = __commonJS({ + "node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js"(exports2, module2) { + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var src_exports = {}; + __export2(src_exports, { + EventStreamMarshaller: () => EventStreamMarshaller, + eventStreamSerdeProvider: () => eventStreamSerdeProvider + }); + module2.exports = __toCommonJS2(src_exports); + var import_eventstream_serde_universal = require_dist_cjs35(); + var import_stream5 = require("stream"); + async function* readabletoIterable(readStream2) { + let streamEnded = false; + let generationEnded = false; + const records = new Array(); + readStream2.on("error", (err) => { + if (!streamEnded) { + streamEnded = true; + } + if (err) { + throw err; + } + }); + readStream2.on("data", (data) => { + records.push(data); + }); + readStream2.on("end", () => { + streamEnded = true; + }); + while (!generationEnded) { + const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); + if (value) { + yield value; + } + generationEnded = streamEnded && records.length === 0; + } + } + __name(readabletoIterable, "readabletoIterable"); + var EventStreamMarshaller = class { + static { + __name(this, "EventStreamMarshaller"); + } + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({ + utf8Decoder, + utf8Encoder + }); + } + deserialize(body, deserializer) { + const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body); + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + return import_stream5.Readable.from(this.universalMarshaller.serialize(input, serializer)); + } + }; + var eventStreamSerdeProvider = /* @__PURE__ */ __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider"); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/ruleset.js +var require_ruleset2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/ruleset.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ruleSet = void 0; + var s4 = "required"; + var t4 = "fn"; + var u5 = "argv"; + var v7 = "ref"; + var a5 = true; + var b5 = "isSet"; + var c4 = "booleanEquals"; + var d7 = "error"; + var e5 = "endpoint"; + var f6 = "tree"; + var g4 = "PartitionResult"; + var h5 = { [s4]: false, "type": "String" }; + var i5 = { [s4]: true, "default": false, "type": "Boolean" }; + var j6 = { [v7]: "Endpoint" }; + var k6 = { [t4]: c4, [u5]: [{ [v7]: "UseFIPS" }, true] }; + var l5 = { [t4]: c4, [u5]: [{ [v7]: "UseDualStack" }, true] }; + var m6 = {}; + var n4 = { [t4]: "getAttr", [u5]: [{ [v7]: g4 }, "supportsFIPS"] }; + var o5 = { [t4]: c4, [u5]: [true, { [t4]: "getAttr", [u5]: [{ [v7]: g4 }, "supportsDualStack"] }] }; + var p5 = [k6]; + var q5 = [l5]; + var r5 = [{ [v7]: "Region" }]; + var _data3 = { version: "1.0", parameters: { Region: h5, UseDualStack: i5, UseFIPS: i5, Endpoint: h5 }, rules: [{ conditions: [{ [t4]: b5, [u5]: [j6] }], rules: [{ conditions: p5, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d7 }, { rules: [{ conditions: q5, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d7 }, { endpoint: { url: j6, properties: m6, headers: m6 }, type: e5 }], type: f6 }], type: f6 }, { rules: [{ conditions: [{ [t4]: b5, [u5]: r5 }], rules: [{ conditions: [{ [t4]: "aws.partition", [u5]: r5, assign: g4 }], rules: [{ conditions: [k6, l5], rules: [{ conditions: [{ [t4]: c4, [u5]: [a5, n4] }, o5], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m6, headers: m6 }, type: e5 }], type: f6 }], type: f6 }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d7 }], type: f6 }, { conditions: p5, rules: [{ conditions: [{ [t4]: c4, [u5]: [n4, a5] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m6, headers: m6 }, type: e5 }], type: f6 }], type: f6 }, { error: "FIPS is enabled but this partition does not support FIPS", type: d7 }], type: f6 }, { conditions: q5, rules: [{ conditions: [o5], rules: [{ rules: [{ endpoint: { url: "https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m6, headers: m6 }, type: e5 }], type: f6 }], type: f6 }, { error: "DualStack is enabled but this partition does not support DualStack", type: d7 }], type: f6 }, { rules: [{ endpoint: { url: "https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}", properties: m6, headers: m6 }, type: e5 }], type: f6 }], type: f6 }], type: f6 }, { error: "Invalid Configuration: Missing Region", type: d7 }], type: f6 }] }; + exports2.ruleSet = _data3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js +var require_endpointResolver2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultEndpointResolver = void 0; + var util_endpoints_1 = require_dist_cjs22(); + var util_endpoints_2 = require_dist_cjs19(); + var ruleset_1 = require_ruleset2(); + var cache3 = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"] + }); + var defaultEndpointResolver3 = (endpointParams, context2 = {}) => { + return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams, + logger: context2.logger + })); + }; + exports2.defaultEndpointResolver = defaultEndpointResolver3; + util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js +var require_runtimeConfig_shared2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var smithy_client_1 = require_dist_cjs27(); + var url_parser_1 = require_dist_cjs21(); + var util_base64_1 = require_dist_cjs12(); + var util_utf8_1 = require_dist_cjs11(); + var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider(); + var endpointResolver_1 = require_endpointResolver2(); + var getRuntimeConfig5 = (config6) => { + return { + apiVersion: "2023-09-30", + base64Decoder: config6?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config6?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config6?.disableHostPrefix ?? false, + endpointProvider: config6?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config6?.extensions ?? [], + httpAuthSchemeProvider: config6?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultBedrockRuntimeHttpAuthSchemeProvider, + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#httpBearerAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"), + signer: new core_2.HttpBearerAuthSigner() + } + ], + logger: config6?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config6?.serviceId ?? "Bedrock Runtime", + urlParser: config6?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config6?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config6?.utf8Encoder ?? util_utf8_1.toUtf8 + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js +var require_runtimeConfig2 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRuntimeConfig = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var package_json_1 = tslib_1.__importDefault(require_package2()); + var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var credential_provider_node_1 = require_dist_cjs62(); + var eventstream_handler_node_1 = require_dist_cjs63(); + var token_providers_1 = require_dist_cjs57(); + var util_user_agent_node_1 = require_dist_cjs51(); + var config_resolver_1 = require_dist_cjs39(); + var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var eventstream_serde_node_1 = require_dist_cjs64(); + var hash_node_1 = require_dist_cjs52(); + var middleware_retry_1 = require_dist_cjs47(); + var node_config_provider_1 = require_dist_cjs43(); + var node_http_handler_1 = require_dist_cjs15(); + var util_body_length_node_1 = require_dist_cjs53(); + var util_retry_1 = require_dist_cjs46(); + var runtimeConfig_shared_1 = require_runtimeConfig_shared2(); + var smithy_client_1 = require_dist_cjs27(); + var util_defaults_mode_node_1 = require_dist_cjs54(); + var smithy_client_2 = require_dist_cjs27(); + var getRuntimeConfig5 = (config6) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config6); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config6); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config6?.profile, + logger: clientSharedValues.logger, + signingName: "bedrock" + }; + return { + ...clientSharedValues, + ...config6, + runtime: "node", + defaultsMode, + authSchemePreference: config6?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config6?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config6?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config6?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + eventStreamPayloadHandlerProvider: config6?.eventStreamPayloadHandlerProvider ?? eventstream_handler_node_1.eventStreamPayloadHandlerProvider, + eventStreamSerdeProvider: config6?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, + httpAuthSchemes: config6?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer() + }, + { + schemeId: "smithy.api#httpBearerAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => { + try { + return await (0, token_providers_1.fromEnvSigningName)({ signingName: "bedrock" })(); + } catch (error) { + return await (0, token_providers_1.nodeProvider)(idProps)(idProps); + } + }), + signer: new core_2.HttpBearerAuthSigner() + } + ], + maxAttempts: config6?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config6), + region: config6?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttp2Handler.create(config6?.requestHandler ?? (async () => ({ ...await defaultConfigProvider(), disableConcurrentStreams: true }))), + retryMode: config6?.retryMode ?? (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE + }, config6), + sha256: config6?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config6?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config6?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config6?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config6?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig) + }; + }; + exports2.getRuntimeConfig = getRuntimeConfig5; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/rng.js +function rng3() { + if (poolPtr3 > rnds8Pool3.length - 16) { + import_crypto10.default.randomFillSync(rnds8Pool3); + poolPtr3 = 0; + } + return rnds8Pool3.slice(poolPtr3, poolPtr3 += 16); +} +var import_crypto10, rnds8Pool3, poolPtr3; +var init_rng3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto10 = __toESM(require("crypto")); + rnds8Pool3 = new Uint8Array(256); + poolPtr3 = rnds8Pool3.length; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/regex.js +var regex_default3; +var init_regex3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default3 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/validate.js +function validate4(uuid) { + return typeof uuid === "string" && regex_default3.test(uuid); +} +var validate_default3; +var init_validate3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex3(); + validate_default3 = validate4; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/stringify.js +function unsafeStringify2(arr, offset = 0) { + return byteToHex3[arr[offset + 0]] + byteToHex3[arr[offset + 1]] + byteToHex3[arr[offset + 2]] + byteToHex3[arr[offset + 3]] + "-" + byteToHex3[arr[offset + 4]] + byteToHex3[arr[offset + 5]] + "-" + byteToHex3[arr[offset + 6]] + byteToHex3[arr[offset + 7]] + "-" + byteToHex3[arr[offset + 8]] + byteToHex3[arr[offset + 9]] + "-" + byteToHex3[arr[offset + 10]] + byteToHex3[arr[offset + 11]] + byteToHex3[arr[offset + 12]] + byteToHex3[arr[offset + 13]] + byteToHex3[arr[offset + 14]] + byteToHex3[arr[offset + 15]]; +} +function stringify4(arr, offset = 0) { + const uuid = unsafeStringify2(arr, offset); + if (!validate_default3(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex3, stringify_default3; +var init_stringify3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate3(); + byteToHex3 = []; + for (let i5 = 0; i5 < 256; ++i5) { + byteToHex3.push((i5 + 256).toString(16).slice(1)); + } + stringify_default3 = stringify4; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v1.js +function v13(options, buf, offset) { + let i5 = buf && offset || 0; + const b5 = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId3; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng3)(); + if (node == null) { + node = _nodeId3 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; + const dt2 = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; + if (dt2 < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt2 < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs3 = msecs; + _lastNSecs3 = nsecs; + _clockseq3 = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b5[i5++] = tl >>> 24 & 255; + b5[i5++] = tl >>> 16 & 255; + b5[i5++] = tl >>> 8 & 255; + b5[i5++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b5[i5++] = tmh >>> 8 & 255; + b5[i5++] = tmh & 255; + b5[i5++] = tmh >>> 24 & 15 | 16; + b5[i5++] = tmh >>> 16 & 255; + b5[i5++] = clockseq >>> 8 | 128; + b5[i5++] = clockseq & 255; + for (let n4 = 0; n4 < 6; ++n4) { + b5[i5 + n4] = node[n4]; + } + return buf || unsafeStringify2(b5); +} +var _nodeId3, _clockseq3, _lastMSecs3, _lastNSecs3, v1_default3; +var init_v13 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng3(); + init_stringify3(); + _lastMSecs3 = 0; + _lastNSecs3 = 0; + v1_default3 = v13; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/parse.js +function parse3(uuid) { + if (!validate_default3(uuid)) { + throw TypeError("Invalid UUID"); + } + let v7; + const arr = new Uint8Array(16); + arr[0] = (v7 = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v7 >>> 16 & 255; + arr[2] = v7 >>> 8 & 255; + arr[3] = v7 & 255; + arr[4] = (v7 = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v7 & 255; + arr[6] = (v7 = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v7 & 255; + arr[8] = (v7 = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v7 & 255; + arr[10] = (v7 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v7 / 4294967296 & 255; + arr[12] = v7 >>> 24 & 255; + arr[13] = v7 >>> 16 & 255; + arr[14] = v7 >>> 8 & 255; + arr[15] = v7 & 255; + return arr; +} +var parse_default3; +var init_parse3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate3(); + parse_default3 = parse3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes3(str2) { + str2 = unescape(encodeURIComponent(str2)); + const bytes = []; + for (let i5 = 0; i5 < str2.length; ++i5) { + bytes.push(str2.charCodeAt(i5)); + } + return bytes; +} +function v352(name, version4, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === "string") { + value = stringToBytes3(value); + } + if (typeof namespace === "string") { + namespace = parse_default3(namespace); + } + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version4; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = bytes[i5]; + } + return buf; + } + return unsafeStringify2(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS3; + generateUUID.URL = URL4; + return generateUUID; +} +var DNS3, URL4; +var init_v353 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify3(); + init_parse3(); + DNS3 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL4 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/md5.js +function md53(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto11.default.createHash("md5").update(bytes).digest(); +} +var import_crypto11, md5_default3; +var init_md53 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto11 = __toESM(require("crypto")); + md5_default3 = md53; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v3.js +var v33, v3_default3; +var init_v33 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v3.js"() { + init_v353(); + init_md53(); + v33 = v352("v3", 48, md5_default3); + v3_default3 = v33; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/native.js +var import_crypto12, native_default2; +var init_native2 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/native.js"() { + import_crypto12 = __toESM(require("crypto")); + native_default2 = { + randomUUID: import_crypto12.default.randomUUID + }; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v4.js +function v43(options, buf, offset) { + if (native_default2.randomUUID && !buf && !options) { + return native_default2.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng3)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i5 = 0; i5 < 16; ++i5) { + buf[offset + i5] = rnds[i5]; + } + return buf; + } + return unsafeStringify2(rnds); +} +var v4_default3; +var init_v43 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v4.js"() { + init_native2(); + init_rng3(); + init_stringify3(); + v4_default3 = v43; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/sha1.js +function sha13(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto13.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto13, sha1_default3; +var init_sha13 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto13 = __toESM(require("crypto")); + sha1_default3 = sha13; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v5.js +var v53, v5_default3; +var init_v53 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/v5.js"() { + init_v353(); + init_sha13(); + v53 = v352("v5", 80, sha1_default3); + v5_default3 = v53; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/nil.js +var nil_default3; +var init_nil3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default3 = "00000000-0000-0000-0000-000000000000"; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/version.js +function version3(uuid) { + if (!validate_default3(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); +} +var version_default3; +var init_version3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/version.js"() { + init_validate3(); + version_default3 = version3; + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports3 = {}; +__export(esm_node_exports3, { + NIL: () => nil_default3, + parse: () => parse_default3, + stringify: () => stringify_default3, + v1: () => v1_default3, + v3: () => v3_default3, + v4: () => v4_default3, + v5: () => v5_default3, + validate: () => validate_default3, + version: () => version_default3 +}); +var init_esm_node3 = __esm({ + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid/dist/esm-node/index.js"() { + init_v13(); + init_v33(); + init_v43(); + init_v53(); + init_nil3(); + init_version3(); + init_validate3(); + init_stringify3(); + init_parse3(); + } +}); + +// node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +var require_dist_cjs65 = __commonJS({ + "node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js"(exports2, module2) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + AccessDeniedException: () => AccessDeniedException2, + ApplyGuardrailCommand: () => ApplyGuardrailCommand, + ApplyGuardrailRequestFilterSensitiveLog: () => ApplyGuardrailRequestFilterSensitiveLog, + AsyncInvokeOutputDataConfig: () => AsyncInvokeOutputDataConfig, + AsyncInvokeStatus: () => AsyncInvokeStatus, + AsyncInvokeSummaryFilterSensitiveLog: () => AsyncInvokeSummaryFilterSensitiveLog, + BedrockRuntime: () => BedrockRuntime, + BedrockRuntimeClient: () => BedrockRuntimeClient2, + BedrockRuntimeServiceException: () => BedrockRuntimeServiceException, + BidirectionalInputPayloadPartFilterSensitiveLog: () => BidirectionalInputPayloadPartFilterSensitiveLog, + BidirectionalOutputPayloadPartFilterSensitiveLog: () => BidirectionalOutputPayloadPartFilterSensitiveLog, + CachePointType: () => CachePointType, + CitationGeneratedContent: () => CitationGeneratedContent, + CitationLocation: () => CitationLocation, + CitationSourceContent: () => CitationSourceContent, + ConflictException: () => ConflictException, + ContentBlock: () => ContentBlock, + ContentBlockDelta: () => ContentBlockDelta, + ContentBlockDeltaEventFilterSensitiveLog: () => ContentBlockDeltaEventFilterSensitiveLog, + ContentBlockDeltaFilterSensitiveLog: () => ContentBlockDeltaFilterSensitiveLog, + ContentBlockFilterSensitiveLog: () => ContentBlockFilterSensitiveLog, + ContentBlockStart: () => ContentBlockStart, + ConversationRole: () => ConversationRole, + ConverseCommand: () => ConverseCommand2, + ConverseOutput: () => ConverseOutput, + ConverseOutputFilterSensitiveLog: () => ConverseOutputFilterSensitiveLog, + ConverseRequestFilterSensitiveLog: () => ConverseRequestFilterSensitiveLog, + ConverseResponseFilterSensitiveLog: () => ConverseResponseFilterSensitiveLog, + ConverseStreamCommand: () => ConverseStreamCommand, + ConverseStreamOutput: () => ConverseStreamOutput, + ConverseStreamOutputFilterSensitiveLog: () => ConverseStreamOutputFilterSensitiveLog, + ConverseStreamRequestFilterSensitiveLog: () => ConverseStreamRequestFilterSensitiveLog, + ConverseStreamResponseFilterSensitiveLog: () => ConverseStreamResponseFilterSensitiveLog, + DocumentContentBlock: () => DocumentContentBlock, + DocumentFormat: () => DocumentFormat, + DocumentSource: () => DocumentSource, + GetAsyncInvokeCommand: () => GetAsyncInvokeCommand, + GetAsyncInvokeResponseFilterSensitiveLog: () => GetAsyncInvokeResponseFilterSensitiveLog, + GuardrailAction: () => GuardrailAction, + GuardrailContentBlock: () => GuardrailContentBlock, + GuardrailContentBlockFilterSensitiveLog: () => GuardrailContentBlockFilterSensitiveLog, + GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence, + GuardrailContentFilterStrength: () => GuardrailContentFilterStrength, + GuardrailContentFilterType: () => GuardrailContentFilterType, + GuardrailContentPolicyAction: () => GuardrailContentPolicyAction, + GuardrailContentQualifier: () => GuardrailContentQualifier, + GuardrailContentSource: () => GuardrailContentSource, + GuardrailContextualGroundingFilterType: () => GuardrailContextualGroundingFilterType, + GuardrailContextualGroundingPolicyAction: () => GuardrailContextualGroundingPolicyAction, + GuardrailConverseContentBlock: () => GuardrailConverseContentBlock, + GuardrailConverseContentBlockFilterSensitiveLog: () => GuardrailConverseContentBlockFilterSensitiveLog, + GuardrailConverseContentQualifier: () => GuardrailConverseContentQualifier, + GuardrailConverseImageBlockFilterSensitiveLog: () => GuardrailConverseImageBlockFilterSensitiveLog, + GuardrailConverseImageFormat: () => GuardrailConverseImageFormat, + GuardrailConverseImageSource: () => GuardrailConverseImageSource, + GuardrailConverseImageSourceFilterSensitiveLog: () => GuardrailConverseImageSourceFilterSensitiveLog, + GuardrailImageBlockFilterSensitiveLog: () => GuardrailImageBlockFilterSensitiveLog, + GuardrailImageFormat: () => GuardrailImageFormat, + GuardrailImageSource: () => GuardrailImageSource, + GuardrailImageSourceFilterSensitiveLog: () => GuardrailImageSourceFilterSensitiveLog, + GuardrailManagedWordType: () => GuardrailManagedWordType, + GuardrailOutputScope: () => GuardrailOutputScope, + GuardrailPiiEntityType: () => GuardrailPiiEntityType, + GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction, + GuardrailStreamProcessingMode: () => GuardrailStreamProcessingMode, + GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction, + GuardrailTopicType: () => GuardrailTopicType, + GuardrailTrace: () => GuardrailTrace, + GuardrailWordPolicyAction: () => GuardrailWordPolicyAction, + ImageFormat: () => ImageFormat, + ImageSource: () => ImageSource, + InternalServerException: () => InternalServerException2, + InvokeModelCommand: () => InvokeModelCommand2, + InvokeModelRequestFilterSensitiveLog: () => InvokeModelRequestFilterSensitiveLog, + InvokeModelResponseFilterSensitiveLog: () => InvokeModelResponseFilterSensitiveLog, + InvokeModelWithBidirectionalStreamCommand: () => InvokeModelWithBidirectionalStreamCommand, + InvokeModelWithBidirectionalStreamInput: () => InvokeModelWithBidirectionalStreamInput, + InvokeModelWithBidirectionalStreamInputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamInputFilterSensitiveLog, + InvokeModelWithBidirectionalStreamOutput: () => InvokeModelWithBidirectionalStreamOutput, + InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog, + InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog, + InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog: () => InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog, + InvokeModelWithResponseStreamCommand: () => InvokeModelWithResponseStreamCommand, + InvokeModelWithResponseStreamRequestFilterSensitiveLog: () => InvokeModelWithResponseStreamRequestFilterSensitiveLog, + InvokeModelWithResponseStreamResponseFilterSensitiveLog: () => InvokeModelWithResponseStreamResponseFilterSensitiveLog, + ListAsyncInvokesCommand: () => ListAsyncInvokesCommand, + ListAsyncInvokesResponseFilterSensitiveLog: () => ListAsyncInvokesResponseFilterSensitiveLog, + MessageFilterSensitiveLog: () => MessageFilterSensitiveLog, + ModelErrorException: () => ModelErrorException, + ModelNotReadyException: () => ModelNotReadyException, + ModelStreamErrorException: () => ModelStreamErrorException, + ModelTimeoutException: () => ModelTimeoutException, + PayloadPartFilterSensitiveLog: () => PayloadPartFilterSensitiveLog, + PerformanceConfigLatency: () => PerformanceConfigLatency, + PromptVariableValues: () => PromptVariableValues, + ReasoningContentBlock: () => ReasoningContentBlock, + ReasoningContentBlockDelta: () => ReasoningContentBlockDelta, + ReasoningContentBlockDeltaFilterSensitiveLog: () => ReasoningContentBlockDeltaFilterSensitiveLog, + ReasoningContentBlockFilterSensitiveLog: () => ReasoningContentBlockFilterSensitiveLog, + ReasoningTextBlockFilterSensitiveLog: () => ReasoningTextBlockFilterSensitiveLog, + ResourceNotFoundException: () => ResourceNotFoundException, + ResponseStream: () => ResponseStream, + ResponseStreamFilterSensitiveLog: () => ResponseStreamFilterSensitiveLog, + ServiceQuotaExceededException: () => ServiceQuotaExceededException, + ServiceUnavailableException: () => ServiceUnavailableException, + SortAsyncInvocationBy: () => SortAsyncInvocationBy, + SortOrder: () => SortOrder, + StartAsyncInvokeCommand: () => StartAsyncInvokeCommand, + StartAsyncInvokeRequestFilterSensitiveLog: () => StartAsyncInvokeRequestFilterSensitiveLog, + StopReason: () => StopReason, + SystemContentBlock: () => SystemContentBlock, + SystemContentBlockFilterSensitiveLog: () => SystemContentBlockFilterSensitiveLog, + ThrottlingException: () => ThrottlingException, + Tool: () => Tool, + ToolChoice: () => ToolChoice, + ToolInputSchema: () => ToolInputSchema, + ToolResultContentBlock: () => ToolResultContentBlock, + ToolResultStatus: () => ToolResultStatus, + Trace: () => Trace, + ValidationException: () => ValidationException, + VideoFormat: () => VideoFormat, + VideoSource: () => VideoSource, + __Client: () => import_smithy_client28.Client, + paginateListAsyncInvokes: () => paginateListAsyncInvokes + }); + module2.exports = __toCommonJS2(index_exports); + var import_middleware_eventstream = require_dist_cjs3(); + var import_middleware_host_header3 = require_dist_cjs4(); + var import_middleware_logger3 = require_dist_cjs5(); + var import_middleware_recursion_detection3 = require_dist_cjs6(); + var import_middleware_user_agent3 = require_dist_cjs29(); + var import_middleware_websocket = require_dist_cjs37(); + var import_config_resolver5 = require_dist_cjs39(); + var import_core39 = (init_dist_es(), __toCommonJS(dist_es_exports)); + var import_eventstream_serde_config_resolver = require_dist_cjs40(); + var import_middleware_content_length3 = require_dist_cjs41(); + var import_middleware_endpoint6 = require_dist_cjs44(); + var import_middleware_retry5 = require_dist_cjs47(); + var import_httpAuthSchemeProvider5 = require_httpAuthSchemeProvider(); + var resolveClientEndpointParameters3 = /* @__PURE__ */ __name((options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "bedrock" + }); + }, "resolveClientEndpointParameters"); + var commonParams3 = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } + }; + var import_runtimeConfig5 = require_runtimeConfig2(); + var import_region_config_resolver3 = require_dist_cjs55(); + var import_protocol_http15 = require_dist_cjs2(); + var import_smithy_client28 = require_dist_cjs27(); + var getHttpAuthExtensionConfiguration3 = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + let _token = runtimeConfig.token; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + setToken(token) { + _token = token; + }, + token() { + return _token; + } + }; + }, "getHttpAuthExtensionConfiguration"); + var resolveHttpAuthRuntimeConfig3 = /* @__PURE__ */ __name((config6) => { + return { + httpAuthSchemes: config6.httpAuthSchemes(), + httpAuthSchemeProvider: config6.httpAuthSchemeProvider(), + credentials: config6.credentials(), + token: config6.token() + }; + }, "resolveHttpAuthRuntimeConfig"); + var resolveRuntimeExtensions3 = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign( + (0, import_region_config_resolver3.getAwsRegionExtensionConfiguration)(runtimeConfig), + (0, import_smithy_client28.getDefaultExtensionConfiguration)(runtimeConfig), + (0, import_protocol_http15.getHttpHandlerExtensionConfiguration)(runtimeConfig), + getHttpAuthExtensionConfiguration3(runtimeConfig) + ); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign( + runtimeConfig, + (0, import_region_config_resolver3.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + (0, import_smithy_client28.resolveDefaultRuntimeConfig)(extensionConfiguration), + (0, import_protocol_http15.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + resolveHttpAuthRuntimeConfig3(extensionConfiguration) + ); + }, "resolveRuntimeExtensions"); + var BedrockRuntimeClient2 = class extends import_smithy_client28.Client { + static { + __name(this, "BedrockRuntimeClient"); + } + /** + * The resolved configuration of BedrockRuntimeClient class. This is resolved and normalized from the {@link BedrockRuntimeClientConfig | constructor configuration interface}. + */ + config; + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig5.getRuntimeConfig)(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters3(_config_0); + const _config_2 = (0, import_middleware_user_agent3.resolveUserAgentConfig)(_config_1); + const _config_3 = (0, import_middleware_retry5.resolveRetryConfig)(_config_2); + const _config_4 = (0, import_config_resolver5.resolveRegionConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header3.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_endpoint6.resolveEndpointConfig)(_config_5); + const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6); + const _config_8 = (0, import_httpAuthSchemeProvider5.resolveHttpAuthSchemeConfig)(_config_7); + const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8); + const _config_10 = (0, import_middleware_websocket.resolveWebSocketConfig)(_config_9); + const _config_11 = resolveRuntimeExtensions3(_config_10, configuration?.extensions || []); + this.config = _config_11; + this.middlewareStack.use((0, import_middleware_user_agent3.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_retry5.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length3.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header3.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger3.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection3.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core39.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider5.defaultBedrockRuntimeHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: /* @__PURE__ */ __name(async (config6) => new import_core39.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config6.credentials, + "smithy.api#httpBearerAuth": config6.token + }), "identityProviderConfigProvider") + }) + ); + this.middlewareStack.use((0, import_core39.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + }; + var import_middleware_serde5 = require_dist_cjs8(); + var BedrockRuntimeServiceException = class _BedrockRuntimeServiceException extends import_smithy_client28.ServiceException { + static { + __name(this, "BedrockRuntimeServiceException"); + } + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _BedrockRuntimeServiceException.prototype); + } + }; + var AccessDeniedException2 = class _AccessDeniedException extends BedrockRuntimeServiceException { + static { + __name(this, "AccessDeniedException"); + } + name = "AccessDeniedException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + } + }; + var AsyncInvokeOutputDataConfig; + ((AsyncInvokeOutputDataConfig3) => { + AsyncInvokeOutputDataConfig3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.s3OutputDataConfig !== void 0) return visitor.s3OutputDataConfig(value.s3OutputDataConfig); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(AsyncInvokeOutputDataConfig || (AsyncInvokeOutputDataConfig = {})); + var AsyncInvokeStatus = { + COMPLETED: "Completed", + FAILED: "Failed", + IN_PROGRESS: "InProgress" + }; + var InternalServerException2 = class _InternalServerException extends BedrockRuntimeServiceException { + static { + __name(this, "InternalServerException"); + } + name = "InternalServerException"; + $fault = "server"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _InternalServerException.prototype); + } + }; + var ThrottlingException = class _ThrottlingException extends BedrockRuntimeServiceException { + static { + __name(this, "ThrottlingException"); + } + name = "ThrottlingException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ThrottlingException.prototype); + } + }; + var ValidationException = class _ValidationException extends BedrockRuntimeServiceException { + static { + __name(this, "ValidationException"); + } + name = "ValidationException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ValidationException.prototype); + } + }; + var SortAsyncInvocationBy = { + SUBMISSION_TIME: "SubmissionTime" + }; + var SortOrder = { + ASCENDING: "Ascending", + DESCENDING: "Descending" + }; + var ConflictException = class _ConflictException extends BedrockRuntimeServiceException { + static { + __name(this, "ConflictException"); + } + name = "ConflictException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ConflictException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ConflictException.prototype); + } + }; + var ResourceNotFoundException = class _ResourceNotFoundException extends BedrockRuntimeServiceException { + static { + __name(this, "ResourceNotFoundException"); + } + name = "ResourceNotFoundException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); + } + }; + var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends BedrockRuntimeServiceException { + static { + __name(this, "ServiceQuotaExceededException"); + } + name = "ServiceQuotaExceededException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype); + } + }; + var ServiceUnavailableException = class _ServiceUnavailableException extends BedrockRuntimeServiceException { + static { + __name(this, "ServiceUnavailableException"); + } + name = "ServiceUnavailableException"; + $fault = "server"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ServiceUnavailableException", + $fault: "server", + ...opts + }); + Object.setPrototypeOf(this, _ServiceUnavailableException.prototype); + } + }; + var GuardrailImageFormat = { + JPEG: "jpeg", + PNG: "png" + }; + var GuardrailImageSource; + ((GuardrailImageSource2) => { + GuardrailImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailImageSource || (GuardrailImageSource = {})); + var GuardrailContentQualifier = { + GROUNDING_SOURCE: "grounding_source", + GUARD_CONTENT: "guard_content", + QUERY: "query" + }; + var GuardrailContentBlock; + ((GuardrailContentBlock2) => { + GuardrailContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailContentBlock || (GuardrailContentBlock = {})); + var GuardrailOutputScope = { + FULL: "FULL", + INTERVENTIONS: "INTERVENTIONS" + }; + var GuardrailContentSource = { + INPUT: "INPUT", + OUTPUT: "OUTPUT" + }; + var GuardrailAction = { + GUARDRAIL_INTERVENED: "GUARDRAIL_INTERVENED", + NONE: "NONE" + }; + var GuardrailContentPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailContentFilterConfidence = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", + NONE: "NONE" + }; + var GuardrailContentFilterStrength = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", + NONE: "NONE" + }; + var GuardrailContentFilterType = { + HATE: "HATE", + INSULTS: "INSULTS", + MISCONDUCT: "MISCONDUCT", + PROMPT_ATTACK: "PROMPT_ATTACK", + SEXUAL: "SEXUAL", + VIOLENCE: "VIOLENCE" + }; + var GuardrailContextualGroundingPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailContextualGroundingFilterType = { + GROUNDING: "GROUNDING", + RELEVANCE: "RELEVANCE" + }; + var GuardrailSensitiveInformationPolicyAction = { + ANONYMIZED: "ANONYMIZED", + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailPiiEntityType = { + ADDRESS: "ADDRESS", + AGE: "AGE", + AWS_ACCESS_KEY: "AWS_ACCESS_KEY", + AWS_SECRET_KEY: "AWS_SECRET_KEY", + CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER", + CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER", + CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV", + CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY", + CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER", + DRIVER_ID: "DRIVER_ID", + EMAIL: "EMAIL", + INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER", + IP_ADDRESS: "IP_ADDRESS", + LICENSE_PLATE: "LICENSE_PLATE", + MAC_ADDRESS: "MAC_ADDRESS", + NAME: "NAME", + PASSWORD: "PASSWORD", + PHONE: "PHONE", + PIN: "PIN", + SWIFT_CODE: "SWIFT_CODE", + UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER", + UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER", + UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", + URL: "URL", + USERNAME: "USERNAME", + US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER", + US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER", + US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", + US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER", + US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER", + VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER" + }; + var GuardrailTopicPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailTopicType = { + DENY: "DENY" + }; + var GuardrailWordPolicyAction = { + BLOCKED: "BLOCKED", + NONE: "NONE" + }; + var GuardrailManagedWordType = { + PROFANITY: "PROFANITY" + }; + var GuardrailTrace = { + DISABLED: "disabled", + ENABLED: "enabled", + ENABLED_FULL: "enabled_full" + }; + var CachePointType = { + DEFAULT: "default" + }; + var CitationLocation; + ((CitationLocation3) => { + CitationLocation3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.documentChar !== void 0) return visitor.documentChar(value.documentChar); + if (value.documentPage !== void 0) return visitor.documentPage(value.documentPage); + if (value.documentChunk !== void 0) return visitor.documentChunk(value.documentChunk); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationLocation || (CitationLocation = {})); + var CitationSourceContent; + ((CitationSourceContent3) => { + CitationSourceContent3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationSourceContent || (CitationSourceContent = {})); + var CitationGeneratedContent; + ((CitationGeneratedContent3) => { + CitationGeneratedContent3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(CitationGeneratedContent || (CitationGeneratedContent = {})); + var DocumentFormat = { + CSV: "csv", + DOC: "doc", + DOCX: "docx", + HTML: "html", + MD: "md", + PDF: "pdf", + TXT: "txt", + XLS: "xls", + XLSX: "xlsx" + }; + var DocumentContentBlock; + ((DocumentContentBlock3) => { + DocumentContentBlock3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(DocumentContentBlock || (DocumentContentBlock = {})); + var DocumentSource; + ((DocumentSource2) => { + DocumentSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + if (value.text !== void 0) return visitor.text(value.text); + if (value.content !== void 0) return visitor.content(value.content); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(DocumentSource || (DocumentSource = {})); + var GuardrailConverseImageFormat = { + JPEG: "jpeg", + PNG: "png" + }; + var GuardrailConverseImageSource; + ((GuardrailConverseImageSource2) => { + GuardrailConverseImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailConverseImageSource || (GuardrailConverseImageSource = {})); + var GuardrailConverseContentQualifier = { + GROUNDING_SOURCE: "grounding_source", + GUARD_CONTENT: "guard_content", + QUERY: "query" + }; + var GuardrailConverseContentBlock; + ((GuardrailConverseContentBlock2) => { + GuardrailConverseContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(GuardrailConverseContentBlock || (GuardrailConverseContentBlock = {})); + var ImageFormat = { + GIF: "gif", + JPEG: "jpeg", + PNG: "png", + WEBP: "webp" + }; + var ImageSource; + ((ImageSource2) => { + ImageSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ImageSource || (ImageSource = {})); + var ReasoningContentBlock; + ((ReasoningContentBlock2) => { + ReasoningContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.reasoningText !== void 0) return visitor.reasoningText(value.reasoningText); + if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ReasoningContentBlock || (ReasoningContentBlock = {})); + var VideoFormat = { + FLV: "flv", + MKV: "mkv", + MOV: "mov", + MP4: "mp4", + MPEG: "mpeg", + MPG: "mpg", + THREE_GP: "three_gp", + WEBM: "webm", + WMV: "wmv" + }; + var VideoSource; + ((VideoSource2) => { + VideoSource2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.bytes !== void 0) return visitor.bytes(value.bytes); + if (value.s3Location !== void 0) return visitor.s3Location(value.s3Location); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(VideoSource || (VideoSource = {})); + var ToolResultContentBlock; + ((ToolResultContentBlock2) => { + ToolResultContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.json !== void 0) return visitor.json(value.json); + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + if (value.document !== void 0) return visitor.document(value.document); + if (value.video !== void 0) return visitor.video(value.video); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolResultContentBlock || (ToolResultContentBlock = {})); + var ToolResultStatus = { + ERROR: "error", + SUCCESS: "success" + }; + var ContentBlock; + ((ContentBlock2) => { + ContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.image !== void 0) return visitor.image(value.image); + if (value.document !== void 0) return visitor.document(value.document); + if (value.video !== void 0) return visitor.video(value.video); + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + if (value.toolResult !== void 0) return visitor.toolResult(value.toolResult); + if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent); + if (value.citationsContent !== void 0) return visitor.citationsContent(value.citationsContent); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlock || (ContentBlock = {})); + var ConversationRole = { + ASSISTANT: "assistant", + USER: "user" + }; + var PerformanceConfigLatency = { + OPTIMIZED: "optimized", + STANDARD: "standard" + }; + var PromptVariableValues; + ((PromptVariableValues3) => { + PromptVariableValues3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(PromptVariableValues || (PromptVariableValues = {})); + var SystemContentBlock; + ((SystemContentBlock2) => { + SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(SystemContentBlock || (SystemContentBlock = {})); + var ToolChoice; + ((ToolChoice3) => { + ToolChoice3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.auto !== void 0) return visitor.auto(value.auto); + if (value.any !== void 0) return visitor.any(value.any); + if (value.tool !== void 0) return visitor.tool(value.tool); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolChoice || (ToolChoice = {})); + var ToolInputSchema; + ((ToolInputSchema2) => { + ToolInputSchema2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.json !== void 0) return visitor.json(value.json); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ToolInputSchema || (ToolInputSchema = {})); + var Tool; + ((Tool2) => { + Tool2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.toolSpec !== void 0) return visitor.toolSpec(value.toolSpec); + if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(Tool || (Tool = {})); + var ConverseOutput; + ((ConverseOutput3) => { + ConverseOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.message !== void 0) return visitor.message(value.message); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ConverseOutput || (ConverseOutput = {})); + var StopReason = { + CONTENT_FILTERED: "content_filtered", + END_TURN: "end_turn", + GUARDRAIL_INTERVENED: "guardrail_intervened", + MAX_TOKENS: "max_tokens", + STOP_SEQUENCE: "stop_sequence", + TOOL_USE: "tool_use" + }; + var ModelErrorException = class _ModelErrorException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelErrorException"); + } + name = "ModelErrorException"; + $fault = "client"; + /** + *

The original status code.

+ * @public + */ + originalStatusCode; + /** + *

The resource name.

+ * @public + */ + resourceName; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelErrorException.prototype); + this.originalStatusCode = opts.originalStatusCode; + this.resourceName = opts.resourceName; + } + }; + var ModelNotReadyException = class _ModelNotReadyException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelNotReadyException"); + } + name = "ModelNotReadyException"; + $fault = "client"; + $retryable = {}; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelNotReadyException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelNotReadyException.prototype); + } + }; + var ModelTimeoutException = class _ModelTimeoutException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelTimeoutException"); + } + name = "ModelTimeoutException"; + $fault = "client"; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelTimeoutException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelTimeoutException.prototype); + } + }; + var GuardrailStreamProcessingMode = { + ASYNC: "async", + SYNC: "sync" + }; + var ReasoningContentBlockDelta; + ((ReasoningContentBlockDelta3) => { + ReasoningContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.redactedContent !== void 0) return visitor.redactedContent(value.redactedContent); + if (value.signature !== void 0) return visitor.signature(value.signature); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ReasoningContentBlockDelta || (ReasoningContentBlockDelta = {})); + var ContentBlockDelta; + ((ContentBlockDelta3) => { + ContentBlockDelta3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.text !== void 0) return visitor.text(value.text); + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent); + if (value.citation !== void 0) return visitor.citation(value.citation); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlockDelta || (ContentBlockDelta = {})); + var ContentBlockStart; + ((ContentBlockStart2) => { + ContentBlockStart2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ContentBlockStart || (ContentBlockStart = {})); + var ModelStreamErrorException = class _ModelStreamErrorException extends BedrockRuntimeServiceException { + static { + __name(this, "ModelStreamErrorException"); + } + name = "ModelStreamErrorException"; + $fault = "client"; + /** + *

The original status code.

+ * @public + */ + originalStatusCode; + /** + *

The original message.

+ * @public + */ + originalMessage; + /** + * @internal + */ + constructor(opts) { + super({ + name: "ModelStreamErrorException", + $fault: "client", + ...opts + }); + Object.setPrototypeOf(this, _ModelStreamErrorException.prototype); + this.originalStatusCode = opts.originalStatusCode; + this.originalMessage = opts.originalMessage; + } + }; + var ConverseStreamOutput; + ((ConverseStreamOutput3) => { + ConverseStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.messageStart !== void 0) return visitor.messageStart(value.messageStart); + if (value.contentBlockStart !== void 0) return visitor.contentBlockStart(value.contentBlockStart); + if (value.contentBlockDelta !== void 0) return visitor.contentBlockDelta(value.contentBlockDelta); + if (value.contentBlockStop !== void 0) return visitor.contentBlockStop(value.contentBlockStop); + if (value.messageStop !== void 0) return visitor.messageStop(value.messageStop); + if (value.metadata !== void 0) return visitor.metadata(value.metadata); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ConverseStreamOutput || (ConverseStreamOutput = {})); + var Trace = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", + ENABLED_FULL: "ENABLED_FULL" + }; + var InvokeModelWithBidirectionalStreamInput; + ((InvokeModelWithBidirectionalStreamInput2) => { + InvokeModelWithBidirectionalStreamInput2.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(InvokeModelWithBidirectionalStreamInput || (InvokeModelWithBidirectionalStreamInput = {})); + var InvokeModelWithBidirectionalStreamOutput; + ((InvokeModelWithBidirectionalStreamOutput3) => { + InvokeModelWithBidirectionalStreamOutput3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(InvokeModelWithBidirectionalStreamOutput || (InvokeModelWithBidirectionalStreamOutput = {})); + var ResponseStream; + ((ResponseStream3) => { + ResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => { + if (value.chunk !== void 0) return visitor.chunk(value.chunk); + if (value.internalServerException !== void 0) + return visitor.internalServerException(value.internalServerException); + if (value.modelStreamErrorException !== void 0) + return visitor.modelStreamErrorException(value.modelStreamErrorException); + if (value.validationException !== void 0) return visitor.validationException(value.validationException); + if (value.throttlingException !== void 0) return visitor.throttlingException(value.throttlingException); + if (value.modelTimeoutException !== void 0) return visitor.modelTimeoutException(value.modelTimeoutException); + if (value.serviceUnavailableException !== void 0) + return visitor.serviceUnavailableException(value.serviceUnavailableException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }, "visit"); + })(ResponseStream || (ResponseStream = {})); + var GetAsyncInvokeResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.failureMessage && { failureMessage: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "GetAsyncInvokeResponseFilterSensitiveLog"); + var AsyncInvokeSummaryFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.failureMessage && { failureMessage: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "AsyncInvokeSummaryFilterSensitiveLog"); + var ListAsyncInvokesResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.asyncInvokeSummaries && { + asyncInvokeSummaries: obj.asyncInvokeSummaries.map((item) => AsyncInvokeSummaryFilterSensitiveLog(item)) + } + }), "ListAsyncInvokesResponseFilterSensitiveLog"); + var StartAsyncInvokeRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.modelInput && { modelInput: import_smithy_client28.SENSITIVE_STRING }, + ...obj.outputDataConfig && { outputDataConfig: obj.outputDataConfig } + }), "StartAsyncInvokeRequestFilterSensitiveLog"); + var GuardrailImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.bytes !== void 0) return { bytes: obj.bytes }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailImageSourceFilterSensitiveLog"); + var GuardrailImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.source && { source: import_smithy_client28.SENSITIVE_STRING } + }), "GuardrailImageBlockFilterSensitiveLog"); + var GuardrailContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailContentBlockFilterSensitiveLog"); + var ApplyGuardrailRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.content && { content: obj.content.map((item) => GuardrailContentBlockFilterSensitiveLog(item)) } + }), "ApplyGuardrailRequestFilterSensitiveLog"); + var GuardrailConverseImageSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.bytes !== void 0) return { bytes: obj.bytes }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailConverseImageSourceFilterSensitiveLog"); + var GuardrailConverseImageBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.source && { source: import_smithy_client28.SENSITIVE_STRING } + }), "GuardrailConverseImageBlockFilterSensitiveLog"); + var GuardrailConverseContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "GuardrailConverseContentBlockFilterSensitiveLog"); + var ReasoningTextBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj + }), "ReasoningTextBlockFilterSensitiveLog"); + var ReasoningContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.reasoningText !== void 0) return { reasoningText: import_smithy_client28.SENSITIVE_STRING }; + if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ReasoningContentBlockFilterSensitiveLog"); + var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.image !== void 0) return { image: obj.image }; + if (obj.document !== void 0) return { document: obj.document }; + if (obj.video !== void 0) return { video: obj.video }; + if (obj.toolUse !== void 0) return { toolUse: obj.toolUse }; + if (obj.toolResult !== void 0) return { toolResult: obj.toolResult }; + if (obj.guardContent !== void 0) + return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) }; + if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint }; + if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client28.SENSITIVE_STRING }; + if (obj.citationsContent !== void 0) return { citationsContent: obj.citationsContent }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ContentBlockFilterSensitiveLog"); + var MessageFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.content && { content: obj.content.map((item) => ContentBlockFilterSensitiveLog(item)) } + }), "MessageFilterSensitiveLog"); + var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.guardContent !== void 0) + return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) }; + if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "SystemContentBlockFilterSensitiveLog"); + var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }, + ...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }, + ...obj.toolConfig && { toolConfig: obj.toolConfig }, + ...obj.promptVariables && { promptVariables: import_smithy_client28.SENSITIVE_STRING }, + ...obj.requestMetadata && { requestMetadata: import_smithy_client28.SENSITIVE_STRING } + }), "ConverseRequestFilterSensitiveLog"); + var ConverseOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.message !== void 0) return { message: MessageFilterSensitiveLog(obj.message) }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ConverseOutputFilterSensitiveLog"); + var ConverseResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.output && { output: ConverseOutputFilterSensitiveLog(obj.output) } + }), "ConverseResponseFilterSensitiveLog"); + var ConverseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }, + ...obj.system && { system: obj.system.map((item) => SystemContentBlockFilterSensitiveLog(item)) }, + ...obj.toolConfig && { toolConfig: obj.toolConfig }, + ...obj.promptVariables && { promptVariables: import_smithy_client28.SENSITIVE_STRING }, + ...obj.requestMetadata && { requestMetadata: import_smithy_client28.SENSITIVE_STRING } + }), "ConverseStreamRequestFilterSensitiveLog"); + var ReasoningContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.redactedContent !== void 0) return { redactedContent: obj.redactedContent }; + if (obj.signature !== void 0) return { signature: obj.signature }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ReasoningContentBlockDeltaFilterSensitiveLog"); + var ContentBlockDeltaFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.text !== void 0) return { text: obj.text }; + if (obj.toolUse !== void 0) return { toolUse: obj.toolUse }; + if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client28.SENSITIVE_STRING }; + if (obj.citation !== void 0) return { citation: obj.citation }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ContentBlockDeltaFilterSensitiveLog"); + var ContentBlockDeltaEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.delta && { delta: ContentBlockDeltaFilterSensitiveLog(obj.delta) } + }), "ContentBlockDeltaEventFilterSensitiveLog"); + var ConverseStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.messageStart !== void 0) return { messageStart: obj.messageStart }; + if (obj.contentBlockStart !== void 0) return { contentBlockStart: obj.contentBlockStart }; + if (obj.contentBlockDelta !== void 0) + return { contentBlockDelta: ContentBlockDeltaEventFilterSensitiveLog(obj.contentBlockDelta) }; + if (obj.contentBlockStop !== void 0) return { contentBlockStop: obj.contentBlockStop }; + if (obj.messageStop !== void 0) return { messageStop: obj.messageStop }; + if (obj.metadata !== void 0) return { metadata: obj.metadata }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ConverseStreamOutputFilterSensitiveLog"); + var ConverseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.stream && { stream: "STREAMING_CONTENT" } + }), "ConverseStreamResponseFilterSensitiveLog"); + var InvokeModelRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelRequestFilterSensitiveLog"); + var InvokeModelResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelResponseFilterSensitiveLog"); + var BidirectionalInputPayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "BidirectionalInputPayloadPartFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "InvokeModelWithBidirectionalStreamInputFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog"); + var BidirectionalOutputPayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "BidirectionalOutputPayloadPartFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.modelTimeoutException !== void 0) return { modelTimeoutException: obj.modelTimeoutException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "InvokeModelWithBidirectionalStreamOutputFilterSensitiveLog"); + var InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog"); + var InvokeModelWithResponseStreamRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: import_smithy_client28.SENSITIVE_STRING } + }), "InvokeModelWithResponseStreamRequestFilterSensitiveLog"); + var PayloadPartFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.bytes && { bytes: import_smithy_client28.SENSITIVE_STRING } + }), "PayloadPartFilterSensitiveLog"); + var ResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => { + if (obj.chunk !== void 0) return { chunk: import_smithy_client28.SENSITIVE_STRING }; + if (obj.internalServerException !== void 0) return { internalServerException: obj.internalServerException }; + if (obj.modelStreamErrorException !== void 0) return { modelStreamErrorException: obj.modelStreamErrorException }; + if (obj.validationException !== void 0) return { validationException: obj.validationException }; + if (obj.throttlingException !== void 0) return { throttlingException: obj.throttlingException }; + if (obj.modelTimeoutException !== void 0) return { modelTimeoutException: obj.modelTimeoutException }; + if (obj.serviceUnavailableException !== void 0) + return { serviceUnavailableException: obj.serviceUnavailableException }; + if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" }; + }, "ResponseStreamFilterSensitiveLog"); + var InvokeModelWithResponseStreamResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ + ...obj, + ...obj.body && { body: "STREAMING_CONTENT" } + }), "InvokeModelWithResponseStreamResponseFilterSensitiveLog"); + var import_core210 = (init_dist_es2(), __toCommonJS(dist_es_exports2)); + var import_uuid = (init_esm_node3(), __toCommonJS(esm_node_exports3)); + var se_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply"); + b5.p("guardrailIdentifier", () => input.guardrailIdentifier, "{guardrailIdentifier}", false); + b5.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_4) => se_GuardrailContentBlockList(_4, context2), "content"), + outputScope: [], + source: [] + }) + ); + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_ApplyGuardrailCommand"); + var se_ConverseCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/model/{modelId}/converse"); + b5.p("modelId", () => input.modelId, "{modelId}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + additionalModelRequestFields: /* @__PURE__ */ __name((_4) => se_Document(_4, context2), "additionalModelRequestFields"), + additionalModelResponseFieldPaths: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "additionalModelResponseFieldPaths"), + guardrailConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "guardrailConfig"), + inferenceConfig: /* @__PURE__ */ __name((_4) => se_InferenceConfiguration(_4, context2), "inferenceConfig"), + messages: /* @__PURE__ */ __name((_4) => se_Messages(_4, context2), "messages"), + performanceConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "performanceConfig"), + promptVariables: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "promptVariables"), + requestMetadata: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "requestMetadata"), + system: /* @__PURE__ */ __name((_4) => se_SystemContentBlocks(_4, context2), "system"), + toolConfig: /* @__PURE__ */ __name((_4) => se_ToolConfiguration(_4, context2), "toolConfig") + }) + ); + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_ConverseCommand"); + var se_ConverseStreamCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/model/{modelId}/converse-stream"); + b5.p("modelId", () => input.modelId, "{modelId}", false); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + additionalModelRequestFields: /* @__PURE__ */ __name((_4) => se_Document(_4, context2), "additionalModelRequestFields"), + additionalModelResponseFieldPaths: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "additionalModelResponseFieldPaths"), + guardrailConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "guardrailConfig"), + inferenceConfig: /* @__PURE__ */ __name((_4) => se_InferenceConfiguration(_4, context2), "inferenceConfig"), + messages: /* @__PURE__ */ __name((_4) => se_Messages(_4, context2), "messages"), + performanceConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "performanceConfig"), + promptVariables: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "promptVariables"), + requestMetadata: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "requestMetadata"), + system: /* @__PURE__ */ __name((_4) => se_SystemContentBlocks(_4, context2), "system"), + toolConfig: /* @__PURE__ */ __name((_4) => se_ToolConfiguration(_4, context2), "toolConfig") + }) + ); + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_ConverseStreamCommand"); + var se_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = {}; + b5.bp("/async-invoke/{invocationArn}"); + b5.p("invocationArn", () => input.invocationArn, "{invocationArn}", false); + let body; + b5.m("GET").h(headers).b(body); + return b5.build(); + }, "se_GetAsyncInvokeCommand"); + var se_InvokeModelCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_ct]: input[_cT] || "application/octet-stream", + [_a6]: input[_a6], + [_xabt]: input[_t2], + [_xabg]: input[_gI], + [_xabg_]: input[_gV], + [_xabpl]: input[_pCL] + }); + b5.bp("/model/{modelId}/invoke"); + b5.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = input.body; + } + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_InvokeModelCommand"); + var se_InvokeModelWithBidirectionalStreamCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/model/{modelId}/invoke-with-bidirectional-stream"); + b5.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = se_InvokeModelWithBidirectionalStreamInput(input.body, context2); + } + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_InvokeModelWithBidirectionalStreamCommand"); + var se_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = (0, import_smithy_client28.map)({}, import_smithy_client28.isSerializableHeaderValue, { + [_ct]: input[_cT] || "application/octet-stream", + [_xaba]: input[_a6], + [_xabt]: input[_t2], + [_xabg]: input[_gI], + [_xabg_]: input[_gV], + [_xabpl]: input[_pCL] + }); + b5.bp("/model/{modelId}/invoke-with-response-stream"); + b5.p("modelId", () => input.modelId, "{modelId}", false); + let body; + if (input.body !== void 0) { + body = input.body; + } + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_InvokeModelWithResponseStreamCommand"); + var se_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = {}; + b5.bp("/async-invoke"); + const query = (0, import_smithy_client28.map)({ + [_sTA]: [() => input.submitTimeAfter !== void 0, () => (0, import_smithy_client28.serializeDateTime)(input[_sTA]).toString()], + [_sTB]: [() => input.submitTimeBefore !== void 0, () => (0, import_smithy_client28.serializeDateTime)(input[_sTB]).toString()], + [_sE]: [, input[_sE]], + [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_nT]: [, input[_nT]], + [_sB]: [, input[_sB]], + [_sO]: [, input[_sO]] + }); + let body; + b5.m("GET").h(headers).q(query).b(body); + return b5.build(); + }, "se_ListAsyncInvokesCommand"); + var se_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (input, context2) => { + const b5 = (0, import_core39.requestBuilder)(input, context2); + const headers = { + "content-type": "application/json" + }; + b5.bp("/async-invoke"); + let body; + body = JSON.stringify( + (0, import_smithy_client28.take)(input, { + clientRequestToken: [true, (_4) => _4 ?? (0, import_uuid.v4)()], + modelId: [], + modelInput: /* @__PURE__ */ __name((_4) => se_ModelInputPayload(_4, context2), "modelInput"), + outputDataConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "outputDataConfig"), + tags: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)(_4), "tags") + }) + ); + b5.m("POST").h(headers).b(body); + return b5.build(); + }, "se_StartAsyncInvokeCommand"); + var de_ApplyGuardrailCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + action: import_smithy_client28.expectString, + actionReason: import_smithy_client28.expectString, + assessments: /* @__PURE__ */ __name((_4) => de_GuardrailAssessmentList(_4, context2), "assessments"), + guardrailCoverage: import_smithy_client28._json, + outputs: import_smithy_client28._json, + usage: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ApplyGuardrailCommand"); + var de_ConverseCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + additionalModelResponseFields: /* @__PURE__ */ __name((_4) => de_Document(_4, context2), "additionalModelResponseFields"), + metrics: import_smithy_client28._json, + output: /* @__PURE__ */ __name((_4) => de_ConverseOutput((0, import_core210.awsExpectUnion)(_4), context2), "output"), + performanceConfig: import_smithy_client28._json, + stopReason: import_smithy_client28.expectString, + trace: /* @__PURE__ */ __name((_4) => de_ConverseTrace(_4, context2), "trace"), + usage: import_smithy_client28._json + }); + Object.assign(contents, doc); + return contents; + }, "de_ConverseCommand"); + var de_ConverseStreamCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = output.body; + contents.stream = de_ConverseStreamOutput(data, context2); + return contents; + }, "de_ConverseStreamCommand"); + var de_GetAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + clientRequestToken: import_smithy_client28.expectString, + endTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "endTime"), + failureMessage: import_smithy_client28.expectString, + invocationArn: import_smithy_client28.expectString, + lastModifiedTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "lastModifiedTime"), + modelArn: import_smithy_client28.expectString, + outputDataConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)((0, import_core210.awsExpectUnion)(_4)), "outputDataConfig"), + status: import_smithy_client28.expectString, + submitTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "submitTime") + }); + Object.assign(contents, doc); + return contents; + }, "de_GetAsyncInvokeCommand"); + var de_InvokeModelCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output), + [_cT]: [, output.headers[_ct]], + [_pCL]: [, output.headers[_xabpl]] + }); + const data = await (0, import_smithy_client28.collectBody)(output.body, context2); + contents.body = data; + return contents; + }, "de_InvokeModelCommand"); + var de_InvokeModelWithBidirectionalStreamCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = output.body; + contents.body = de_InvokeModelWithBidirectionalStreamOutput(data, context2); + return contents; + }, "de_InvokeModelWithBidirectionalStreamCommand"); + var de_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output), + [_cT]: [, output.headers[_xabct]], + [_pCL]: [, output.headers[_xabpl]] + }); + const data = output.body; + contents.body = de_ResponseStream(data, context2); + return contents; + }, "de_InvokeModelWithResponseStreamCommand"); + var de_ListAsyncInvokesCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + asyncInvokeSummaries: /* @__PURE__ */ __name((_4) => de_AsyncInvokeSummaries(_4, context2), "asyncInvokeSummaries"), + nextToken: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_ListAsyncInvokesCommand"); + var de_StartAsyncInvokeCommand = /* @__PURE__ */ __name(async (output, context2) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError3(output, context2); + } + const contents = (0, import_smithy_client28.map)({ + $metadata: deserializeMetadata3(output) + }); + const data = (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.expectObject)(await (0, import_core210.parseJsonBody)(output.body, context2)), "body"); + const doc = (0, import_smithy_client28.take)(data, { + invocationArn: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + return contents; + }, "de_StartAsyncInvokeCommand"); + var de_CommandError3 = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonErrorBody)(output.body, context2) + }; + const errorCode = (0, import_core210.loadRestJsonErrorCode)(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.bedrockruntime#AccessDeniedException": + throw await de_AccessDeniedExceptionRes2(parsedOutput, context2); + case "InternalServerException": + case "com.amazonaws.bedrockruntime#InternalServerException": + throw await de_InternalServerExceptionRes2(parsedOutput, context2); + case "ResourceNotFoundException": + case "com.amazonaws.bedrockruntime#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context2); + case "ServiceQuotaExceededException": + case "com.amazonaws.bedrockruntime#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context2); + case "ThrottlingException": + case "com.amazonaws.bedrockruntime#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context2); + case "ValidationException": + case "com.amazonaws.bedrockruntime#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context2); + case "ModelErrorException": + case "com.amazonaws.bedrockruntime#ModelErrorException": + throw await de_ModelErrorExceptionRes(parsedOutput, context2); + case "ModelNotReadyException": + case "com.amazonaws.bedrockruntime#ModelNotReadyException": + throw await de_ModelNotReadyExceptionRes(parsedOutput, context2); + case "ModelTimeoutException": + case "com.amazonaws.bedrockruntime#ModelTimeoutException": + throw await de_ModelTimeoutExceptionRes(parsedOutput, context2); + case "ServiceUnavailableException": + case "com.amazonaws.bedrockruntime#ServiceUnavailableException": + throw await de_ServiceUnavailableExceptionRes(parsedOutput, context2); + case "ModelStreamErrorException": + case "com.amazonaws.bedrockruntime#ModelStreamErrorException": + throw await de_ModelStreamErrorExceptionRes(parsedOutput, context2); + case "ConflictException": + case "com.amazonaws.bedrockruntime#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context2); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError3({ + output, + parsedBody, + errorCode + }); + } + }, "de_CommandError"); + var throwDefaultError3 = (0, import_smithy_client28.withBaseException)(BedrockRuntimeServiceException); + var de_AccessDeniedExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_AccessDeniedExceptionRes"); + var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ConflictExceptionRes"); + var de_InternalServerExceptionRes2 = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new InternalServerException2({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_InternalServerExceptionRes"); + var de_ModelErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString, + originalStatusCode: import_smithy_client28.expectInt32, + resourceName: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelErrorException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelErrorExceptionRes"); + var de_ModelNotReadyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelNotReadyException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelNotReadyExceptionRes"); + var de_ModelStreamErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString, + originalMessage: import_smithy_client28.expectString, + originalStatusCode: import_smithy_client28.expectInt32 + }); + Object.assign(contents, doc); + const exception = new ModelStreamErrorException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelStreamErrorExceptionRes"); + var de_ModelTimeoutExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ModelTimeoutException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ModelTimeoutExceptionRes"); + var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ResourceNotFoundExceptionRes"); + var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ServiceQuotaExceededExceptionRes"); + var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ServiceUnavailableException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ServiceUnavailableExceptionRes"); + var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ThrottlingExceptionRes"); + var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context2) => { + const contents = (0, import_smithy_client28.map)({}); + const data = parsedOutput.body; + const doc = (0, import_smithy_client28.take)(data, { + message: import_smithy_client28.expectString + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata3(parsedOutput), + ...contents + }); + return (0, import_smithy_client28.decorateServiceException)(exception, parsedOutput.body); + }, "de_ValidationExceptionRes"); + var se_InvokeModelWithBidirectionalStreamInput = /* @__PURE__ */ __name((input, context2) => { + const eventMarshallingVisitor = /* @__PURE__ */ __name((event) => InvokeModelWithBidirectionalStreamInput.visit(event, { + chunk: /* @__PURE__ */ __name((value) => se_BidirectionalInputPayloadPart_event(value, context2), "chunk"), + _: /* @__PURE__ */ __name((value) => value, "_") + }), "eventMarshallingVisitor"); + return context2.eventStreamMarshaller.serialize(input, eventMarshallingVisitor); + }, "se_InvokeModelWithBidirectionalStreamInput"); + var se_BidirectionalInputPayloadPart_event = /* @__PURE__ */ __name((input, context2) => { + const headers = { + ":event-type": { type: "string", value: "chunk" }, + ":message-type": { type: "string", value: "event" }, + ":content-type": { type: "string", value: "application/json" } + }; + let body = new Uint8Array(); + body = se_BidirectionalInputPayloadPart(input, context2); + body = context2.utf8Decoder(JSON.stringify(body)); + return { headers, body }; + }, "se_BidirectionalInputPayloadPart_event"); + var de_ConverseStreamOutput = /* @__PURE__ */ __name((output, context2) => { + return context2.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["messageStart"] != null) { + return { + messageStart: await de_MessageStartEvent_event(event["messageStart"], context2) + }; + } + if (event["contentBlockStart"] != null) { + return { + contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context2) + }; + } + if (event["contentBlockDelta"] != null) { + return { + contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context2) + }; + } + if (event["contentBlockStop"] != null) { + return { + contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context2) + }; + } + if (event["messageStop"] != null) { + return { + messageStop: await de_MessageStopEvent_event(event["messageStop"], context2) + }; + } + if (event["metadata"] != null) { + return { + metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context2) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context2) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context2 + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context2) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context2) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context2 + ) + }; + } + return { $unknown: event }; + }); + }, "de_ConverseStreamOutput"); + var de_InvokeModelWithBidirectionalStreamOutput = /* @__PURE__ */ __name((output, context2) => { + return context2.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["chunk"] != null) { + return { + chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context2) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context2) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context2 + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context2) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context2) + }; + } + if (event["modelTimeoutException"] != null) { + return { + modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context2) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context2 + ) + }; + } + return { $unknown: event }; + }); + }, "de_InvokeModelWithBidirectionalStreamOutput"); + var de_ResponseStream = /* @__PURE__ */ __name((output, context2) => { + return context2.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["chunk"] != null) { + return { + chunk: await de_PayloadPart_event(event["chunk"], context2) + }; + } + if (event["internalServerException"] != null) { + return { + internalServerException: await de_InternalServerException_event(event["internalServerException"], context2) + }; + } + if (event["modelStreamErrorException"] != null) { + return { + modelStreamErrorException: await de_ModelStreamErrorException_event( + event["modelStreamErrorException"], + context2 + ) + }; + } + if (event["validationException"] != null) { + return { + validationException: await de_ValidationException_event(event["validationException"], context2) + }; + } + if (event["throttlingException"] != null) { + return { + throttlingException: await de_ThrottlingException_event(event["throttlingException"], context2) + }; + } + if (event["modelTimeoutException"] != null) { + return { + modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context2) + }; + } + if (event["serviceUnavailableException"] != null) { + return { + serviceUnavailableException: await de_ServiceUnavailableException_event( + event["serviceUnavailableException"], + context2 + ) + }; + } + return { $unknown: event }; + }); + }, "de_ResponseStream"); + var de_BidirectionalOutputPayloadPart_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, de_BidirectionalOutputPayloadPart(data, context2)); + return contents; + }, "de_BidirectionalOutputPayloadPart_event"); + var de_ContentBlockDeltaEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, de_ContentBlockDeltaEvent(data, context2)); + return contents; + }, "de_ContentBlockDeltaEvent_event"); + var de_ContentBlockStartEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_ContentBlockStartEvent_event"); + var de_ContentBlockStopEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_ContentBlockStopEvent_event"); + var de_ConverseStreamMetadataEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, de_ConverseStreamMetadataEvent(data, context2)); + return contents; + }, "de_ConverseStreamMetadataEvent_event"); + var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_InternalServerExceptionRes2(parsedOutput, context2); + }, "de_InternalServerException_event"); + var de_MessageStartEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, (0, import_smithy_client28._json)(data)); + return contents; + }, "de_MessageStartEvent_event"); + var de_MessageStopEvent_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, de_MessageStopEvent(data, context2)); + return contents; + }, "de_MessageStopEvent_event"); + var de_ModelStreamErrorException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_ModelStreamErrorExceptionRes(parsedOutput, context2); + }, "de_ModelStreamErrorException_event"); + var de_ModelTimeoutException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_ModelTimeoutExceptionRes(parsedOutput, context2); + }, "de_ModelTimeoutException_event"); + var de_PayloadPart_event = /* @__PURE__ */ __name(async (output, context2) => { + const contents = {}; + const data = await (0, import_core210.parseJsonBody)(output.body, context2); + Object.assign(contents, de_PayloadPart(data, context2)); + return contents; + }, "de_PayloadPart_event"); + var de_ServiceUnavailableException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_ServiceUnavailableExceptionRes(parsedOutput, context2); + }, "de_ServiceUnavailableException_event"); + var de_ThrottlingException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_ThrottlingExceptionRes(parsedOutput, context2); + }, "de_ThrottlingException_event"); + var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context2) => { + const parsedOutput = { + ...output, + body: await (0, import_core210.parseJsonBody)(output.body, context2) + }; + return de_ValidationExceptionRes(parsedOutput, context2); + }, "de_ValidationException_event"); + var se_BidirectionalInputPayloadPart = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + bytes: context2.base64Encoder + }); + }, "se_BidirectionalInputPayloadPart"); + var se_ContentBlock = /* @__PURE__ */ __name((input, context2) => { + return ContentBlock.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + citationsContent: /* @__PURE__ */ __name((value) => ({ citationsContent: (0, import_smithy_client28._json)(value) }), "citationsContent"), + document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context2) }), "document"), + guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context2) }), "guardContent"), + image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context2) }), "image"), + reasoningContent: /* @__PURE__ */ __name((value) => ({ reasoningContent: se_ReasoningContentBlock(value, context2) }), "reasoningContent"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + toolResult: /* @__PURE__ */ __name((value) => ({ toolResult: se_ToolResultBlock(value, context2) }), "toolResult"), + toolUse: /* @__PURE__ */ __name((value) => ({ toolUse: se_ToolUseBlock(value, context2) }), "toolUse"), + video: /* @__PURE__ */ __name((value) => ({ video: se_VideoBlock(value, context2) }), "video"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ContentBlock"); + var se_ContentBlocks = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_ContentBlock(entry, context2); + }); + }, "se_ContentBlocks"); + var se_DocumentBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + citations: import_smithy_client28._json, + context: [], + format: [], + name: [], + source: /* @__PURE__ */ __name((_4) => se_DocumentSource(_4, context2), "source") + }); + }, "se_DocumentBlock"); + var se_DocumentSource = /* @__PURE__ */ __name((input, context2) => { + return DocumentSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context2.base64Encoder(value) }), "bytes"), + content: /* @__PURE__ */ __name((value) => ({ content: (0, import_smithy_client28._json)(value) }), "content"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_DocumentSource"); + var se_GuardrailContentBlock = /* @__PURE__ */ __name((input, context2) => { + return GuardrailContentBlock.visit(input, { + image: /* @__PURE__ */ __name((value) => ({ image: se_GuardrailImageBlock(value, context2) }), "image"), + text: /* @__PURE__ */ __name((value) => ({ text: (0, import_smithy_client28._json)(value) }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailContentBlock"); + var se_GuardrailContentBlockList = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_GuardrailContentBlock(entry, context2); + }); + }, "se_GuardrailContentBlockList"); + var se_GuardrailConverseContentBlock = /* @__PURE__ */ __name((input, context2) => { + return GuardrailConverseContentBlock.visit(input, { + image: /* @__PURE__ */ __name((value) => ({ image: se_GuardrailConverseImageBlock(value, context2) }), "image"), + text: /* @__PURE__ */ __name((value) => ({ text: (0, import_smithy_client28._json)(value) }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailConverseContentBlock"); + var se_GuardrailConverseImageBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_4) => se_GuardrailConverseImageSource(_4, context2), "source") + }); + }, "se_GuardrailConverseImageBlock"); + var se_GuardrailConverseImageSource = /* @__PURE__ */ __name((input, context2) => { + return GuardrailConverseImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context2.base64Encoder(value) }), "bytes"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailConverseImageSource"); + var se_GuardrailImageBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_4) => se_GuardrailImageSource(_4, context2), "source") + }); + }, "se_GuardrailImageBlock"); + var se_GuardrailImageSource = /* @__PURE__ */ __name((input, context2) => { + return GuardrailImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context2.base64Encoder(value) }), "bytes"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_GuardrailImageSource"); + var se_ImageBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_4) => se_ImageSource(_4, context2), "source") + }); + }, "se_ImageBlock"); + var se_ImageSource = /* @__PURE__ */ __name((input, context2) => { + return ImageSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context2.base64Encoder(value) }), "bytes"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ImageSource"); + var se_InferenceConfiguration = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + maxTokens: [], + stopSequences: import_smithy_client28._json, + temperature: import_smithy_client28.serializeFloat, + topP: import_smithy_client28.serializeFloat + }); + }, "se_InferenceConfiguration"); + var se_Message = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_4) => se_ContentBlocks(_4, context2), "content"), + role: [] + }); + }, "se_Message"); + var se_Messages = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_Message(entry, context2); + }); + }, "se_Messages"); + var se_ModelInputPayload = /* @__PURE__ */ __name((input, context2) => { + return input; + }, "se_ModelInputPayload"); + var se_ReasoningContentBlock = /* @__PURE__ */ __name((input, context2) => { + return ReasoningContentBlock.visit(input, { + reasoningText: /* @__PURE__ */ __name((value) => ({ reasoningText: (0, import_smithy_client28._json)(value) }), "reasoningText"), + redactedContent: /* @__PURE__ */ __name((value) => ({ redactedContent: context2.base64Encoder(value) }), "redactedContent"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ReasoningContentBlock"); + var se_SystemContentBlock = /* @__PURE__ */ __name((input, context2) => { + return SystemContentBlock.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context2) }), "guardContent"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_SystemContentBlock"); + var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_SystemContentBlock(entry, context2); + }); + }, "se_SystemContentBlocks"); + var se_Tool = /* @__PURE__ */ __name((input, context2) => { + return Tool.visit(input, { + cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client28._json)(value) }), "cachePoint"), + toolSpec: /* @__PURE__ */ __name((value) => ({ toolSpec: se_ToolSpecification(value, context2) }), "toolSpec"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_Tool"); + var se_ToolConfiguration = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + toolChoice: import_smithy_client28._json, + tools: /* @__PURE__ */ __name((_4) => se_Tools(_4, context2), "tools") + }); + }, "se_ToolConfiguration"); + var se_ToolInputSchema = /* @__PURE__ */ __name((input, context2) => { + return ToolInputSchema.visit(input, { + json: /* @__PURE__ */ __name((value) => ({ json: se_Document(value, context2) }), "json"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ToolInputSchema"); + var se_ToolResultBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + content: /* @__PURE__ */ __name((_4) => se_ToolResultContentBlocks(_4, context2), "content"), + status: [], + toolUseId: [] + }); + }, "se_ToolResultBlock"); + var se_ToolResultContentBlock = /* @__PURE__ */ __name((input, context2) => { + return ToolResultContentBlock.visit(input, { + document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context2) }), "document"), + image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context2) }), "image"), + json: /* @__PURE__ */ __name((value) => ({ json: se_Document(value, context2) }), "json"), + text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"), + video: /* @__PURE__ */ __name((value) => ({ video: se_VideoBlock(value, context2) }), "video"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_ToolResultContentBlock"); + var se_ToolResultContentBlocks = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_ToolResultContentBlock(entry, context2); + }); + }, "se_ToolResultContentBlocks"); + var se_Tools = /* @__PURE__ */ __name((input, context2) => { + return input.filter((e5) => e5 != null).map((entry) => { + return se_Tool(entry, context2); + }); + }, "se_Tools"); + var se_ToolSpecification = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + description: [], + inputSchema: /* @__PURE__ */ __name((_4) => se_ToolInputSchema(_4, context2), "inputSchema"), + name: [] + }); + }, "se_ToolSpecification"); + var se_ToolUseBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + input: /* @__PURE__ */ __name((_4) => se_Document(_4, context2), "input"), + name: [], + toolUseId: [] + }); + }, "se_ToolUseBlock"); + var se_VideoBlock = /* @__PURE__ */ __name((input, context2) => { + return (0, import_smithy_client28.take)(input, { + format: [], + source: /* @__PURE__ */ __name((_4) => se_VideoSource(_4, context2), "source") + }); + }, "se_VideoBlock"); + var se_VideoSource = /* @__PURE__ */ __name((input, context2) => { + return VideoSource.visit(input, { + bytes: /* @__PURE__ */ __name((value) => ({ bytes: context2.base64Encoder(value) }), "bytes"), + s3Location: /* @__PURE__ */ __name((value) => ({ s3Location: (0, import_smithy_client28._json)(value) }), "s3Location"), + _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_") + }); + }, "se_VideoSource"); + var se_Document = /* @__PURE__ */ __name((input, context2) => { + return input; + }, "se_Document"); + var de_AsyncInvokeSummaries = /* @__PURE__ */ __name((output, context2) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_AsyncInvokeSummary(entry, context2); + }); + return retVal; + }, "de_AsyncInvokeSummaries"); + var de_AsyncInvokeSummary = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + clientRequestToken: import_smithy_client28.expectString, + endTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "endTime"), + failureMessage: import_smithy_client28.expectString, + invocationArn: import_smithy_client28.expectString, + lastModifiedTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "lastModifiedTime"), + modelArn: import_smithy_client28.expectString, + outputDataConfig: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28._json)((0, import_core210.awsExpectUnion)(_4)), "outputDataConfig"), + status: import_smithy_client28.expectString, + submitTime: /* @__PURE__ */ __name((_4) => (0, import_smithy_client28.expectNonNull)((0, import_smithy_client28.parseRfc3339DateTimeWithOffset)(_4)), "submitTime") + }); + }, "de_AsyncInvokeSummary"); + var de_BidirectionalOutputPayloadPart = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + bytes: context2.base64Decoder + }); + }, "de_BidirectionalOutputPayloadPart"); + var de_ContentBlock = /* @__PURE__ */ __name((output, context2) => { + if (output.cachePoint != null) { + return { + cachePoint: (0, import_smithy_client28._json)(output.cachePoint) + }; + } + if (output.citationsContent != null) { + return { + citationsContent: (0, import_smithy_client28._json)(output.citationsContent) + }; + } + if (output.document != null) { + return { + document: de_DocumentBlock(output.document, context2) + }; + } + if (output.guardContent != null) { + return { + guardContent: de_GuardrailConverseContentBlock((0, import_core210.awsExpectUnion)(output.guardContent), context2) + }; + } + if (output.image != null) { + return { + image: de_ImageBlock(output.image, context2) + }; + } + if (output.reasoningContent != null) { + return { + reasoningContent: de_ReasoningContentBlock((0, import_core210.awsExpectUnion)(output.reasoningContent), context2) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.toolResult != null) { + return { + toolResult: de_ToolResultBlock(output.toolResult, context2) + }; + } + if (output.toolUse != null) { + return { + toolUse: de_ToolUseBlock(output.toolUse, context2) + }; + } + if (output.video != null) { + return { + video: de_VideoBlock(output.video, context2) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ContentBlock"); + var de_ContentBlockDelta = /* @__PURE__ */ __name((output, context2) => { + if (output.citation != null) { + return { + citation: (0, import_smithy_client28._json)(output.citation) + }; + } + if (output.reasoningContent != null) { + return { + reasoningContent: de_ReasoningContentBlockDelta((0, import_core210.awsExpectUnion)(output.reasoningContent), context2) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.toolUse != null) { + return { + toolUse: (0, import_smithy_client28._json)(output.toolUse) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ContentBlockDelta"); + var de_ContentBlockDeltaEvent = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + contentBlockIndex: import_smithy_client28.expectInt32, + delta: /* @__PURE__ */ __name((_4) => de_ContentBlockDelta((0, import_core210.awsExpectUnion)(_4), context2), "delta") + }); + }, "de_ContentBlockDeltaEvent"); + var de_ContentBlocks = /* @__PURE__ */ __name((output, context2) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_ContentBlock((0, import_core210.awsExpectUnion)(entry), context2); + }); + return retVal; + }, "de_ContentBlocks"); + var de_ConverseOutput = /* @__PURE__ */ __name((output, context2) => { + if (output.message != null) { + return { + message: de_Message(output.message, context2) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ConverseOutput"); + var de_ConverseStreamMetadataEvent = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + metrics: import_smithy_client28._json, + performanceConfig: import_smithy_client28._json, + trace: /* @__PURE__ */ __name((_4) => de_ConverseStreamTrace(_4, context2), "trace"), + usage: import_smithy_client28._json + }); + }, "de_ConverseStreamMetadataEvent"); + var de_ConverseStreamTrace = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + guardrail: /* @__PURE__ */ __name((_4) => de_GuardrailTraceAssessment(_4, context2), "guardrail"), + promptRouter: import_smithy_client28._json + }); + }, "de_ConverseStreamTrace"); + var de_ConverseTrace = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + guardrail: /* @__PURE__ */ __name((_4) => de_GuardrailTraceAssessment(_4, context2), "guardrail"), + promptRouter: import_smithy_client28._json + }); + }, "de_ConverseTrace"); + var de_DocumentBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + citations: import_smithy_client28._json, + context: import_smithy_client28.expectString, + format: import_smithy_client28.expectString, + name: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_4) => de_DocumentSource((0, import_core210.awsExpectUnion)(_4), context2), "source") + }); + }, "de_DocumentBlock"); + var de_DocumentSource = /* @__PURE__ */ __name((output, context2) => { + if (output.bytes != null) { + return { + bytes: context2.base64Decoder(output.bytes) + }; + } + if (output.content != null) { + return { + content: (0, import_smithy_client28._json)(output.content) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_DocumentSource"); + var de_GuardrailAssessment = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + contentPolicy: import_smithy_client28._json, + contextualGroundingPolicy: /* @__PURE__ */ __name((_4) => de_GuardrailContextualGroundingPolicyAssessment(_4, context2), "contextualGroundingPolicy"), + invocationMetrics: import_smithy_client28._json, + sensitiveInformationPolicy: import_smithy_client28._json, + topicPolicy: import_smithy_client28._json, + wordPolicy: import_smithy_client28._json + }); + }, "de_GuardrailAssessment"); + var de_GuardrailAssessmentList = /* @__PURE__ */ __name((output, context2) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_GuardrailAssessment(entry, context2); + }); + return retVal; + }, "de_GuardrailAssessmentList"); + var de_GuardrailAssessmentListMap = /* @__PURE__ */ __name((output, context2) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + acc[key] = de_GuardrailAssessmentList(value, context2); + return acc; + }, {}); + }, "de_GuardrailAssessmentListMap"); + var de_GuardrailAssessmentMap = /* @__PURE__ */ __name((output, context2) => { + return Object.entries(output).reduce((acc, [key, value]) => { + if (value === null) { + return acc; + } + acc[key] = de_GuardrailAssessment(value, context2); + return acc; + }, {}); + }, "de_GuardrailAssessmentMap"); + var de_GuardrailContextualGroundingFilter = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + action: import_smithy_client28.expectString, + detected: import_smithy_client28.expectBoolean, + score: import_smithy_client28.limitedParseDouble, + threshold: import_smithy_client28.limitedParseDouble, + type: import_smithy_client28.expectString + }); + }, "de_GuardrailContextualGroundingFilter"); + var de_GuardrailContextualGroundingFilters = /* @__PURE__ */ __name((output, context2) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_GuardrailContextualGroundingFilter(entry, context2); + }); + return retVal; + }, "de_GuardrailContextualGroundingFilters"); + var de_GuardrailContextualGroundingPolicyAssessment = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + filters: /* @__PURE__ */ __name((_4) => de_GuardrailContextualGroundingFilters(_4, context2), "filters") + }); + }, "de_GuardrailContextualGroundingPolicyAssessment"); + var de_GuardrailConverseContentBlock = /* @__PURE__ */ __name((output, context2) => { + if (output.image != null) { + return { + image: de_GuardrailConverseImageBlock(output.image, context2) + }; + } + if (output.text != null) { + return { + text: (0, import_smithy_client28._json)(output.text) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_GuardrailConverseContentBlock"); + var de_GuardrailConverseImageBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_4) => de_GuardrailConverseImageSource((0, import_core210.awsExpectUnion)(_4), context2), "source") + }); + }, "de_GuardrailConverseImageBlock"); + var de_GuardrailConverseImageSource = /* @__PURE__ */ __name((output, context2) => { + if (output.bytes != null) { + return { + bytes: context2.base64Decoder(output.bytes) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_GuardrailConverseImageSource"); + var de_GuardrailTraceAssessment = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + actionReason: import_smithy_client28.expectString, + inputAssessment: /* @__PURE__ */ __name((_4) => de_GuardrailAssessmentMap(_4, context2), "inputAssessment"), + modelOutput: import_smithy_client28._json, + outputAssessments: /* @__PURE__ */ __name((_4) => de_GuardrailAssessmentListMap(_4, context2), "outputAssessments") + }); + }, "de_GuardrailTraceAssessment"); + var de_ImageBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_4) => de_ImageSource((0, import_core210.awsExpectUnion)(_4), context2), "source") + }); + }, "de_ImageBlock"); + var de_ImageSource = /* @__PURE__ */ __name((output, context2) => { + if (output.bytes != null) { + return { + bytes: context2.base64Decoder(output.bytes) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ImageSource"); + var de_Message = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + content: /* @__PURE__ */ __name((_4) => de_ContentBlocks(_4, context2), "content"), + role: import_smithy_client28.expectString + }); + }, "de_Message"); + var de_MessageStopEvent = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + additionalModelResponseFields: /* @__PURE__ */ __name((_4) => de_Document(_4, context2), "additionalModelResponseFields"), + stopReason: import_smithy_client28.expectString + }); + }, "de_MessageStopEvent"); + var de_PayloadPart = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + bytes: context2.base64Decoder + }); + }, "de_PayloadPart"); + var de_ReasoningContentBlock = /* @__PURE__ */ __name((output, context2) => { + if (output.reasoningText != null) { + return { + reasoningText: (0, import_smithy_client28._json)(output.reasoningText) + }; + } + if (output.redactedContent != null) { + return { + redactedContent: context2.base64Decoder(output.redactedContent) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ReasoningContentBlock"); + var de_ReasoningContentBlockDelta = /* @__PURE__ */ __name((output, context2) => { + if (output.redactedContent != null) { + return { + redactedContent: context2.base64Decoder(output.redactedContent) + }; + } + if ((0, import_smithy_client28.expectString)(output.signature) !== void 0) { + return { signature: (0, import_smithy_client28.expectString)(output.signature) }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ReasoningContentBlockDelta"); + var de_ToolResultBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + content: /* @__PURE__ */ __name((_4) => de_ToolResultContentBlocks(_4, context2), "content"), + status: import_smithy_client28.expectString, + toolUseId: import_smithy_client28.expectString + }); + }, "de_ToolResultBlock"); + var de_ToolResultContentBlock = /* @__PURE__ */ __name((output, context2) => { + if (output.document != null) { + return { + document: de_DocumentBlock(output.document, context2) + }; + } + if (output.image != null) { + return { + image: de_ImageBlock(output.image, context2) + }; + } + if (output.json != null) { + return { + json: de_Document(output.json, context2) + }; + } + if ((0, import_smithy_client28.expectString)(output.text) !== void 0) { + return { text: (0, import_smithy_client28.expectString)(output.text) }; + } + if (output.video != null) { + return { + video: de_VideoBlock(output.video, context2) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_ToolResultContentBlock"); + var de_ToolResultContentBlocks = /* @__PURE__ */ __name((output, context2) => { + const retVal = (output || []).filter((e5) => e5 != null).map((entry) => { + return de_ToolResultContentBlock((0, import_core210.awsExpectUnion)(entry), context2); + }); + return retVal; + }, "de_ToolResultContentBlocks"); + var de_ToolUseBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + input: /* @__PURE__ */ __name((_4) => de_Document(_4, context2), "input"), + name: import_smithy_client28.expectString, + toolUseId: import_smithy_client28.expectString + }); + }, "de_ToolUseBlock"); + var de_VideoBlock = /* @__PURE__ */ __name((output, context2) => { + return (0, import_smithy_client28.take)(output, { + format: import_smithy_client28.expectString, + source: /* @__PURE__ */ __name((_4) => de_VideoSource((0, import_core210.awsExpectUnion)(_4), context2), "source") + }); + }, "de_VideoBlock"); + var de_VideoSource = /* @__PURE__ */ __name((output, context2) => { + if (output.bytes != null) { + return { + bytes: context2.base64Decoder(output.bytes) + }; + } + if (output.s3Location != null) { + return { + s3Location: (0, import_smithy_client28._json)(output.s3Location) + }; + } + return { $unknown: Object.entries(output)[0] }; + }, "de_VideoSource"); + var de_Document = /* @__PURE__ */ __name((output, context2) => { + return output; + }, "de_Document"); + var deserializeMetadata3 = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] + }), "deserializeMetadata"); + var _a6 = "accept"; + var _cT = "contentType"; + var _ct = "content-type"; + var _gI = "guardrailIdentifier"; + var _gV = "guardrailVersion"; + var _mR = "maxResults"; + var _nT = "nextToken"; + var _pCL = "performanceConfigLatency"; + var _sB = "sortBy"; + var _sE = "statusEquals"; + var _sO = "sortOrder"; + var _sTA = "submitTimeAfter"; + var _sTB = "submitTimeBefore"; + var _t2 = "trace"; + var _xaba = "x-amzn-bedrock-accept"; + var _xabct = "x-amzn-bedrock-content-type"; + var _xabg = "x-amzn-bedrock-guardrailidentifier"; + var _xabg_ = "x-amzn-bedrock-guardrailversion"; + var _xabpl = "x-amzn-bedrock-performanceconfig-latency"; + var _xabt = "x-amzn-bedrock-trace"; + var ApplyGuardrailCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ApplyGuardrail", {}).n("BedrockRuntimeClient", "ApplyGuardrailCommand").f(ApplyGuardrailRequestFilterSensitiveLog, void 0).ser(se_ApplyGuardrailCommand).de(de_ApplyGuardrailCommand).build() { + static { + __name(this, "ApplyGuardrailCommand"); + } + }; + var ConverseCommand2 = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "Converse", {}).n("BedrockRuntimeClient", "ConverseCommand").f(ConverseRequestFilterSensitiveLog, ConverseResponseFilterSensitiveLog).ser(se_ConverseCommand).de(de_ConverseCommand).build() { + static { + __name(this, "ConverseCommand"); + } + }; + var ConverseStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ConverseStream", { + /** + * @internal + */ + eventStream: { + output: true + } + }).n("BedrockRuntimeClient", "ConverseStreamCommand").f(ConverseStreamRequestFilterSensitiveLog, ConverseStreamResponseFilterSensitiveLog).ser(se_ConverseStreamCommand).de(de_ConverseStreamCommand).build() { + static { + __name(this, "ConverseStreamCommand"); + } + }; + var GetAsyncInvokeCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "GetAsyncInvoke", {}).n("BedrockRuntimeClient", "GetAsyncInvokeCommand").f(void 0, GetAsyncInvokeResponseFilterSensitiveLog).ser(se_GetAsyncInvokeCommand).de(de_GetAsyncInvokeCommand).build() { + static { + __name(this, "GetAsyncInvokeCommand"); + } + }; + var InvokeModelCommand2 = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModel", {}).n("BedrockRuntimeClient", "InvokeModelCommand").f(InvokeModelRequestFilterSensitiveLog, InvokeModelResponseFilterSensitiveLog).ser(se_InvokeModelCommand).de(de_InvokeModelCommand).build() { + static { + __name(this, "InvokeModelCommand"); + } + }; + var InvokeModelWithBidirectionalStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()), + (0, import_middleware_eventstream.getEventStreamPlugin)(config6), + (0, import_middleware_websocket.getWebSocketPlugin)(config6, { + headerPrefix: "x-amz-bedrock-" + }) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModelWithBidirectionalStream", { + /** + * @internal + */ + eventStream: { + input: true, + output: true + } + }).n("BedrockRuntimeClient", "InvokeModelWithBidirectionalStreamCommand").f( + InvokeModelWithBidirectionalStreamRequestFilterSensitiveLog, + InvokeModelWithBidirectionalStreamResponseFilterSensitiveLog + ).ser(se_InvokeModelWithBidirectionalStreamCommand).de(de_InvokeModelWithBidirectionalStreamCommand).build() { + static { + __name(this, "InvokeModelWithBidirectionalStreamCommand"); + } + }; + var InvokeModelWithResponseStreamCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "InvokeModelWithResponseStream", { + /** + * @internal + */ + eventStream: { + output: true + } + }).n("BedrockRuntimeClient", "InvokeModelWithResponseStreamCommand").f(InvokeModelWithResponseStreamRequestFilterSensitiveLog, InvokeModelWithResponseStreamResponseFilterSensitiveLog).ser(se_InvokeModelWithResponseStreamCommand).de(de_InvokeModelWithResponseStreamCommand).build() { + static { + __name(this, "InvokeModelWithResponseStreamCommand"); + } + }; + var ListAsyncInvokesCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "ListAsyncInvokes", {}).n("BedrockRuntimeClient", "ListAsyncInvokesCommand").f(void 0, ListAsyncInvokesResponseFilterSensitiveLog).ser(se_ListAsyncInvokesCommand).de(de_ListAsyncInvokesCommand).build() { + static { + __name(this, "ListAsyncInvokesCommand"); + } + }; + var StartAsyncInvokeCommand = class extends import_smithy_client28.Command.classBuilder().ep(commonParams3).m(function(Command, cs, config6, o5) { + return [ + (0, import_middleware_serde5.getSerdePlugin)(config6, this.serialize, this.deserialize), + (0, import_middleware_endpoint6.getEndpointPlugin)(config6, Command.getEndpointParameterInstructions()) + ]; + }).s("AmazonBedrockFrontendService", "StartAsyncInvoke", {}).n("BedrockRuntimeClient", "StartAsyncInvokeCommand").f(StartAsyncInvokeRequestFilterSensitiveLog, void 0).ser(se_StartAsyncInvokeCommand).de(de_StartAsyncInvokeCommand).build() { + static { + __name(this, "StartAsyncInvokeCommand"); + } + }; + var commands3 = { + ApplyGuardrailCommand, + ConverseCommand: ConverseCommand2, + ConverseStreamCommand, + GetAsyncInvokeCommand, + InvokeModelCommand: InvokeModelCommand2, + InvokeModelWithBidirectionalStreamCommand, + InvokeModelWithResponseStreamCommand, + ListAsyncInvokesCommand, + StartAsyncInvokeCommand + }; + var BedrockRuntime = class extends BedrockRuntimeClient2 { + static { + __name(this, "BedrockRuntime"); + } + }; + (0, import_smithy_client28.createAggregatedClient)(commands3, BedrockRuntime); + var paginateListAsyncInvokes = (0, import_core39.createPaginator)(BedrockRuntimeClient2, ListAsyncInvokesCommand, "nextToken", "nextToken", "maxResults"); + } +}); + +// node_modules/@commitlint/types/lib/ensure.js +var require_ensure = __commonJS({ + "node_modules/@commitlint/types/lib/ensure.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/format.js +var require_format = __commonJS({ + "node_modules/@commitlint/types/lib/format.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/is-ignored.js +var require_is_ignored = __commonJS({ + "node_modules/@commitlint/types/lib/is-ignored.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/lint.js +var require_lint = __commonJS({ + "node_modules/@commitlint/types/lib/lint.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/load.js +var require_load = __commonJS({ + "node_modules/@commitlint/types/lib/load.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/parse.js +var require_parse3 = __commonJS({ + "node_modules/@commitlint/types/lib/parse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/prompt.js +var require_prompt = __commonJS({ + "node_modules/@commitlint/types/lib/prompt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@commitlint/types/lib/rules.js +var require_rules = __commonJS({ + "node_modules/@commitlint/types/lib/rules.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RuleConfigQuality = exports2.RuleConfigSeverity = void 0; + var RuleConfigSeverity2; + (function(RuleConfigSeverity3) { + RuleConfigSeverity3[RuleConfigSeverity3["Disabled"] = 0] = "Disabled"; + RuleConfigSeverity3[RuleConfigSeverity3["Warning"] = 1] = "Warning"; + RuleConfigSeverity3[RuleConfigSeverity3["Error"] = 2] = "Error"; + })(RuleConfigSeverity2 || (exports2.RuleConfigSeverity = RuleConfigSeverity2 = {})); + var RuleConfigQuality; + (function(RuleConfigQuality2) { + RuleConfigQuality2[RuleConfigQuality2["User"] = 0] = "User"; + RuleConfigQuality2[RuleConfigQuality2["Qualified"] = 1] = "Qualified"; + })(RuleConfigQuality || (exports2.RuleConfigQuality = RuleConfigQuality = {})); + } +}); + +// node_modules/@commitlint/types/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/@commitlint/types/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + var desc = Object.getOwnPropertyDescriptor(m6, k6); + if (!desc || ("get" in desc ? !m6.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m6[k6]; + } }; + } + Object.defineProperty(o5, k22, desc); + } : function(o5, m6, k6, k22) { + if (k22 === void 0) k22 = k6; + o5[k22] = m6[k6]; + }); + var __exportStar2 = exports2 && exports2.__exportStar || function(m6, exports3) { + for (var p5 in m6) if (p5 !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p5)) __createBinding2(exports3, m6, p5); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_ensure(), exports2); + __exportStar2(require_format(), exports2); + __exportStar2(require_is_ignored(), exports2); + __exportStar2(require_lint(), exports2); + __exportStar2(require_load(), exports2); + __exportStar2(require_parse3(), exports2); + __exportStar2(require_prompt(), exports2); + __exportStar2(require_rules(), exports2); + } +}); + +// src/github-action.ts +var import_core38 = __toESM(require_core(), 1); +var import_exec = __toESM(require_exec(), 1); +var import_github = __toESM(require_github(), 1); + +// node_modules/@clack/core/dist/index.mjs +var import_sisteransi = __toESM(require_src(), 1); +var import_node_process = require("node:process"); +var f = __toESM(require("node:readline"), 1); +function j(t4) { + return t4 && t4.__esModule && Object.prototype.hasOwnProperty.call(t4, "default") ? t4.default : t4; +} +var M = { exports: {} }; +(function(t4) { + var u5 = {}; + t4.exports = u5, u5.eastAsianWidth = function(e5) { + var s4 = e5.charCodeAt(0), C4 = e5.length == 2 ? e5.charCodeAt(1) : 0, D5 = s4; + return 55296 <= s4 && s4 <= 56319 && 56320 <= C4 && C4 <= 57343 && (s4 &= 1023, C4 &= 1023, D5 = s4 << 10 | C4, D5 += 65536), D5 == 12288 || 65281 <= D5 && D5 <= 65376 || 65504 <= D5 && D5 <= 65510 ? "F" : D5 == 8361 || 65377 <= D5 && D5 <= 65470 || 65474 <= D5 && D5 <= 65479 || 65482 <= D5 && D5 <= 65487 || 65490 <= D5 && D5 <= 65495 || 65498 <= D5 && D5 <= 65500 || 65512 <= D5 && D5 <= 65518 ? "H" : 4352 <= D5 && D5 <= 4447 || 4515 <= D5 && D5 <= 4519 || 4602 <= D5 && D5 <= 4607 || 9001 <= D5 && D5 <= 9002 || 11904 <= D5 && D5 <= 11929 || 11931 <= D5 && D5 <= 12019 || 12032 <= D5 && D5 <= 12245 || 12272 <= D5 && D5 <= 12283 || 12289 <= D5 && D5 <= 12350 || 12353 <= D5 && D5 <= 12438 || 12441 <= D5 && D5 <= 12543 || 12549 <= D5 && D5 <= 12589 || 12593 <= D5 && D5 <= 12686 || 12688 <= D5 && D5 <= 12730 || 12736 <= D5 && D5 <= 12771 || 12784 <= D5 && D5 <= 12830 || 12832 <= D5 && D5 <= 12871 || 12880 <= D5 && D5 <= 13054 || 13056 <= D5 && D5 <= 19903 || 19968 <= D5 && D5 <= 42124 || 42128 <= D5 && D5 <= 42182 || 43360 <= D5 && D5 <= 43388 || 44032 <= D5 && D5 <= 55203 || 55216 <= D5 && D5 <= 55238 || 55243 <= D5 && D5 <= 55291 || 63744 <= D5 && D5 <= 64255 || 65040 <= D5 && D5 <= 65049 || 65072 <= D5 && D5 <= 65106 || 65108 <= D5 && D5 <= 65126 || 65128 <= D5 && D5 <= 65131 || 110592 <= D5 && D5 <= 110593 || 127488 <= D5 && D5 <= 127490 || 127504 <= D5 && D5 <= 127546 || 127552 <= D5 && D5 <= 127560 || 127568 <= D5 && D5 <= 127569 || 131072 <= D5 && D5 <= 194367 || 177984 <= D5 && D5 <= 196605 || 196608 <= D5 && D5 <= 262141 ? "W" : 32 <= D5 && D5 <= 126 || 162 <= D5 && D5 <= 163 || 165 <= D5 && D5 <= 166 || D5 == 172 || D5 == 175 || 10214 <= D5 && D5 <= 10221 || 10629 <= D5 && D5 <= 10630 ? "Na" : D5 == 161 || D5 == 164 || 167 <= D5 && D5 <= 168 || D5 == 170 || 173 <= D5 && D5 <= 174 || 176 <= D5 && D5 <= 180 || 182 <= D5 && D5 <= 186 || 188 <= D5 && D5 <= 191 || D5 == 198 || D5 == 208 || 215 <= D5 && D5 <= 216 || 222 <= D5 && D5 <= 225 || D5 == 230 || 232 <= D5 && D5 <= 234 || 236 <= D5 && D5 <= 237 || D5 == 240 || 242 <= D5 && D5 <= 243 || 247 <= D5 && D5 <= 250 || D5 == 252 || D5 == 254 || D5 == 257 || D5 == 273 || D5 == 275 || D5 == 283 || 294 <= D5 && D5 <= 295 || D5 == 299 || 305 <= D5 && D5 <= 307 || D5 == 312 || 319 <= D5 && D5 <= 322 || D5 == 324 || 328 <= D5 && D5 <= 331 || D5 == 333 || 338 <= D5 && D5 <= 339 || 358 <= D5 && D5 <= 359 || D5 == 363 || D5 == 462 || D5 == 464 || D5 == 466 || D5 == 468 || D5 == 470 || D5 == 472 || D5 == 474 || D5 == 476 || D5 == 593 || D5 == 609 || D5 == 708 || D5 == 711 || 713 <= D5 && D5 <= 715 || D5 == 717 || D5 == 720 || 728 <= D5 && D5 <= 731 || D5 == 733 || D5 == 735 || 768 <= D5 && D5 <= 879 || 913 <= D5 && D5 <= 929 || 931 <= D5 && D5 <= 937 || 945 <= D5 && D5 <= 961 || 963 <= D5 && D5 <= 969 || D5 == 1025 || 1040 <= D5 && D5 <= 1103 || D5 == 1105 || D5 == 8208 || 8211 <= D5 && D5 <= 8214 || 8216 <= D5 && D5 <= 8217 || 8220 <= D5 && D5 <= 8221 || 8224 <= D5 && D5 <= 8226 || 8228 <= D5 && D5 <= 8231 || D5 == 8240 || 8242 <= D5 && D5 <= 8243 || D5 == 8245 || D5 == 8251 || D5 == 8254 || D5 == 8308 || D5 == 8319 || 8321 <= D5 && D5 <= 8324 || D5 == 8364 || D5 == 8451 || D5 == 8453 || D5 == 8457 || D5 == 8467 || D5 == 8470 || 8481 <= D5 && D5 <= 8482 || D5 == 8486 || D5 == 8491 || 8531 <= D5 && D5 <= 8532 || 8539 <= D5 && D5 <= 8542 || 8544 <= D5 && D5 <= 8555 || 8560 <= D5 && D5 <= 8569 || D5 == 8585 || 8592 <= D5 && D5 <= 8601 || 8632 <= D5 && D5 <= 8633 || D5 == 8658 || D5 == 8660 || D5 == 8679 || D5 == 8704 || 8706 <= D5 && D5 <= 8707 || 8711 <= D5 && D5 <= 8712 || D5 == 8715 || D5 == 8719 || D5 == 8721 || D5 == 8725 || D5 == 8730 || 8733 <= D5 && D5 <= 8736 || D5 == 8739 || D5 == 8741 || 8743 <= D5 && D5 <= 8748 || D5 == 8750 || 8756 <= D5 && D5 <= 8759 || 8764 <= D5 && D5 <= 8765 || D5 == 8776 || D5 == 8780 || D5 == 8786 || 8800 <= D5 && D5 <= 8801 || 8804 <= D5 && D5 <= 8807 || 8810 <= D5 && D5 <= 8811 || 8814 <= D5 && D5 <= 8815 || 8834 <= D5 && D5 <= 8835 || 8838 <= D5 && D5 <= 8839 || D5 == 8853 || D5 == 8857 || D5 == 8869 || D5 == 8895 || D5 == 8978 || 9312 <= D5 && D5 <= 9449 || 9451 <= D5 && D5 <= 9547 || 9552 <= D5 && D5 <= 9587 || 9600 <= D5 && D5 <= 9615 || 9618 <= D5 && D5 <= 9621 || 9632 <= D5 && D5 <= 9633 || 9635 <= D5 && D5 <= 9641 || 9650 <= D5 && D5 <= 9651 || 9654 <= D5 && D5 <= 9655 || 9660 <= D5 && D5 <= 9661 || 9664 <= D5 && D5 <= 9665 || 9670 <= D5 && D5 <= 9672 || D5 == 9675 || 9678 <= D5 && D5 <= 9681 || 9698 <= D5 && D5 <= 9701 || D5 == 9711 || 9733 <= D5 && D5 <= 9734 || D5 == 9737 || 9742 <= D5 && D5 <= 9743 || 9748 <= D5 && D5 <= 9749 || D5 == 9756 || D5 == 9758 || D5 == 9792 || D5 == 9794 || 9824 <= D5 && D5 <= 9825 || 9827 <= D5 && D5 <= 9829 || 9831 <= D5 && D5 <= 9834 || 9836 <= D5 && D5 <= 9837 || D5 == 9839 || 9886 <= D5 && D5 <= 9887 || 9918 <= D5 && D5 <= 9919 || 9924 <= D5 && D5 <= 9933 || 9935 <= D5 && D5 <= 9953 || D5 == 9955 || 9960 <= D5 && D5 <= 9983 || D5 == 10045 || D5 == 10071 || 10102 <= D5 && D5 <= 10111 || 11093 <= D5 && D5 <= 11097 || 12872 <= D5 && D5 <= 12879 || 57344 <= D5 && D5 <= 63743 || 65024 <= D5 && D5 <= 65039 || D5 == 65533 || 127232 <= D5 && D5 <= 127242 || 127248 <= D5 && D5 <= 127277 || 127280 <= D5 && D5 <= 127337 || 127344 <= D5 && D5 <= 127386 || 917760 <= D5 && D5 <= 917999 || 983040 <= D5 && D5 <= 1048573 || 1048576 <= D5 && D5 <= 1114109 ? "A" : "N"; + }, u5.characterLength = function(e5) { + var s4 = this.eastAsianWidth(e5); + return s4 == "F" || s4 == "W" || s4 == "A" ? 2 : 1; + }; + function F4(e5) { + return e5.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; + } + u5.length = function(e5) { + for (var s4 = F4(e5), C4 = 0, D5 = 0; D5 < s4.length; D5++) C4 = C4 + this.characterLength(s4[D5]); + return C4; + }, u5.slice = function(e5, s4, C4) { + textLen = u5.length(e5), s4 = s4 || 0, C4 = C4 || 1, s4 < 0 && (s4 = textLen + s4), C4 < 0 && (C4 = textLen + C4); + for (var D5 = "", i5 = 0, n4 = F4(e5), E4 = 0; E4 < n4.length; E4++) { + var h5 = n4[E4], o5 = u5.length(h5); + if (i5 >= s4 - (o5 == 2 ? 1 : 0)) if (i5 + o5 <= C4) D5 += h5; + else break; + i5 += o5; + } + return D5; + }; +})(M); +var J = M.exports; +var Q = j(J); +var X = function() { + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; +}; +var DD = j(X); +var m = 10; +var T = (t4 = 0) => (u5) => `\x1B[${u5 + t4}m`; +var P = (t4 = 0) => (u5) => `\x1B[${38 + t4};5;${u5}m`; +var W = (t4 = 0) => (u5, F4, e5) => `\x1B[${38 + t4};2;${u5};${F4};${e5}m`; +var r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; +Object.keys(r.modifier); +var uD = Object.keys(r.color); +var FD = Object.keys(r.bgColor); +[...uD, ...FD]; +function tD() { + const t4 = /* @__PURE__ */ new Map(); + for (const [u5, F4] of Object.entries(r)) { + for (const [e5, s4] of Object.entries(F4)) r[e5] = { open: `\x1B[${s4[0]}m`, close: `\x1B[${s4[1]}m` }, F4[e5] = r[e5], t4.set(s4[0], s4[1]); + Object.defineProperty(r, u5, { value: F4, enumerable: false }); + } + return Object.defineProperty(r, "codes", { value: t4, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = T(), r.color.ansi256 = P(), r.color.ansi16m = W(), r.bgColor.ansi = T(m), r.bgColor.ansi256 = P(m), r.bgColor.ansi16m = W(m), Object.defineProperties(r, { rgbToAnsi256: { value: (u5, F4, e5) => u5 === F4 && F4 === e5 ? u5 < 8 ? 16 : u5 > 248 ? 231 : Math.round((u5 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u5 / 255 * 5) + 6 * Math.round(F4 / 255 * 5) + Math.round(e5 / 255 * 5), enumerable: false }, hexToRgb: { value: (u5) => { + const F4 = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u5.toString(16)); + if (!F4) return [0, 0, 0]; + let [e5] = F4; + e5.length === 3 && (e5 = [...e5].map((C4) => C4 + C4).join("")); + const s4 = Number.parseInt(e5, 16); + return [s4 >> 16 & 255, s4 >> 8 & 255, s4 & 255]; + }, enumerable: false }, hexToAnsi256: { value: (u5) => r.rgbToAnsi256(...r.hexToRgb(u5)), enumerable: false }, ansi256ToAnsi: { value: (u5) => { + if (u5 < 8) return 30 + u5; + if (u5 < 16) return 90 + (u5 - 8); + let F4, e5, s4; + if (u5 >= 232) F4 = ((u5 - 232) * 10 + 8) / 255, e5 = F4, s4 = F4; + else { + u5 -= 16; + const i5 = u5 % 36; + F4 = Math.floor(u5 / 36) / 5, e5 = Math.floor(i5 / 6) / 5, s4 = i5 % 6 / 5; + } + const C4 = Math.max(F4, e5, s4) * 2; + if (C4 === 0) return 30; + let D5 = 30 + (Math.round(s4) << 2 | Math.round(e5) << 1 | Math.round(F4)); + return C4 === 2 && (D5 += 60), D5; + }, enumerable: false }, rgbToAnsi: { value: (u5, F4, e5) => r.ansi256ToAnsi(r.rgbToAnsi256(u5, F4, e5)), enumerable: false }, hexToAnsi: { value: (u5) => r.ansi256ToAnsi(r.hexToAnsi256(u5)), enumerable: false } }), r; +} +var eD = tD(); +var CD = "]"; +var w = `${CD}8;;`; +var V = Symbol("clack:cancel"); +var PD = globalThis.process.platform.startsWith("win"); +function WD({ input: t4 = import_node_process.stdin, output: u5 = import_node_process.stdout, overwrite: F4 = true, hideCursor: e5 = true } = {}) { + const s4 = f.createInterface({ input: t4, output: u5, prompt: "", tabSize: 1 }); + f.emitKeypressEvents(t4, s4), t4.isTTY && t4.setRawMode(true); + const C4 = (D5, { name: i5 }) => { + if (String(D5) === "" && process.exit(0), !F4) return; + let n4 = i5 === "return" ? 0 : -1, E4 = i5 === "return" ? -1 : 0; + f.moveCursor(u5, n4, E4, () => { + f.clearLine(u5, 1, () => { + t4.once("keypress", C4); + }); + }); + }; + return e5 && process.stdout.write(import_sisteransi.cursor.hide), t4.once("keypress", C4), () => { + t4.off("keypress", C4), e5 && process.stdout.write(import_sisteransi.cursor.show), t4.isTTY && !PD && t4.setRawMode(false), s4.terminal = false, s4.close(); + }; +} // node_modules/@clack/prompts/dist/index.mjs var import_node_process2 = __toESM(require("node:process"), 1); @@ -69929,7 +95610,7 @@ function N() { return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : Boolean(import_node_process2.default.env.CI) || Boolean(import_node_process2.default.env.WT_SESSION) || Boolean(import_node_process2.default.env.TERMINUS_SUBLIME) || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm"; } var p = N(); -var u = (r3, n2) => p ? r3 : n2; +var u = (r5, n4) => p ? r5 : n4; var W2 = u("\u25C6", "*"); var D = u("\u25A0", "x"); var F = u("\u25B2", "x"); @@ -69951,52 +95632,52 @@ var U = u("\u25CF", "\u2022"); var Z = u("\u25C6", "*"); var z = u("\u25B2", "!"); var X2 = u("\u25A0", "x"); -var b = (r3) => r3.replace(ue(), ""); -var ie = (r3 = "", n2 = "") => { - const s2 = ` -${r3} +var b = (r5) => r5.replace(ue(), ""); +var ie = (r5 = "", n4 = "") => { + const s4 = ` +${r5} `.split(` -`), t2 = Math.max(s2.reduce((c2, l3) => (l3 = b(l3), l3.length > c2 ? l3.length : c2), 0), b(n2).length) + 2, i3 = s2.map((c2) => `${import_picocolors.default.gray(a)} ${import_picocolors.default.dim(c2)}${" ".repeat(t2 - b(c2).length)}${import_picocolors.default.gray(a)}`).join(` +`), t4 = Math.max(s4.reduce((c4, l5) => (l5 = b(l5), l5.length > c4 ? l5.length : c4), 0), b(n4).length) + 2, i5 = s4.map((c4) => `${import_picocolors.default.gray(a)} ${import_picocolors.default.dim(c4)}${" ".repeat(t4 - b(c4).length)}${import_picocolors.default.gray(a)}`).join(` `); process.stdout.write(`${import_picocolors.default.gray(a)} -${import_picocolors.default.green(f2)} ${import_picocolors.default.reset(n2)} ${import_picocolors.default.gray(R.repeat(Math.max(t2 - n2.length - 1, 1)) + G)} -${i3} -${import_picocolors.default.gray(H + R.repeat(t2 + 2) + K)} +${import_picocolors.default.green(f2)} ${import_picocolors.default.reset(n4)} ${import_picocolors.default.gray(R.repeat(Math.max(t4 - n4.length - 1, 1)) + G)} +${i5} +${import_picocolors.default.gray(H + R.repeat(t4 + 2) + K)} `); }; -var ae = (r3 = "") => { - process.stdout.write(`${import_picocolors.default.gray(L)} ${r3} +var ae = (r5 = "") => { + process.stdout.write(`${import_picocolors.default.gray(L)} ${r5} `); }; -var ce = (r3 = "") => { +var ce = (r5 = "") => { process.stdout.write(`${import_picocolors.default.gray(a)} -${import_picocolors.default.gray(o)} ${r3} +${import_picocolors.default.gray(o)} ${r5} `); }; var C = p ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"]; var le = () => { - let r3, n2; - const s2 = p ? 80 : 120; - return { start(t2 = "") { - t2 = t2.replace(/\.?\.?\.$/, ""), r3 = WD(), process.stdout.write(`${import_picocolors.default.gray(a)} -${import_picocolors.default.magenta("\u25CB")} ${t2} + let r5, n4; + const s4 = p ? 80 : 120; + return { start(t4 = "") { + t4 = t4.replace(/\.?\.?\.$/, ""), r5 = WD(), process.stdout.write(`${import_picocolors.default.gray(a)} +${import_picocolors.default.magenta("\u25CB")} ${t4} `); - let i3 = 0, c2 = 0; - n2 = setInterval(() => { - let l3 = C[i3]; - process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l3)} ${t2}${Math.floor(c2) >= 1 ? ".".repeat(Math.floor(c2)).slice(0, 3) : ""} -`), i3 = i3 === C.length - 1 ? 0 : i3 + 1, c2 = c2 === C.length ? 0 : c2 + 0.125; - }, s2); - }, stop(t2 = "") { - process.stdout.write(import_sisteransi2.cursor.move(-999, -2)), process.stdout.write(import_sisteransi2.erase.down(2)), clearInterval(n2), process.stdout.write(`${import_picocolors.default.gray(a)} -${import_picocolors.default.green(f2)} ${t2} -`), r3(); + let i5 = 0, c4 = 0; + n4 = setInterval(() => { + let l5 = C[i5]; + process.stdout.write(import_sisteransi2.cursor.move(-999, -1)), process.stdout.write(`${import_picocolors.default.magenta(l5)} ${t4}${Math.floor(c4) >= 1 ? ".".repeat(Math.floor(c4)).slice(0, 3) : ""} +`), i5 = i5 === C.length - 1 ? 0 : i5 + 1, c4 = c4 === C.length ? 0 : c4 + 0.125; + }, s4); + }, stop(t4 = "") { + process.stdout.write(import_sisteransi2.cursor.move(-999, -2)), process.stdout.write(import_sisteransi2.erase.down(2)), clearInterval(n4), process.stdout.write(`${import_picocolors.default.gray(a)} +${import_picocolors.default.green(f2)} ${t4} +`), r5(); } }; }; function ue() { - const r3 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"); - return new RegExp(r3, "g"); + const r5 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"); + return new RegExp(r5, "g"); } // src/github-action.ts @@ -70280,10 +95961,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { return 3; } if ("TERM_PROGRAM" in env) { - const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + const version4 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": { - return version2 >= 3 ? 3 : 2; + return version4 >= 3 ? 3 : 2; } case "Apple_Terminal": { return 2; @@ -70505,14 +96186,14 @@ var FD2 = Object.getOwnPropertyDescriptor; var tD2 = Object.getOwnPropertyNames; var ED = Object.getPrototypeOf; var L2 = Object.prototype.hasOwnProperty; -var nD = (D4) => m2(D4, "__esModule", { value: true }); -var rD = (D4, F3) => () => (D4 && (F3 = D4(D4 = 0)), F3); -var iD = (D4, F3) => () => (F3 || D4((F3 = { exports: {} }).exports, F3), F3.exports); -var oD = (D4, F3, u3, C3) => { - if (F3 && typeof F3 == "object" || typeof F3 == "function") for (let t2 of tD2(F3)) !L2.call(D4, t2) && (u3 || t2 !== "default") && m2(D4, t2, { get: () => F3[t2], enumerable: !(C3 = FD2(F3, t2)) || C3.enumerable }); - return D4; +var nD = (D5) => m2(D5, "__esModule", { value: true }); +var rD = (D5, F4) => () => (D5 && (F4 = D5(D5 = 0)), F4); +var iD = (D5, F4) => () => (F4 || D5((F4 = { exports: {} }).exports, F4), F4.exports); +var oD = (D5, F4, u5, C4) => { + if (F4 && typeof F4 == "object" || typeof F4 == "function") for (let t4 of tD2(F4)) !L2.call(D5, t4) && (u5 || t4 !== "default") && m2(D5, t4, { get: () => F4[t4], enumerable: !(C4 = FD2(F4, t4)) || C4.enumerable }); + return D5; }; -var BD = (D4, F3) => oD(nD(m2(D4 != null ? DD2(ED(D4)) : {}, "default", !F3 && D4 && D4.__esModule ? { get: () => D4.default, enumerable: true } : { value: D4, enumerable: true })), D4); +var BD = (D5, F4) => oD(nD(m2(D5 != null ? DD2(ED(D5)) : {}, "default", !F4 && D5 && D5.__esModule ? { get: () => D5.default, enumerable: true } : { value: D5, enumerable: true })), D5); var i = rD(() => { }); var $2 = iD((LD, N4) => { @@ -70537,38 +96218,38 @@ i(); i(); i(); var O = 10; -var U2 = (D4 = 0) => (F3) => `\x1B[${F3 + D4}m`; -var V2 = (D4 = 0) => (F3) => `\x1B[${38 + D4};5;${F3}m`; -var Y = (D4 = 0) => (F3, u3, C3) => `\x1B[${38 + D4};2;${F3};${u3};${C3}m`; +var U2 = (D5 = 0) => (F4) => `\x1B[${F4 + D5}m`; +var V2 = (D5 = 0) => (F4) => `\x1B[${38 + D5};5;${F4}m`; +var Y = (D5 = 0) => (F4, u5, C4) => `\x1B[${38 + D5};2;${F4};${u5};${C4}m`; function AD2() { - let D4 = /* @__PURE__ */ new Map(), F3 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; - F3.color.gray = F3.color.blackBright, F3.bgColor.bgGray = F3.bgColor.bgBlackBright, F3.color.grey = F3.color.blackBright, F3.bgColor.bgGrey = F3.bgColor.bgBlackBright; - for (let [u3, C3] of Object.entries(F3)) { - for (let [t2, E3] of Object.entries(C3)) F3[t2] = { open: `\x1B[${E3[0]}m`, close: `\x1B[${E3[1]}m` }, C3[t2] = F3[t2], D4.set(E3[0], E3[1]); - Object.defineProperty(F3, u3, { value: C3, enumerable: false }); - } - return Object.defineProperty(F3, "codes", { value: D4, enumerable: false }), F3.color.close = "\x1B[39m", F3.bgColor.close = "\x1B[49m", F3.color.ansi = U2(), F3.color.ansi256 = V2(), F3.color.ansi16m = Y(), F3.bgColor.ansi = U2(O), F3.bgColor.ansi256 = V2(O), F3.bgColor.ansi16m = Y(O), Object.defineProperties(F3, { rgbToAnsi256: { value: (u3, C3, t2) => u3 === C3 && C3 === t2 ? u3 < 8 ? 16 : u3 > 248 ? 231 : Math.round((u3 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u3 / 255 * 5) + 6 * Math.round(C3 / 255 * 5) + Math.round(t2 / 255 * 5), enumerable: false }, hexToRgb: { value: (u3) => { - let C3 = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(u3.toString(16)); - if (!C3) return [0, 0, 0]; - let { colorString: t2 } = C3.groups; - t2.length === 3 && (t2 = t2.split("").map((e3) => e3 + e3).join("")); - let E3 = Number.parseInt(t2, 16); - return [E3 >> 16 & 255, E3 >> 8 & 255, E3 & 255]; - }, enumerable: false }, hexToAnsi256: { value: (u3) => F3.rgbToAnsi256(...F3.hexToRgb(u3)), enumerable: false }, ansi256ToAnsi: { value: (u3) => { - if (u3 < 8) return 30 + u3; - if (u3 < 16) return 90 + (u3 - 8); - let C3, t2, E3; - if (u3 >= 232) C3 = ((u3 - 232) * 10 + 8) / 255, t2 = C3, E3 = C3; + let D5 = /* @__PURE__ */ new Map(), F4 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; + F4.color.gray = F4.color.blackBright, F4.bgColor.bgGray = F4.bgColor.bgBlackBright, F4.color.grey = F4.color.blackBright, F4.bgColor.bgGrey = F4.bgColor.bgBlackBright; + for (let [u5, C4] of Object.entries(F4)) { + for (let [t4, E4] of Object.entries(C4)) F4[t4] = { open: `\x1B[${E4[0]}m`, close: `\x1B[${E4[1]}m` }, C4[t4] = F4[t4], D5.set(E4[0], E4[1]); + Object.defineProperty(F4, u5, { value: C4, enumerable: false }); + } + return Object.defineProperty(F4, "codes", { value: D5, enumerable: false }), F4.color.close = "\x1B[39m", F4.bgColor.close = "\x1B[49m", F4.color.ansi = U2(), F4.color.ansi256 = V2(), F4.color.ansi16m = Y(), F4.bgColor.ansi = U2(O), F4.bgColor.ansi256 = V2(O), F4.bgColor.ansi16m = Y(O), Object.defineProperties(F4, { rgbToAnsi256: { value: (u5, C4, t4) => u5 === C4 && C4 === t4 ? u5 < 8 ? 16 : u5 > 248 ? 231 : Math.round((u5 - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u5 / 255 * 5) + 6 * Math.round(C4 / 255 * 5) + Math.round(t4 / 255 * 5), enumerable: false }, hexToRgb: { value: (u5) => { + let C4 = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(u5.toString(16)); + if (!C4) return [0, 0, 0]; + let { colorString: t4 } = C4.groups; + t4.length === 3 && (t4 = t4.split("").map((e5) => e5 + e5).join("")); + let E4 = Number.parseInt(t4, 16); + return [E4 >> 16 & 255, E4 >> 8 & 255, E4 & 255]; + }, enumerable: false }, hexToAnsi256: { value: (u5) => F4.rgbToAnsi256(...F4.hexToRgb(u5)), enumerable: false }, ansi256ToAnsi: { value: (u5) => { + if (u5 < 8) return 30 + u5; + if (u5 < 16) return 90 + (u5 - 8); + let C4, t4, E4; + if (u5 >= 232) C4 = ((u5 - 232) * 10 + 8) / 255, t4 = C4, E4 = C4; else { - u3 -= 16; - let n2 = u3 % 36; - C3 = Math.floor(u3 / 36) / 5, t2 = Math.floor(n2 / 6) / 5, E3 = n2 % 6 / 5; + u5 -= 16; + let n4 = u5 % 36; + C4 = Math.floor(u5 / 36) / 5, t4 = Math.floor(n4 / 6) / 5, E4 = n4 % 6 / 5; } - let e3 = Math.max(C3, t2, E3) * 2; - if (e3 === 0) return 30; - let r3 = 30 + (Math.round(E3) << 2 | Math.round(t2) << 1 | Math.round(C3)); - return e3 === 2 && (r3 += 60), r3; - }, enumerable: false }, rgbToAnsi: { value: (u3, C3, t2) => F3.ansi256ToAnsi(F3.rgbToAnsi256(u3, C3, t2)), enumerable: false }, hexToAnsi: { value: (u3) => F3.ansi256ToAnsi(F3.hexToAnsi256(u3)), enumerable: false } }), F3; + let e5 = Math.max(C4, t4, E4) * 2; + if (e5 === 0) return 30; + let r5 = 30 + (Math.round(E4) << 2 | Math.round(t4) << 1 | Math.round(C4)); + return e5 === 2 && (r5 += 60), r5; + }, enumerable: false }, rgbToAnsi: { value: (u5, C4, t4) => F4.ansi256ToAnsi(F4.rgbToAnsi256(u5, C4, t4)), enumerable: false }, hexToAnsi: { value: (u5) => F4.ansi256ToAnsi(F4.hexToAnsi256(u5)), enumerable: false } }), F4; } var fD = AD2(); var pD = "]"; @@ -70579,12 +96260,12 @@ i(); var J2 = import_tty.default.WriteStream.prototype.hasColors(); var y2 = /^[\w.-]+$/; var { stringify: d3 } = JSON; -function G2(t2, e3) { - if (!t2) throw new Error("Command options are required"); - const { name: r3 } = t2; - if (t2.name === void 0) throw new Error("Command name is required"); - if (!y2.test(r3)) throw new Error(`Invalid command name ${JSON.stringify(r3)}. Command names must be one word.`); - return { options: t2, callback: e3 }; +function G2(t4, e5) { + if (!t4) throw new Error("Command options are required"); + const { name: r5 } = t4; + if (t4.name === void 0) throw new Error("Command name is required"); + if (!y2.test(r5)) throw new Error(`Invalid command name ${JSON.stringify(r5)}. Command names must be one word.`); + return { options: t4, callback: e5 }; } // src/commands/config.ts @@ -70886,6 +96567,58 @@ var CONFIG_KEYS = /* @__PURE__ */ ((CONFIG_KEYS2) => { return CONFIG_KEYS2; })(CONFIG_KEYS || {}); var MODEL_LIST = { + bedrock: [ + // Anthropic Claude models + "anthropic.claude-instant-v1", + "anthropic.claude-v2", + "anthropic.claude-v2:1", + "anthropic.claude-3-sonnet-20240229-v1:0", + "anthropic.claude-3-haiku-20240307-v1:0", + "anthropic.claude-3-opus-20240229-v1:0", + "anthropic.claude-3-5-sonnet-20240620-v1:0", + "anthropic.claude-3-5-sonnet-20241022-v2:0", + "anthropic.claude-3-7-sonnet-20250219-v1:0", + "anthropic.claude-3-5-haiku-20241022-v1:0", + "anthropic.claude-opus-4-20250514-v1:0", + "anthropic.claude-sonnet-4-20250514-v1:0", + // Amazon models + "amazon.titan-text-lite-v1", + "amazon.titan-text-express-v1", + "amazon.titan-text-premier-v1:0", + "amazon.nova-lite-v1:0", + "amazon.nova-pro-v1:0", + "amazon.nova-micro-v1:0", + "amazon.nova-premier-v1:0", + // Meta Llama models + "meta.llama3-8b-instruct-v1:0", + "meta.llama3-70b-instruct-v1:0", + "meta.llama3-1-8b-instruct-v1:0", + "meta.llama3-1-70b-instruct-v1:0", + "meta.llama3-2-11b-instruct-v1:0", + "meta.llama3-2-90b-instruct-v1:0", + "meta.llama3-3-70b-instruct-v1:0", + "meta.llama4-scout-17b-instruct-v1:0", + "meta.llama4-maverick-17b-instruct-v1:0", + // AI21 models + "ai21.jamba-instruct-v1:0", + "ai21.jamba-1-5-large-v1:0", + "ai21.jamba-1-5-mini-v1:0", + // Cohere models + "cohere.command-text-v14", + "cohere.command-light-text-v14", + "cohere.command-r-v1:0", + "cohere.command-r-plus-v1:0", + // Mistral models + "mistral.mistral-7b-instruct-v0:2", + "mistral.mixtral-8x7b-instruct-v0:1", + "mistral.mistral-large-2402-v1:0", + "mistral.mistral-small-2402-v1:0", + "mistral.pixtral-large-2502-v1:0", + // Stability models + "stability.stable-diffusion-xl-v1", + // Deepseek models + "deepseek.r1-v1:0" + ], openai: [ "gpt-4o-mini", "gpt-3.5-turbo", @@ -71335,6 +97068,9 @@ var getDefaultModel = (provider) => { return MODEL_LIST.deepseek[0]; case "openrouter": return MODEL_LIST.openrouter[0]; + case "bedrock": + return MODEL_LIST.bedrock[6]; + // Default to Claude 3.5 Sonnet which is a good balance default: return MODEL_LIST.openai[0]; } @@ -71489,9 +97225,10 @@ var configValidators = { "flowise", "groq", "deepseek", - "openrouter" + "openrouter", + "bedrock" ].includes(value) || value.startsWith("ollama"), - `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek' or 'openai' (default)` + `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek', 'bedrock' or 'openai' (default)` ); return value; }, @@ -71508,7 +97245,7 @@ var configValidators = { "OCO_TEST_MOCK_TYPE" /* OCO_TEST_MOCK_TYPE */, TEST_MOCK_TYPES.includes(value), `${value} is not supported yet, use ${TEST_MOCK_TYPES.map( - (t2) => `'${t2}'` + (t4) => `'${t4}'` ).join(", ")}` ); return value; @@ -71535,6 +97272,7 @@ var OCO_AI_PROVIDER_ENUM = /* @__PURE__ */ ((OCO_AI_PROVIDER_ENUM2) => { OCO_AI_PROVIDER_ENUM2["MLX"] = "mlx"; OCO_AI_PROVIDER_ENUM2["DEEPSEEK"] = "deepseek"; OCO_AI_PROVIDER_ENUM2["OPENROUTER"] = "openrouter"; + OCO_AI_PROVIDER_ENUM2["BEDROCK"] = "bedrock"; return OCO_AI_PROVIDER_ENUM2; })(OCO_AI_PROVIDER_ENUM || {}); var defaultConfigPath = (0, import_path.join)((0, import_os.homedir)(), ".opencommit"); @@ -71621,17 +97359,17 @@ var mergeConfigs = (main, fallback) => { }; var cleanUndefinedValues = (config6) => { return Object.fromEntries( - Object.entries(config6).map(([_3, v2]) => { + Object.entries(config6).map(([_4, v7]) => { try { - if (typeof v2 === "string") { - if (v2 === "undefined") return [_3, void 0]; - if (v2 === "null") return [_3, null]; - const parsedValue = JSON.parse(v2); - return [_3, parsedValue]; + if (typeof v7 === "string") { + if (v7 === "undefined") return [_4, void 0]; + if (v7 === "null") return [_4, null]; + const parsedValue = JSON.parse(v7); + return [_4, parsedValue]; } - return [_3, v2]; + return [_4, v7]; } catch (error) { - return [_3, v2]; + return [_4, v7]; } }) ); @@ -71933,7 +97671,7 @@ init_isFile(); // node_modules/formdata-node/lib/esm/isBlob.js init_Blob(); -var isBlob = (value) => value instanceof Blob3; +var isBlob2 = (value) => value instanceof Blob3; // node_modules/formdata-node/lib/esm/FormData.js init_isFunction(); @@ -71944,10 +97682,10 @@ var deprecateConstructorEntries = (0, import_util.deprecate)(() => { }, 'Constructor "entries" argument is not spec-compliant and will be removed in next major release.'); // node_modules/formdata-node/lib/esm/FormData.js -var __classPrivateFieldGet3 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet3 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _FormData_instances; var _FormData_entries; @@ -72032,7 +97770,7 @@ var FormData3 = class { type: rawValue.type, lastModified: rawValue.lastModified }); - } else if (isBlob(rawValue)) { + } else if (isBlob2(rawValue)) { value = new File3([rawValue], fileName === void 0 ? "blob" : fileName, { type: rawValue.type }); @@ -72102,8 +97840,8 @@ function isPlainObject(value) { var isPlainObject_default = isPlainObject; // node_modules/form-data-encoder/lib/esm/util/normalizeValue.js -var normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i3, str2) => { - if (match === "\r" && str2[i3 + 1] !== "\n" || match === "\n" && str2[i3 - 1] !== "\r") { +var normalizeValue = (value) => String(value).replace(/\r|\n/g, (match, i5, str2) => { + if (match === "\r" && str2[i5 + 1] !== "\n" || match === "\n" && str2[i5 - 1] !== "\r") { return "\r\n"; } return match; @@ -72125,16 +97863,16 @@ var isFileLike = (value) => Boolean(value && typeof value === "object" && isFunc var isFormData = (value) => Boolean(value && isFunction_default(value.constructor) && value[Symbol.toStringTag] === "FormData" && isFunction_default(value.append) && isFunction_default(value.getAll) && isFunction_default(value.entries) && isFunction_default(value[Symbol.iterator])); // node_modules/form-data-encoder/lib/esm/FormDataEncoder.js -var __classPrivateFieldSet3 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet3 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet4 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet4 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _FormDataEncoder_instances; var _FormDataEncoder_CRLF; @@ -72460,19 +98198,19 @@ var Stream = class _Stream { if (sse.event === "completion") { try { yield JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } } if (sse.event === "message_start" || sse.event === "message_delta" || sse.event === "message_stop" || sse.event === "content_block_start" || sse.event === "content_block_delta" || sse.event === "content_block_stop") { try { yield JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } } if (sse.event === "ping") { @@ -72486,10 +98224,10 @@ var Stream = class _Stream { } } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -72529,10 +98267,10 @@ var Stream = class _Stream { yield JSON.parse(line); } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -72643,15 +98381,15 @@ async function* iterSSEChunks(iterator2) { function findDoubleNewlineIndex(buffer) { const newline = 10; const carriage = 13; - for (let i3 = 0; i3 < buffer.length - 2; i3++) { - if (buffer[i3] === newline && buffer[i3 + 1] === newline) { - return i3 + 2; + for (let i5 = 0; i5 < buffer.length - 2; i5++) { + if (buffer[i5] === newline && buffer[i5 + 1] === newline) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === carriage) { - return i3 + 2; + if (buffer[i5] === carriage && buffer[i5 + 1] === carriage) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === newline && i3 + 3 < buffer.length && buffer[i3 + 2] === carriage && buffer[i3 + 3] === newline) { - return i3 + 4; + if (buffer[i5] === carriage && buffer[i5 + 1] === newline && i5 + 3 < buffer.length && buffer[i5 + 2] === carriage && buffer[i5 + 3] === newline) { + return i5 + 4; } } return -1; @@ -72683,7 +98421,7 @@ var SSEDecoder = class { if (line.startsWith(":")) { return null; } - let [fieldname, _3, value] = partition(line, ":"); + let [fieldname, _4, value] = partition(line, ":"); if (value.startsWith(" ")) { value = value.substring(1); } @@ -72784,9 +98522,9 @@ function readableStreamAsyncIterable(stream4) { if (result?.done) reader.releaseLock(); return result; - } catch (e3) { + } catch (e5) { reader.releaseLock(); - throw e3; + throw e5; } }, async return() { @@ -72841,33 +98579,33 @@ async function getBytes(value) { } function propsForError(value) { const props = Object.getOwnPropertyNames(value); - return `[${props.map((p3) => `"${p3}"`).join(", ")}]`; + return `[${props.map((p5) => `"${p5}"`).join(", ")}]`; } function getName(value) { return getStringFromMaybeBuffer(value.name) || getStringFromMaybeBuffer(value.filename) || // For fs.ReadStream getStringFromMaybeBuffer(value.path)?.split(/[\\/]/).pop(); } -var getStringFromMaybeBuffer = (x2) => { - if (typeof x2 === "string") - return x2; - if (typeof Buffer !== "undefined" && x2 instanceof Buffer) - return String(x2); +var getStringFromMaybeBuffer = (x4) => { + if (typeof x4 === "string") + return x4; + if (typeof Buffer !== "undefined" && x4 instanceof Buffer) + return String(x4); return void 0; }; var isAsyncIterableIterator = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function"; var isMultipartBody = (body) => body && typeof body === "object" && body.body && body[Symbol.toStringTag] === "MultipartBody"; // node_modules/@anthropic-ai/sdk/core.mjs -var __classPrivateFieldSet5 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet5 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet6 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet6 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractPage_client; async function defaultParseResponse(props) { @@ -72921,7 +98659,7 @@ var APIPromise = class _APIPromise extends Promise { * - `import '@anthropic-ai/sdk/shims/web'` (otherwise) */ asResponse() { - return this.responsePromise.then((p3) => p3.response); + return this.responsePromise.then((p5) => p5.response); } /** * Gets the parsed response data and the raw `Response` instance. @@ -73132,7 +98870,7 @@ var APIClient = class { debug(`response (error; ${retryMessage2})`, response.status, url2, responseHeaders); return this.retryRequest(options, retriesRemaining, responseHeaders); } - const errText = await response.text().catch((e3) => castToError(e3).message); + const errText = await response.text().catch((e5) => castToError(e5).message); const errJSON = safeJSON(errText); const errMessage = errJSON ? void 0 : errText; const retryMessage = retriesRemaining ? `(error; no more retries left)` : `(error; not retryable)`; @@ -73158,7 +98896,7 @@ var APIClient = class { return url2.toString(); } stringifyQuery(query) { - return Object.entries(query).filter(([_3, value]) => typeof value !== "undefined").map(([key, value]) => { + return Object.entries(query).filter(([_4, value]) => typeof value !== "undefined").map(([key, value]) => { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; } @@ -73433,14 +99171,14 @@ var isAbsoluteURL = (url2) => { return startsWithSchemeRegexp.test(url2); }; var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); -var validatePositiveInteger = (name, n2) => { - if (typeof n2 !== "number" || !Number.isInteger(n2)) { +var validatePositiveInteger = (name, n4) => { + if (typeof n4 !== "number" || !Number.isInteger(n4)) { throw new AnthropicError(`${name} must be an integer`); } - if (n2 < 0) { + if (n4 < 0) { throw new AnthropicError(`${name} must be a positive integer`); } - return n2; + return n4; }; var castToError = (err) => { if (err instanceof Error) @@ -73467,13 +99205,13 @@ function hasOwn(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } function applyHeadersMut(targetHeaders, newHeaders) { - for (const k4 in newHeaders) { - if (!hasOwn(newHeaders, k4)) + for (const k6 in newHeaders) { + if (!hasOwn(newHeaders, k6)) continue; - const lowerKey = k4.toLowerCase(); + const lowerKey = k6.toLowerCase(); if (!lowerKey) continue; - const val = newHeaders[k4]; + const val = newHeaders[k6]; if (val === null) { delete targetHeaders[lowerKey]; } else if (val !== void 0) { @@ -73487,10 +99225,10 @@ function debug(action, ...args) { } } var uuid4 = () => { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c2) => { - const r3 = Math.random() * 16 | 0; - const v2 = c2 === "x" ? r3 : r3 & 3 | 8; - return v2.toString(16); + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c4) => { + const r5 = Math.random() * 16 | 0; + const v7 = c4 === "x" ? r5 : r5 & 3 | 8; + return v7.toString(16); }); }; @@ -73516,16 +99254,16 @@ var Completions = class extends APIResource { })(Completions || (Completions = {})); // node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs -var __classPrivateFieldSet6 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet6 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet7 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet7 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _MessageStream_instances; var _MessageStream_currentMessageSnapshot; @@ -73695,7 +99433,7 @@ var MessageStream = class _MessageStream { const listeners = __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event]; if (!listeners) return this; - const index = listeners.findIndex((l3) => l3.listener === listener); + const index = listeners.findIndex((l5) => l5.listener === listener); if (index >= 0) listeners.splice(index, 1); return this; @@ -73762,7 +99500,7 @@ var MessageStream = class _MessageStream { } const listeners = __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event]; if (listeners) { - __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once); + __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event] = listeners.filter((l5) => !l5.once); listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { @@ -74097,9 +99835,9 @@ function bind(fn, thisArg) { var { toString } = Object.prototype; var { getPrototypeOf } = Object; var { iterator, toStringTag } = Symbol; -var kindOf = /* @__PURE__ */ ((cache) => (thing) => { +var kindOf = /* @__PURE__ */ ((cache3) => (thing) => { const str2 = toString.call(thing); - return cache[str2] || (cache[str2] = str2.slice(8, -1).toLowerCase()); + return cache3[str2] || (cache3[str2] = str2.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)); var kindOfTest = (type2) => { type2 = type2.toLowerCase(); @@ -74135,7 +99873,7 @@ var isPlainObject3 = (val) => { }; var isDate = kindOfTest("Date"); var isFile2 = kindOfTest("File"); -var isBlob2 = kindOfTest("Blob"); +var isBlob3 = kindOfTest("Blob"); var isFileList = kindOfTest("FileList"); var isStream = (val) => isObject(val) && isFunction3(val.pipe); var isFormData2 = (thing) => { @@ -74144,27 +99882,27 @@ var isFormData2 = (thing) => { kind3 === "object" && isFunction3(thing.toString) && thing.toString() === "[object FormData]")); }; var isURLSearchParams = kindOfTest("URLSearchParams"); -var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); +var [isReadableStream2, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest); var trim = (str2) => str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function forEach(obj, fn, { allOwnKeys = false } = {}) { if (obj === null || typeof obj === "undefined") { return; } - let i3; - let l3; + let i5; + let l5; if (typeof obj !== "object") { obj = [obj]; } if (isArray(obj)) { - for (i3 = 0, l3 = obj.length; i3 < l3; i3++) { - fn.call(null, obj[i3], i3, obj); + for (i5 = 0, l5 = obj.length; i5 < l5; i5++) { + fn.call(null, obj[i5], i5, obj); } } else { const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; let key; - for (i3 = 0; i3 < len; i3++) { - key = keys[i3]; + for (i5 = 0; i5 < len; i5++) { + key = keys[i5]; fn.call(null, obj[key], key, obj); } } @@ -74172,10 +99910,10 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) { function findKey(obj, key) { key = key.toLowerCase(); const keys = Object.keys(obj); - let i3 = keys.length; + let i5 = keys.length; let _key; - while (i3-- > 0) { - _key = keys[i3]; + while (i5-- > 0) { + _key = keys[i5]; if (key === _key.toLowerCase()) { return _key; } @@ -74202,20 +99940,20 @@ function merge() { result[targetKey] = val; } }; - for (let i3 = 0, l3 = arguments.length; i3 < l3; i3++) { - arguments[i3] && forEach(arguments[i3], assignValue); + for (let i5 = 0, l5 = arguments.length; i5 < l5; i5++) { + arguments[i5] && forEach(arguments[i5], assignValue); } return result; } -var extend = (a3, b3, thisArg, { allOwnKeys } = {}) => { - forEach(b3, (val, key) => { +var extend = (a5, b5, thisArg, { allOwnKeys } = {}) => { + forEach(b5, (val, key) => { if (thisArg && isFunction3(val)) { - a3[key] = bind(val, thisArg); + a5[key] = bind(val, thisArg); } else { - a3[key] = val; + a5[key] = val; } }, { allOwnKeys }); - return a3; + return a5; }; var stripBOM = (content) => { if (content.charCodeAt(0) === 65279) { @@ -74233,16 +99971,16 @@ var inherits = (constructor, superConstructor, props, descriptors2) => { }; var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { let props; - let i3; + let i5; let prop; const merged = {}; destObj = destObj || {}; if (sourceObj == null) return destObj; do { props = Object.getOwnPropertyNames(sourceObj); - i3 = props.length; - while (i3-- > 0) { - prop = props[i3]; + i5 = props.length; + while (i5-- > 0) { + prop = props[i5]; if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { destObj[prop] = sourceObj[prop]; merged[prop] = true; @@ -74264,11 +100002,11 @@ var endsWith = (str2, searchString, position) => { var toArray = (thing) => { if (!thing) return null; if (isArray(thing)) return thing; - let i3 = thing.length; - if (!isNumber(i3)) return null; - const arr = new Array(i3); - while (i3-- > 0) { - arr[i3] = thing[i3]; + let i5 = thing.length; + if (!isNumber(i5)) return null; + const arr = new Array(i5); + while (i5-- > 0) { + arr[i5] = thing[i5]; } return arr; }; @@ -74298,7 +100036,7 @@ var isHTMLForm = kindOfTest("HTMLFormElement"); var toCamelCase = (str2) => { return str2.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, - function replacer(m4, p1, p22) { + function replacer(m6, p1, p22) { return p1.toUpperCase() + p22; } ); @@ -74355,19 +100093,19 @@ function isSpecCompliantForm(thing) { } var toJSONObject = (obj) => { const stack = new Array(10); - const visit = (source, i3) => { + const visit = (source, i5) => { if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } if (!("toJSON" in source)) { - stack[i3] = source; + stack[i5] = source; const target = isArray(source) ? [] : {}; forEach(source, (value, key) => { - const reducedValue = visit(value, i3 + 1); + const reducedValue = visit(value, i5 + 1); !isUndefined(reducedValue) && (target[key] = reducedValue); }); - stack[i3] = void 0; + stack[i5] = void 0; return target; } } @@ -74409,14 +100147,14 @@ var utils_default = { isBoolean, isObject, isPlainObject: isPlainObject3, - isReadableStream, + isReadableStream: isReadableStream2, isRequest, isResponse, isHeaders, isUndefined, isDate, isFile: isFile2, - isBlob: isBlob2, + isBlob: isBlob3, isRegExp, isFunction: isFunction3, isStream, @@ -74546,9 +100284,9 @@ function removeBrackets(key) { } function renderKey(path2, key, dots) { if (!path2) return key; - return path2.concat(key).map(function each(token, i3) { + return path2.concat(key).map(function each(token, i5) { token = removeBrackets(token); - return !dots && i3 ? "[" + token + "]" : token; + return !dots && i5 ? "[" + token + "]" : token; }).join(dots ? "." : ""); } function isFlatArray(arr) { @@ -74768,9 +100506,9 @@ var InterceptorManager = class { * @returns {void} */ forEach(fn) { - utils_default.forEach(this.handlers, function forEachHandler(h3) { - if (h3 !== null) { - fn(h3); + utils_default.forEach(this.handlers, function forEachHandler(h5) { + if (h5 !== null) { + fn(h5); } }); } @@ -74804,8 +100542,8 @@ var generateString = (size = 16, alphabet2 = ALPHABET.ALPHA_DIGIT) => { const { length } = alphabet2; const randomValues = new Uint32Array(size); import_crypto4.default.randomFillSync(randomValues); - for (let i3 = 0; i3 < size; i3++) { - str2 += alphabet2[randomValues[i3] % length]; + for (let i5 = 0; i5 < size; i5++) { + str2 += alphabet2[randomValues[i5] % length]; } return str2; }; @@ -74867,11 +100605,11 @@ function parsePropPath(name) { function arrayToObject(arr) { const obj = {}; const keys = Object.keys(arr); - let i3; + let i5; const len = keys.length; let key; - for (i3 = 0; i3 < len; i3++) { - key = keys[i3]; + for (i5 = 0; i5 < len; i5++) { + key = keys[i5]; obj[key] = arr[key]; } return obj; @@ -74917,9 +100655,9 @@ function stringifySafely(rawValue, parser, encoder) { try { (parser || JSON.parse)(rawValue); return utils_default.trim(rawValue); - } catch (e3) { - if (e3.name !== "SyntaxError") { - throw e3; + } catch (e5) { + if (e5.name !== "SyntaxError") { + throw e5; } } } @@ -74981,12 +100719,12 @@ var defaults = { const strictJSONParsing = !silentJSONParsing && JSONRequested; try { return JSON.parse(data); - } catch (e3) { + } catch (e5) { if (strictJSONParsing) { - if (e3.name === "SyntaxError") { - throw AxiosError_default.from(e3, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + if (e5.name === "SyntaxError") { + throw AxiosError_default.from(e5, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); } - throw e3; + throw e5; } } } @@ -75044,11 +100782,11 @@ var parseHeaders_default = (rawHeaders) => { const parsed = {}; let key; let val; - let i3; + let i5; rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { - i3 = line.indexOf(":"); - key = line.substring(0, i3).trim().toLowerCase(); - val = line.substring(i3 + 1).trim(); + i5 = line.indexOf(":"); + key = line.substring(0, i5).trim().toLowerCase(); + val = line.substring(i5 + 1).trim(); if (!key || parsed[key] && ignoreDuplicateOf[key]) { return; } @@ -75102,7 +100840,7 @@ function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) } } function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w4, char, str2) => { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w6, char, str2) => { return char.toUpperCase() + str2; }); } @@ -75204,10 +100942,10 @@ var AxiosHeaders = class { } clear(matcher) { const keys = Object.keys(this); - let i3 = keys.length; + let i5 = keys.length; let deleted = false; - while (i3--) { - const key = keys[i3]; + while (i5--) { + const key = keys[i5]; if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; @@ -75676,11 +101414,11 @@ function speedometer(samplesCount, min) { } bytes[head] = chunkLength; timestamps[head] = now; - let i3 = tail; + let i5 = tail; let bytesCount = 0; - while (i3 !== head) { - bytesCount += bytes[i3++]; - i3 = i3 % samplesCount; + while (i5 !== head) { + bytesCount += bytes[i5++]; + i5 = i5 % samplesCount; } head = (head + 1) % samplesCount; if (head === tail) { @@ -75734,9 +101472,9 @@ var throttle_default = throttle; var progressEventReducer = (listener, isDownloadStream, freq = 3) => { let bytesNotified = 0; const _speedometer = speedometer_default(50, 250); - return throttle_default((e3) => { - const loaded = e3.loaded; - const total = e3.lengthComputable ? e3.total : void 0; + return throttle_default((e5) => { + const loaded = e5.loaded; + const total = e5.lengthComputable ? e5.total : void 0; const progressBytes = loaded - bytesNotified; const rate = _speedometer(progressBytes); const inRange = loaded <= total; @@ -75748,7 +101486,7 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => { bytes: progressBytes, rate: rate ? rate : void 0, estimated: rate && total && inRange ? (total - loaded) / rate : void 0, - event: e3, + event: e5, lengthComputable: total != null, [isDownloadStream ? "download" : "upload"]: true }; @@ -75966,7 +101704,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config6) { try { const knownLength = await import_util4.default.promisify(data.getLength).call(data); Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - } catch (e3) { + } catch (e5) { } } } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { @@ -76323,30 +102061,30 @@ function mergeConfig(config1, config22) { } return source; } - function mergeDeepProperties(a3, b3, prop, caseless) { - if (!utils_default.isUndefined(b3)) { - return getMergedValue(a3, b3, prop, caseless); - } else if (!utils_default.isUndefined(a3)) { - return getMergedValue(void 0, a3, prop, caseless); + function mergeDeepProperties(a5, b5, prop, caseless) { + if (!utils_default.isUndefined(b5)) { + return getMergedValue(a5, b5, prop, caseless); + } else if (!utils_default.isUndefined(a5)) { + return getMergedValue(void 0, a5, prop, caseless); } } - function valueFromConfig2(a3, b3) { - if (!utils_default.isUndefined(b3)) { - return getMergedValue(void 0, b3); + function valueFromConfig2(a5, b5) { + if (!utils_default.isUndefined(b5)) { + return getMergedValue(void 0, b5); } } - function defaultToConfig2(a3, b3) { - if (!utils_default.isUndefined(b3)) { - return getMergedValue(void 0, b3); - } else if (!utils_default.isUndefined(a3)) { - return getMergedValue(void 0, a3); + function defaultToConfig2(a5, b5) { + if (!utils_default.isUndefined(b5)) { + return getMergedValue(void 0, b5); + } else if (!utils_default.isUndefined(a5)) { + return getMergedValue(void 0, a5); } } - function mergeDirectKeys(a3, b3, prop) { + function mergeDirectKeys(a5, b5, prop) { if (prop in config22) { - return getMergedValue(a3, b3); + return getMergedValue(a5, b5); } else if (prop in config1) { - return getMergedValue(void 0, a3); + return getMergedValue(void 0, a5); } } const mergeMap = { @@ -76378,7 +102116,7 @@ function mergeConfig(config1, config22) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a3, b3, prop) => mergeDeepProperties(headersToObject(a3), headersToObject(b3), prop, true) + headers: (a5, b5, prop) => mergeDeepProperties(headersToObject(a5), headersToObject(b5), prop, true) }; utils_default.forEach(Object.keys(Object.assign({}, config1, config22)), function computeConfigValue(prop) { const merge2 = mergeMap[prop] || mergeDeepProperties; @@ -76626,10 +102364,10 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => { const iterator2 = readBytes(stream4, chunkSize); let bytes = 0; let done; - let _onFinish = (e3) => { + let _onFinish = (e5) => { if (!done) { done = true; - onFinish && onFinish(e3); + onFinish && onFinish(e5); } }; return new ReadableStream({ @@ -76668,7 +102406,7 @@ var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__ var test = (fn, ...args) => { try { return !!fn(...args); - } catch (e3) { + } catch (e5) { return false; } }; @@ -76691,7 +102429,7 @@ var resolvers = { }; isFetchSupported && ((res) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => { - !resolvers[type2] && (resolvers[type2] = utils_default.isFunction(res[type2]) ? (res2) => res2[type2]() : (_3, config6) => { + !resolvers[type2] && (resolvers[type2] = utils_default.isFunction(res[type2]) ? (res2) => res2[type2]() : (_4, config6) => { throw new AxiosError_default(`Response type '${type2}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config6); }); }); @@ -76835,7 +102573,7 @@ utils_default.forEach(knownAdapters, (fn, value) => { if (fn) { try { Object.defineProperty(fn, "name", { value }); - } catch (e3) { + } catch (e5) { } Object.defineProperty(fn, "adapterName", { value }); } @@ -76849,8 +102587,8 @@ var adapters_default = { let nameOrAdapter; let adapter; const rejectedReasons = {}; - for (let i3 = 0; i3 < length; i3++) { - nameOrAdapter = adapters[i3]; + for (let i5 = 0; i5 < length; i5++) { + nameOrAdapter = adapters[i5]; let id; adapter = nameOrAdapter; if (!isResolvedHandle(nameOrAdapter)) { @@ -76862,15 +102600,15 @@ var adapters_default = { if (adapter) { break; } - rejectedReasons[id || "#" + i3] = adapter; + rejectedReasons[id || "#" + i5] = adapter; } if (!adapter) { const reasons = Object.entries(rejectedReasons).map( - ([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build") + ([id, state3]) => `adapter ${id} ` + (state3 === false ? "is not supported by the environment" : "is not available in the build") ); - let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + let s4 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; throw new AxiosError_default( - `There is no suitable adapter to dispatch the request ` + s2, + `There is no suitable adapter to dispatch the request ` + s4, "ERR_NOT_SUPPORT" ); } @@ -76926,29 +102664,29 @@ function dispatchRequest(config6) { // node_modules/axios/lib/helpers/validator.js var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i3) => { +["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i5) => { validators[type2] = function validator(thing) { - return typeof thing === type2 || "a" + (i3 < 1 ? "n " : " ") + type2; + return typeof thing === type2 || "a" + (i5 < 1 ? "n " : " ") + type2; }; }); var deprecatedWarnings = {}; -validators.transitional = function transitional(validator, version2, message) { +validators.transitional = function transitional(validator, version4, message) { function formatMessage(opt, desc) { return "[Axios v" + VERSION2 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : ""); } return (value, opt, opts) => { if (validator === false) { throw new AxiosError_default( - formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), + formatMessage(opt, " has been removed" + (version4 ? " in " + version4 : "")), AxiosError_default.ERR_DEPRECATED ); } - if (version2 && !deprecatedWarnings[opt]) { + if (version4 && !deprecatedWarnings[opt]) { deprecatedWarnings[opt] = true; console.warn( formatMessage( opt, - " has been deprecated since v" + version2 + " and will be removed in the near future" + " has been deprecated since v" + version4 + " and will be removed in the near future" ) ); } @@ -76966,9 +102704,9 @@ function assertOptions(options, schema, allowUnknown) { throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); - let i3 = keys.length; - while (i3-- > 0) { - const opt = keys[i3]; + let i5 = keys.length; + while (i5-- > 0) { + const opt = keys[i5]; const validator = schema[opt]; if (validator) { const value = options[opt]; @@ -77020,7 +102758,7 @@ var Axios = class { } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { err.stack += "\n" + stack; } - } catch (e3) { + } catch (e5) { } } throw err; @@ -77090,7 +102828,7 @@ var Axios = class { responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); }); let promise; - let i3 = 0; + let i5 = 0; let len; if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), void 0]; @@ -77098,17 +102836,17 @@ var Axios = class { chain.push.apply(chain, responseInterceptorChain); len = chain.length; promise = Promise.resolve(config6); - while (i3 < len) { - promise = promise.then(chain[i3++], chain[i3++]); + while (i5 < len) { + promise = promise.then(chain[i5++], chain[i5++]); } return promise; } len = requestInterceptorChain.length; let newConfig = config6; - i3 = 0; - while (i3 < len) { - const onFulfilled = requestInterceptorChain[i3++]; - const onRejected = requestInterceptorChain[i3++]; + i5 = 0; + while (i5 < len) { + const onFulfilled = requestInterceptorChain[i5++]; + const onRejected = requestInterceptorChain[i5++]; try { newConfig = onFulfilled(newConfig); } catch (error) { @@ -77121,10 +102859,10 @@ var Axios = class { } catch (error) { return Promise.reject(error); } - i3 = 0; + i5 = 0; len = responseInterceptorChain.length; - while (i3 < len) { - promise = promise.then(responseInterceptorChain[i3++], responseInterceptorChain[i3++]); + while (i5 < len) { + promise = promise.then(responseInterceptorChain[i5++], responseInterceptorChain[i5++]); } return promise; } @@ -77174,9 +102912,9 @@ var CancelToken = class _CancelToken { const token = this; this.promise.then((cancel) => { if (!token._listeners) return; - let i3 = token._listeners.length; - while (i3-- > 0) { - token._listeners[i3](cancel); + let i5 = token._listeners.length; + while (i5-- > 0) { + token._listeners[i5](cancel); } token._listeners = null; }); @@ -77248,8 +102986,8 @@ var CancelToken = class _CancelToken { */ static source() { let cancel; - const token = new _CancelToken(function executor(c2) { - cancel = c2; + const token = new _CancelToken(function executor(c4) { + cancel = c4; }); return { token, @@ -77405,24 +103143,24 @@ function removeContentTags(content, tag) { let result = ""; let skipUntil = null; let depth = 0; - for (let i3 = 0; i3 < content.length; i3++) { - if (content.substring(i3, i3 + openTag.length) === openTag) { + for (let i5 = 0; i5 < content.length; i5++) { + if (content.substring(i5, i5 + openTag.length) === openTag) { depth++; if (depth === 1) { - skipUntil = content.indexOf(closeTag, i3 + openTag.length); - i3 = i3 + openTag.length - 1; + skipUntil = content.indexOf(closeTag, i5 + openTag.length); + i5 = i5 + openTag.length - 1; continue; } - } else if (content.substring(i3, i3 + closeTag.length) === closeTag && depth > 0) { + } else if (content.substring(i5, i5 + closeTag.length) === closeTag && depth > 0) { depth--; if (depth === 0) { - i3 = i3 + closeTag.length - 1; + i5 = i5 + closeTag.length - 1; skipUntil = null; continue; } } if (skipUntil === null) { - result += content[i3]; + result += content[i5]; } } result = result.replace(/[ \t]+/g, " ").trim(); @@ -77462,7 +103200,7 @@ var AnthropicEngine = class { max_tokens: this.config.maxTokensOutput }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a3, b3) => a3 + b3, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); } @@ -77543,24 +103281,24 @@ function isObject2(input) { } // node_modules/@azure/core-util/dist/esm/error.js -function isError(e3) { - if (isObject2(e3)) { - const hasName = typeof e3.name === "string"; - const hasMessage = typeof e3.message === "string"; +function isError(e5) { + if (isObject2(e5)) { + const hasName = typeof e5.name === "string"; + const hasMessage = typeof e5.message === "string"; return hasName && hasMessage; } return false; } -function getErrorMessage(e3) { - if (isError(e3)) { - return e3.message; +function getErrorMessage(e5) { + if (isError(e5)) { + return e5.message; } else { let stringified; try { - if (typeof e3 === "object" && e3) { - stringified = JSON.stringify(e3); + if (typeof e5 === "object" && e5) { + stringified = JSON.stringify(e5); } else { - stringified = String(e3); + stringified = String(e5); } } catch (err) { stringified = "[unable to stringify input]"; @@ -77601,92 +103339,16 @@ function isTokenCredential(credential) { return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); } -// node_modules/tslib/tslib.es6.mjs -function __rest(s2, e3) { - var t2 = {}; - for (var p3 in s2) if (Object.prototype.hasOwnProperty.call(s2, p3) && e3.indexOf(p3) < 0) - t2[p3] = s2[p3]; - if (s2 != null && typeof Object.getOwnPropertySymbols === "function") - for (var i3 = 0, p3 = Object.getOwnPropertySymbols(s2); i3 < p3.length; i3++) { - if (e3.indexOf(p3[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p3[i3])) - t2[p3[i3]] = s2[p3[i3]]; - } - return t2; -} -function __values(o3) { - var s2 = typeof Symbol === "function" && Symbol.iterator, m4 = s2 && o3[s2], i3 = 0; - if (m4) return m4.call(o3); - if (o3 && typeof o3.length === "number") return { - next: function() { - if (o3 && i3 >= o3.length) o3 = void 0; - return { value: o3 && o3[i3++], done: !o3 }; - } - }; - throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __await(v2) { - return this instanceof __await ? (this.v = v2, this) : new __await(v2); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g2 = generator.apply(thisArg, _arguments || []), i3, q3 = []; - return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { - return this; - }, i3; - function verb(n2) { - if (g2[n2]) i3[n2] = function(v2) { - return new Promise(function(a3, b3) { - q3.push([n2, v2, a3, b3]) > 1 || resume(n2, v2); - }); - }; - } - function resume(n2, v2) { - try { - step(g2[n2](v2)); - } catch (e3) { - settle2(q3[0][3], e3); - } - } - function step(r3) { - r3.value instanceof __await ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q3[0][2], r3); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle2(f4, v2) { - if (f4(v2), q3.shift(), q3.length) resume(q3[0][0], q3[0][1]); - } -} -function __asyncValues(o3) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m4 = o3[Symbol.asyncIterator], i3; - return m4 ? m4.call(o3) : (o3 = typeof __values === "function" ? __values(o3) : o3[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { - return this; - }, i3); - function verb(n2) { - i3[n2] = o3[n2] && function(v2) { - return new Promise(function(resolve, reject) { - v2 = o3[n2](v2), settle2(resolve, reject, v2.done, v2.value); - }); - }; - } - function settle2(resolve, reject, d5, v2) { - Promise.resolve(v2).then(function(v6) { - resolve({ value: v6, done: d5 }); - }, reject); - } -} +// node_modules/@azure/openai/dist-esm/src/OpenAIClient.js +init_tslib_es6(); // node_modules/@azure/core-rest-pipeline/dist/esm/pipeline.js var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); var HttpPipeline = class _HttpPipeline { constructor(policies) { - var _a5; + var _a6; this._policies = []; - this._policies = (_a5 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a5 !== void 0 ? _a5 : []; + this._policies = (_a6 = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a6 !== void 0 ? _a6 : []; this._orderedPolicies = void 0; } addPolicy(policy, options = {}) { @@ -77981,9 +103643,9 @@ function setLogLevel(level) { } azureLogLevel = level; const enabledNamespaces2 = []; - for (const logger3 of registeredLoggers) { - if (shouldEnable(logger3)) { - enabledNamespaces2.push(logger3.namespace); + for (const logger5 of registeredLoggers) { + if (shouldEnable(logger5)) { + enabledNamespaces2.push(logger5.namespace); } } debug_default.enable(enabledNamespaces2.join(",")); @@ -78010,26 +103672,26 @@ function patchLogMethod(parent, child) { }; } function createLogger(parent, level) { - const logger3 = Object.assign(parent.extend(level), { + const logger5 = Object.assign(parent.extend(level), { level }); - patchLogMethod(parent, logger3); - if (shouldEnable(logger3)) { + patchLogMethod(parent, logger5); + if (shouldEnable(logger5)) { const enabledNamespaces2 = debug_default.disable(); - debug_default.enable(enabledNamespaces2 + "," + logger3.namespace); + debug_default.enable(enabledNamespaces2 + "," + logger5.namespace); } - registeredLoggers.add(logger3); - return logger3; + registeredLoggers.add(logger5); + return logger5; } -function shouldEnable(logger3) { - return Boolean(azureLogLevel && levelMap[logger3.level] <= levelMap[azureLogLevel]); +function shouldEnable(logger5) { + return Boolean(azureLogLevel && levelMap[logger5.level] <= levelMap[azureLogLevel]); } function isAzureLogLevel(logLevel) { return AZURE_LOG_LEVELS.includes(logLevel); } // node_modules/@azure/core-rest-pipeline/dist/esm/log.js -var logger = createClientLogger("core-rest-pipeline"); +var logger2 = createClientLogger("core-rest-pipeline"); // node_modules/@azure/core-rest-pipeline/dist/esm/util/sanitizer.js var RedactedString = "REDACTED"; @@ -78079,8 +103741,8 @@ var Sanitizer = class { constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n2) => n2.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p3) => p3.toLowerCase())); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n4) => n4.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p5) => p5.toLowerCase())); } sanitize(obj) { const seen = /* @__PURE__ */ new Set(); @@ -78125,11 +103787,11 @@ var Sanitizer = class { return value; } const sanitized = {}; - for (const k4 of Object.keys(value)) { - if (this.allowedQueryParameters.has(k4.toLowerCase())) { - sanitized[k4] = value[k4]; + for (const k6 of Object.keys(value)) { + if (this.allowedQueryParameters.has(k6.toLowerCase())) { + sanitized[k6] = value[k6]; } else { - sanitized[k4] = RedactedString; + sanitized[k6] = RedactedString; } } return sanitized; @@ -78154,8 +103816,8 @@ var Sanitizer = class { // node_modules/@azure/core-rest-pipeline/dist/esm/policies/logPolicy.js var logPolicyName = "logPolicy"; function logPolicy(options = {}) { - var _a5; - const logger3 = (_a5 = options.logger) !== null && _a5 !== void 0 ? _a5 : logger.info; + var _a6; + const logger5 = (_a6 = options.logger) !== null && _a6 !== void 0 ? _a6 : logger2.info; const sanitizer = new Sanitizer({ additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, additionalAllowedQueryParameters: options.additionalAllowedQueryParameters @@ -78163,13 +103825,13 @@ function logPolicy(options = {}) { return { name: logPolicyName, async sendRequest(request3, next) { - if (!logger3.enabled) { + if (!logger5.enabled) { return next(request3); } - logger3(`Request: ${sanitizer.sanitize(request3)}`); + logger5(`Request: ${sanitizer.sanitize(request3)}`); const response = await next(request3); - logger3(`Response status code: ${response.status}`); - logger3(`Headers: ${sanitizer.sanitize(response.headers)}`); + logger5(`Response status code: ${response.status}`); + logger5(`Headers: ${sanitizer.sanitize(response.headers)}`); return response; } }; @@ -78212,16 +103874,16 @@ var process4 = __toESM(require("node:process"), 1); function getHeaderName() { return "User-Agent"; } -function setPlatformSpecificData(map) { +function setPlatformSpecificData(map2) { const versions2 = process4.versions; if (versions2.bun) { - map.set("Bun", versions2.bun); + map2.set("Bun", versions2.bun); } else if (versions2.deno) { - map.set("Deno", versions2.deno); + map2.set("Deno", versions2.deno); } else if (versions2.node) { - map.set("Node", versions2.node); + map2.set("Node", versions2.node); } - map.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); + map2.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); } // node_modules/@azure/core-rest-pipeline/dist/esm/constants.js @@ -78266,11 +103928,12 @@ function userAgentPolicy(options = {}) { } // node_modules/@azure/core-rest-pipeline/dist/esm/util/concat.js +init_tslib_es6(); var import_node_stream2 = require("node:stream"); // node_modules/@azure/core-rest-pipeline/dist/esm/util/typeGuards.js -function isBlob3(x2) { - return typeof x2.stream === "function"; +function isBlob4(x4) { + return typeof x4.stream === "function"; } // node_modules/@azure/core-rest-pipeline/dist/esm/util/file.js @@ -78286,8 +103949,8 @@ var unimplementedMethods = { } }; var rawContent = Symbol("rawContent"); -function hasRawContent(x2) { - return typeof x2[rawContent] === "function"; +function hasRawContent(x4) { + return typeof x4[rawContent] === "function"; } function getRawContent(blob) { if (hasRawContent(blob)) { @@ -78297,9 +103960,9 @@ function getRawContent(blob) { } } function createFile(content, name, options = {}) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; if (isNode) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a5 = options.type) !== null && _a5 !== void 0 ? _a5 : "", lastModified: (_b2 = options.lastModified) !== null && _b2 !== void 0 ? _b2 : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c2 = options.webkitRelativePath) !== null && _c2 !== void 0 ? _c2 : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); + return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a6 = options.type) !== null && _a6 !== void 0 ? _a6 : "", lastModified: (_b2 = options.lastModified) !== null && _b2 !== void 0 ? _b2 : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c2 = options.webkitRelativePath) !== null && _c2 !== void 0 ? _c2 : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); } else { return new File([content], name, options); } @@ -78341,7 +104004,7 @@ function ensureNodeStream(stream4) { function toStream(source) { if (source instanceof Uint8Array) { return import_node_stream2.Readable.from(Buffer.from(source)); - } else if (isBlob3(source)) { + } else if (isBlob4(source)) { return toStream(getRawContent(source)); } else { return ensureNodeStream(source); @@ -78349,13 +104012,13 @@ function toStream(source) { } async function concat(sources) { return function() { - const streams = sources.map((x2) => typeof x2 === "function" ? x2() : x2).map(toStream); + const streams = sources.map((x4) => typeof x4 === "function" ? x4() : x4).map(toStream); return import_node_stream2.Readable.from(function() { return __asyncGenerator(this, arguments, function* () { - var _a5, e_1, _b2, _c2; + var _a6, e_1, _b2, _c2; for (const stream4 of streams) { try { - for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream4)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a5 = stream_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, stream_1 = (e_1 = void 0, __asyncValues(stream4)), stream_1_1; stream_1_1 = yield __await(stream_1.next()), _a6 = stream_1_1.done, !_a6; _d2 = true) { _c2 = stream_1_1.value; _d2 = false; const chunk = _c2; @@ -78365,7 +104028,7 @@ async function concat(sources) { e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1)); + if (!_d2 && !_a6 && (_b2 = stream_1.return)) yield __await(_b2.call(stream_1)); } finally { if (e_1) throw e_1.error; } @@ -78391,7 +104054,7 @@ function encodeHeaders(headers) { function getLength(source) { if (source instanceof Uint8Array) { return source.byteLength; - } else if (isBlob3(source)) { + } else if (isBlob4(source)) { return source.size === -1 ? void 0 : source.size; } else { return void 0; @@ -78435,7 +104098,7 @@ function assertValidBoundary(boundary) { if (boundary.length > maxBoundaryLength) { throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); } - if (Array.from(boundary).some((x2) => !validBoundaryCharacters.has(x2))) { + if (Array.from(boundary).some((x4) => !validBoundaryCharacters.has(x4))) { throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); } } @@ -78443,7 +104106,7 @@ function multipartPolicy() { return { name: multipartPolicyName, async sendRequest(request3, next) { - var _a5; + var _a6; if (!request3.multipartBody) { return next(request3); } @@ -78451,7 +104114,7 @@ function multipartPolicy() { throw new Error("multipartBody and regular body cannot be set at the same time"); } let boundary = request3.multipartBody.boundary; - const contentTypeHeader = (_a5 = request3.headers.get("Content-Type")) !== null && _a5 !== void 0 ? _a5 : "multipart/mixed"; + const contentTypeHeader = (_a6 = request3.headers.get("Content-Type")) !== null && _a6 !== void 0 ? _a6 : "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}`); @@ -78551,7 +104214,7 @@ function getRetryAfterInMs(response) { const date = Date.parse(retryAfterHeader); const diff = date - Date.now(); return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (e3) { + } catch (e5) { return void 0; } } @@ -78577,8 +104240,8 @@ function throttlingRetryStrategy() { var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; function exponentialRetryStrategy(options = {}) { - var _a5, _b2; - const retryInterval = (_a5 = options.retryDelayInMs) !== null && _a5 !== void 0 ? _a5 : DEFAULT_CLIENT_RETRY_INTERVAL; + var _a6, _b2; + const retryInterval = (_a6 = options.retryDelayInMs) !== null && _a6 !== void 0 ? _a6 : DEFAULT_CLIENT_RETRY_INTERVAL; const maxRetryInterval = (_b2 = options.maxRetryDelayInMs) !== null && _b2 !== void 0 ? _b2 : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; let retryAfterInMs = retryInterval; return { @@ -78616,11 +104279,11 @@ function isSystemError(err) { var retryPolicyLogger = createClientLogger("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) { - const logger3 = options.logger || retryPolicyLogger; + const logger5 = options.logger || retryPolicyLogger; return { name: retryPolicyName, async sendRequest(request3, next) { - var _a5, _b2; + var _a6, _b2; let response; let responseError; let retryCount = -1; @@ -78629,24 +104292,24 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO response = void 0; responseError = void 0; try { - logger3.info(`Retry ${retryCount}: Attempting to send request`, request3.requestId); + logger5.info(`Retry ${retryCount}: Attempting to send request`, request3.requestId); response = await next(request3); - logger3.info(`Retry ${retryCount}: Received a response from request`, request3.requestId); - } catch (e3) { - logger3.error(`Retry ${retryCount}: Received an error from request`, request3.requestId); - responseError = e3; - if (!e3 || responseError.name !== "RestError") { - throw e3; + logger5.info(`Retry ${retryCount}: Received a response from request`, request3.requestId); + } catch (e5) { + logger5.error(`Retry ${retryCount}: Received an error from request`, request3.requestId); + responseError = e5; + if (!e5 || responseError.name !== "RestError") { + throw e5; } response = responseError.response; } - if ((_a5 = request3.abortSignal) === null || _a5 === void 0 ? void 0 : _a5.aborted) { - logger3.error(`Retry ${retryCount}: Request aborted.`); + if ((_a6 = request3.abortSignal) === null || _a6 === void 0 ? void 0 : _a6.aborted) { + logger5.error(`Retry ${retryCount}: Request aborted.`); const abortError = new AbortError(); throw abortError; } if (retryCount >= ((_b2 = options.maxRetries) !== null && _b2 !== void 0 ? _b2 : DEFAULT_RETRY_POLICY_COUNT)) { - logger3.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + logger5.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); if (responseError) { throw responseError; } else if (response) { @@ -78655,7 +104318,7 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO throw new Error("Maximum retries reached with no response or error to throw"); } } - logger3.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + logger5.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); strategiesLoop: for (const strategy of strategies) { const strategyLogger = strategy.logger || retryPolicyLogger; strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); @@ -78685,11 +104348,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO } } if (responseError) { - logger3.info(`None of the retry strategies could work with the received error. Throwing it.`); + logger5.info(`None of the retry strategies could work with the received error. Throwing it.`); throw responseError; } if (response) { - logger3.info(`None of the retry strategies could work with the received response. Returning it.`); + logger5.info(`None of the retry strategies could work with the received response. Returning it.`); return response; } } @@ -78700,11 +104363,11 @@ function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_CO // node_modules/@azure/core-rest-pipeline/dist/esm/policies/defaultRetryPolicy.js var defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { - var _a5; + var _a6; return { name: defaultRetryPolicyName, sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], { - maxRetries: (_a5 = options.maxRetries) !== null && _a5 !== void 0 ? _a5 : DEFAULT_RETRY_POLICY_COUNT + maxRetries: (_a6 = options.maxRetries) !== null && _a6 !== void 0 ? _a6 : DEFAULT_RETRY_POLICY_COUNT }).sendRequest }; } @@ -78713,8 +104376,8 @@ function defaultRetryPolicy(options = {}) { function normalizeName(name) { return name.toLowerCase(); } -function* headerIterator(map) { - for (const entry of map.values()) { +function* headerIterator(map2) { + for (const entry of map2.values()) { yield [entry.name, entry.value]; } } @@ -78742,8 +104405,8 @@ var HttpHeadersImpl = class { * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a5; - return (_a5 = this._headersMap.get(normalizeName(name))) === null || _a5 === void 0 ? void 0 : _a5.value; + var _a6; + return (_a6 = this._headersMap.get(normalizeName(name))) === null || _a6 === void 0 ? void 0 : _a6.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -78947,7 +104610,7 @@ function setProxyAgentOnRequest(request3, cachedAgents, proxyUrl) { const url2 = new URL(request3.url); const isInsecure = url2.protocol !== "https:"; if (request3.tlsSettings) { - logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + logger2.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } const headers = request3.headers.toJSON(); if (isInsecure) { @@ -78971,8 +104634,8 @@ function proxyPolicy(proxySettings, options) { return { name: proxyPolicyName, async sendRequest(request3, next) { - var _a5; - if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a5 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a5 !== void 0 ? _a5 : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + var _a6; + if (!request3.proxySettings && defaultProxy && !isBypassed(request3.url, (_a6 = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a6 !== void 0 ? _a6 : globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request3, cachedAgents, defaultProxy); } else if (request3.proxySettings) { setProxyAgentOnRequest(request3, cachedAgents, getUrlFromProxySettings(request3.proxySettings)); @@ -79092,8 +104755,8 @@ function getInstrumenter() { function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a5; - const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a5 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a5 === void 0 ? void 0 : _a5.tracingContext })); + var _a6; + const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a6 = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a6 === void 0 ? void 0 : _a6.tracingContext })); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(knownContextKeys.namespace)) { @@ -79165,11 +104828,11 @@ var RestError = class _RestError extends Error { }; RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; RestError.PARSE_ERROR = "PARSE_ERROR"; -function isRestError(e3) { - if (e3 instanceof RestError) { +function isRestError(e5) { + if (e5 instanceof RestError) { return true; } - return isError(e3) && e3.name === "RestError"; + return isError(e5) && e5.name === "RestError"; } // node_modules/@azure/core-rest-pipeline/dist/esm/policies/tracingPolicy.js @@ -79180,8 +104843,8 @@ function tracingPolicy(options = {}) { return { name: tracingPolicyName, async sendRequest(request3, next) { - var _a5, _b2; - if (!tracingClient || !((_a5 = request3.tracingOptions) === null || _a5 === void 0 ? void 0 : _a5.tracingContext)) { + var _a6, _b2; + if (!tracingClient || !((_a6 = request3.tracingOptions) === null || _a6 === void 0 ? void 0 : _a6.tracingContext)) { return next(request3); } const { span, tracingContext } = (_b2 = tryCreateSpan(tracingClient, request3, userAgent)) !== null && _b2 !== void 0 ? _b2 : {}; @@ -79206,8 +104869,8 @@ function tryCreateTracingClient() { packageName: "@azure/core-rest-pipeline", packageVersion: SDK_VERSION }); - } catch (e3) { - logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Error when creating the TracingClient: ${getErrorMessage(e5)}`); return void 0; } } @@ -79233,8 +104896,8 @@ function tryCreateSpan(tracingClient, request3, userAgent) { request3.headers.set(key, value); } return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } catch (e3) { - logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e5)}`); return void 0; } } @@ -79248,8 +104911,8 @@ function tryProcessError(span, error) { span.setAttribute("http.status_code", error.statusCode); } span.end(); - } catch (e3) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e5)}`); } } function tryProcessResponse(span, response) { @@ -79263,14 +104926,14 @@ function tryProcessResponse(span, response) { status: "success" }); span.end(); - } catch (e3) { - logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e3)}`); + } catch (e5) { + logger2.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e5)}`); } } // node_modules/@azure/core-rest-pipeline/dist/esm/createPipelineFromOptions.js function createPipelineFromOptions(options) { - var _a5; + var _a6; const pipeline = createEmptyPipeline(); if (isNode) { if (options.tlsOptions) { @@ -79281,7 +104944,7 @@ function createPipelineFromOptions(options) { } pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] }); pipeline.addPolicy(userAgentPolicy(options.userAgentOptions)); - pipeline.addPolicy(setClientRequestIdPolicy((_a5 = options.telemetryOptions) === null || _a5 === void 0 ? void 0 : _a5.clientRequestIdHeaderName)); + pipeline.addPolicy(setClientRequestIdPolicy((_a6 = options.telemetryOptions) === null || _a6 === void 0 ? void 0 : _a6.clientRequestIdHeaderName)); pipeline.addPolicy(multipartPolicy(), { afterPhase: "Deserialize" }); pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: "Retry" }); pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: "Retry" }); @@ -79298,7 +104961,7 @@ var https2 = __toESM(require("node:https"), 1); var zlib2 = __toESM(require("node:zlib"), 1); var import_node_stream3 = require("node:stream"); var DEFAULT_TLS_SETTINGS = {}; -function isReadableStream2(body) { +function isReadableStream3(body) { return body && typeof body.pipe === "function"; } function isStreamComplete(stream4) { @@ -79319,8 +104982,8 @@ var ReportTransform = class extends import_node_stream3.Transform { try { this.progressCallback({ loadedBytes: this.loadedBytes }); callback(); - } catch (e3) { - callback(e3); + } catch (e5) { + callback(e5); } } constructor(progressCallback) { @@ -79338,7 +105001,7 @@ var NodeHttpClient = class { * @param request - The request to be made. */ async sendRequest(request3) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; const abortController = new AbortController(); let abortListener; if (request3.abortSignal) { @@ -79371,10 +105034,10 @@ var NodeHttpClient = class { if (body && request3.onUploadProgress) { const onUploadProgress = request3.onUploadProgress; const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e3) => { - logger.error("Error in upload progress", e3); + uploadReportStream.on("error", (e5) => { + logger2.error("Error in upload progress", e5); }); - if (isReadableStream2(body)) { + if (isReadableStream3(body)) { body.pipe(uploadReportStream); } else { uploadReportStream.end(body); @@ -79383,7 +105046,7 @@ var NodeHttpClient = class { } const res = await this.makeRequest(request3, abortController, body); const headers = getResponseHeaders(res); - const status = (_a5 = res.statusCode) !== null && _a5 !== void 0 ? _a5 : 0; + const status = (_a6 = res.statusCode) !== null && _a6 !== void 0 ? _a6 : 0; const response = { status, headers, @@ -79397,8 +105060,8 @@ var NodeHttpClient = class { const onDownloadProgress = request3.onDownloadProgress; if (onDownloadProgress) { const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e3) => { - logger.error("Error in download progress", e3); + downloadReportStream.on("error", (e5) => { + logger2.error("Error in download progress", e5); }); responseStream.pipe(downloadReportStream); responseStream = downloadReportStream; @@ -79415,32 +105078,32 @@ var NodeHttpClient = class { } finally { if (request3.abortSignal && abortListener) { let uploadStreamDone = Promise.resolve(); - if (isReadableStream2(body)) { + if (isReadableStream3(body)) { uploadStreamDone = isStreamComplete(body); } let downloadStreamDone = Promise.resolve(); - if (isReadableStream2(responseStream)) { + if (isReadableStream3(responseStream)) { downloadStreamDone = isStreamComplete(responseStream); } Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a6; + var _a7; if (abortListener) { - (_a6 = request3.abortSignal) === null || _a6 === void 0 ? void 0 : _a6.removeEventListener("abort", abortListener); + (_a7 = request3.abortSignal) === null || _a7 === void 0 ? void 0 : _a7.removeEventListener("abort", abortListener); } - }).catch((e3) => { - logger.warning("Error when cleaning up abortListener on httpRequest", e3); + }).catch((e5) => { + logger2.warning("Error when cleaning up abortListener on httpRequest", e5); }); } } } makeRequest(request3, abortController, body) { - var _a5; + var _a6; const url2 = new URL(request3.url); const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request3.allowInsecureConnection) { throw new Error(`Cannot connect to ${request3.url} while allowInsecureConnection is false.`); } - const agent = (_a5 = request3.agent) !== null && _a5 !== void 0 ? _a5 : this.getOrCreateAgent(request3, isInsecure); + const agent = (_a6 = request3.agent) !== null && _a6 !== void 0 ? _a6 : this.getOrCreateAgent(request3, isInsecure); const options = { agent, hostname: url2.hostname, @@ -79452,15 +105115,15 @@ var NodeHttpClient = class { return new Promise((resolve, reject) => { const req = isInsecure ? http2.request(options, resolve) : https2.request(options, resolve); req.once("error", (err) => { - var _a6; - reject(new RestError(err.message, { code: (_a6 = err.code) !== null && _a6 !== void 0 ? _a6 : RestError.REQUEST_SEND_ERROR, request: request3 })); + var _a7; + reject(new RestError(err.message, { code: (_a7 = err.code) !== null && _a7 !== void 0 ? _a7 : RestError.REQUEST_SEND_ERROR, request: request3 })); }); abortController.signal.addEventListener("abort", () => { const abortError = new AbortError("The operation was aborted."); req.destroy(abortError); reject(abortError); }); - if (body && isReadableStream2(body)) { + if (body && isReadableStream3(body)) { body.pipe(req); } else if (body) { if (typeof body === "string" || Buffer.isBuffer(body)) { @@ -79468,7 +105131,7 @@ var NodeHttpClient = class { } else if (isArrayBuffer2(body)) { req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); } else { - logger.error("Unrecognized body type", body); + logger2.error("Unrecognized body type", body); reject(new RestError("Unrecognized body type")); } } else { @@ -79477,7 +105140,7 @@ var NodeHttpClient = class { }); } getOrCreateAgent(request3, isInsecure) { - var _a5; + var _a6; const disableKeepAlive = request3.disableKeepAlive; if (isInsecure) { if (disableKeepAlive) { @@ -79491,12 +105154,12 @@ var NodeHttpClient = class { if (disableKeepAlive && !request3.tlsSettings) { return https2.globalAgent; } - const tlsSettings = (_a5 = request3.tlsSettings) !== null && _a5 !== void 0 ? _a5 : DEFAULT_TLS_SETTINGS; + const tlsSettings = (_a6 = request3.tlsSettings) !== null && _a6 !== void 0 ? _a6 : DEFAULT_TLS_SETTINGS; let agent = this.cachedHttpsAgents.get(tlsSettings); if (agent && agent.options.keepAlive === !disableKeepAlive) { return agent; } - logger.info("No cached TLS Agent exist, creating a new Agent"); + logger2.info("No cached TLS Agent exist, creating a new Agent"); agent = new https2.Agent(Object.assign({ // keepAlive is true if disableKeepAlive is false. keepAlive: !disableKeepAlive @@ -79546,11 +105209,11 @@ function streamToText(stream4) { stream4.on("end", () => { resolve(Buffer.concat(buffer).toString("utf8")); }); - stream4.on("error", (e3) => { - if (e3 && (e3 === null || e3 === void 0 ? void 0 : e3.name) === "AbortError") { - reject(e3); + stream4.on("error", (e5) => { + if (e5 && (e5 === null || e5 === void 0 ? void 0 : e5.name) === "AbortError") { + reject(e5); } else { - reject(new RestError(`Error reading response as text: ${e3.message}`, { + reject(new RestError(`Error reading response as text: ${e5.message}`, { code: RestError.PARSE_ERROR })); } @@ -79562,7 +105225,7 @@ function getBodyLength2(body) { return 0; } else if (Buffer.isBuffer(body)) { return body.length; - } else if (isReadableStream2(body)) { + } else if (isReadableStream3(body)) { return null; } else if (isArrayBuffer2(body)) { return body.byteLength; @@ -79584,10 +105247,10 @@ function createDefaultHttpClient() { // node_modules/@azure/core-rest-pipeline/dist/esm/pipelineRequest.js var PipelineRequestImpl = class { constructor(options) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; this.url = options.url; this.body = options.body; - this.headers = (_a5 = options.headers) !== null && _a5 !== void 0 ? _a5 : createHttpHeaders(); + this.headers = (_a6 = options.headers) !== null && _a6 !== void 0 ? _a6 : createHttpHeaders(); this.method = (_b2 = options.method) !== null && _b2 !== void 0 ? _b2 : "GET"; this.timeout = (_c2 = options.timeout) !== null && _c2 !== void 0 ? _c2 : 0; this.multipartBody = options.multipartBody; @@ -79623,7 +105286,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a5) { + } catch (_a6) { return null; } } else { @@ -79658,8 +105321,8 @@ function createTokenCycler(credential, tokenCyclerOptions) { * window and not already refreshing) */ get shouldRefresh() { - var _a5; - return !cycler.isRefreshing && ((_a5 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a5 !== void 0 ? _a5 : 0) - options.refreshWindowInMs < Date.now(); + var _a6; + return !cycler.isRefreshing && ((_a6 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a6 !== void 0 ? _a6 : 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -79670,14 +105333,14 @@ function createTokenCycler(credential, tokenCyclerOptions) { } }; function refresh(scopes, getTokenOptions) { - var _a5; + var _a6; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a5 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a5 !== void 0 ? _a5 : Date.now() + (_a6 = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a6 !== void 0 ? _a6 : Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -79724,10 +105387,10 @@ function getChallenge(response) { return; } function bearerTokenAuthenticationPolicy(options) { - var _a5; + var _a6; const { credential, scopes, challengeCallbacks } = options; - const logger3 = options.logger || logger; - const callbacks = Object.assign({ authorizeRequest: (_a5 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a5 !== void 0 ? _a5 : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const logger5 = options.logger || logger2; + const callbacks = Object.assign({ authorizeRequest: (_a6 = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a6 !== void 0 ? _a6 : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); const getAccessToken = credential ? createTokenCycler( credential /* , options */ @@ -79755,7 +105418,7 @@ function bearerTokenAuthenticationPolicy(options) { scopes: Array.isArray(scopes) ? scopes : [scopes], request: request3, getAccessToken, - logger: logger3 + logger: logger5 }); let response; let error; @@ -79771,7 +105434,7 @@ function bearerTokenAuthenticationPolicy(options) { request: request3, response, getAccessToken, - logger: logger3 + logger: logger5 }); if (shouldSendRequest) { return next(request3); @@ -79816,7 +105479,7 @@ function keyCredentialAuthenticationPolicy(credential, apiKeyHeaderName) { // node_modules/@azure-rest/core-client/dist/esm/clientHelpers.js var cachedHttpClient; function addCredentialPipelinePolicy(pipeline, endpoint, options = {}) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const { credential, clientOptions } = options; if (!credential) { return; @@ -79824,7 +105487,7 @@ function addCredentialPipelinePolicy(pipeline, endpoint, options = {}) { if (isTokenCredential(credential)) { const tokenPolicy = bearerTokenAuthenticationPolicy({ credential, - scopes: (_b2 = (_a5 = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.credentials) === null || _a5 === void 0 ? void 0 : _a5.scopes) !== null && _b2 !== void 0 ? _b2 : `${endpoint}/.default` + scopes: (_b2 = (_a6 = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.credentials) === null || _a6 === void 0 ? void 0 : _a6.scopes) !== null && _b2 !== void 0 ? _b2 : `${endpoint}/.default` }); pipeline.addPolicy(tokenPolicy); } else if (isKeyCredential2(credential)) { @@ -79853,9 +105516,9 @@ function getCachedDefaultHttpsClient() { // node_modules/@azure-rest/core-client/dist/esm/operationOptionHelpers.js function operationOptionsToRequestParameters(options) { - var _a5, _b2, _c2, _d2, _e2, _f; + var _a6, _b2, _c2, _d2, _e2, _f; return { - allowInsecureConnection: (_a5 = options.requestOptions) === null || _a5 === void 0 ? void 0 : _a5.allowInsecureConnection, + allowInsecureConnection: (_a6 = options.requestOptions) === null || _a6 === void 0 ? void 0 : _a6.allowInsecureConnection, timeout: (_b2 = options.requestOptions) === null || _b2 === void 0 ? void 0 : _b2.timeout, skipUrlEncoding: (_c2 = options.requestOptions) === null || _c2 === void 0 ? void 0 : _c2.skipUrlEncoding, abortSignal: options.abortSignal, @@ -79868,18 +105531,18 @@ function operationOptionsToRequestParameters(options) { } // node_modules/@azure-rest/core-client/dist/esm/helpers/isReadableStream.js -function isReadableStream3(body) { +function isReadableStream4(body) { return Boolean(body) && typeof body.pipe === "function"; } // node_modules/@azure-rest/core-client/dist/esm/sendRequest.js async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { - var _a5; + var _a6; const httpClient = customHttpClient !== null && customHttpClient !== void 0 ? customHttpClient : getCachedDefaultHttpsClient(); const request3 = buildPipelineRequest(method, url2, options); const response = await pipeline.sendRequest(httpClient, request3); const headers = response.headers.toJSON(); - const stream4 = (_a5 = response.readableStreamBody) !== null && _a5 !== void 0 ? _a5 : response.browserStreamBody; + const stream4 = (_a6 = response.readableStreamBody) !== null && _a6 !== void 0 ? _a6 : response.browserStreamBody; const parsedBody = options.responseAsStream || stream4 !== void 0 ? void 0 : getResponseBody(response); const body = stream4 !== null && stream4 !== void 0 ? stream4 : parsedBody; if (options === null || options === void 0 ? void 0 : options.onResponse) { @@ -79893,8 +105556,8 @@ async function sendRequest(method, url2, pipeline, options = {}, customHttpClien }; } function getRequestContentType(options = {}) { - var _a5, _b2, _c2; - return (_c2 = (_a5 = options.contentType) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2["content-type"]) !== null && _c2 !== void 0 ? _c2 : getContentType(options.body); + var _a6, _b2, _c2; + return (_c2 = (_a6 = options.contentType) !== null && _a6 !== void 0 ? _a6 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2["content-type"]) !== null && _c2 !== void 0 ? _c2 : getContentType(options.body); } function getContentType(body) { if (ArrayBuffer.isView(body)) { @@ -79911,11 +105574,11 @@ function getContentType(body) { return "application/json; charset=UTF-8"; } function buildPipelineRequest(method, url2, options = {}) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; const requestContentType = getRequestContentType(options); const { body, formData } = getRequestBody(options.body, requestContentType); const hasContent = body !== void 0 || formData !== void 0; - const headers = createHttpHeaders(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c2 = (_a5 = options.accept) !== null && _a5 !== void 0 ? _a5 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2.accept) !== null && _c2 !== void 0 ? _c2 : "application/json" }), hasContent && requestContentType && { + const headers = createHttpHeaders(Object.assign(Object.assign(Object.assign({}, options.headers ? options.headers : {}), { accept: (_c2 = (_a6 = options.accept) !== null && _a6 !== void 0 ? _a6 : (_b2 = options.headers) === null || _b2 === void 0 ? void 0 : _b2.accept) !== null && _c2 !== void 0 ? _c2 : "application/json" }), hasContent && requestContentType && { "content-type": requestContentType })); return createPipelineRequest({ @@ -79938,7 +105601,7 @@ function getRequestBody(body, contentType = "") { if (body === void 0) { return { body: void 0 }; } - if (isReadableStream3(body)) { + if (isReadableStream4(body)) { return { body }; } const firstType = contentType.split(";")[0]; @@ -79979,8 +105642,8 @@ function processFormData(formData) { return processedFormData; } function getResponseBody(response) { - var _a5, _b2; - const contentType = (_a5 = response.headers.get("content-type")) !== null && _a5 !== void 0 ? _a5 : ""; + var _a6, _b2; + const contentType = (_a6 = response.headers.get("content-type")) !== null && _a6 !== void 0 ? _a6 : ""; const firstType = contentType.split(";")[0]; const bodyToParse = (_b2 = response.bodyAsText) !== null && _b2 !== void 0 ? _b2 : ""; if (firstType === "text/plain") { @@ -79996,9 +105659,9 @@ function getResponseBody(response) { } } function createParseError(response, err) { - var _a5; + var _a6; const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; - const errCode = (_a5 = err.code) !== null && _a5 !== void 0 ? _a5 : RestError.PARSE_ERROR; + const errCode = (_a6 = err.code) !== null && _a6 !== void 0 ? _a6 : RestError.PARSE_ERROR; return new RestError(msg, { code: errCode, statusCode: response.status, @@ -80052,7 +105715,7 @@ function skipQueryParameterEncoding(url2) { return url2; } function buildBaseUrl(endpoint, options) { - var _a5; + var _a6; if (!options.pathParameters) { return endpoint; } @@ -80068,7 +105731,7 @@ function buildBaseUrl(endpoint, options) { if (!options.skipUrlEncoding) { value = encodeURIComponent(param); } - endpoint = (_a5 = replaceAll(endpoint, `{${key}}`, value)) !== null && _a5 !== void 0 ? _a5 : ""; + endpoint = (_a6 = replaceAll(endpoint, `{${key}}`, value)) !== null && _a6 !== void 0 ? _a6 : ""; } return endpoint; } @@ -80088,7 +105751,7 @@ function replaceAll(value, searchValue, replaceValue) { // node_modules/@azure-rest/core-client/dist/esm/getClient.js function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { - var _a5, _b2; + var _a6, _b2; let credentials; if (credentialsOrPipelineOptions) { if (isCredential(credentialsOrPipelineOptions)) { @@ -80098,7 +105761,7 @@ function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { } } const pipeline = createDefaultPipeline(endpoint, credentials, clientOptions); - if ((_a5 = clientOptions.additionalPolicies) === null || _a5 === void 0 ? void 0 : _a5.length) { + if ((_a6 = clientOptions.additionalPolicies) === null || _a6 === void 0 ? void 0 : _a6.length) { for (const { policy, position } of clientOptions.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; pipeline.addPolicy(policy, { @@ -80144,8 +105807,8 @@ function getClient(endpoint, credentialsOrPipelineOptions, clientOptions = {}) { }; } function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { - var _a5; - allowInsecureConnection = (_a5 = options.allowInsecureConnection) !== null && _a5 !== void 0 ? _a5 : allowInsecureConnection; + var _a6; + allowInsecureConnection = (_a6 = options.allowInsecureConnection) !== null && _a6 !== void 0 ? _a6 : allowInsecureConnection; return { then: function(onFulfilled, onrejected) { return sendRequest(method, url2, pipeline, Object.assign(Object.assign({}, options), { allowInsecureConnection }), httpClient).then(onFulfilled, onrejected); @@ -80166,19 +105829,19 @@ function isCredential(param) { } // node_modules/@azure/openai/dist-esm/src/logger.js -var logger2 = createClientLogger("openai"); +var logger3 = createClientLogger("openai"); // node_modules/@azure/openai/dist-esm/src/rest/openAIClient.js function createClient(endpoint, credentials, options = {}) { - var _a5, _b2, _c2, _d2, _e2, _f, _g, _h; - const baseUrl = (_a5 = options.baseUrl) !== null && _a5 !== void 0 ? _a5 : `${endpoint}/openai`; + var _a6, _b2, _c2, _d2, _e2, _f, _g, _h; + const baseUrl = (_a6 = options.baseUrl) !== null && _a6 !== void 0 ? _a6 : `${endpoint}/openai`; options.apiVersion = (_b2 = options.apiVersion) !== null && _b2 !== void 0 ? _b2 : "2024-03-01-preview"; const userAgentInfo = `azsdk-js-openai-rest/1.0.0-beta.12`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` : `${userAgentInfo}`; options = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { - logger: (_d2 = (_c2 = options.loggingOptions) === null || _c2 === void 0 ? void 0 : _c2.logger) !== null && _d2 !== void 0 ? _d2 : logger2.info + logger: (_d2 = (_c2 = options.loggingOptions) === null || _c2 === void 0 ? void 0 : _c2.logger) !== null && _d2 !== void 0 ? _d2 : logger3.info }, credentials: { scopes: (_f = (_e2 = options.credentials) === null || _e2 === void 0 ? void 0 : _e2.scopes) !== null && _f !== void 0 ? _f : ["https://cognitiveservices.azure.com/.default"], apiKeyHeaderName: (_h = (_g = options.credentials) === null || _g === void 0 ? void 0 : _g.apiKeyHeaderName) !== null && _h !== void 0 ? _h : "api-key" @@ -80210,7 +105873,7 @@ function isUnexpected(response) { return !pathDetails.includes(response.status); } function getParametrizedPathSuccess(method, path2) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const pathParts = path2.split("/"); let matchedLen = -1, matchedValue = []; for (const [key, value] of Object.entries(responseMap)) { @@ -80220,17 +105883,17 @@ function getParametrizedPathSuccess(method, path2) { const candidatePath = getPathFromMapKey(key); const candidateParts = candidatePath.split("/"); let found = true; - for (let i3 = candidateParts.length - 1, j4 = pathParts.length - 1; i3 >= 1 && j4 >= 1; i3--, j4--) { - if (((_a5 = candidateParts[i3]) === null || _a5 === void 0 ? void 0 : _a5.startsWith("{")) && ((_b2 = candidateParts[i3]) === null || _b2 === void 0 ? void 0 : _b2.indexOf("}")) !== -1) { - const start = candidateParts[i3].indexOf("}") + 1, end = (_c2 = candidateParts[i3]) === null || _c2 === void 0 ? void 0 : _c2.length; - const isMatched = new RegExp(`${(_d2 = candidateParts[i3]) === null || _d2 === void 0 ? void 0 : _d2.slice(start, end)}`).test(pathParts[j4] || ""); + for (let i5 = candidateParts.length - 1, j6 = pathParts.length - 1; i5 >= 1 && j6 >= 1; i5--, j6--) { + if (((_a6 = candidateParts[i5]) === null || _a6 === void 0 ? void 0 : _a6.startsWith("{")) && ((_b2 = candidateParts[i5]) === null || _b2 === void 0 ? void 0 : _b2.indexOf("}")) !== -1) { + const start = candidateParts[i5].indexOf("}") + 1, end = (_c2 = candidateParts[i5]) === null || _c2 === void 0 ? void 0 : _c2.length; + const isMatched = new RegExp(`${(_d2 = candidateParts[i5]) === null || _d2 === void 0 ? void 0 : _d2.slice(start, end)}`).test(pathParts[j6] || ""); if (!isMatched) { found = false; break; } continue; } - if (candidateParts[i3] !== pathParts[j4]) { + if (candidateParts[i5] !== pathParts[j6]) { found = false; break; } @@ -80256,10 +105919,16 @@ function createOpenAI(endpoint, credential, options = {}) { return clientContext; } +// node_modules/@azure/openai/dist-esm/src/api/operations.js +init_tslib_es6(); + +// node_modules/@azure/openai/dist-esm/src/utils/serializeUtil.js +init_tslib_es6(); + // node_modules/@azure/openai/dist-esm/src/api/util.js -function wrapError(f4, message) { +function wrapError(f6, message) { try { - const result = f4(); + const result = f6(); return result; } catch (cause) { throw new Error(`${message}: ${cause}`, { cause }); @@ -80269,7 +105938,7 @@ function camelCaseKeys(obj) { if (typeof obj !== "object" || !obj) return obj; if (Array.isArray(obj)) { - return obj.map((v2) => camelCaseKeys(v2)); + return obj.map((v7) => camelCaseKeys(v7)); } else { for (const key of Object.keys(obj)) { const value = obj[key]; @@ -80286,7 +105955,7 @@ function snakeCaseKeys(obj) { if (typeof obj !== "object" || !obj) return obj; if (Array.isArray(obj)) { - return obj.map((v2) => snakeCaseKeys(v2)); + return obj.map((v7) => snakeCaseKeys(v7)); } else { for (const key of Object.keys(obj)) { const value = obj[key]; @@ -80355,7 +106024,7 @@ function serializeChatMessageImageContentItem(obj) { }; } function serializeAzureSearchChatExtensionConfiguration(obj) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; return { type: obj["type"], parameters: { @@ -80367,7 +106036,7 @@ function serializeAzureSearchChatExtensionConfiguration(obj) { endpoint: obj["endpoint"], index_name: obj["indexName"], fields_mapping: !obj.fieldsMapping ? void 0 : { - title_field: (_a5 = obj.fieldsMapping) === null || _a5 === void 0 ? void 0 : _a5["titleField"], + title_field: (_a6 = obj.fieldsMapping) === null || _a6 === void 0 ? void 0 : _a6["titleField"], url_field: (_b2 = obj.fieldsMapping) === null || _b2 === void 0 ? void 0 : _b2["urlField"], filepath_field: (_c2 = obj.fieldsMapping) === null || _c2 === void 0 ? void 0 : _c2["filepathField"], content_fields: (_d2 = obj.fieldsMapping) === null || _d2 === void 0 ? void 0 : _d2["contentFields"], @@ -80423,7 +106092,7 @@ function serializeAzureCosmosDBChatExtensionConfiguration(obj) { }; } function serializeElasticsearchChatExtensionConfiguration(obj) { - var _a5, _b2, _c2, _d2, _e2, _f; + var _a6, _b2, _c2, _d2, _e2, _f; return { type: obj["type"], parameters: { @@ -80435,7 +106104,7 @@ function serializeElasticsearchChatExtensionConfiguration(obj) { endpoint: obj["endpoint"], index_name: obj["indexName"], fields_mapping: !obj.fieldsMapping ? void 0 : { - title_field: (_a5 = obj.fieldsMapping) === null || _a5 === void 0 ? void 0 : _a5["titleField"], + title_field: (_a6 = obj.fieldsMapping) === null || _a6 === void 0 ? void 0 : _a6["titleField"], url_field: (_b2 = obj.fieldsMapping) === null || _b2 === void 0 ? void 0 : _b2["urlField"], filepath_field: (_c2 = obj.fieldsMapping) === null || _c2 === void 0 ? void 0 : _c2["filepathField"], content_fields: (_d2 = obj.fieldsMapping) === null || _d2 === void 0 ? void 0 : _d2["contentFields"], @@ -80569,11 +106238,11 @@ function streamToText2(stream4) { stream4.on("end", () => { resolve(Buffer.concat(buffer).toString("utf8")); }); - stream4.on("error", (e3) => { - if (e3 && (e3 === null || e3 === void 0 ? void 0 : e3.name) === "AbortError") { - reject(e3); + stream4.on("error", (e5) => { + if (e5 && (e5 === null || e5 === void 0 ? void 0 : e5.name) === "AbortError") { + reject(e5); } else { - reject(new RestError(`Error reading response as text: ${e3.message}`, { + reject(new RestError(`Error reading response as text: ${e5.message}`, { code: RestError.PARSE_ERROR })); } @@ -80581,7 +106250,11 @@ function streamToText2(stream4) { }); } +// node_modules/@azure/core-sse/dist/esm/sse.js +init_tslib_es6(); + // node_modules/@azure/core-sse/dist/esm/utils.js +init_tslib_es6(); function createStream(asyncIter, cancel) { const stream4 = iteratorToStream(asyncIter, cancel); return polyfillStream(stream4, cancel); @@ -80592,8 +106265,8 @@ function polyfillStream(stream4, dispose) { return stream4; } function makeAsyncDisposable(webStream, dispose) { - var _a5; - (_a5 = Symbol.asyncDispose) !== null && _a5 !== void 0 ? _a5 : Symbol.asyncDispose = Symbol("Symbol.asyncDispose"); + var _a6; + (_a6 = Symbol.asyncDispose) !== null && _a6 !== void 0 ? _a6 : Symbol.asyncDispose = Symbol("Symbol.asyncDispose"); if (!webStream[Symbol.asyncDispose]) { webStream[Symbol.asyncDispose] = () => dispose(); } @@ -80620,7 +106293,7 @@ function iteratorToStream(iterator2, cancel) { }); } function ensureAsyncIterable(stream4) { - if (isReadableStream4(stream4)) { + if (isReadableStream5(stream4)) { makeAsyncIterable2(stream4); return { cancel: () => stream4.cancel(), @@ -80635,7 +106308,7 @@ function ensureAsyncIterable(stream4) { }; } } -function isReadableStream4(body) { +function isReadableStream5(body) { return Boolean(body && typeof body.getReader === "function" && typeof body.tee === "function"); } function toAsyncIterable(stream4) { @@ -80670,10 +106343,10 @@ function createSseStream(chunkStream) { const asyncIter = toMessage(toLine(iterable)); return createStream(asyncIter, cancel); } -function concatBuffer(a3, b3) { - const res = new Uint8Array(a3.length + b3.length); - res.set(a3); - res.set(b3, a3.length); +function concatBuffer(a5, b5) { + const res = new Uint8Array(a5.length + b5.length); + res.set(a5); + res.set(b5, a5.length); return res; } function createMessage() { @@ -80686,13 +106359,13 @@ function createMessage() { } function toLine(chunkIter) { return __asyncGenerator(this, arguments, function* toLine_1() { - var _a5, e_1, _b2, _c2; + var _a6, e_1, _b2, _c2; let buf; let bufIdx = 0; let fieldLen = -1; let discardTrailingNewline = false; try { - for (var _d2 = true, chunkIter_1 = __asyncValues(chunkIter), chunkIter_1_1; chunkIter_1_1 = yield __await(chunkIter_1.next()), _a5 = chunkIter_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, chunkIter_1 = __asyncValues(chunkIter), chunkIter_1_1; chunkIter_1_1 = yield __await(chunkIter_1.next()), _a6 = chunkIter_1_1.done, !_a6; _d2 = true) { _c2 = chunkIter_1_1.value; _d2 = false; const chunk = _c2; @@ -80747,7 +106420,7 @@ function toLine(chunkIter) { e_1 = { error: e_1_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = chunkIter_1.return)) yield __await(_b2.call(chunkIter_1)); + if (!_d2 && !_a6 && (_b2 = chunkIter_1.return)) yield __await(_b2.call(chunkIter_1)); } finally { if (e_1) throw e_1.error; } @@ -80756,11 +106429,11 @@ function toLine(chunkIter) { } function toMessage(lineIter) { return __asyncGenerator(this, arguments, function* toMessage_1() { - var _a5, e_2, _b2, _c2; + var _a6, e_2, _b2, _c2; let message = createMessage(); const decoder = new TextDecoder(); try { - for (var _d2 = true, lineIter_1 = __asyncValues(lineIter), lineIter_1_1; lineIter_1_1 = yield __await(lineIter_1.next()), _a5 = lineIter_1_1.done, !_a5; _d2 = true) { + for (var _d2 = true, lineIter_1 = __asyncValues(lineIter), lineIter_1_1; lineIter_1_1 = yield __await(lineIter_1.next()), _a6 = lineIter_1_1.done, !_a6; _d2 = true) { _c2 = lineIter_1_1.value; _d2 = false; const { line, fieldLen } = _c2; @@ -80795,7 +106468,7 @@ function toMessage(lineIter) { e_2 = { error: e_2_1 }; } finally { try { - if (!_d2 && !_a5 && (_b2 = lineIter_1.return)) yield __await(_b2.call(lineIter_1)); + if (!_d2 && !_a6 && (_b2 = lineIter_1.return)) yield __await(_b2.call(lineIter_1)); } finally { if (e_2) throw e_2.error; } @@ -80804,6 +106477,7 @@ function toMessage(lineIter) { } // node_modules/@azure/openai/dist-esm/src/api/readableStreamUtils.js +init_tslib_es6(); function polyfillStream2(stream4) { makeAsyncIterable3(stream4); return stream4; @@ -80914,8 +106588,8 @@ function getCompletionsResult(body) { prompt_filter_results, prompt_annotations }) - }), { choices: choices.map((_a5) => { - var { content_filter_results } = _a5, choice = __rest(_a5, ["content_filter_results"]); + }), { choices: choices.map((_a6) => { + var { content_filter_results } = _a6, choice = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(choice)), !content_filter_results ? {} : { contentFilterResults: parseContentFilterResultsForChoiceOutput(content_filter_results) }); @@ -80931,7 +106605,7 @@ function streamCompletions(context2, deploymentName, prompt, options = { request return getOaiSSEs(response, getCompletionsResult); } function _getChatCompletionsSend(context2, deploymentId, body, options = { requestOptions: {} }) { - var _a5, _b2, _c2, _d2, _e2, _f, _g; + var _a6, _b2, _c2, _d2, _e2, _f, _g; return context2.path("/deployments/{deploymentId}/chat/completions", deploymentId).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { body: { model: body["model"], stream: body["stream"], @@ -80944,9 +106618,9 @@ function _getChatCompletionsSend(context2, deploymentId, body, options = { reque stop: body["stop"], presence_penalty: body["presencePenalty"], frequency_penalty: body["frequencyPenalty"], - data_sources: body["dataSources"] === void 0 ? body["dataSources"] : body["dataSources"].map((p3) => serializeAzureChatExtensionConfigurationUnion(p3)), + data_sources: body["dataSources"] === void 0 ? body["dataSources"] : body["dataSources"].map((p5) => serializeAzureChatExtensionConfigurationUnion(p5)), enhancements: !body.enhancements ? void 0 : { - grounding: !((_a5 = body.enhancements) === null || _a5 === void 0 ? void 0 : _a5.grounding) ? void 0 : { enabled: (_c2 = (_b2 = body.enhancements) === null || _b2 === void 0 ? void 0 : _b2.grounding) === null || _c2 === void 0 ? void 0 : _c2["enabled"] }, + grounding: !((_a6 = body.enhancements) === null || _a6 === void 0 ? void 0 : _a6.grounding) ? void 0 : { enabled: (_c2 = (_b2 = body.enhancements) === null || _b2 === void 0 ? void 0 : _b2.grounding) === null || _c2 === void 0 ? void 0 : _c2["enabled"] }, ocr: !((_d2 = body.enhancements) === null || _d2 === void 0 ? void 0 : _d2.ocr) ? void 0 : { enabled: (_f = (_e2 = body.enhancements) === null || _e2 === void 0 ? void 0 : _e2.ocr) === null || _f === void 0 ? void 0 : _f["enabled"] } }, seed: body["seed"], @@ -80955,13 +106629,13 @@ function _getChatCompletionsSend(context2, deploymentId, body, options = { reque response_format: !body.responseFormat ? void 0 : { type: (_g = body.responseFormat) === null || _g === void 0 ? void 0 : _g["type"] }, tool_choice: body["toolChoice"], tools: body["tools"], - functions: body["functions"] === void 0 ? body["functions"] : body["functions"].map((p3) => ({ - name: p3["name"], - description: p3["description"], - parameters: p3["parameters"] + functions: body["functions"] === void 0 ? body["functions"] : body["functions"].map((p5) => ({ + name: p5["name"], + description: p5["description"], + parameters: p5["parameters"] })), function_call: body["functionCall"], - messages: body["messages"].map((p3) => serializeChatRequestMessageUnion(p3)) + messages: body["messages"].map((p5) => serializeChatRequestMessageUnion(p5)) } })); } async function _getChatCompletionsDeserialize(result) { @@ -80983,8 +106657,8 @@ function getChatCompletionsResult(body) { promptTokens: usage["prompt_tokens"], totalTokens: usage["total_tokens"] } - }), { choices: !choices ? [] : choices.map((_a5) => { - var { content_filter_results } = _a5, choice = __rest(_a5, ["content_filter_results"]); + }), { choices: !choices ? [] : choices.map((_a6) => { + var { content_filter_results } = _a6, choice = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(choice)), !content_filter_results ? {} : { contentFilterResults: parseContentFilterResultsForChoiceOutput(content_filter_results) }); @@ -81027,54 +106701,54 @@ async function _getImageGenerationsDeserialize(result) { } return { created: new Date(result.body["created"]), - data: result.body["data"].map((p3) => { - var _a5, _b2, _c2, _d2, _e2, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s, _t2, _u, _v, _w, _x, _y, _z, _0, _1, _22, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _222, _23, _24, _25; + data: result.body["data"].map((p5) => { + var _a6, _b2, _c2, _d2, _e2, _f, _g, _h, _j, _k, _l, _m2, _o, _p, _q, _r2, _s, _t2, _u, _v, _w, _x, _y, _z, _0, _1, _22, _32, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _222, _23, _24, _25; return { - url: p3["url"], - base64Data: p3["b64_json"], - contentFilterResults: !p3.content_filter_results ? void 0 : { - sexual: !((_a5 = p3.content_filter_results) === null || _a5 === void 0 ? void 0 : _a5.sexual) ? void 0 : { - severity: (_c2 = (_b2 = p3.content_filter_results) === null || _b2 === void 0 ? void 0 : _b2.sexual) === null || _c2 === void 0 ? void 0 : _c2["severity"], - filtered: (_e2 = (_d2 = p3.content_filter_results) === null || _d2 === void 0 ? void 0 : _d2.sexual) === null || _e2 === void 0 ? void 0 : _e2["filtered"] + url: p5["url"], + base64Data: p5["b64_json"], + contentFilterResults: !p5.content_filter_results ? void 0 : { + sexual: !((_a6 = p5.content_filter_results) === null || _a6 === void 0 ? void 0 : _a6.sexual) ? void 0 : { + severity: (_c2 = (_b2 = p5.content_filter_results) === null || _b2 === void 0 ? void 0 : _b2.sexual) === null || _c2 === void 0 ? void 0 : _c2["severity"], + filtered: (_e2 = (_d2 = p5.content_filter_results) === null || _d2 === void 0 ? void 0 : _d2.sexual) === null || _e2 === void 0 ? void 0 : _e2["filtered"] }, - violence: !((_f = p3.content_filter_results) === null || _f === void 0 ? void 0 : _f.violence) ? void 0 : { - severity: (_h = (_g = p3.content_filter_results) === null || _g === void 0 ? void 0 : _g.violence) === null || _h === void 0 ? void 0 : _h["severity"], - filtered: (_k = (_j = p3.content_filter_results) === null || _j === void 0 ? void 0 : _j.violence) === null || _k === void 0 ? void 0 : _k["filtered"] + violence: !((_f = p5.content_filter_results) === null || _f === void 0 ? void 0 : _f.violence) ? void 0 : { + severity: (_h = (_g = p5.content_filter_results) === null || _g === void 0 ? void 0 : _g.violence) === null || _h === void 0 ? void 0 : _h["severity"], + filtered: (_k = (_j = p5.content_filter_results) === null || _j === void 0 ? void 0 : _j.violence) === null || _k === void 0 ? void 0 : _k["filtered"] }, - hate: !((_l = p3.content_filter_results) === null || _l === void 0 ? void 0 : _l.hate) ? void 0 : { - severity: (_o = (_m = p3.content_filter_results) === null || _m === void 0 ? void 0 : _m.hate) === null || _o === void 0 ? void 0 : _o["severity"], - filtered: (_q = (_p = p3.content_filter_results) === null || _p === void 0 ? void 0 : _p.hate) === null || _q === void 0 ? void 0 : _q["filtered"] + hate: !((_l = p5.content_filter_results) === null || _l === void 0 ? void 0 : _l.hate) ? void 0 : { + severity: (_o = (_m2 = p5.content_filter_results) === null || _m2 === void 0 ? void 0 : _m2.hate) === null || _o === void 0 ? void 0 : _o["severity"], + filtered: (_q = (_p = p5.content_filter_results) === null || _p === void 0 ? void 0 : _p.hate) === null || _q === void 0 ? void 0 : _q["filtered"] }, - selfHarm: !((_r2 = p3.content_filter_results) === null || _r2 === void 0 ? void 0 : _r2.self_harm) ? void 0 : { - severity: (_t2 = (_s = p3.content_filter_results) === null || _s === void 0 ? void 0 : _s.self_harm) === null || _t2 === void 0 ? void 0 : _t2["severity"], - filtered: (_v = (_u = p3.content_filter_results) === null || _u === void 0 ? void 0 : _u.self_harm) === null || _v === void 0 ? void 0 : _v["filtered"] + selfHarm: !((_r2 = p5.content_filter_results) === null || _r2 === void 0 ? void 0 : _r2.self_harm) ? void 0 : { + severity: (_t2 = (_s = p5.content_filter_results) === null || _s === void 0 ? void 0 : _s.self_harm) === null || _t2 === void 0 ? void 0 : _t2["severity"], + filtered: (_v = (_u = p5.content_filter_results) === null || _u === void 0 ? void 0 : _u.self_harm) === null || _v === void 0 ? void 0 : _v["filtered"] } }, - revisedPrompt: p3["revised_prompt"], - promptFilterResults: !p3.prompt_filter_results ? void 0 : { - sexual: !((_w = p3.prompt_filter_results) === null || _w === void 0 ? void 0 : _w.sexual) ? void 0 : { - severity: (_y = (_x = p3.prompt_filter_results) === null || _x === void 0 ? void 0 : _x.sexual) === null || _y === void 0 ? void 0 : _y["severity"], - filtered: (_0 = (_z = p3.prompt_filter_results) === null || _z === void 0 ? void 0 : _z.sexual) === null || _0 === void 0 ? void 0 : _0["filtered"] + revisedPrompt: p5["revised_prompt"], + promptFilterResults: !p5.prompt_filter_results ? void 0 : { + sexual: !((_w = p5.prompt_filter_results) === null || _w === void 0 ? void 0 : _w.sexual) ? void 0 : { + severity: (_y = (_x = p5.prompt_filter_results) === null || _x === void 0 ? void 0 : _x.sexual) === null || _y === void 0 ? void 0 : _y["severity"], + filtered: (_0 = (_z = p5.prompt_filter_results) === null || _z === void 0 ? void 0 : _z.sexual) === null || _0 === void 0 ? void 0 : _0["filtered"] }, - violence: !((_1 = p3.prompt_filter_results) === null || _1 === void 0 ? void 0 : _1.violence) ? void 0 : { - severity: (_3 = (_22 = p3.prompt_filter_results) === null || _22 === void 0 ? void 0 : _22.violence) === null || _3 === void 0 ? void 0 : _3["severity"], - filtered: (_5 = (_4 = p3.prompt_filter_results) === null || _4 === void 0 ? void 0 : _4.violence) === null || _5 === void 0 ? void 0 : _5["filtered"] + violence: !((_1 = p5.prompt_filter_results) === null || _1 === void 0 ? void 0 : _1.violence) ? void 0 : { + severity: (_32 = (_22 = p5.prompt_filter_results) === null || _22 === void 0 ? void 0 : _22.violence) === null || _32 === void 0 ? void 0 : _32["severity"], + filtered: (_5 = (_4 = p5.prompt_filter_results) === null || _4 === void 0 ? void 0 : _4.violence) === null || _5 === void 0 ? void 0 : _5["filtered"] }, - hate: !((_6 = p3.prompt_filter_results) === null || _6 === void 0 ? void 0 : _6.hate) ? void 0 : { - severity: (_8 = (_7 = p3.prompt_filter_results) === null || _7 === void 0 ? void 0 : _7.hate) === null || _8 === void 0 ? void 0 : _8["severity"], - filtered: (_10 = (_9 = p3.prompt_filter_results) === null || _9 === void 0 ? void 0 : _9.hate) === null || _10 === void 0 ? void 0 : _10["filtered"] + hate: !((_6 = p5.prompt_filter_results) === null || _6 === void 0 ? void 0 : _6.hate) ? void 0 : { + severity: (_8 = (_7 = p5.prompt_filter_results) === null || _7 === void 0 ? void 0 : _7.hate) === null || _8 === void 0 ? void 0 : _8["severity"], + filtered: (_10 = (_9 = p5.prompt_filter_results) === null || _9 === void 0 ? void 0 : _9.hate) === null || _10 === void 0 ? void 0 : _10["filtered"] }, - selfHarm: !((_11 = p3.prompt_filter_results) === null || _11 === void 0 ? void 0 : _11.self_harm) ? void 0 : { - severity: (_13 = (_12 = p3.prompt_filter_results) === null || _12 === void 0 ? void 0 : _12.self_harm) === null || _13 === void 0 ? void 0 : _13["severity"], - filtered: (_15 = (_14 = p3.prompt_filter_results) === null || _14 === void 0 ? void 0 : _14.self_harm) === null || _15 === void 0 ? void 0 : _15["filtered"] + selfHarm: !((_11 = p5.prompt_filter_results) === null || _11 === void 0 ? void 0 : _11.self_harm) ? void 0 : { + severity: (_13 = (_12 = p5.prompt_filter_results) === null || _12 === void 0 ? void 0 : _12.self_harm) === null || _13 === void 0 ? void 0 : _13["severity"], + filtered: (_15 = (_14 = p5.prompt_filter_results) === null || _14 === void 0 ? void 0 : _14.self_harm) === null || _15 === void 0 ? void 0 : _15["filtered"] }, - profanity: !((_16 = p3.prompt_filter_results) === null || _16 === void 0 ? void 0 : _16.profanity) ? void 0 : { - filtered: (_18 = (_17 = p3.prompt_filter_results) === null || _17 === void 0 ? void 0 : _17.profanity) === null || _18 === void 0 ? void 0 : _18["filtered"], - detected: (_20 = (_19 = p3.prompt_filter_results) === null || _19 === void 0 ? void 0 : _19.profanity) === null || _20 === void 0 ? void 0 : _20["detected"] + profanity: !((_16 = p5.prompt_filter_results) === null || _16 === void 0 ? void 0 : _16.profanity) ? void 0 : { + filtered: (_18 = (_17 = p5.prompt_filter_results) === null || _17 === void 0 ? void 0 : _17.profanity) === null || _18 === void 0 ? void 0 : _18["filtered"], + detected: (_20 = (_19 = p5.prompt_filter_results) === null || _19 === void 0 ? void 0 : _19.profanity) === null || _20 === void 0 ? void 0 : _20["detected"] }, - jailbreak: !((_21 = p3.prompt_filter_results) === null || _21 === void 0 ? void 0 : _21.jailbreak) ? void 0 : { - filtered: (_23 = (_222 = p3.prompt_filter_results) === null || _222 === void 0 ? void 0 : _222.jailbreak) === null || _23 === void 0 ? void 0 : _23["filtered"], - detected: (_25 = (_24 = p3.prompt_filter_results) === null || _24 === void 0 ? void 0 : _24.jailbreak) === null || _25 === void 0 ? void 0 : _25["detected"] + jailbreak: !((_21 = p5.prompt_filter_results) === null || _21 === void 0 ? void 0 : _21.jailbreak) ? void 0 : { + filtered: (_23 = (_222 = p5.prompt_filter_results) === null || _222 === void 0 ? void 0 : _222.jailbreak) === null || _23 === void 0 ? void 0 : _23["filtered"], + detected: (_25 = (_24 = p5.prompt_filter_results) === null || _24 === void 0 ? void 0 : _24.jailbreak) === null || _25 === void 0 ? void 0 : _25["detected"] } } }; @@ -81098,9 +106772,9 @@ async function _getEmbeddingsDeserialize(result) { throw result.body.error; } return { - data: result.body["data"].map((p3) => ({ - embedding: p3["embedding"], - index: p3["index"] + data: result.body["data"].map((p5) => ({ + embedding: p5["embedding"], + index: p5["index"] })), usage: { promptTokens: result.body.usage["prompt_tokens"], @@ -81114,24 +106788,24 @@ async function getEmbeddings(context2, deploymentId, body, options = { requestOp } function getContentFilterResultsForPrompt({ prompt_annotations, prompt_filter_results }) { const res = prompt_filter_results !== null && prompt_filter_results !== void 0 ? prompt_filter_results : prompt_annotations; - return res === null || res === void 0 ? void 0 : res.map((_a5) => { - var { content_filter_results } = _a5, rest = __rest(_a5, ["content_filter_results"]); + return res === null || res === void 0 ? void 0 : res.map((_a6) => { + var { content_filter_results } = _a6, rest = __rest(_a6, ["content_filter_results"]); return Object.assign(Object.assign({}, camelCaseKeys(rest)), { contentFilterResults: parseContentFilterResultDetailsForPromptOutput(content_filter_results) }); }); } -function parseContentFilterResultDetailsForPromptOutput(_a5 = {}) { - var { error } = _a5, rest = __rest(_a5, ["error"]); +function parseContentFilterResultDetailsForPromptOutput(_a6 = {}) { + var { error } = _a6, rest = __rest(_a6, ["error"]); return error ? parseError(error) : camelCaseKeys(rest); } function parseError(error) { - var _a5; + var _a6; return { - error: Object.assign(Object.assign({}, error), { details: (_a5 = error["details"]) !== null && _a5 !== void 0 ? _a5 : [] }) + error: Object.assign(Object.assign({}, error), { details: (_a6 = error["details"]) !== null && _a6 !== void 0 ? _a6 : [] }) }; } -function parseContentFilterResultsForChoiceOutput(_a5 = {}) { +function parseContentFilterResultsForChoiceOutput(_a6 = {}) { var _b2; - var { error } = _a5, successResult = __rest(_a5, ["error"]); + var { error } = _a6, successResult = __rest(_a6, ["error"]); return error ? { error: Object.assign(Object.assign({}, error), { details: (_b2 = error["details"]) !== null && _b2 !== void 0 ? _b2 : [] }) } : camelCaseKeys(successResult); @@ -81178,15 +106852,15 @@ function nonAzurePolicy() { } // node_modules/@azure/openai/dist-esm/src/OpenAIClient.js -function createOpenAIEndpoint(version2) { - return `https://api.openai.com/v${version2}`; +function createOpenAIEndpoint(version4) { + return `https://api.openai.com/v${version4}`; } function isCred(cred) { return isTokenCredential(cred) || cred.key !== void 0; } var OpenAIClient = class { constructor(endpointOrOpenAiKey, credOrOptions = {}, options = {}) { - var _a5, _b2; + var _a6, _b2; this._isAzure = false; let opts; let endpoint; @@ -81201,7 +106875,7 @@ var OpenAIClient = class { cred = endpointOrOpenAiKey; const { credentials } = credOrOptions, restOpts = __rest(credOrOptions, ["credentials"]); opts = Object.assign({ credentials: { - apiKeyHeaderName: (_a5 = credentials === null || credentials === void 0 ? void 0 : credentials.apiKeyHeaderName) !== null && _a5 !== void 0 ? _a5 : "Authorization", + apiKeyHeaderName: (_a6 = credentials === null || credentials === void 0 ? void 0 : credentials.apiKeyHeaderName) !== null && _a6 !== void 0 ? _a6 : "Authorization", scopes: credentials === null || credentials === void 0 ? void 0 : credentials.scopes } }, restOpts); } @@ -81300,7 +106974,7 @@ var AzureEngine = class { constructor(config6) { this.generateCommitMessage = async (messages) => { try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a3, b3) => a3 + b3, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); } @@ -81474,8 +107148,8 @@ var RequestUrl = class { this.requestOptions = requestOptions; } toString() { - var _a5, _b2; - const apiVersion = ((_a5 = this.requestOptions) === null || _a5 === void 0 ? void 0 : _a5.apiVersion) || DEFAULT_API_VERSION; + var _a6, _b2; + const apiVersion = ((_a6 = this.requestOptions) === null || _a6 === void 0 ? void 0 : _a6.apiVersion) || DEFAULT_API_VERSION; const baseUrl = ((_b2 = this.requestOptions) === null || _b2 === void 0 ? void 0 : _b2.baseUrl) || DEFAULT_BASE_URL; let url2 = `${baseUrl}/${apiVersion}/${this.model}:${this.task}`; if (this.stream) { @@ -81502,8 +107176,8 @@ async function getHeaders(url2) { if (!(customHeaders instanceof Headers)) { try { customHeaders = new Headers(customHeaders); - } catch (e3) { - throw new GoogleGenerativeAIRequestInputError(`unable to convert customHeaders value ${JSON.stringify(customHeaders)} to Headers: ${e3.message}`); + } catch (e5) { + throw new GoogleGenerativeAIRequestInputError(`unable to convert customHeaders value ${JSON.stringify(customHeaders)} to Headers: ${e5.message}`); } } for (const [headerName, headerValue] of customHeaders.entries()) { @@ -81543,15 +107217,15 @@ async function _makeRequestInternal(model, task, apiKey, stream4, body, requestO message += ` ${JSON.stringify(json.error.details)}`; errorDetails = json.error.details; } - } catch (e3) { + } catch (e5) { } throw new GoogleGenerativeAIFetchError(`Error fetching from ${url2.toString()}: [${response.status} ${response.statusText}] ${message}`, response.status, response.statusText, errorDetails); } - } catch (e3) { - let err = e3; - if (!(e3 instanceof GoogleGenerativeAIFetchError || e3 instanceof GoogleGenerativeAIRequestInputError)) { - err = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e3.message}`); - err.stack = e3.stack; + } catch (e5) { + let err = e5; + if (!(e5 instanceof GoogleGenerativeAIFetchError || e5 instanceof GoogleGenerativeAIRequestInputError)) { + err = new GoogleGenerativeAIError(`Error fetching from ${url2.toString()}: ${e5.message}`); + err.stack = e5.stack; } throw err; } @@ -81614,9 +107288,9 @@ function addHelpers(response) { return response; } function getText(response) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const textStrings = []; - if ((_b2 = (_a5 = response.candidates) === null || _a5 === void 0 ? void 0 : _a5[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { + if ((_b2 = (_a6 = response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { for (const part of (_d2 = (_c2 = response.candidates) === null || _c2 === void 0 ? void 0 : _c2[0].content) === null || _d2 === void 0 ? void 0 : _d2.parts) { if (part.text) { textStrings.push(part.text); @@ -81630,9 +107304,9 @@ function getText(response) { } } function getFunctionCalls(response) { - var _a5, _b2, _c2, _d2; + var _a6, _b2, _c2, _d2; const functionCalls = []; - if ((_b2 = (_a5 = response.candidates) === null || _a5 === void 0 ? void 0 : _a5[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { + if ((_b2 = (_a6 = response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { for (const part of (_d2 = (_c2 = response.candidates) === null || _c2 === void 0 ? void 0 : _c2[0].content) === null || _d2 === void 0 ? void 0 : _d2.parts) { if (part.functionCall) { functionCalls.push(part.functionCall); @@ -81650,11 +107324,11 @@ function hadBadFinishReason(candidate) { return !!candidate.finishReason && badFinishReasons.includes(candidate.finishReason); } function formatBlockErrorMessage(response) { - var _a5, _b2, _c2; + var _a6, _b2, _c2; let message = ""; if ((!response.candidates || response.candidates.length === 0) && response.promptFeedback) { message += "Response was blocked"; - if ((_a5 = response.promptFeedback) === null || _a5 === void 0 ? void 0 : _a5.blockReason) { + if ((_a6 = response.promptFeedback) === null || _a6 === void 0 ? void 0 : _a6.blockReason) { message += ` due to ${response.promptFeedback.blockReason}`; } if ((_b2 = response.promptFeedback) === null || _b2 === void 0 ? void 0 : _b2.blockReasonMessage) { @@ -81671,31 +107345,31 @@ function formatBlockErrorMessage(response) { } return message; } -function __await2(v2) { - return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2); +function __await2(v7) { + return this instanceof __await2 ? (this.v = v7, this) : new __await2(v7); } function __asyncGenerator2(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g2 = generator.apply(thisArg, _arguments || []), i3, q3 = []; - return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + var g4 = generator.apply(thisArg, _arguments || []), i5, q5 = []; + return i5 = {}, verb("next"), verb("throw"), verb("return"), i5[Symbol.asyncIterator] = function() { return this; - }, i3; - function verb(n2) { - if (g2[n2]) i3[n2] = function(v2) { - return new Promise(function(a3, b3) { - q3.push([n2, v2, a3, b3]) > 1 || resume(n2, v2); + }, i5; + function verb(n4) { + if (g4[n4]) i5[n4] = function(v7) { + return new Promise(function(a5, b5) { + q5.push([n4, v7, a5, b5]) > 1 || resume(n4, v7); }); }; } - function resume(n2, v2) { + function resume(n4, v7) { try { - step(g2[n2](v2)); - } catch (e3) { - settle2(q3[0][3], e3); + step(g4[n4](v7)); + } catch (e5) { + settle2(q5[0][3], e5); } } - function step(r3) { - r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle2(q3[0][2], r3); + function step(r5) { + r5.value instanceof __await2 ? Promise.resolve(r5.value.v).then(fulfill, reject) : settle2(q5[0][2], r5); } function fulfill(value) { resume("next", value); @@ -81703,8 +107377,8 @@ function __asyncGenerator2(thisArg, _arguments, generator) { function reject(value) { resume("throw", value); } - function settle2(f4, v2) { - if (f4(v2), q3.shift(), q3.length) resume(q3[0][0], q3[0][1]); + function settle2(f6, v7) { + if (f6(v7), q5.shift(), q5.length) resume(q5[0][0], q5[0][1]); } } var responseLineRE = /^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/; @@ -81762,7 +107436,7 @@ function getResponseStream(inputStream) { while (match) { try { parsedResponse = JSON.parse(match[1]); - } catch (e3) { + } catch (e5) { controller.error(new GoogleGenerativeAIError(`Error parsing JSON response: "${match[1]}"`)); return; } @@ -81785,22 +107459,22 @@ function aggregateResponses(responses) { for (const response of responses) { if (response.candidates) { for (const candidate of response.candidates) { - const i3 = candidate.index; + const i5 = candidate.index; if (!aggregatedResponse.candidates) { aggregatedResponse.candidates = []; } - if (!aggregatedResponse.candidates[i3]) { - aggregatedResponse.candidates[i3] = { + if (!aggregatedResponse.candidates[i5]) { + aggregatedResponse.candidates[i5] = { index: candidate.index }; } - aggregatedResponse.candidates[i3].citationMetadata = candidate.citationMetadata; - aggregatedResponse.candidates[i3].finishReason = candidate.finishReason; - aggregatedResponse.candidates[i3].finishMessage = candidate.finishMessage; - aggregatedResponse.candidates[i3].safetyRatings = candidate.safetyRatings; + aggregatedResponse.candidates[i5].citationMetadata = candidate.citationMetadata; + aggregatedResponse.candidates[i5].finishReason = candidate.finishReason; + aggregatedResponse.candidates[i5].finishMessage = candidate.finishMessage; + aggregatedResponse.candidates[i5].safetyRatings = candidate.safetyRatings; if (candidate.content && candidate.content.parts) { - if (!aggregatedResponse.candidates[i3].content) { - aggregatedResponse.candidates[i3].content = { + if (!aggregatedResponse.candidates[i5].content) { + aggregatedResponse.candidates[i5].content = { role: candidate.content.role || "user", parts: [] }; @@ -81816,7 +107490,7 @@ function aggregateResponses(responses) { if (Object.keys(newPart).length === 0) { newPart.text = ""; } - aggregatedResponse.candidates[i3].content.parts.push(newPart); + aggregatedResponse.candidates[i5].content.parts.push(newPart); } } } @@ -82007,11 +107681,11 @@ var ChatSession = class { * {@link GenerateContentResult} */ async sendMessage(request3) { - var _a5, _b2, _c2, _d2, _e2; + var _a6, _b2, _c2, _d2, _e2; await this._sendPromise; const newContent = formatNewContent(request3); const generateContentRequest = { - safetySettings: (_a5 = this.params) === null || _a5 === void 0 ? void 0 : _a5.safetySettings, + safetySettings: (_a6 = this.params) === null || _a6 === void 0 ? void 0 : _a6.safetySettings, generationConfig: (_b2 = this.params) === null || _b2 === void 0 ? void 0 : _b2.generationConfig, tools: (_c2 = this.params) === null || _c2 === void 0 ? void 0 : _c2.tools, toolConfig: (_d2 = this.params) === null || _d2 === void 0 ? void 0 : _d2.toolConfig, @@ -82020,14 +107694,14 @@ var ChatSession = class { }; let finalResult; this._sendPromise = this._sendPromise.then(() => generateContent(this._apiKey, this.model, generateContentRequest, this.requestOptions)).then((result) => { - var _a6; + var _a7; if (result.response.candidates && result.response.candidates.length > 0) { this._history.push(newContent); const responseContent = Object.assign({ parts: [], // Response seems to come back without a role set. role: "model" - }, (_a6 = result.response.candidates) === null || _a6 === void 0 ? void 0 : _a6[0].content); + }, (_a7 = result.response.candidates) === null || _a7 === void 0 ? void 0 : _a7[0].content); this._history.push(responseContent); } else { const blockErrorMessage = formatBlockErrorMessage(result.response); @@ -82046,11 +107720,11 @@ var ChatSession = class { * and a response promise. */ async sendMessageStream(request3) { - var _a5, _b2, _c2, _d2, _e2; + var _a6, _b2, _c2, _d2, _e2; await this._sendPromise; const newContent = formatNewContent(request3); const generateContentRequest = { - safetySettings: (_a5 = this.params) === null || _a5 === void 0 ? void 0 : _a5.safetySettings, + safetySettings: (_a6 = this.params) === null || _a6 === void 0 ? void 0 : _a6.safetySettings, generationConfig: (_b2 = this.params) === null || _b2 === void 0 ? void 0 : _b2.generationConfig, tools: (_c2 = this.params) === null || _c2 === void 0 ? void 0 : _c2.tools, toolConfig: (_d2 = this.params) === null || _d2 === void 0 ? void 0 : _d2.toolConfig, @@ -82074,9 +107748,9 @@ var ChatSession = class { console.warn(`sendMessageStream() was unsuccessful. ${blockErrorMessage}. Inspect response object for details.`); } } - }).catch((e3) => { - if (e3.message !== SILENT_ERROR) { - console.error(e3); + }).catch((e5) => { + if (e5.message !== SILENT_ERROR) { + console.error(e5); } }); return streamPromise; @@ -82180,15 +107854,15 @@ var GeminiEngine = class { this.config = config6; } async generateCommitMessage(messages) { - const systemInstruction = messages.filter((m4) => m4.role === "system").map((m4) => m4.content).join("\n"); + const systemInstruction = messages.filter((m6) => m6.role === "system").map((m6) => m6.content).join("\n"); const gemini = this.client.getGenerativeModel({ model: this.config.model, systemInstruction }); - const contents = messages.filter((m4) => m4.role !== "system").map( - (m4) => ({ - parts: [{ text: m4.content }], - role: m4.role === "user" ? m4.role : "model" + const contents = messages.filter((m6) => m6.role !== "system").map( + (m6) => ({ + parts: [{ text: m6.content }], + role: m6.role === "user" ? m6.role : "model" }) ); try { @@ -82418,10 +108092,10 @@ var Stream2 = class _Stream { let data; try { data = JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } if (data && data.error) { throw new APIError3(void 0, data.error, void 0, void 0); @@ -82431,10 +108105,10 @@ var Stream2 = class _Stream { let data; try { data = JSON.parse(sse.data); - } catch (e3) { + } catch (e5) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); - throw e3; + throw e5; } if (sse.event == "error") { throw new APIError3(void 0, data.error, data.message, void 0); @@ -82443,10 +108117,10 @@ var Stream2 = class _Stream { } } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -82486,10 +108160,10 @@ var Stream2 = class _Stream { yield JSON.parse(line); } done = true; - } catch (e3) { - if (e3 instanceof Error && e3.name === "AbortError") + } catch (e5) { + if (e5 instanceof Error && e5.name === "AbortError") return; - throw e3; + throw e5; } finally { if (!done) controller.abort(); @@ -82600,15 +108274,15 @@ async function* iterSSEChunks2(iterator2) { function findDoubleNewlineIndex2(buffer) { const newline = 10; const carriage = 13; - for (let i3 = 0; i3 < buffer.length - 2; i3++) { - if (buffer[i3] === newline && buffer[i3 + 1] === newline) { - return i3 + 2; + for (let i5 = 0; i5 < buffer.length - 2; i5++) { + if (buffer[i5] === newline && buffer[i5 + 1] === newline) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === carriage) { - return i3 + 2; + if (buffer[i5] === carriage && buffer[i5 + 1] === carriage) { + return i5 + 2; } - if (buffer[i3] === carriage && buffer[i3 + 1] === newline && i3 + 3 < buffer.length && buffer[i3 + 2] === carriage && buffer[i3 + 3] === newline) { - return i3 + 4; + if (buffer[i5] === carriage && buffer[i5 + 1] === newline && i5 + 3 < buffer.length && buffer[i5 + 2] === carriage && buffer[i5 + 3] === newline) { + return i5 + 4; } } return -1; @@ -82640,7 +108314,7 @@ var SSEDecoder2 = class { if (line.startsWith(":")) { return null; } - let [fieldname, _3, value] = partition2(line, ":"); + let [fieldname, _4, value] = partition2(line, ":"); if (value.startsWith(" ")) { value = value.substring(1); } @@ -82741,9 +108415,9 @@ function readableStreamAsyncIterable2(stream4) { if (result?.done) reader.releaseLock(); return result; - } catch (e3) { + } catch (e5) { reader.releaseLock(); - throw e3; + throw e5; } }, async return() { @@ -82801,17 +108475,17 @@ async function getBytes2(value) { } function propsForError2(value) { const props = Object.getOwnPropertyNames(value); - return `[${props.map((p3) => `"${p3}"`).join(", ")}]`; + return `[${props.map((p5) => `"${p5}"`).join(", ")}]`; } function getName2(value) { return getStringFromMaybeBuffer2(value.name) || getStringFromMaybeBuffer2(value.filename) || // For fs.ReadStream getStringFromMaybeBuffer2(value.path)?.split(/[\\/]/).pop(); } -var getStringFromMaybeBuffer2 = (x2) => { - if (typeof x2 === "string") - return x2; - if (typeof Buffer !== "undefined" && x2 instanceof Buffer) - return String(x2); +var getStringFromMaybeBuffer2 = (x4) => { + if (typeof x4 === "string") + return x4; + if (typeof Buffer !== "undefined" && x4 instanceof Buffer) + return String(x4); return void 0; }; var isAsyncIterableIterator2 = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function"; @@ -82846,16 +108520,16 @@ var addFormValue = async (form, key, value) => { }; // node_modules/openai/core.mjs -var __classPrivateFieldSet7 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet8 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet8 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet9 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractPage_client2; async function defaultParseResponse2(props) { @@ -82909,7 +108583,7 @@ var APIPromise2 = class _APIPromise extends Promise { * - `import 'openai/shims/web'` (otherwise) */ asResponse() { - return this.responsePromise.then((p3) => p3.response); + return this.responsePromise.then((p5) => p5.response); } /** * Gets the parsed response data and the raw `Response` instance. @@ -83125,7 +108799,7 @@ var APIClient2 = class { debug2(`response (error; ${retryMessage2})`, response.status, url2, responseHeaders); return this.retryRequest(options, retriesRemaining, responseHeaders); } - const errText = await response.text().catch((e3) => castToError2(e3).message); + const errText = await response.text().catch((e5) => castToError2(e5).message); const errJSON = safeJSON2(errText); const errMessage = errJSON ? void 0 : errText; const retryMessage = retriesRemaining ? `(error; no more retries left)` : `(error; not retryable)`; @@ -83151,7 +108825,7 @@ var APIClient2 = class { return url2.toString(); } stringifyQuery(query) { - return Object.entries(query).filter(([_3, value]) => typeof value !== "undefined").map(([key, value]) => { + return Object.entries(query).filter(([_4, value]) => typeof value !== "undefined").map(([key, value]) => { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; } @@ -83229,7 +108903,7 @@ var APIClient2 = class { var AbstractPage2 = class { constructor(client, response, body, options) { _AbstractPage_client2.set(this, void 0); - __classPrivateFieldSet7(this, _AbstractPage_client2, client, "f"); + __classPrivateFieldSet8(this, _AbstractPage_client2, client, "f"); this.options = options; this.response = response; this.body = body; @@ -83256,7 +108930,7 @@ var AbstractPage2 = class { nextOptions.query = void 0; nextOptions.path = nextInfo.url.toString(); } - return await __classPrivateFieldGet8(this, _AbstractPage_client2, "f").requestAPIList(this.constructor, nextOptions); + return await __classPrivateFieldGet9(this, _AbstractPage_client2, "f").requestAPIList(this.constructor, nextOptions); } async *iterPages() { let page = this; @@ -83320,7 +108994,7 @@ var requestOptionsKeys = { __streamClass: true }; var isRequestOptions = (obj) => { - return typeof obj === "object" && obj !== null && !isEmptyObj2(obj) && Object.keys(obj).every((k4) => hasOwn2(requestOptionsKeys, k4)); + return typeof obj === "object" && obj !== null && !isEmptyObj2(obj) && Object.keys(obj).every((k6) => hasOwn2(requestOptionsKeys, k6)); }; var getPlatformProperties2 = () => { if (typeof Deno !== "undefined" && Deno.build != null) { @@ -83445,14 +109119,14 @@ var isAbsoluteURL3 = (url2) => { return startsWithSchemeRegexp2.test(url2); }; var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); -var validatePositiveInteger2 = (name, n2) => { - if (typeof n2 !== "number" || !Number.isInteger(n2)) { +var validatePositiveInteger2 = (name, n4) => { + if (typeof n4 !== "number" || !Number.isInteger(n4)) { throw new OpenAIError(`${name} must be an integer`); } - if (n2 < 0) { + if (n4 < 0) { throw new OpenAIError(`${name} must be a positive integer`); } - return n2; + return n4; }; var castToError2 = (err) => { if (err instanceof Error) @@ -83479,13 +109153,13 @@ function hasOwn2(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } function applyHeadersMut2(targetHeaders, newHeaders) { - for (const k4 in newHeaders) { - if (!hasOwn2(newHeaders, k4)) + for (const k6 in newHeaders) { + if (!hasOwn2(newHeaders, k6)) continue; - const lowerKey = k4.toLowerCase(); + const lowerKey = k6.toLowerCase(); if (!lowerKey) continue; - const val = newHeaders[k4]; + const val = newHeaders[k6]; if (val === null) { delete targetHeaders[lowerKey]; } else if (val !== void 0) { @@ -83499,10 +109173,10 @@ function debug2(action, ...args) { } } var uuid42 = () => { - return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c2) => { - const r3 = Math.random() * 16 | 0; - const v2 = c2 === "x" ? r3 : r3 & 3 | 8; - return v2.toString(16); + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c4) => { + const r5 = Math.random() * 16 | 0; + const v7 = c4 === "x" ? r5 : r5 & 3 | 8; + return v7.toString(16); }); }; var isRunningInBrowser = () => { @@ -83896,16 +109570,16 @@ var isToolMessage = (message) => { }; // node_modules/openai/lib/EventStream.mjs -var __classPrivateFieldSet8 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet9 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet9 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet10 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _EventStream_instances; var _EventStream_connectedPromise; @@ -83939,17 +109613,17 @@ var EventStream = class { _EventStream_errored.set(this, false); _EventStream_aborted.set(this, false); _EventStream_catchingPromiseCreated.set(this, false); - __classPrivateFieldSet8(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_resolveConnectedPromise, resolve, "f"); - __classPrivateFieldSet8(this, _EventStream_rejectConnectedPromise, reject, "f"); + __classPrivateFieldSet9(this, _EventStream_connectedPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet9(this, _EventStream_resolveConnectedPromise, resolve, "f"); + __classPrivateFieldSet9(this, _EventStream_rejectConnectedPromise, reject, "f"); }), "f"); - __classPrivateFieldSet8(this, _EventStream_endPromise, new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_resolveEndPromise, resolve, "f"); - __classPrivateFieldSet8(this, _EventStream_rejectEndPromise, reject, "f"); + __classPrivateFieldSet9(this, _EventStream_endPromise, new Promise((resolve, reject) => { + __classPrivateFieldSet9(this, _EventStream_resolveEndPromise, resolve, "f"); + __classPrivateFieldSet9(this, _EventStream_rejectEndPromise, reject, "f"); }), "f"); - __classPrivateFieldGet9(this, _EventStream_connectedPromise, "f").catch(() => { + __classPrivateFieldGet10(this, _EventStream_connectedPromise, "f").catch(() => { }); - __classPrivateFieldGet9(this, _EventStream_endPromise, "f").catch(() => { + __classPrivateFieldGet10(this, _EventStream_endPromise, "f").catch(() => { }); } _run(executor) { @@ -83957,23 +109631,23 @@ var EventStream = class { executor().then(() => { this._emitFinal(); this._emit("end"); - }, __classPrivateFieldGet9(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); + }, __classPrivateFieldGet10(this, _EventStream_instances, "m", _EventStream_handleError).bind(this)); }, 0); } _connected() { if (this.ended) return; - __classPrivateFieldGet9(this, _EventStream_resolveConnectedPromise, "f").call(this); + __classPrivateFieldGet10(this, _EventStream_resolveConnectedPromise, "f").call(this); this._emit("connect"); } get ended() { - return __classPrivateFieldGet9(this, _EventStream_ended, "f"); + return __classPrivateFieldGet10(this, _EventStream_ended, "f"); } get errored() { - return __classPrivateFieldGet9(this, _EventStream_errored, "f"); + return __classPrivateFieldGet10(this, _EventStream_errored, "f"); } get aborted() { - return __classPrivateFieldGet9(this, _EventStream_aborted, "f"); + return __classPrivateFieldGet10(this, _EventStream_aborted, "f"); } abort() { this.controller.abort(); @@ -83986,7 +109660,7 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ on(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = []); + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = []); listeners.push({ listener }); return this; } @@ -83998,10 +109672,10 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ off(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event]; + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event]; if (!listeners) return this; - const index = listeners.findIndex((l3) => l3.listener === listener); + const index = listeners.findIndex((l5) => l5.listener === listener); if (index >= 0) listeners.splice(index, 1); return this; @@ -84012,7 +109686,7 @@ var EventStream = class { * @returns this ChatCompletionStream, so that calls can be chained */ once(event, listener) { - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = []); + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] || (__classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = []); listeners.push({ listener, once: true }); return this; } @@ -84029,46 +109703,46 @@ var EventStream = class { */ emitted(event) { return new Promise((resolve, reject) => { - __classPrivateFieldSet8(this, _EventStream_catchingPromiseCreated, true, "f"); + __classPrivateFieldSet9(this, _EventStream_catchingPromiseCreated, true, "f"); if (event !== "error") this.once("error", reject); this.once(event, resolve); }); } async done() { - __classPrivateFieldSet8(this, _EventStream_catchingPromiseCreated, true, "f"); - await __classPrivateFieldGet9(this, _EventStream_endPromise, "f"); + __classPrivateFieldSet9(this, _EventStream_catchingPromiseCreated, true, "f"); + await __classPrivateFieldGet10(this, _EventStream_endPromise, "f"); } _emit(event, ...args) { - if (__classPrivateFieldGet9(this, _EventStream_ended, "f")) { + if (__classPrivateFieldGet10(this, _EventStream_ended, "f")) { return; } if (event === "end") { - __classPrivateFieldSet8(this, _EventStream_ended, true, "f"); - __classPrivateFieldGet9(this, _EventStream_resolveEndPromise, "f").call(this); + __classPrivateFieldSet9(this, _EventStream_ended, true, "f"); + __classPrivateFieldGet10(this, _EventStream_resolveEndPromise, "f").call(this); } - const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event]; + const listeners = __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event]; if (listeners) { - __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once); + __classPrivateFieldGet10(this, _EventStream_listeners, "f")[event] = listeners.filter((l5) => !l5.once); listeners.forEach(({ listener }) => listener(...args)); } if (event === "abort") { const error = args[0]; - if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + if (!__classPrivateFieldGet10(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { Promise.reject(error); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectEndPromise, "f").call(this, error); this._emit("end"); return; } if (event === "error") { const error = args[0]; - if (!__classPrivateFieldGet9(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { + if (!__classPrivateFieldGet10(this, _EventStream_catchingPromiseCreated, "f") && !listeners?.length) { Promise.reject(error); } - __classPrivateFieldGet9(this, _EventStream_rejectConnectedPromise, "f").call(this, error); - __classPrivateFieldGet9(this, _EventStream_rejectEndPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectConnectedPromise, "f").call(this, error); + __classPrivateFieldGet10(this, _EventStream_rejectEndPromise, "f").call(this, error); this._emit("end"); } } @@ -84076,12 +109750,12 @@ var EventStream = class { } }; _EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectConnectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_endPromise = /* @__PURE__ */ new WeakMap(), _EventStream_resolveEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_rejectEndPromise = /* @__PURE__ */ new WeakMap(), _EventStream_listeners = /* @__PURE__ */ new WeakMap(), _EventStream_ended = /* @__PURE__ */ new WeakMap(), _EventStream_errored = /* @__PURE__ */ new WeakMap(), _EventStream_aborted = /* @__PURE__ */ new WeakMap(), _EventStream_catchingPromiseCreated = /* @__PURE__ */ new WeakMap(), _EventStream_instances = /* @__PURE__ */ new WeakSet(), _EventStream_handleError = function _EventStream_handleError2(error) { - __classPrivateFieldSet8(this, _EventStream_errored, true, "f"); + __classPrivateFieldSet9(this, _EventStream_errored, true, "f"); if (error instanceof Error && error.name === "AbortError") { error = new APIUserAbortError3(); } if (error instanceof APIUserAbortError3) { - __classPrivateFieldSet8(this, _EventStream_aborted, true, "f"); + __classPrivateFieldSet9(this, _EventStream_aborted, true, "f"); return this._emit("abort", error); } if (error instanceof OpenAIError) { @@ -84167,7 +109841,7 @@ function hasAutoParseableInput(params) { if (isAutoParsableResponseFormat(params.response_format)) { return true; } - return params.tools?.some((t2) => isAutoParsableTool(t2) || t2.type === "function" && t2.function.strict === true) ?? false; + return params.tools?.some((t4) => isAutoParsableTool(t4) || t4.type === "function" && t4.function.strict === true) ?? false; } function validateInputTools(tools) { for (const tool of tools ?? []) { @@ -84181,10 +109855,10 @@ function validateInputTools(tools) { } // node_modules/openai/lib/AbstractChatCompletionRunner.mjs -var __classPrivateFieldGet10 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet11 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _AbstractChatCompletionRunner_instances; var _AbstractChatCompletionRunner_getFinalContent; @@ -84246,7 +109920,7 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalContent() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); } /** * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, @@ -84254,7 +109928,7 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalMessage() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); } /** * @returns a promise that resolves with the content of the final FunctionCall, or rejects @@ -84262,15 +109936,15 @@ var AbstractChatCompletionRunner = class extends EventStream { */ async finalFunctionCall() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); } async finalFunctionCallResult() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); } async totalUsage() { await this.done(); - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); } allChatCompletions() { return [...this._chatCompletions]; @@ -84279,20 +109953,20 @@ var AbstractChatCompletionRunner = class extends EventStream { const completion = this._chatCompletions[this._chatCompletions.length - 1]; if (completion) this._emit("finalChatCompletion", completion); - const finalMessage = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); + const finalMessage = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); if (finalMessage) this._emit("finalMessage", finalMessage); - const finalContent = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); + const finalContent = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); if (finalContent) this._emit("finalContent", finalContent); - const finalFunctionCall = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); + const finalFunctionCall = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); if (finalFunctionCall) this._emit("finalFunctionCall", finalFunctionCall); - const finalFunctionCallResult = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); + const finalFunctionCallResult = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); if (finalFunctionCallResult != null) this._emit("finalFunctionCallResult", finalFunctionCallResult); - if (this._chatCompletions.some((c2) => c2.usage)) { - this._emit("totalUsage", __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); + if (this._chatCompletions.some((c4) => c4.usage)) { + this._emit("totalUsage", __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); } } async _createChatCompletion(client, params, options) { @@ -84302,7 +109976,7 @@ var AbstractChatCompletionRunner = class extends EventStream { this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); + __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); const chatCompletion = await client.chat.completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal }); this._connected(); return this._addChatCompletion(parseChatCompletion(chatCompletion, params)); @@ -84319,18 +109993,18 @@ var AbstractChatCompletionRunner = class extends EventStream { const singleFunctionToCall = typeof function_call !== "string" && function_call?.name; const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; const functionsByName = {}; - for (const f4 of params.functions) { - functionsByName[f4.name || f4.function.name] = f4; + for (const f6 of params.functions) { + functionsByName[f6.name || f6.function.name] = f6; } - const functions = params.functions.map((f4) => ({ - name: f4.name || f4.function.name, - parameters: f4.parameters, - description: f4.description + const functions = params.functions.map((f6) => ({ + name: f6.name || f6.function.name, + parameters: f6.parameters, + description: f6.description })); for (const message of params.messages) { this._addMessage(message, false); } - for (let i3 = 0; i3 < maxChatCompletions; ++i3) { + for (let i5 = 0; i5 < maxChatCompletions; ++i5) { const chatCompletion = await this._createChatCompletion(client, { ...restParams, function_call, @@ -84346,7 +110020,7 @@ var AbstractChatCompletionRunner = class extends EventStream { const { name, arguments: args } = message.function_call; const fn = functionsByName[name]; if (!fn) { - const content2 = `Invalid function_call: ${JSON.stringify(name)}. Available options are: ${functions.map((f4) => JSON.stringify(f4.name)).join(", ")}. Please try again`; + const content2 = `Invalid function_call: ${JSON.stringify(name)}. Available options are: ${functions.map((f6) => JSON.stringify(f6.name)).join(", ")}. Please try again`; this._addMessage({ role, name, content: content2 }); continue; } else if (singleFunctionToCall && singleFunctionToCall !== name) { @@ -84366,7 +110040,7 @@ var AbstractChatCompletionRunner = class extends EventStream { continue; } const rawContent2 = await fn.function(parsed, this); - const content = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); + const content = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); this._addMessage({ role, name, content }); if (singleFunctionToCall) return; @@ -84397,24 +110071,24 @@ var AbstractChatCompletionRunner = class extends EventStream { return tool; }); const functionsByName = {}; - for (const f4 of inputTools) { - if (f4.type === "function") { - functionsByName[f4.function.name || f4.function.function.name] = f4.function; + for (const f6 of inputTools) { + if (f6.type === "function") { + functionsByName[f6.function.name || f6.function.function.name] = f6.function; } } - const tools = "tools" in params ? inputTools.map((t2) => t2.type === "function" ? { + const tools = "tools" in params ? inputTools.map((t4) => t4.type === "function" ? { type: "function", function: { - name: t2.function.name || t2.function.function.name, - parameters: t2.function.parameters, - description: t2.function.description, - strict: t2.function.strict + name: t4.function.name || t4.function.function.name, + parameters: t4.function.parameters, + description: t4.function.description, + strict: t4.function.strict } - } : t2) : void 0; + } : t4) : void 0; for (const message of params.messages) { this._addMessage(message, false); } - for (let i3 = 0; i3 < maxChatCompletions; ++i3) { + for (let i5 = 0; i5 < maxChatCompletions; ++i5) { const chatCompletion = await this._createChatCompletion(client, { ...restParams, tool_choice, @@ -84452,7 +110126,7 @@ var AbstractChatCompletionRunner = class extends EventStream { continue; } const rawContent2 = await fn.function(parsed, this); - const content = __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); + const content = __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent2); this._addMessage({ role, tool_call_id, content }); if (singleFunctionToCall) { return; @@ -84463,11 +110137,11 @@ var AbstractChatCompletionRunner = class extends EventStream { } }; _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _AbstractChatCompletionRunner_getFinalContent = function _AbstractChatCompletionRunner_getFinalContent2() { - return __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; + return __classPrivateFieldGet11(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content ?? null; }, _AbstractChatCompletionRunner_getFinalMessage = function _AbstractChatCompletionRunner_getFinalMessage2() { - let i3 = this.messages.length; - while (i3-- > 0) { - const message = this.messages[i3]; + let i5 = this.messages.length; + while (i5-- > 0) { + const message = this.messages[i5]; if (isAssistantMessage(message)) { const { function_call, ...rest } = message; const ret = { @@ -84483,8 +110157,8 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra } throw new OpenAIError("stream ended without producing a ChatCompletionMessage with role=assistant"); }, _AbstractChatCompletionRunner_getFinalFunctionCall = function _AbstractChatCompletionRunner_getFinalFunctionCall2() { - for (let i3 = this.messages.length - 1; i3 >= 0; i3--) { - const message = this.messages[i3]; + for (let i5 = this.messages.length - 1; i5 >= 0; i5--) { + const message = this.messages[i5]; if (isAssistantMessage(message) && message?.function_call) { return message.function_call; } @@ -84494,12 +110168,12 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra } return; }, _AbstractChatCompletionRunner_getFinalFunctionCallResult = function _AbstractChatCompletionRunner_getFinalFunctionCallResult2() { - for (let i3 = this.messages.length - 1; i3 >= 0; i3--) { - const message = this.messages[i3]; + for (let i5 = this.messages.length - 1; i5 >= 0; i5--) { + const message = this.messages[i5]; if (isFunctionMessage(message) && message.content != null) { return message.content; } - if (isToolMessage(message) && message.content != null && typeof message.content === "string" && this.messages.some((x2) => x2.role === "assistant" && x2.tool_calls?.some((y4) => y4.type === "function" && y4.id === message.tool_call_id))) { + if (isToolMessage(message) && message.content != null && typeof message.content === "string" && this.messages.some((x4) => x4.role === "assistant" && x4.tool_calls?.some((y5) => y5.type === "function" && y5.id === message.tool_call_id))) { return message.content; } } @@ -84776,16 +110450,16 @@ var generate = (tokens) => { var partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input))))); // node_modules/openai/lib/ChatCompletionStream.mjs -var __classPrivateFieldSet9 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet10 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; -var __classPrivateFieldGet11 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet12 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; var _ChatCompletionStream_instances; var _ChatCompletionStream_params; @@ -84806,11 +110480,11 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl _ChatCompletionStream_params.set(this, void 0); _ChatCompletionStream_choiceEventStates.set(this, void 0); _ChatCompletionStream_currentChatCompletionSnapshot.set(this, void 0); - __classPrivateFieldSet9(this, _ChatCompletionStream_params, params, "f"); - __classPrivateFieldSet9(this, _ChatCompletionStream_choiceEventStates, [], "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_params, params, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_choiceEventStates, [], "f"); } get currentChatCompletionSnapshot() { - return __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + return __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); } /** * Intended for use on the frontend, consuming a stream produced with @@ -84837,16 +110511,16 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); const stream4 = await client.chat.completions.create({ ...params, stream: true }, { ...options, signal: this.controller.signal }); this._connected(); for await (const chunk of stream4) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + return this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } async _fromReadableStream(readableStream, options) { const signal = options?.signal; @@ -84855,32 +110529,32 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl this.controller.abort(); signal.addEventListener("abort", () => this.controller.abort()); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); this._connected(); const stream4 = Stream2.fromReadableStream(readableStream, this.controller); let chatId; for await (const chunk of stream4) { if (chatId && chatId !== chunk.id) { - this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); chatId = chunk.id; } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addChatCompletion(__classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); + return this._addChatCompletion(__classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } [(_ChatCompletionStream_params = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_choiceEventStates = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_currentChatCompletionSnapshot = /* @__PURE__ */ new WeakMap(), _ChatCompletionStream_instances = /* @__PURE__ */ new WeakSet(), _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest2() { if (this.ended) return; - __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); }, _ChatCompletionStream_getChoiceEventState = function _ChatCompletionStream_getChoiceEventState2(choice) { - let state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; - if (state2) { - return state2; + let state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index]; + if (state3) { + return state3; } - state2 = { + state3 = { content_done: false, refusal_done: false, logprobs_content_done: false, @@ -84888,12 +110562,12 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl done_tool_calls: /* @__PURE__ */ new Set(), current_tool_call_index: null }; - __classPrivateFieldGet11(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state2; - return state2; + __classPrivateFieldGet12(this, _ChatCompletionStream_choiceEventStates, "f")[choice.index] = state3; + return state3; }, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk2(chunk) { if (this.ended) return; - const completion = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); + const completion = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); this._emit("chunk", chunk, completion); for (const choice of chunk.choices) { const choiceSnapshot = completion.choices[choice.index]; @@ -84923,21 +110597,21 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl snapshot: choiceSnapshot.logprobs?.refusal ?? [] }); } - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); if (choiceSnapshot.finish_reason) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); - if (state2.current_tool_call_index != null) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state2.current_tool_call_index); + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state3.current_tool_call_index != null) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state3.current_tool_call_index); } } for (const toolCall of choice.delta.tool_calls ?? []) { - if (state2.current_tool_call_index !== toolCall.index) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); - if (state2.current_tool_call_index != null) { - __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state2.current_tool_call_index); + if (state3.current_tool_call_index !== toolCall.index) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitContentDoneEvents).call(this, choiceSnapshot); + if (state3.current_tool_call_index != null) { + __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_emitToolCallDoneEvent).call(this, choiceSnapshot, state3.current_tool_call_index); } } - state2.current_tool_call_index = toolCall.index; + state3.current_tool_call_index = toolCall.index; } for (const toolCallDelta of choice.delta.tool_calls ?? []) { const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallDelta.index]; @@ -84958,8 +110632,8 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } } }, _ChatCompletionStream_emitToolCallDoneEvent = function _ChatCompletionStream_emitToolCallDoneEvent2(choiceSnapshot, toolCallIndex) { - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); - if (state2.done_tool_calls.has(toolCallIndex)) { + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (state3.done_tool_calls.has(toolCallIndex)) { return; } const toolCallSnapshot = choiceSnapshot.message.tool_calls?.[toolCallIndex]; @@ -84970,7 +110644,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl throw new Error("tool call snapshot missing `type`"); } if (toolCallSnapshot.type === "function") { - const inputTool = __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => tool.type === "function" && tool.function.name === toolCallSnapshot.function.name); + const inputTool = __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")?.tools?.find((tool) => tool.type === "function" && tool.function.name === toolCallSnapshot.function.name); this._emit("tool_calls.function.arguments.done", { name: toolCallSnapshot.function.name, index: toolCallIndex, @@ -84981,50 +110655,50 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl assertNever(toolCallSnapshot.type); } }, _ChatCompletionStream_emitContentDoneEvents = function _ChatCompletionStream_emitContentDoneEvents2(choiceSnapshot) { - const state2 = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); - if (choiceSnapshot.message.content && !state2.content_done) { - state2.content_done = true; - const responseFormat = __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); + const state3 = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getChoiceEventState).call(this, choiceSnapshot); + if (choiceSnapshot.message.content && !state3.content_done) { + state3.content_done = true; + const responseFormat = __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this); this._emit("content.done", { content: choiceSnapshot.message.content, parsed: responseFormat ? responseFormat.$parseRaw(choiceSnapshot.message.content) : null }); } - if (choiceSnapshot.message.refusal && !state2.refusal_done) { - state2.refusal_done = true; + if (choiceSnapshot.message.refusal && !state3.refusal_done) { + state3.refusal_done = true; this._emit("refusal.done", { refusal: choiceSnapshot.message.refusal }); } - if (choiceSnapshot.logprobs?.content && !state2.logprobs_content_done) { - state2.logprobs_content_done = true; + if (choiceSnapshot.logprobs?.content && !state3.logprobs_content_done) { + state3.logprobs_content_done = true; this._emit("logprobs.content.done", { content: choiceSnapshot.logprobs.content }); } - if (choiceSnapshot.logprobs?.refusal && !state2.logprobs_refusal_done) { - state2.logprobs_refusal_done = true; + if (choiceSnapshot.logprobs?.refusal && !state3.logprobs_refusal_done) { + state3.logprobs_refusal_done = true; this._emit("logprobs.refusal.done", { refusal: choiceSnapshot.logprobs.refusal }); } }, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest2() { if (this.ended) { throw new OpenAIError(`stream has ended, this shouldn't happen`); } - const snapshot = __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + const snapshot = __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); if (!snapshot) { throw new OpenAIError(`request ended without sending any chunks`); } - __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); - __classPrivateFieldSet9(this, _ChatCompletionStream_choiceEventStates, [], "f"); - return finalizeChatCompletion(snapshot, __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")); + __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, void 0, "f"); + __classPrivateFieldSet10(this, _ChatCompletionStream_choiceEventStates, [], "f"); + return finalizeChatCompletion(snapshot, __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")); }, _ChatCompletionStream_getAutoParseableResponseFormat = function _ChatCompletionStream_getAutoParseableResponseFormat2() { - const responseFormat = __classPrivateFieldGet11(this, _ChatCompletionStream_params, "f")?.response_format; + const responseFormat = __classPrivateFieldGet12(this, _ChatCompletionStream_params, "f")?.response_format; if (isAutoParsableResponseFormat(responseFormat)) { return responseFormat; } return null; }, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion2(chunk) { - var _a5, _b2, _c2, _d2; - let snapshot = __classPrivateFieldGet11(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); + var _a6, _b2, _c2, _d2; + let snapshot = __classPrivateFieldGet12(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); const { choices, ...rest } = chunk; if (!snapshot) { - snapshot = __classPrivateFieldSet9(this, _ChatCompletionStream_currentChatCompletionSnapshot, { + snapshot = __classPrivateFieldSet10(this, _ChatCompletionStream_currentChatCompletionSnapshot, { ...rest, choices: [] }, "f"); @@ -85044,7 +110718,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl assertIsEmpty(rest3); Object.assign(choice.logprobs, rest3); if (content2) { - (_a5 = choice.logprobs).content ?? (_a5.content = []); + (_a6 = choice.logprobs).content ?? (_a6.content = []); choice.logprobs.content.push(...content2); } if (refusal2) { @@ -85055,7 +110729,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } if (finish_reason) { choice.finish_reason = finish_reason; - if (__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f") && hasAutoParseableInput(__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f"))) { + if (__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f") && hasAutoParseableInput(__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f"))) { if (finish_reason === "length") { throw new LengthFinishReasonError(); } @@ -85089,7 +110763,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl } if (content) { choice.message.content = (choice.message.content || "") + content; - if (!choice.message.refusal && __classPrivateFieldGet11(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { + if (!choice.message.refusal && __classPrivateFieldGet12(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_getAutoParseableResponseFormat).call(this)) { choice.message.parsed = partialParse(choice.message.content); } } @@ -85109,7 +110783,7 @@ var ChatCompletionStream = class _ChatCompletionStream extends AbstractChatCompl tool_call.function.name = fn.name; if (fn?.arguments) { tool_call.function.arguments += fn.arguments; - if (shouldParseToolCall(__classPrivateFieldGet11(this, _ChatCompletionStream_params, "f"), tool_call)) { + if (shouldParseToolCall(__classPrivateFieldGet12(this, _ChatCompletionStream_params, "f"), tool_call)) { tool_call.function.parsed_arguments = partialParse(tool_call.function.arguments); } } @@ -85218,23 +110892,23 @@ function finalizeChatCompletion(snapshot, params) { role, content, refusal: message.refusal ?? null, - tool_calls: tool_calls.map((tool_call, i3) => { + tool_calls: tool_calls.map((tool_call, i5) => { const { function: fn, type: type2, id: id2, ...toolRest } = tool_call; const { arguments: args, name, ...fnRest } = fn || {}; if (id2 == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].id + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].id ${str(snapshot)}`); } if (type2 == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].type + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].type ${str(snapshot)}`); } if (name == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].function.name + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].function.name ${str(snapshot)}`); } if (args == null) { - throw new OpenAIError(`missing choices[${index}].tool_calls[${i3}].function.arguments + throw new OpenAIError(`missing choices[${index}].tool_calls[${i5}].function.arguments ${str(snapshot)}`); } return { ...toolRest, id: id2, type: type2, function: { ...fnRest, name, arguments: args } }; @@ -85257,8 +110931,8 @@ ${str(snapshot)}`); }; return maybeParseChatCompletion(completion, params); } -function str(x2) { - return JSON.stringify(x2); +function str(x4) { + return JSON.stringify(x4); } function assertIsEmpty(obj) { return; @@ -85342,16 +111016,16 @@ var Chat2 = class extends APIResource2 { })(Chat2 || (Chat2 = {})); // node_modules/openai/lib/AssistantStream.mjs -var __classPrivateFieldGet12 = function(receiver, state2, kind3, f4) { - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind3 === "m" ? f4 : kind3 === "a" ? f4.call(receiver) : f4 ? f4.value : state2.get(receiver); +var __classPrivateFieldGet13 = function(receiver, state3, kind3, f6) { + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind3 === "m" ? f6 : kind3 === "a" ? f6.call(receiver) : f6 ? f6.value : state3.get(receiver); }; -var __classPrivateFieldSet10 = function(receiver, state2, value, kind3, f4) { +var __classPrivateFieldSet11 = function(receiver, state3, value, kind3, f6) { if (kind3 === "m") throw new TypeError("Private method is not writable"); - if (kind3 === "a" && !f4) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state2 === "function" ? receiver !== state2 || !f4 : !state2.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind3 === "a" ? f4.call(receiver, value) : f4 ? f4.value = value : state2.set(receiver, value), value; + if (kind3 === "a" && !f6) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state3 === "function" ? receiver !== state3 || !f6 : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind3 === "a" ? f6.call(receiver, value) : f6 ? f6.value = value : state3.set(receiver, value), value; }; var _AssistantStream_instances; var _AssistantStream_events; @@ -85457,12 +111131,12 @@ var AssistantStream = class _AssistantStream extends EventStream { this._connected(); const stream4 = Stream2.fromReadableStream(readableStream, this.controller); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } toReadableStream() { const stream4 = new Stream2(this[Symbol.asyncIterator].bind(this), this.controller); @@ -85490,12 +111164,12 @@ var AssistantStream = class _AssistantStream extends EventStream { }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } static createThreadAssistantStream(params, thread, options) { const runner = new _AssistantStream(); @@ -85514,30 +111188,30 @@ var AssistantStream = class _AssistantStream extends EventStream { return runner; } currentEvent() { - return __classPrivateFieldGet12(this, _AssistantStream_currentEvent, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentEvent, "f"); } currentRun() { - return __classPrivateFieldGet12(this, _AssistantStream_currentRunSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentRunSnapshot, "f"); } currentMessageSnapshot() { - return __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f"); } currentRunStepSnapshot() { - return __classPrivateFieldGet12(this, _AssistantStream_currentRunStepSnapshot, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_currentRunStepSnapshot, "f"); } async finalRunSteps() { await this.done(); - return Object.values(__classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")); + return Object.values(__classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")); } async finalMessages() { await this.done(); - return Object.values(__classPrivateFieldGet12(this, _AssistantStream_messageSnapshots, "f")); + return Object.values(__classPrivateFieldGet13(this, _AssistantStream_messageSnapshots, "f")); } async finalRun() { await this.done(); - if (!__classPrivateFieldGet12(this, _AssistantStream_finalRun, "f")) + if (!__classPrivateFieldGet13(this, _AssistantStream_finalRun, "f")) throw Error("Final run was not received."); - return __classPrivateFieldGet12(this, _AssistantStream_finalRun, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_finalRun, "f"); } async _createThreadAssistantStream(thread, params, options) { const signal = options?.signal; @@ -85550,12 +111224,12 @@ var AssistantStream = class _AssistantStream extends EventStream { const stream4 = await thread.createAndRun(body, { ...options, signal: this.controller.signal }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } async _createAssistantStream(run2, threadId, params, options) { const signal = options?.signal; @@ -85568,12 +111242,12 @@ var AssistantStream = class _AssistantStream extends EventStream { const stream4 = await run2.create(threadId, body, { ...options, signal: this.controller.signal }); this._connected(); for await (const event of stream4) { - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_addEvent).call(this, event); } if (stream4.controller.signal?.aborted) { throw new APIUserAbortError3(); } - return this._addRun(__classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); + return this._addRun(__classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_endRequest).call(this)); } static accumulateDelta(acc, delta) { for (const [key, deltaValue] of Object.entries(delta)) { @@ -85597,7 +111271,7 @@ var AssistantStream = class _AssistantStream extends EventStream { } else if (isObj(accValue) && isObj(deltaValue)) { accValue = this.accumulateDelta(accValue, deltaValue); } else if (Array.isArray(accValue) && Array.isArray(deltaValue)) { - if (accValue.every((x2) => typeof x2 === "string" || typeof x2 === "number")) { + if (accValue.every((x4) => typeof x4 === "string" || typeof x4 === "number")) { accValue.push(...deltaValue); continue; } @@ -85624,8 +111298,8 @@ var AssistantStream = class _AssistantStream extends EventStream { _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { if (this.ended) return; - __classPrivateFieldSet10(this, _AssistantStream_currentEvent, event, "f"); - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); + __classPrivateFieldSet11(this, _AssistantStream_currentEvent, event, "f"); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleEvent).call(this, event); switch (event.event) { case "thread.created": break; @@ -85638,7 +111312,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.cancelling": case "thread.run.cancelled": case "thread.run.expired": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleRun).call(this, event); break; case "thread.run.step.created": case "thread.run.step.in_progress": @@ -85647,14 +111321,14 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleRunStep).call(this, event); break; case "thread.message.created": case "thread.message.in_progress": case "thread.message.delta": case "thread.message.completed": case "thread.message.incomplete": - __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); + __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_handleMessage).call(this, event); break; case "error": throw new Error("Encountered an error event in event processing - errors should be processed earlier"); @@ -85663,13 +111337,13 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { if (this.ended) { throw new OpenAIError(`stream has ended, this shouldn't happen`); } - if (!__classPrivateFieldGet12(this, _AssistantStream_finalRun, "f")) + if (!__classPrivateFieldGet13(this, _AssistantStream_finalRun, "f")) throw Error("Final run has not been received"); - return __classPrivateFieldGet12(this, _AssistantStream_finalRun, "f"); + return __classPrivateFieldGet13(this, _AssistantStream_finalRun, "f"); }, _AssistantStream_handleMessage = function _AssistantStream_handleMessage2(event) { - const [accumulatedMessage, newContent] = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); - __classPrivateFieldSet10(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); - __classPrivateFieldGet12(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; + const [accumulatedMessage, newContent] = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateMessage).call(this, event, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); + __classPrivateFieldSet11(this, _AssistantStream_messageSnapshot, accumulatedMessage, "f"); + __classPrivateFieldGet13(this, _AssistantStream_messageSnapshots, "f")[accumulatedMessage.id] = accumulatedMessage; for (const content of newContent) { const snapshotContent = accumulatedMessage.content[content.index]; if (snapshotContent?.type == "text") { @@ -85695,46 +111369,46 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { throw Error("The snapshot associated with this text delta is not text or missing"); } } - if (content.index != __classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f")) { - if (__classPrivateFieldGet12(this, _AssistantStream_currentContent, "f")) { - switch (__classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").type) { + if (content.index != __classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f")) { + if (__classPrivateFieldGet13(this, _AssistantStream_currentContent, "f")) { + switch (__classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").type) { case "text": - this._emit("textDone", __classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").text, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("textDone", __classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").text, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; case "image_file": - this._emit("imageFileDone", __classPrivateFieldGet12(this, _AssistantStream_currentContent, "f").image_file, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("imageFileDone", __classPrivateFieldGet13(this, _AssistantStream_currentContent, "f").image_file, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; } } - __classPrivateFieldSet10(this, _AssistantStream_currentContentIndex, content.index, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentContentIndex, content.index, "f"); } - __classPrivateFieldSet10(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentContent, accumulatedMessage.content[content.index], "f"); } } break; case "thread.message.completed": case "thread.message.incomplete": - if (__classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f") !== void 0) { - const currentContent = event.data.content[__classPrivateFieldGet12(this, _AssistantStream_currentContentIndex, "f")]; + if (__classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f") !== void 0) { + const currentContent = event.data.content[__classPrivateFieldGet13(this, _AssistantStream_currentContentIndex, "f")]; if (currentContent) { switch (currentContent.type) { case "image_file": - this._emit("imageFileDone", currentContent.image_file, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("imageFileDone", currentContent.image_file, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; case "text": - this._emit("textDone", currentContent.text, __classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")); + this._emit("textDone", currentContent.text, __classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")); break; } } } - if (__classPrivateFieldGet12(this, _AssistantStream_messageSnapshot, "f")) { + if (__classPrivateFieldGet13(this, _AssistantStream_messageSnapshot, "f")) { this._emit("messageDone", event.data); } - __classPrivateFieldSet10(this, _AssistantStream_messageSnapshot, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_messageSnapshot, void 0, "f"); } }, _AssistantStream_handleRunStep = function _AssistantStream_handleRunStep2(event) { - const accumulatedRunStep = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); - __classPrivateFieldSet10(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); + const accumulatedRunStep = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateRunStep).call(this, event); + __classPrivateFieldSet11(this, _AssistantStream_currentRunStepSnapshot, accumulatedRunStep, "f"); switch (event.event) { case "thread.run.step.created": this._emit("runStepCreated", event.data); @@ -85743,16 +111417,16 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { const delta = event.data.delta; if (delta.step_details && delta.step_details.type == "tool_calls" && delta.step_details.tool_calls && accumulatedRunStep.step_details.type == "tool_calls") { for (const toolCall of delta.step_details.tool_calls) { - if (toolCall.index == __classPrivateFieldGet12(this, _AssistantStream_currentToolCallIndex, "f")) { + if (toolCall.index == __classPrivateFieldGet13(this, _AssistantStream_currentToolCallIndex, "f")) { this._emit("toolCallDelta", toolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index]); } else { - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); } - __classPrivateFieldSet10(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) - this._emit("toolCallCreated", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCallIndex, toolCall.index, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, accumulatedRunStep.step_details.tool_calls[toolCall.index], "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) + this._emit("toolCallCreated", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); } } } @@ -85762,12 +111436,12 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": - __classPrivateFieldSet10(this, _AssistantStream_currentRunStepSnapshot, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentRunStepSnapshot, void 0, "f"); const details = event.data.step_details; if (details.type == "tool_calls") { - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, void 0, "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, void 0, "f"); } } this._emit("runStepDone", event.data, accumulatedRunStep); @@ -85776,34 +111450,34 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { break; } }, _AssistantStream_handleEvent = function _AssistantStream_handleEvent2(event) { - __classPrivateFieldGet12(this, _AssistantStream_events, "f").push(event); + __classPrivateFieldGet13(this, _AssistantStream_events, "f").push(event); this._emit("event", event); }, _AssistantStream_accumulateRunStep = function _AssistantStream_accumulateRunStep2(event) { switch (event.event) { case "thread.run.step.created": - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; return event.data; case "thread.run.step.delta": - let snapshot = __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + let snapshot = __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; if (!snapshot) { throw Error("Received a RunStepDelta before creation of a snapshot"); } let data = event.data; if (data.delta) { const accumulated = AssistantStream.accumulateDelta(snapshot, data.delta); - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = accumulated; } - return __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + return __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; case "thread.run.step.completed": case "thread.run.step.failed": case "thread.run.step.cancelled": case "thread.run.step.expired": case "thread.run.step.in_progress": - __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; + __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id] = event.data; break; } - if (__classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) - return __classPrivateFieldGet12(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; + if (__classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]) + return __classPrivateFieldGet13(this, _AssistantStream_runStepSnapshots, "f")[event.data.id]; throw new Error("No snapshot available"); }, _AssistantStream_accumulateMessage = function _AssistantStream_accumulateMessage2(event, snapshot) { let newContent = []; @@ -85819,7 +111493,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { for (const contentElement of data.delta.content) { if (contentElement.index in snapshot.content) { let currentContent = snapshot.content[contentElement.index]; - snapshot.content[contentElement.index] = __classPrivateFieldGet12(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); + snapshot.content[contentElement.index] = __classPrivateFieldGet13(this, _AssistantStream_instances, "m", _AssistantStream_accumulateContent).call(this, contentElement, currentContent); } else { snapshot.content[contentElement.index] = contentElement; newContent.push(contentElement); @@ -85840,7 +111514,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { }, _AssistantStream_accumulateContent = function _AssistantStream_accumulateContent2(contentElement, currentContent) { return AssistantStream.accumulateDelta(currentContent, contentElement); }, _AssistantStream_handleRun = function _AssistantStream_handleRun2(event) { - __classPrivateFieldSet10(this, _AssistantStream_currentRunSnapshot, event.data, "f"); + __classPrivateFieldSet11(this, _AssistantStream_currentRunSnapshot, event.data, "f"); switch (event.event) { case "thread.run.created": break; @@ -85853,10 +111527,10 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) { case "thread.run.failed": case "thread.run.completed": case "thread.run.expired": - __classPrivateFieldSet10(this, _AssistantStream_finalRun, event.data, "f"); - if (__classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")) { - this._emit("toolCallDone", __classPrivateFieldGet12(this, _AssistantStream_currentToolCall, "f")); - __classPrivateFieldSet10(this, _AssistantStream_currentToolCall, void 0, "f"); + __classPrivateFieldSet11(this, _AssistantStream_finalRun, event.data, "f"); + if (__classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")) { + this._emit("toolCallDone", __classPrivateFieldGet13(this, _AssistantStream_currentToolCall, "f")); + __classPrivateFieldSet11(this, _AssistantStream_currentToolCall, void 0, "f"); } break; case "thread.run.cancelling": @@ -86982,7 +112656,142 @@ var OpenAiEngine = class { max_tokens: this.config.maxTokensOutput }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a3, b3) => a3 + b3, 0); + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); + const completion = await this.client.chat.completions.create(params); + const message = completion.choices[0].message; + let content = message?.content; + return removeContentTags(content, "think"); + } catch (error) { + const err = error; + if (axios_default.isAxiosError(error) && error.response?.status === 401) { + const openAiError = error.response.data.error; + if (openAiError) throw new Error(openAiError.message); + } + throw err; + } + }; + this.config = config6; + const clientOptions = { + apiKey: config6.apiKey + }; + if (config6.baseURL) { + clientOptions.baseURL = config6.baseURL; + } + if (config6.customHeaders) { + const headers = parseCustomHeaders(config6.customHeaders); + if (Object.keys(headers).length > 0) { + clientOptions.defaultHeaders = headers; + } + } + this.client = new OpenAI(clientOptions); + } +}; + +// src/engine/mistral.ts +var Mistral = require_mistralai().Mistral; +var MistralAiEngine = class { + // Using any type for Mistral client to avoid TS errors + constructor(config6) { + this.generateCommitMessage = async (messages) => { + const params = { + model: this.config.model, + messages, + topP: 0.1, + maxTokens: this.config.maxTokensOutput + }; + try { + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); + const completion = await this.client.chat.complete(params); + if (!completion.choices) throw Error("No completion choice available."); + const message = completion.choices[0].message; + if (!message || !message.content) + throw Error("No completion choice available."); + let content = message.content; + return removeContentTags(content, "think"); + } catch (error) { + const err = error; + if (axios_default.isAxiosError(error) && error.response?.status === 401) { + const mistralError = error.response.data.error; + if (mistralError) throw new Error(mistralError.message); + } + throw err; + } + }; + this.config = config6; + if (!config6.baseURL) { + this.client = new Mistral({ apiKey: config6.apiKey }); + } else { + this.client = new Mistral({ + apiKey: config6.apiKey, + serverURL: config6.baseURL + }); + } + } +}; + +// src/engine/groq.ts +var GroqEngine = class extends OpenAiEngine { + constructor(config6) { + config6.baseURL = "https://api.groq.com/openai/v1"; + super(config6); + } +}; + +// src/engine/mlx.ts +var MLXEngine = class { + constructor(config6) { + this.config = config6; + this.client = axios_default.create({ + url: config6.baseURL ? `${config6.baseURL}/${config6.apiKey}` : "http://localhost:8080/v1/chat/completions", + headers: { "Content-Type": "application/json" } + }); + } + async generateCommitMessage(messages) { + const params = { + messages, + temperature: 0, + top_p: 0.1, + repetition_penalty: 1.5, + stream: false + }; + try { + const response = await this.client.post( + this.client.getUri(this.config), + params + ); + const choices = response.data.choices; + const message = choices[0].message; + let content = message?.content; + return removeContentTags(content, "think"); + } catch (err) { + const message = err.response?.data?.error ?? err.message; + throw new Error(`MLX provider error: ${message}`); + } + } +}; + +// src/engine/deepseek.ts +var DeepseekEngine = class extends OpenAiEngine { + constructor(config6) { + super({ + ...config6, + baseURL: "https://api.deepseek.com/v1" + }); + // Identical method from OpenAiEngine, re-implemented here + this.generateCommitMessage = async (messages) => { + const params = { + model: this.config.model, + messages, + temperature: 0, + top_p: 0.1, + max_tokens: this.config.maxTokensOutput + }; + try { + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); const completion = await this.client.chat.completions.create(params); @@ -86998,173 +112807,418 @@ var OpenAiEngine = class { throw err; } }; - this.config = config6; - const clientOptions = { - apiKey: config6.apiKey - }; - if (config6.baseURL) { - clientOptions.baseURL = config6.baseURL; - } - if (config6.customHeaders) { - const headers = parseCustomHeaders(config6.customHeaders); - if (Object.keys(headers).length > 0) { - clientOptions.defaultHeaders = headers; - } - } - this.client = new OpenAI(clientOptions); } }; -// src/engine/mistral.ts -var Mistral = require_mistralai().Mistral; -var MistralAiEngine = class { - // Using any type for Mistral client to avoid TS errors +// src/engine/openrouter.ts +var OpenRouterEngine = class { constructor(config6) { + this.config = config6; this.generateCommitMessage = async (messages) => { - const params = { - model: this.config.model, - messages, - topP: 0.1, - maxTokens: this.config.maxTokensOutput - }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a3, b3) => a3 + b3, 0); - if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) - throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); - const completion = await this.client.chat.complete(params); - if (!completion.choices) - throw Error("No completion choice available."); - const message = completion.choices[0].message; - if (!message || !message.content) - throw Error("No completion choice available."); - let content = message.content; + const response = await this.client.post("", { + model: this.config.model, + messages + }); + const message = response.data.choices[0].message; + let content = message?.content; return removeContentTags(content, "think"); } catch (error) { const err = error; if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const mistralError = error.response.data.error; - if (mistralError) throw new Error(mistralError.message); + const openRouterError = error.response.data.error; + if (openRouterError) throw new Error(openRouterError.message); } throw err; } }; - this.config = config6; - if (!config6.baseURL) { - this.client = new Mistral({ apiKey: config6.apiKey }); - } else { - this.client = new Mistral({ apiKey: config6.apiKey, serverURL: config6.baseURL }); - } - } -}; - -// src/engine/groq.ts -var GroqEngine = class extends OpenAiEngine { - constructor(config6) { - config6.baseURL = "https://api.groq.com/openai/v1"; - super(config6); - } -}; - -// src/engine/mlx.ts -var MLXEngine = class { - constructor(config6) { - this.config = config6; this.client = axios_default.create({ - url: config6.baseURL ? `${config6.baseURL}/${config6.apiKey}` : "http://localhost:8080/v1/chat/completions", - headers: { "Content-Type": "application/json" } + baseURL: "https://openrouter.ai/api/v1/chat/completions", + headers: { + Authorization: `Bearer ${config6.apiKey}`, + "HTTP-Referer": "https://github.com/di-sukharev/opencommit", + "X-Title": "OpenCommit", + "Content-Type": "application/json" + } }); } - async generateCommitMessage(messages) { - const params = { - messages, - temperature: 0, - top_p: 0.1, - repetition_penalty: 1.5, - stream: false - }; - try { - const response = await this.client.post( - this.client.getUri(this.config), - params - ); - const choices = response.data.choices; - const message = choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); - } catch (err) { - const message = err.response?.data?.error ?? err.message; - throw new Error(`MLX provider error: ${message}`); - } - } }; -// src/engine/deepseek.ts -var DeepseekEngine = class extends OpenAiEngine { +// src/engine/bedrock.ts +var import_client_bedrock_runtime = __toESM(require_dist_cjs65(), 1); +var BedrockEngine = class { constructor(config6) { - super({ - ...config6, - baseURL: "https://api.deepseek.com/v1" - }); - // Identical method from OpenAiEngine, re-implemented here this.generateCommitMessage = async (messages) => { - const params = { - model: this.config.model, - messages, - temperature: 0, - top_p: 0.1, - max_tokens: this.config.maxTokensOutput - }; try { - const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a3, b3) => a3 + b3, 0); - if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) + const REQUEST_TOKENS = messages.map((msg) => tokenCount(msg.content) + 4).reduce((a5, b5) => a5 + b5, 0); + if (REQUEST_TOKENS > this.config.maxTokensInput - this.config.maxTokensOutput) { throw new Error("TOO_MUCH_TOKENS" /* tooMuchTokens */); - const completion = await this.client.chat.completions.create(params); - const message = completion.choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); + } + const systemMessage = messages.find((msg) => msg.role === "system")?.content || ""; + const restMessages = messages.filter((msg) => msg.role !== "system"); + if (this.config.useConverseApi !== false) { + return this.generateWithConverseApi(systemMessage, restMessages); + } else { + return this.generateWithInvokeModelApi(systemMessage, restMessages); + } } catch (error) { const err = error; if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openAiError = error.response.data.error; - if (openAiError) throw new Error(openAiError.message); + const bedrockError = error.response.data.error; + if (bedrockError) throw new Error(bedrockError.message); } + ce(`${source_default.red("\u2716")} ${err?.message || err}`); throw err; } }; - } -}; - -// src/engine/openrouter.ts -var OpenRouterEngine = class { - constructor(config6) { this.config = config6; - this.generateCommitMessage = async (messages) => { - try { - const response = await this.client.post("", { - model: this.config.model, - messages - }); - const message = response.data.choices[0].message; - let content = message?.content; - return removeContentTags(content, "think"); - } catch (error) { - const err = error; - if (axios_default.isAxiosError(error) && error.response?.status === 401) { - const openRouterError = error.response.data.error; - if (openRouterError) throw new Error(openRouterError.message); + const clientOptions = { + region: config6.region || "us-east-1" + // Default to us-east-1 if not specified + }; + if (config6.apiKey) { + if (config6.apiKey.startsWith("Bedrock-API-Key-")) { + if (!config6.customHeaders) { + config6.customHeaders = {}; } - throw err; + config6.customHeaders["x-api-key"] = config6.apiKey; + } else { + const [accessKeyId, secretAccessKey] = config6.apiKey.split(":"); + if (accessKeyId && secretAccessKey) { + clientOptions.credentials = { accessKeyId, secretAccessKey }; + } + } + } + this.client = new import_client_bedrock_runtime.BedrockRuntimeClient(clientOptions); + } + // Helper to identify model family by looking for relevant substrings in the model ID + getModelFamily(modelId) { + if (modelId.includes("claude")) return "anthropic.claude"; + if (modelId.includes("titan")) return "amazon.titan"; + if (modelId.includes("nova")) return "amazon.nova"; + if (modelId.includes("llama")) return "meta.llama"; + if (modelId.includes("ai21") || modelId.includes("jamba") || modelId.includes("jurassic")) return "ai21"; + if (modelId.includes("cohere") || modelId.includes("command")) return "cohere"; + if (modelId.includes("mistral")) return "mistral"; + if (modelId.includes("stability")) return "stability"; + if (modelId.includes("deepseek")) return "deepseek"; + return "unknown"; + } + // Uses the newer Converse API which supports guardrails + async generateWithConverseApi(systemMessage, messages) { + const modelId = this.config.model; + const converseMessages = []; + let systemInstructions = ""; + if (systemMessage) { + systemInstructions = systemMessage; + } + for (let i5 = 0; i5 < messages.length; i5++) { + const message = messages[i5]; + if (message.role === "system") continue; + if (i5 === 0 && message.role === "user" && systemInstructions) { + converseMessages.push({ + role: "user", + content: [{ text: `[System Instructions]: ${systemInstructions} + +[User Message]: ${message.content}` }] + }); + } else { + const role = message.role === "assistant" ? "assistant" : "user"; + converseMessages.push({ + role, + content: [{ text: message.content }] + }); + } + } + const params = { + modelId, + messages: converseMessages, + inferenceConfig: { + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 } }; - this.client = axios_default.create({ - baseURL: "https://openrouter.ai/api/v1/chat/completions", - headers: { - Authorization: `Bearer ${config6.apiKey}`, - "HTTP-Referer": "https://github.com/di-sukharev/opencommit", - "X-Title": "OpenCommit", - "Content-Type": "application/json" + if (this.config.guardrailId) { + params["guardrailConfig"] = { + guardrailId: this.config.guardrailId, + guardrailVersion: this.config.guardrailVersion || "DRAFT" + // Use configured version or default to DRAFT + }; + } + const command = new import_client_bedrock_runtime.ConverseCommand(params); + const response = await this.client.send(command); + if (response.output?.message?.content?.[0]?.text) { + const content = response.output.message.content[0].text; + return removeContentTags(content, "think"); + } + return null; + } + // Uses the older InvokeModel API for backwards compatibility + async generateWithInvokeModelApi(systemMessage, messages) { + let payload; + const modelId = this.config.model; + const modelFamily = this.getModelFamily(modelId); + switch (modelFamily) { + case "anthropic.claude": + payload = { + anthropic_version: "bedrock-2023-05-31", + max_tokens: this.config.maxTokensOutput, + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + case "amazon.titan": + payload = { + inputText: this.formatMessagesAsTitanPrompt(systemMessage, messages), + textGenerationConfig: { + maxTokenCount: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + } + }; + break; + case "amazon.nova": + payload = { + prompt: this.formatMessagesAsNovaPrompt(systemMessage, messages), + temperature: 0, + top_p: 0.1, + max_tokens: this.config.maxTokensOutput + }; + break; + case "meta.llama": + payload = { + prompt: this.formatMessagesAsLlamaPrompt(systemMessage, messages), + max_gen_len: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + case "ai21": + payload = { + prompt: this.formatMessagesAsAI21Prompt(systemMessage, messages), + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + }; + break; + case "cohere": + payload = { + prompt: this.formatMessagesAsGenericPrompt(systemMessage, messages), + max_tokens: this.config.maxTokensOutput, + temperature: 0, + p: 0.1 + }; + break; + case "mistral": + payload = { + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role === "assistant" ? "assistant" : "user", + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + case "stability": + payload = { + text_prompts: [ + { + text: this.formatMessagesAsGenericPrompt(systemMessage, messages) + } + ], + cfg_scale: 7, + steps: 30 + }; + break; + case "deepseek": + payload = { + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + default: + payload = { + max_tokens: this.config.maxTokensOutput, + messages: [ + ...systemMessage ? [{ role: "system", content: systemMessage }] : [], + ...messages.map((msg) => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + } + const command = new import_client_bedrock_runtime.InvokeModelCommand({ + modelId, + body: JSON.stringify(payload), + contentType: "application/json", + accept: "application/json" + }); + const response = await this.client.send(command); + const responseBody = JSON.parse(new TextDecoder().decode(response.body)); + let content; + switch (modelFamily) { + case "anthropic.claude": + content = responseBody.content?.[0]?.text; + break; + case "amazon.titan": + content = responseBody.results?.[0]?.outputText; + break; + case "amazon.nova": + content = responseBody.completion; + break; + case "meta.llama": + content = responseBody.generation; + break; + case "ai21": + content = responseBody.completions?.[0]?.data?.text; + break; + case "cohere": + content = responseBody.generations?.[0]?.text; + break; + case "mistral": + content = responseBody.outputs?.[0]?.text || responseBody.completion; + break; + case "stability": + content = responseBody.artifacts?.[0]?.text; + break; + case "deepseek": + content = responseBody.content?.[0]?.text || responseBody.generated_text; + break; + default: + content = responseBody.content?.[0]?.text || responseBody.generation || responseBody.text || responseBody.completion || responseBody.answer || responseBody.response; + break; + } + return removeContentTags(content, "think"); + } + formatMessagesAsTitanPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `System: ${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `Human: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `Assistant: ${message.content} + +`; } - }); + } + prompt += "Assistant: "; + return prompt; + } + formatMessagesAsNovaPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `USER: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `ASSISTANT: ${message.content} + +`; + } + } + prompt += "ASSISTANT: "; + return prompt; + } + formatMessagesAsLlamaPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += ` +${systemMessage} + + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += ` +${message.content} + + +`; + } else if (message.role === "assistant") { + prompt += ` +${message.content} + + +`; + } + } + prompt += "\n"; + return prompt; + } + formatMessagesAsAI21Prompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + if (message.role === "user") { + prompt += `User: ${message.content} + +`; + } else if (message.role === "assistant") { + prompt += `Assistant: ${message.content} + +`; + } + } + prompt += "Assistant: "; + return prompt; + } + formatMessagesAsGenericPrompt(systemMessage, messages) { + let prompt = ""; + if (systemMessage) { + prompt += `${systemMessage} + +`; + } + for (const message of messages) { + const role = message.role === "user" ? "User" : "Assistant"; + prompt += `${role}: ${message.content} + +`; + } + prompt += "Assistant: "; + return prompt; } }; @@ -87222,6 +113276,8 @@ function getEngine() { return new DeepseekEngine(DEFAULT_CONFIG2); case "openrouter" /* OPENROUTER */: return new OpenRouterEngine(DEFAULT_CONFIG2); + case "bedrock" /* BEDROCK */: + return new BedrockEngine(DEFAULT_CONFIG2); default: return new OpenAiEngine(DEFAULT_CONFIG2); } @@ -87231,10 +113287,10 @@ function getEngine() { var COMMITLINT_LLM_CONFIG_PATH = `${process.env.PWD}/.opencommit-commitlint`; // src/modules/commitlint/crypto.ts -var import_crypto6 = __toESM(require("crypto"), 1); +var import_crypto14 = __toESM(require("crypto"), 1); var computeHash = async (content, algorithm = "sha256") => { try { - const hash = import_crypto6.default.createHash(algorithm); + const hash = import_crypto14.default.createHash(algorithm); hash.update(content); return hash.digest("hex"); } catch (error) { @@ -87244,7 +113300,7 @@ var computeHash = async (content, algorithm = "sha256") => { }; // src/modules/commitlint/prompts.ts -var import_types = __toESM(require_lib6(), 1); +var import_types5 = __toESM(require_lib6(), 1); var config2 = getConfig(); var translation = i18n[config2.OCO_LANGUAGE || "en"]; var getTypeRuleExtraDescription = (type2, prompt) => prompt?.questions?.type?.enum?.[type2]?.description; @@ -87256,11 +113312,11 @@ var llmReadableRules = { enumRule: (key, applicable, value) => `The ${key} should ${applicable} be one of the following values: - ${Array.isArray(value) ? value.join("\n - ") : value}.`, enumTypeRule: (key, applicable, value, prompt) => `The ${key} should ${applicable} be one of the following values: - - ${Array.isArray(value) ? value.map((v2) => { - const description = getTypeRuleExtraDescription(v2, prompt); + - ${Array.isArray(value) ? value.map((v7) => { + const description = getTypeRuleExtraDescription(v7, prompt); if (description) { - return `${v2} (${description})`; - } else return v2; + return `${v7} (${description})`; + } else return v7; }).join("\n - ") : value}.`, fullStopRule: (key, applicable, value) => `The ${key} should ${applicable} end with '${value}'.`, maxLengthRule: (key, applicable, value) => `The ${key} should ${applicable} have ${value} characters or less.`, @@ -87304,7 +113360,7 @@ var rulesPrompts = { }; var getPrompt = (ruleName, ruleConfig, prompt) => { const [severity, applicable, value] = ruleConfig; - if (severity === import_types.RuleConfigSeverity.Disabled) return null; + if (severity === import_types5.RuleConfigSeverity.Disabled) return null; const promptFn = rulesPrompts[ruleName]; if (promptFn) { return promptFn(applicable, value, prompt); @@ -87392,8 +113448,8 @@ var findModulePath = (moduleName) => { ]; for (const basePath of searchPaths) { try { - const resolvedPath = require.resolve(moduleName, { paths: [basePath] }); - return resolvedPath; + const resolvedPath3 = require.resolve(moduleName, { paths: [basePath] }); + return resolvedPath3; } catch { } } @@ -87450,7 +113506,7 @@ var commitlintLLMConfigExists = async () => { try { await import_promises2.default.access(COMMITLINT_LLM_CONFIG_PATH); exists = true; - } catch (e3) { + } catch (e5) { exists = false; } return exists; @@ -87733,7 +113789,10 @@ var config5 = getConfig(); var MAX_TOKENS_INPUT = config5.OCO_TOKENS_MAX_INPUT; var MAX_TOKENS_OUTPUT = config5.OCO_TOKENS_MAX_OUTPUT; var generateCommitMessageChatCompletionPrompt = async (diff, fullGitMojiSpec, context2) => { - const INIT_MESSAGES_PROMPT = await getMainCommitPrompt(fullGitMojiSpec, context2); + const INIT_MESSAGES_PROMPT = await getMainCommitPrompt( + fullGitMojiSpec, + context2 + ); const chatContextAsCompletionRequest = [...INIT_MESSAGES_PROMPT]; chatContextAsCompletionRequest.push({ role: "user", @@ -87757,7 +113816,7 @@ var generateCommitMessageByDiff = async (diff, fullGitMojiSpec = false, context2 ); const INIT_MESSAGES_PROMPT_LENGTH = INIT_MESSAGES_PROMPT.map( (msg) => tokenCount(msg.content) + 4 - ).reduce((a3, b3) => a3 + b3, 0); + ).reduce((a5, b5) => a5 + b5, 0); const MAX_REQUEST_TOKENS = MAX_TOKENS_INPUT - ADJUSTMENT_FACTOR - INIT_MESSAGES_PROMPT_LENGTH - MAX_TOKENS_OUTPUT; if (tokenCount(diff) >= MAX_REQUEST_TOKENS) { const commitMessagePromises = await getCommitMsgsPromisesFromFileDiffs( @@ -87880,7 +113939,7 @@ function sleep3(ms) { } // src/github-action.ts -var GITHUB_TOKEN = import_core22.default.getInput("GITHUB_TOKEN"); +var GITHUB_TOKEN = import_core38.default.getInput("GITHUB_TOKEN"); var octokit = import_github.default.getOctokit(GITHUB_TOKEN); var context = import_github.default.context; var owner = context.repo.owner; @@ -87911,9 +113970,9 @@ async function improveMessagesInChunks(diffsAndSHAs) { try { const chunkOfImprovedMessages = await Promise.all(chunkOfPromises); const chunkOfImprovedMessagesBySha = chunkOfImprovedMessages.map( - (improvedMsg, i3) => { + (improvedMsg, i5) => { const index = improvedMessagesAndSHAs.length; - const sha = diffsAndSHAs[index + i3].sha; + const sha = diffsAndSHAs[index + i5].sha; return { sha, msg: improvedMsg }; } ); @@ -87966,7 +114025,7 @@ async function improveCommitMessages(commitsToImprove) { } const createCommitMessageFile = (message, index) => (0, import_fs3.writeFileSync)(`./commit-${index}.txt`, message); improvedMessagesWithSHAs.forEach( - ({ msg }, i3) => createCommitMessageFile(msg, i3) + ({ msg }, i5) => createCommitMessageFile(msg, i5) ); (0, import_fs3.writeFileSync)(`./count.txt`, "0"); (0, import_fs3.writeFileSync)( @@ -87989,7 +114048,7 @@ async function improveCommitMessages(commitsToImprove) { } ); const deleteCommitMessageFile = (index) => (0, import_fs3.unlinkSync)(`./commit-${index}.txt`); - commitsToImprove.forEach((_commit, i3) => deleteCommitMessageFile(i3)); + commitsToImprove.forEach((_commit, i5) => deleteCommitMessageFile(i5)); (0, import_fs3.unlinkSync)("./count.txt"); (0, import_fs3.unlinkSync)("./rebase-exec.sh"); ce("Force pushing non-interactively rebased commits into remote."); @@ -88012,13 +114071,13 @@ async function run() { await improveCommitMessages(commits); } else { ce("Wrong action."); - import_core22.default.error( + import_core38.default.error( `OpenCommit was called on ${import_github.default.context.payload.action}. OpenCommit is supposed to be used on "push" action.` ); } } catch (error) { const err = error?.message || error; - import_core22.default.setFailed(err); + import_core38.default.setFailed(err); } } run(); diff --git a/package-lock.json b/package-lock.json index ee93607f..63387d9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1", "@anthropic-ai/sdk": "^0.19.2", + "@aws-sdk/client-bedrock-runtime": "^3.844.0", "@azure/openai": "^1.0.0-beta.12", "@clack/prompts": "^0.6.1", "@dqbd/tiktoken": "^1.0.2", @@ -131,2317 +132,3693 @@ "undici-types": "~5.26.4" } }, - "node_modules/@azure-rest/core-client": { - "version": "1.4.0", - "license": "MIT", + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "license": "Apache-2.0", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.5.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "license": "MIT", + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" } }, - "node_modules/@azure/core-auth": { - "version": "1.7.2", - "license": "MIT", + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.15.2", - "license": "MIT", + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-sse": { - "version": "2.1.2", - "license": "MIT", + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-tracing": { - "version": "1.1.2", - "license": "MIT", + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "license": "Apache-2.0", "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "node_modules/@azure/core-util": { - "version": "1.9.0", - "license": "MIT", + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "license": "Apache-2.0", "dependencies": { - "@azure/abort-controller": "^2.0.0", "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" } }, - "node_modules/@azure/logger": { - "version": "1.1.2", - "license": "MIT", + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "license": "Apache-2.0", "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" } }, - "node_modules/@azure/openai": { - "version": "1.0.0-beta.12", - "license": "MIT", + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "license": "Apache-2.0", "dependencies": { - "@azure-rest/core-client": "^1.1.7", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.13.0", - "@azure/core-sse": "^2.0.0", - "@azure/core-util": "^1.4.0", - "@azure/logger": "^1.0.3", - "tslib": "^2.4.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", - "dev": true, - "license": "MIT", + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=14.0.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.24.1", - "dev": true, - "license": "MIT", + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=14.0.0" } }, - "node_modules/@babel/core": { - "version": "7.24.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/client-bedrock-runtime": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.844.0.tgz", + "integrity": "sha512-aKaHY0ZxSubE3mHC34fDSQsclwNM3tWCEJdjEFJ7qjYXQ5zyMr4A0gV/GKDuufX5gh4riRp0R/EaR6cDbG4ApA==", + "license": "Apache-2.0", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/credential-provider-node": "3.844.0", + "@aws-sdk/eventstream-handler-node": "3.840.0", + "@aws-sdk/middleware-eventstream": "3.840.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/middleware-websocket": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/token-providers": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/eventstream-serde-browser": "^4.0.4", + "@smithy/eventstream-serde-config-resolver": "^4.1.2", + "@smithy/eventstream-serde-node": "^4.0.4", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-stream": "^4.2.3", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "node": ">=18.0.0" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", + "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", "bin": { - "semver": "bin/semver.js" + "uuid": "dist/bin/uuid" } }, - "node_modules/@babel/generator": { - "version": "7.24.1", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/client-sso": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.844.0.tgz", + "integrity": "sha512-FktodSx+pfUfIqMjoNwZ6t1xqq/G3cfT7I4JJ0HKHoIIZdoCHQB52x0OzKDtHDJAnEQPInasdPS8PorZBZtHmg==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.24.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/core": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.844.0.tgz", + "integrity": "sha512-pfpI54bG5Xf2NkqrDBC2REStXlDXNCw/whORhkEs+Tp5exU872D5QKguzjPA6hH+8Pvbq1qgt5zXMbduISTHJw==", + "license": "Apache-2.0", "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" + "@aws-sdk/types": "3.840.0", + "@aws-sdk/xml-builder": "3.821.0", + "@smithy/core": "^3.7.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/signature-v4": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-utf8": "^4.0.0", + "fast-xml-parser": "5.2.5", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.844.0.tgz", + "integrity": "sha512-WB94Ox86MqcZ4CnRjKgopzaSuZH4hMP0GqdOxG4s1it1lRWOIPOHOC1dPiM0Zbj1uqITIhbXUQVXyP/uaJeNkw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.844.0.tgz", + "integrity": "sha512-e+efVqfkhpM8zxYeiLNgTUlX+tmtXzVm3bw1A02U9Z9cWBHyQNb8pi90M7QniLoqRURY1B0C2JqkOE61gd4KNg==", + "license": "Apache-2.0", "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.3", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.844.0.tgz", + "integrity": "sha512-jc5ArGz2HfAx5QPXD+Ep36+QWyCKzl2TG6Vtl87/vljfLhVD0gEHv8fRsqWEp3Rc6hVfKnCjLW5ayR2HYcow9w==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.22.5" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/credential-provider-env": "3.844.0", + "@aws-sdk/credential-provider-http": "3.844.0", + "@aws-sdk/credential-provider-process": "3.844.0", + "@aws-sdk/credential-provider-sso": "3.844.0", + "@aws-sdk/credential-provider-web-identity": "3.844.0", + "@aws-sdk/nested-clients": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.844.0.tgz", + "integrity": "sha512-pUqB0StTNyW0R03XjTA3wrQZcie/7FJKSXlYHue921ZXuhLOZpzyDkLNfdRsZTcEoYYWVPSmyS+Eu/g5yVsBNA==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.24.0" + "@aws-sdk/credential-provider-env": "3.844.0", + "@aws-sdk/credential-provider-http": "3.844.0", + "@aws-sdk/credential-provider-ini": "3.844.0", + "@aws-sdk/credential-provider-process": "3.844.0", + "@aws-sdk/credential-provider-sso": "3.844.0", + "@aws-sdk/credential-provider-web-identity": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.844.0.tgz", + "integrity": "sha512-VCI8XvIDt2WBfk5Gi/wXKPcWTS3OkAbovB66oKcNQalllH8ESDg4SfLNhchdnN8A5sDGj6tIBJ19nk+dQ6GaqQ==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.844.0.tgz", + "integrity": "sha512-UNp/uWufGlb5nWa4dpc6uQnDOB/9ysJJFG95ACowNVL9XWfi1LJO7teKrqNkVhq0CzSJS1tCt3FvX4UfM+aN1g==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.844.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/token-providers": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.844.0.tgz", + "integrity": "sha512-iDmX4pPmatjttIScdspZRagaFnCjpHZIEEwTyKdXxUaU0iAOSXF8ecrCEvutETvImPOC86xdrq+MPacJOnMzUA==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.22.5" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/nested-clients": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/eventstream-handler-node": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.840.0.tgz", + "integrity": "sha512-m/zVrSSAEHq+6h4sy0JUEBScB1pGgs/1+iRVhfzfbnf+/gTr4ut2jRq4tDiNEX9pQ1oFVvw+ntPua5qfquQeRQ==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.22.5" + "@aws-sdk/types": "3.840.0", + "@smithy/eventstream-codec": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-eventstream": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.840.0.tgz", + "integrity": "sha512-4khgf7AjJ4llh3aiNmZ+x4PGl4vkKNxRHn0xTgi6Iw1J3SChsF2mnNaLXK8hoXeydx756rw+JhqOuZH91i5l4w==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.840.0.tgz", + "integrity": "sha512-ub+hXJAbAje94+Ya6c6eL7sYujoE8D4Bumu1NUI8TXjUhVVn0HzVWQjpRLshdLsUp1AW7XyeJaxyajRaJQ8+Xg==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.840.0.tgz", + "integrity": "sha512-lSV8FvjpdllpGaRspywss4CtXV8M7NNNH+2/j86vMH+YCOZ6fu2T/TyFd/tHwZ92vDfHctWkRbQxg0bagqwovA==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.840.0.tgz", + "integrity": "sha512-Gu7lGDyfddyhIkj1Z1JtrY5NHb5+x/CRiB87GjaSrKxkDaydtX2CU977JIABtt69l9wLbcGDIQ+W0uJ5xPof7g==", + "license": "Apache-2.0", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@aws-sdk/types": "3.840.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/parser": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", - "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.844.0.tgz", + "integrity": "sha512-SIbDNUL6ZYXPj5Tk0qEz05sW9kNS1Gl3/wNWEmH+AuUACipkyIeKKWzD6z5433MllETh73vtka/JQF3g7AuZww==", + "license": "Apache-2.0", "dependencies": { - "@babel/types": "^7.27.3" - }, - "bin": { - "parser": "bin/babel-parser.js" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@smithy/core": "^3.7.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/middleware-websocket": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.844.0.tgz", + "integrity": "sha512-5ZtntUZ9ZMdUbQZ3kI5e5tpiZPN/O57h6fnGZ+GHB+wpSVSOQS78TBt0qYZW+CoZr8iyRsVkJheGETajFCMaUg==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-format-url": "3.840.0", + "@smithy/eventstream-codec": "^4.0.4", + "@smithy/eventstream-serde-browser": "^4.0.4", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/signature-v4": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-hex-encoding": "^4.0.0", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/nested-clients": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.844.0.tgz", + "integrity": "sha512-p2XILWc7AcevUSpBg2VtQrk79eWQC4q2JsCSY7HxKpFLZB4mMOfmiTyYkR1gEA6AttK/wpCOtfz+hi1/+z2V1A==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.844.0", + "@aws-sdk/middleware-host-header": "3.840.0", + "@aws-sdk/middleware-logger": "3.840.0", + "@aws-sdk/middleware-recursion-detection": "3.840.0", + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/region-config-resolver": "3.840.0", + "@aws-sdk/types": "3.840.0", + "@aws-sdk/util-endpoints": "3.844.0", + "@aws-sdk/util-user-agent-browser": "3.840.0", + "@aws-sdk/util-user-agent-node": "3.844.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.7.0", + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/hash-node": "^4.0.4", + "@smithy/invalid-dependency": "^4.0.4", + "@smithy/middleware-content-length": "^4.0.4", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-retry": "^4.1.15", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.22", + "@smithy/util-defaults-mode-node": "^4.0.22", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.840.0.tgz", + "integrity": "sha512-Qjnxd/yDv9KpIMWr90ZDPtRj0v75AqGC92Lm9+oHXZ8p1MjG5JE2CW0HL8JRgK9iKzgKBL7pPQRXI8FkvEVfrA==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "@aws-sdk/types": "3.840.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/token-providers": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.844.0.tgz", + "integrity": "sha512-Kh728FEny0fil+LeH8U1offPJCTd/EDh8liBAvLtViLHt2WoX2xC8rk98D38Q5p79aIUhHb3Pf4n9IZfTu/Kog==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@aws-sdk/core": "3.844.0", + "@aws-sdk/nested-clients": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/types": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.840.0.tgz", + "integrity": "sha512-xliuHaUFZxEx1NSXeLLZ9Dyu6+EJVQKEoD+yM+zqUo3YDZ7medKJWY6fIOKiPX/N7XbLdBYwajb15Q7IL8KkeA==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.844.0.tgz", + "integrity": "sha512-1DHh0WTUmxlysz3EereHKtKoxVUG9UC5BsfAw6Bm4/6qDlJiqtY3oa2vebkYN23yltKdfsCK65cwnBRU59mWVg==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-endpoints": "^3.0.6", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/util-format-url": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.840.0.tgz", + "integrity": "sha512-VB1PWyI1TQPiPvg4w7tgUGGQER1xxXPNUqfh3baxUSFi1Oh8wHrDnFywkxLm3NMmgDmnLnSZ5Q326qAoyqKLSg==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@aws-sdk/types": "3.840.0", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.804.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.804.0.tgz", + "integrity": "sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.840.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.840.0.tgz", + "integrity": "sha512-JdyZM3EhhL4PqwFpttZu1afDpPJCCc3eyZOLi+srpX11LsGj6sThf47TYQN75HT1CarZ7cCdQHGzP2uy3/xHfQ==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@aws-sdk/types": "3.840.0", + "@smithy/types": "^4.3.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.844.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.844.0.tgz", + "integrity": "sha512-0eTpURp9Gxbyyeqr78ogARZMSWS5KUMZuN+XMHxNpQLmn2S+J3g+MAyoklCcwhKXlbdQq2aMULEiy0mqIWytuw==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@aws-sdk/middleware-user-agent": "3.844.0", + "@aws-sdk/types": "3.840.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", + "node_modules/@aws-sdk/xml-builder": { + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.821.0.tgz", + "integrity": "sha512-DIIotRnefVL6DiaHtO6/21DhJ4JZnnIwdNbpwiAhdt/AVbttcE4yw925gsjur0OGv5BTYXQXU3YnANBYnZjuQA==", + "license": "Apache-2.0", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, + "node_modules/@azure-rest/core-client": { + "version": "1.4.0", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.0.0", + "tslib": "^2.6.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, + "node_modules/@azure/abort-controller": { + "version": "2.1.2", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=18.0.0" } }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.1", - "dev": true, + "node_modules/@azure/core-auth": { + "version": "1.7.2", "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" + "@azure/abort-controller": "^2.0.0", + "@azure/core-util": "^1.1.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=18.0.0" } }, - "node_modules/@babel/runtime": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", - "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", - "dev": true, + "node_modules/@azure/core-rest-pipeline": { + "version": "1.15.2", "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.4.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.3.0", + "@azure/logger": "^1.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", - "dev": true, + "node_modules/@azure/core-sse": { + "version": "2.1.2", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/traverse": { - "version": "7.24.1", - "dev": true, + "node_modules/@azure/core-tracing": { + "version": "1.1.2", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, + "node_modules/@azure/core-util": { + "version": "1.9.0", "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=4" + "node": ">=18.0.0" } }, - "node_modules/@babel/types": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", - "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", - "dev": true, + "node_modules/@azure/logger": { + "version": "1.1.2", "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.9.0" + "node": ">=18.0.0" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@clack/core": { - "version": "0.3.4", + "node_modules/@azure/openai": { + "version": "1.0.0-beta.12", "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", - "sisteransi": "^1.0.5" + "@azure-rest/core-client": "^1.1.7", + "@azure/core-auth": "^1.4.0", + "@azure/core-rest-pipeline": "^1.13.0", + "@azure/core-sse": "^2.0.0", + "@azure/core-util": "^1.4.0", + "@azure/logger": "^1.0.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@clack/prompts": { - "version": "0.6.3", - "bundleDependencies": [ - "is-unicode-supported" - ], + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, "license": "MIT", "dependencies": { - "@clack/core": "^0.3.2", - "picocolors": "^1.0.0", - "sisteransi": "^1.0.5" - } - }, - "node_modules/@clack/prompts/node_modules/is-unicode-supported": { - "version": "1.3.0", - "extraneous": true, - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=12" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@commitlint/types": { - "version": "17.8.1", + "node_modules/@babel/compat-data": { + "version": "7.24.1", "dev": true, "license": "MIT", - "dependencies": { - "chalk": "^4.1.0" - }, "engines": { - "node": ">=v14" + "node": ">=6.9.0" } }, - "node_modules/@commitlint/types/node_modules/ansi-styles": { - "version": "4.3.0", + "node_modules/@babel/core": { + "version": "7.24.3", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.1", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.1", + "@babel/parser": "^7.24.1", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { - "node": ">=8" + "node": ">=6.9.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "type": "opencollective", + "url": "https://opencollective.com/babel" } }, - "node_modules/@commitlint/types/node_modules/chalk": { - "version": "4.1.2", + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.1", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=6.9.0" } }, - "node_modules/@commitlint/types/node_modules/color-convert": { - "version": "2.0.1", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { - "node": ">=7.0.0" + "node": ">=6.9.0" } }, - "node_modules/@commitlint/types/node_modules/color-name": { - "version": "1.1.4", + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", "dev": true, - "license": "MIT" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { - "node": ">=12" + "node": ">=6.9.0" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@dqbd/tiktoken": { - "version": "1.0.13", - "license": "MIT" - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", - "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", - "cpu": [ - "ppc64" - ], + "node_modules/@babel/helper-module-imports": { + "version": "7.24.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "aix" - ], + "dependencies": { + "@babel/types": "^7.24.0" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", - "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", - "cpu": [ - "arm" - ], + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", - "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/helper-plugin-utils": { + "version": "7.24.0", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", - "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", - "cpu": [ - "x64" - ], + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], + "dependencies": { + "@babel/types": "^7.22.5" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", - "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], + "dependencies": { + "@babel/types": "^7.22.5" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", - "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", - "cpu": [ - "x64" - ], + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", - "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", - "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", - "cpu": [ - "x64" - ], + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", - "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", - "cpu": [ - "arm" - ], + "node_modules/@babel/helpers": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", - "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/parser": { + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", + "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@babel/types": "^7.27.3" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, "engines": { - "node": ">=18" + "node": ">=6.0.0" } }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", - "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", - "cpu": [ - "ia32" - ], + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", - "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", - "cpu": [ - "loong64" - ], + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", - "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", - "cpu": [ - "mips64el" - ], + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", - "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", - "cpu": [ - "ppc64" - ], + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", - "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", - "cpu": [ - "riscv64" - ], + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", - "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", - "cpu": [ - "s390x" - ], + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.1", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", - "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", - "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", - "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", - "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", - "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", - "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", - "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", - "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", - "cpu": [ - "ia32" - ], + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.1", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, "engines": { - "node": ">=18" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", - "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", - "cpu": [ - "x64" - ], + "node_modules/@babel/runtime": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.4.3" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", + "globals": "^11.1.0" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", "dev": true, "license": "MIT", "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=4" } }, - "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "node_modules/@babel/types": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", + "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@eslint/object-schema": "^2.1.6", - "debug": "^4.3.1", - "minimatch": "^3.1.2" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=6.9.0" } }, - "node_modules/@eslint/config-helpers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", - "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", "dev": true, - "license": "Apache-2.0", + "license": "MIT" + }, + "node_modules/@clack/core": { + "version": "0.3.4", + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "0.6.3", + "bundleDependencies": [ + "is-unicode-supported" + ], + "license": "MIT", + "dependencies": { + "@clack/core": "^0.3.2", + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts/node_modules/is-unicode-supported": { + "version": "1.3.0", + "extraneous": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@commitlint/types": { + "version": "17.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/types/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@commitlint/types/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@commitlint/types/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@commitlint/types/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@dqbd/tiktoken": { + "version": "1.0.13", + "license": "MIT" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", + "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.14.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@google/generative-ai": { + "version": "0.11.4", + "license": "Apache-2.0", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/console/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/console/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/console/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/console/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/core/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@jest/core/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/@eslint/core": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", - "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "node_modules/@jest/reporters/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.15" + "color-convert": "^2.0.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "node_modules/@jest/reporters/node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=10" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@eslint/js": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", + "node_modules/@jest/reporters/node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "dependencies": { + "color-name": "~1.1.4" }, - "funding": { - "url": "https://eslint.org/donate" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/@eslint/object-schema": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", - "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "node_modules/@jest/reporters/node_modules/color-name": { + "version": "1.1.4", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } + "license": "MIT" }, - "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "node_modules/@jest/schemas": { + "version": "29.6.3", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@eslint/core": "^0.14.0", - "levn": "^0.4.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", + "node_modules/@jest/source-map": { + "version": "29.6.3", + "dev": true, "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, "engines": { - "node": ">=14" - } - }, - "node_modules/@google/generative-ai": { - "version": "0.11.4", - "license": "Apache-2.0", - "engines": { - "node": ">=18.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "node_modules/@jest/test-result": { + "version": "29.7.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, "engines": { - "node": ">=18.18.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": ">=18.18.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "node_modules/@jest/transform": { + "version": "29.7.0", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "node_modules/@jest/transform/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=18.18" + "node": ">=8" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "node_modules/@jest/transform/node_modules/chalk": { + "version": "4.1.2", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "node_modules/@jest/transform/node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "color-name": "~1.1.4" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "node_modules/@jest/transform/node_modules/color-name": { + "version": "1.1.4", "dev": true, "license": "MIT" }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "node_modules/@jest/types": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types/node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, "license": "MIT", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/@jest/types/node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "node_modules/@jest/types/node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=7.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", + "node_modules/@jest/types/node_modules/color-name": { + "version": "1.1.4", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "dev": true, + "license": "MIT", "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", "dev": true, "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", "dev": true, "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": ">=6.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "dev": true, + "node_modules/@ljharb/through": { + "version": "2.3.13", "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "call-bind": "^1.0.7" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", + "node_modules/@mistralai/mistralai": { + "version": "1.3.5", + "peerDependencies": { + "react": "^18 || ^19", + "react-dom": "^18 || ^19", + "zod": ">= 3" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, + "node_modules/@octokit/auth-token": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", + "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 18" } }, - "node_modules/@jest/console": { - "version": "29.7.0", - "dev": true, + "node_modules/@octokit/core": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz", + "integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==", "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" + "@octokit/auth-token": "^4.0.0", + "@octokit/graphql": "^7.1.0", + "@octokit/request": "^8.4.1", + "@octokit/request-error": "^5.1.1", + "@octokit/types": "^13.0.0", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 18" } }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, + "node_modules/@octokit/endpoint": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", + "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@octokit/types": "^13.1.0", + "universal-user-agent": "^6.0.0" }, "engines": { - "node": ">=8" + "node": ">= 18" + } + }, + "node_modules/@octokit/graphql": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz", + "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==", + "license": "MIT", + "dependencies": { + "@octokit/request": "^8.4.1", + "@octokit/types": "^13.0.0", + "universal-user-agent": "^6.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": ">= 18" } }, - "node_modules/@jest/console/node_modules/chalk": { - "version": "4.1.2", - "dev": true, + "node_modules/@octokit/openapi-types": { + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", + "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==", + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", + "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@octokit/types": "^12.6.0" }, "engines": { - "node": ">=10" + "node": ">= 18" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "@octokit/core": "5" } }, - "node_modules/@jest/console/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, + "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^20.0.0" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", + "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@octokit/types": "^12.6.0" }, "engines": { - "node": ">=7.0.0" + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": "5" } }, - "node_modules/@jest/console/node_modules/color-name": { - "version": "1.1.4", - "dev": true, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", "license": "MIT" }, - "node_modules/@jest/core": { - "version": "29.7.0", - "dev": true, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "@octokit/openapi-types": "^20.0.0" } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, + "node_modules/@octokit/request": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", + "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@octokit/endpoint": "^9.0.6", + "@octokit/request-error": "^5.1.1", + "@octokit/types": "^13.1.0", + "universal-user-agent": "^6.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">= 18" } }, - "node_modules/@jest/core/node_modules/chalk": { - "version": "4.1.2", - "dev": true, + "node_modules/@octokit/request-error": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", + "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@octokit/types": "^13.1.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">= 18" } }, - "node_modules/@jest/core/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, + "node_modules/@octokit/types": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", + "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", "license": "MIT", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "@octokit/openapi-types": "^24.2.0" } }, - "node_modules/@jest/core/node_modules/color-name": { - "version": "1.1.4", + "node_modules/@octokit/webhooks-schemas": { + "version": "6.11.0", + "license": "MIT" + }, + "node_modules/@octokit/webhooks-types": { + "version": "6.11.0", + "license": "MIT" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", "dev": true, "license": "MIT" }, - "node_modules/@jest/environment": { - "version": "29.7.0", + "node_modules/@sinonjs/commons": { + "version": "3.0.1", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "type-detect": "4.0.8" } }, - "node_modules/@jest/expect": { - "version": "29.7.0", + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@smithy/abort-controller": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", + "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/config-resolver": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.4.tgz", + "integrity": "sha512-prmU+rDddxHOH0oNcwemL+SwnzcG65sBF2yXRO7aeXIn/xTlq2pX7JLVbkBnVLowHLg4/OL4+jBmv9hVrVGS+w==", + "license": "Apache-2.0", "dependencies": { - "jest-get-type": "^29.6.3" + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/core": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.7.0.tgz", + "integrity": "sha512-7ov8hu/4j0uPZv8b27oeOFtIBtlFmM3ibrPv/Omx1uUdoXvcpJ00U+H/OWWC/keAguLlcqwtyL2/jTlSnApgNQ==", + "license": "Apache-2.0", "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "@smithy/middleware-serde": "^4.0.8", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-stream": "^4.2.3", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/credential-provider-imds": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz", + "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==", + "license": "Apache-2.0", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/eventstream-codec": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.0.4.tgz", + "integrity": "sha512-7XoWfZqWb/QoR/rAU4VSi0mWnO2vu9/ltS6JZ5ZSZv0eovLVfDfu0/AX4ub33RsJTOth3TiFWSHS5YdztvFnig==", + "license": "Apache-2.0", "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^4.3.1", + "@smithy/util-hex-encoding": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.0.4.tgz", + "integrity": "sha512-3fb/9SYaYqbpy/z/H3yIi0bYKyAa89y6xPmIqwr2vQiUT2St+avRt8UKwsWt9fEdEasc5d/V+QjrviRaX1JRFA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.1.2.tgz", + "integrity": "sha512-JGtambizrWP50xHgbzZI04IWU7LdI0nh/wGbqH3sJesYToMi2j/DcoElqyOcqEIG/D4tNyxgRuaqBXWE3zOFhQ==", + "license": "Apache-2.0", "dependencies": { - "color-convert": "^2.0.1" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=8" + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.4.tgz", + "integrity": "sha512-RD6UwNZ5zISpOWPuhVgRz60GkSIp0dy1fuZmj4RYmqLVRtejFqQ16WmfYDdoSoAjlp1LX+FnZo+/hkdmyyGZ1w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", + "node_modules/@smithy/eventstream-serde-universal": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.4.tgz", + "integrity": "sha512-UeJpOmLGhq1SLox79QWw/0n2PFX+oPRE1ZyRMxPIaFEfCqWaqpB7BU9C8kpPOGEhLF7AwEqfFbtwNxGy4ReENA==", + "license": "Apache-2.0", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@smithy/eventstream-codec": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "node_modules/@smithy/fetch-http-handler": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.1.0.tgz", + "integrity": "sha512-mADw7MS0bYe2OGKkHYMaqarOXuDwRbO6ArD91XhHcl2ynjGCFF+hvqf0LyQcYxkA1zaWjefSkU7Ne9mqgApSgQ==", + "license": "Apache-2.0", "dependencies": { - "color-name": "~1.1.4" + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=7.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "dev": true, - "license": "MIT", + "node_modules/@smithy/hash-node": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz", + "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==", + "license": "Apache-2.0", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "@smithy/types": "^4.3.1", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "dev": true, - "license": "MIT", + "node_modules/@smithy/invalid-dependency": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz", + "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/is-array-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz", + "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==", + "license": "Apache-2.0", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/middleware-content-length": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.4.tgz", + "integrity": "sha512-F7gDyfI2BB1Kc+4M6rpuOLne5LOcEknH1n6UQB69qv+HucXBR1rkzXBnQTB2q46sFy1PM/zuSJOB532yc8bg3w==", + "license": "Apache-2.0", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/middleware-endpoint": { + "version": "4.1.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.14.tgz", + "integrity": "sha512-+BGLpK5D93gCcSEceaaYhUD/+OCGXM1IDaq/jKUQ+ujB0PTWlWN85noodKw/IPFZhIKFCNEe19PGd/reUMeLSQ==", + "license": "Apache-2.0", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "@smithy/core": "^3.7.0", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-middleware": "^4.0.4", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/middleware-retry": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.15.tgz", + "integrity": "sha512-iKYUJpiyTQ33U2KlOZeUb0GwtzWR3C0soYcKuCnTmJrvt6XwTPQZhMfsjJZNw7PpQ3TU4Ati1qLSrkSJxnnSMQ==", + "license": "Apache-2.0", "dependencies": { - "color-convert": "^2.0.1" + "@smithy/node-config-provider": "^4.1.3", + "@smithy/protocol-http": "^5.1.2", + "@smithy/service-error-classification": "^4.0.6", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.6", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18.0.0" } }, - "node_modules/@jest/transform/node_modules/chalk": { - "version": "4.1.2", - "dev": true, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", + "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", + "license": "Apache-2.0", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=18.0.0" } }, - "node_modules/@jest/transform/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "node_modules/@smithy/middleware-stack": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", + "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", + "license": "Apache-2.0", "dependencies": { - "color-name": "~1.1.4" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=7.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/transform/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "dev": true, - "license": "MIT", + "node_modules/@smithy/node-config-provider": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", + "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", + "license": "Apache-2.0", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@smithy/property-provider": "^4.0.4", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", + "node_modules/@smithy/node-http-handler": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.1.0.tgz", + "integrity": "sha512-vqfSiHz2v8b3TTTrdXi03vNz1KLYYS3bhHCDv36FYDqxT7jvTll1mMnCrkD+gOvgwybuunh/2VmvOMqwBegxEg==", + "license": "Apache-2.0", "dependencies": { - "color-convert": "^2.0.1" + "@smithy/abort-controller": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18.0.0" } }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", + "node_modules/@smithy/property-provider": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", + "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", + "license": "Apache-2.0", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=18.0.0" } }, - "node_modules/@jest/types/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", + "node_modules/@smithy/protocol-http": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", + "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", + "license": "Apache-2.0", "dependencies": { - "color-name": "~1.1.4" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">=7.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jest/types/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "dev": true, - "license": "MIT", + "node_modules/@smithy/querystring-builder": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz", + "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@smithy/types": "^4.3.1", + "@smithy/util-uri-escape": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "dev": true, - "license": "MIT", + "node_modules/@smithy/querystring-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", + "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">=6.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "dev": true, - "license": "MIT", + "node_modules/@smithy/service-error-classification": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.6.tgz", + "integrity": "sha512-RRoTDL//7xi4tn5FrN2NzH17jbgmnKidUqd4KvquT0954/i6CXXkh1884jBiunq24g9cGtPBEXlU40W6EpNOOg==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1" + }, "engines": { - "node": ">=6.0.0" + "node": ">=18.0.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "dev": true, - "license": "MIT", + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", + "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@ljharb/through": { - "version": "2.3.13", - "license": "MIT", + "node_modules/@smithy/signature-v4": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz", + "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==", + "license": "Apache-2.0", "dependencies": { - "call-bind": "^1.0.7" + "@smithy/is-array-buffer": "^4.0.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-uri-escape": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 0.4" + "node": ">=18.0.0" } }, - "node_modules/@mistralai/mistralai": { - "version": "1.3.5", - "peerDependencies": { - "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": ">= 3" + "node_modules/@smithy/smithy-client": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.6.tgz", + "integrity": "sha512-3wfhywdzB/CFszP6moa5L3lf5/zSfQoH0kvVSdkyK2az5qZet0sn2PAHjcTDiq296Y4RP5yxF7B6S6+3oeBUCQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.7.0", + "@smithy/middleware-endpoint": "^4.1.14", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", + "node_modules/@smithy/types": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", + "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "license": "Apache-2.0", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 8" + "node": ">=18.0.0" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", + "node_modules/@smithy/url-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", + "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, "engines": { - "node": ">= 8" + "node": ">=18.0.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", + "node_modules/@smithy/util-base64": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", + "license": "Apache-2.0", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 8" + "node": ">=18.0.0" } }, - "node_modules/@octokit/auth-token": { + "node_modules/@smithy/util-body-length-browser": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz", + "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/core": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz", - "integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==", - "license": "MIT", + "node_modules/@smithy/util-body-length-node": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz", + "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==", + "license": "Apache-2.0", "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.1.0", - "@octokit/request": "^8.4.1", - "@octokit/request-error": "^5.1.1", - "@octokit/types": "^13.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/endpoint": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", - "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", - "license": "MIT", + "node_modules/@smithy/util-buffer-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz", + "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@smithy/is-array-buffer": "^4.0.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/graphql": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz", - "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==", - "license": "MIT", + "node_modules/@smithy/util-config-provider": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz", + "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==", + "license": "Apache-2.0", "dependencies": { - "@octokit/request": "^8.4.1", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^6.0.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/openapi-types": { - "version": "24.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", - "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", - "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", - "license": "MIT", + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.22.tgz", + "integrity": "sha512-hjElSW18Wq3fUAWVk6nbk7pGrV7ZT14DL1IUobmqhV3lxcsIenr5FUsDe2jlTVaS8OYBI3x+Og9URv5YcKb5QA==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^12.6.0" + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "bowser": "^2.11.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" + "node": ">=18.0.0" } }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "license": "MIT", + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.22.tgz", + "integrity": "sha512-7B8mfQBtwwr2aNRRmU39k/bsRtv9B6/1mTMrGmmdJFKmLAH+KgIiOuhaqfKOBGh9sZ/VkZxbvm94rI4MMYpFjQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/openapi-types": "^20.0.0" + "@smithy/config-resolver": "^4.1.4", + "@smithy/credential-provider-imds": "^4.0.6", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.6", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", - "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "license": "MIT", + "node_modules/@smithy/util-endpoints": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", + "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^12.6.0" + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" + "node": ">=18.0.0" } }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "license": "MIT", + "node_modules/@smithy/util-hex-encoding": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz", + "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==", + "license": "Apache-2.0", "dependencies": { - "@octokit/openapi-types": "^20.0.0" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@octokit/request": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", - "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", - "license": "MIT", + "node_modules/@smithy/util-middleware": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", + "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", + "license": "Apache-2.0", "dependencies": { - "@octokit/endpoint": "^9.0.6", - "@octokit/request-error": "^5.1.1", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/request-error": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", - "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", - "license": "MIT", + "node_modules/@smithy/util-retry": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.6.tgz", + "integrity": "sha512-+YekoF2CaSMv6zKrA6iI/N9yva3Gzn4L6n35Luydweu5MMPYpiGZlWqehPHDHyNbnyaYlz/WJyYAZnC+loBDZg==", + "license": "Apache-2.0", "dependencies": { - "@octokit/types": "^13.1.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@smithy/service-error-classification": "^4.0.6", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "engines": { - "node": ">= 18" + "node": ">=18.0.0" } }, - "node_modules/@octokit/types": { - "version": "13.10.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", - "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", - "license": "MIT", + "node_modules/@smithy/util-stream": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.3.tgz", + "integrity": "sha512-cQn412DWHHFNKrQfbHY8vSFI3nTROY1aIKji9N0tpp8gUABRilr7wdf8fqBbSlXresobM+tQFNk6I+0LXK/YZg==", + "license": "Apache-2.0", "dependencies": { - "@octokit/openapi-types": "^24.2.0" + "@smithy/fetch-http-handler": "^5.1.0", + "@smithy/node-http-handler": "^4.1.0", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@octokit/webhooks-schemas": { - "version": "6.11.0", - "license": "MIT" - }, - "node_modules/@octokit/webhooks-types": { - "version": "6.11.0", - "license": "MIT" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/@smithy/util-uri-escape": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz", + "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==", + "license": "Apache-2.0", "dependencies": { - "type-detect": "4.0.8" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "dev": true, - "license": "BSD-3-Clause", + "node_modules/@smithy/util-utf8": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", + "license": "Apache-2.0", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@smithy/util-buffer-from": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@tsconfig/node10": { @@ -2596,6 +3973,12 @@ "@types/node": "*" } }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "license": "MIT" + }, "node_modules/@types/yargs": { "version": "17.0.32", "dev": true, @@ -3237,6 +4620,12 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.11", "dev": true, @@ -4382,6 +5771,24 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fast-xml-parser": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", + "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^2.1.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", @@ -7940,6 +9347,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/supports-color": { "version": "7.2.0", "license": "MIT", diff --git a/package.json b/package.json index 3a12332f..1fd9ce5d 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1", "@anthropic-ai/sdk": "^0.19.2", + "@aws-sdk/client-bedrock-runtime": "^3.844.0", "@azure/openai": "^1.0.0-beta.12", "@clack/prompts": "^0.6.1", "@dqbd/tiktoken": "^1.0.2", diff --git a/src/commands/config.ts b/src/commands/config.ts index c5d01de0..696956f7 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -38,6 +38,58 @@ export enum CONFIG_MODES { } export const MODEL_LIST = { + bedrock: [ + // Anthropic Claude models + "anthropic.claude-instant-v1", + "anthropic.claude-v2", + "anthropic.claude-v2:1", + "anthropic.claude-3-sonnet-20240229-v1:0", + "anthropic.claude-3-haiku-20240307-v1:0", + "anthropic.claude-3-opus-20240229-v1:0", + "anthropic.claude-3-5-sonnet-20240620-v1:0", + "anthropic.claude-3-5-sonnet-20241022-v2:0", + "anthropic.claude-3-7-sonnet-20250219-v1:0", + "anthropic.claude-3-5-haiku-20241022-v1:0", + "anthropic.claude-opus-4-20250514-v1:0", + "anthropic.claude-sonnet-4-20250514-v1:0", + // Amazon models + "amazon.titan-text-lite-v1", + "amazon.titan-text-express-v1", + "amazon.titan-text-premier-v1:0", + "amazon.nova-lite-v1:0", + "amazon.nova-pro-v1:0", + "amazon.nova-micro-v1:0", + "amazon.nova-premier-v1:0", + // Meta Llama models + "meta.llama3-8b-instruct-v1:0", + "meta.llama3-70b-instruct-v1:0", + "meta.llama3-1-8b-instruct-v1:0", + "meta.llama3-1-70b-instruct-v1:0", + "meta.llama3-2-11b-instruct-v1:0", + "meta.llama3-2-90b-instruct-v1:0", + "meta.llama3-3-70b-instruct-v1:0", + "meta.llama4-scout-17b-instruct-v1:0", + "meta.llama4-maverick-17b-instruct-v1:0", + // AI21 models + "ai21.jamba-instruct-v1:0", + "ai21.jamba-1-5-large-v1:0", + "ai21.jamba-1-5-mini-v1:0", + // Cohere models + "cohere.command-text-v14", + "cohere.command-light-text-v14", + "cohere.command-r-v1:0", + "cohere.command-r-plus-v1:0", + // Mistral models + "mistral.mistral-7b-instruct-v0:2", + "mistral.mixtral-8x7b-instruct-v0:1", + "mistral.mistral-large-2402-v1:0", + "mistral.mistral-small-2402-v1:0", + "mistral.pixtral-large-2502-v1:0", + // Stability models + "stability.stable-diffusion-xl-v1", + // Deepseek models + "deepseek.r1-v1:0" + ], openai: [ 'gpt-4o-mini', 'gpt-3.5-turbo', @@ -486,6 +538,8 @@ const getDefaultModel = (provider: string | undefined): string => { return MODEL_LIST.deepseek[0]; case 'openrouter': return MODEL_LIST.openrouter[0]; + case 'bedrock': + return MODEL_LIST.bedrock[6]; // Default to Claude 3.5 Sonnet which is a good balance default: return MODEL_LIST.openai[0]; } @@ -676,9 +730,10 @@ export const configValidators = { 'flowise', 'groq', 'deepseek', - 'openrouter' + 'openrouter', + 'bedrock' ].includes(value) || value.startsWith('ollama'), - `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek' or 'openai' (default)` + `${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek', 'bedrock' or 'openai' (default)` ); return value; @@ -735,7 +790,8 @@ export enum OCO_AI_PROVIDER_ENUM { MISTRAL = 'mistral', MLX = 'mlx', DEEPSEEK = 'deepseek', - OPENROUTER = 'openrouter' + OPENROUTER = 'openrouter', + BEDROCK = 'bedrock' } export type ConfigType = { diff --git a/src/engine/bedrock.ts b/src/engine/bedrock.ts new file mode 100644 index 00000000..2646e247 --- /dev/null +++ b/src/engine/bedrock.ts @@ -0,0 +1,491 @@ +import { + BedrockRuntimeClient, + InvokeModelCommand, + ConverseCommand +} from '@aws-sdk/client-bedrock-runtime'; +import { outro } from '@clack/prompts'; +import axios from 'axios'; +import chalk from 'chalk'; +import { OpenAI } from 'openai'; +import { GenerateCommitMessageErrorEnum } from '../generateCommitMessageFromGitDiff'; +import { removeContentTags } from '../utils/removeContentTags'; +import { tokenCount } from '../utils/tokenCount'; +import { AiEngine, AiEngineConfig } from './Engine'; + +interface BedrockConfig extends AiEngineConfig { + region?: string; + guardrailId?: string; + guardrailVersion?: string; + useConverseApi?: boolean; +} + +export class BedrockEngine implements AiEngine { + config: BedrockConfig; + client: BedrockRuntimeClient; + + constructor(config: BedrockConfig) { + this.config = config; + + const clientOptions: { region?: string; credentials?: any } = { + region: config.region || 'us-east-1' // Default to us-east-1 if not specified + }; + + // Handle authentication - support both API key and IAM credentials + if (config.apiKey) { + if (config.apiKey.startsWith('Bedrock-API-Key-')) { + // Using API key auth - the AWS SDK automatically picks up the x-api-key header + // from the custom headers + if (!config.customHeaders) { + config.customHeaders = {}; + } + config.customHeaders['x-api-key'] = config.apiKey; + } else { + // Fallback to IAM credentials if provided in format "accessKey:secretKey" + const [accessKeyId, secretAccessKey] = config.apiKey.split(':'); + if (accessKeyId && secretAccessKey) { + clientOptions.credentials = { accessKeyId, secretAccessKey }; + } + } + } + + this.client = new BedrockRuntimeClient(clientOptions); + } + + // Helper to identify model family by looking for relevant substrings in the model ID + private getModelFamily(modelId: string): string { + // Check for model families by looking for relevant substrings + if (modelId.includes('claude')) return 'anthropic.claude'; + if (modelId.includes('titan')) return 'amazon.titan'; + if (modelId.includes('nova')) return 'amazon.nova'; + if (modelId.includes('llama')) return 'meta.llama'; + if (modelId.includes('ai21') || modelId.includes('jamba') || modelId.includes('jurassic')) return 'ai21'; + if (modelId.includes('cohere') || modelId.includes('command')) return 'cohere'; + if (modelId.includes('mistral')) return 'mistral'; + if (modelId.includes('stability')) return 'stability'; + if (modelId.includes('deepseek')) return 'deepseek'; + + // Default + return 'unknown'; + } + + public generateCommitMessage = async ( + messages: Array + ): Promise => { + try { + const REQUEST_TOKENS = messages + .map((msg) => tokenCount(msg.content as string) + 4) + .reduce((a, b) => a + b, 0); + + if ( + REQUEST_TOKENS > + this.config.maxTokensInput - this.config.maxTokensOutput + ) { + throw new Error(GenerateCommitMessageErrorEnum.tooMuchTokens); + } + + // Extract system message and remaining messages + const systemMessage = messages.find((msg) => msg.role === 'system')?.content as string || ''; + const restMessages = messages.filter((msg) => msg.role !== 'system'); + + // If useConverseApi is enabled (or not specified), use the Converse API + if (this.config.useConverseApi !== false) { + return this.generateWithConverseApi(systemMessage, restMessages); + } else { + // Otherwise use the older InvokeModel API + return this.generateWithInvokeModelApi(systemMessage, restMessages); + } + } catch (error) { + const err = error as Error; + if ( + axios.isAxiosError<{ error?: { message: string } }>(error) && + error.response?.status === 401 + ) { + const bedrockError = error.response.data.error; + if (bedrockError) throw new Error(bedrockError.message); + } + + outro(`${chalk.red('✖')} ${err?.message || err}`); + throw err; + } + }; + + // Uses the newer Converse API which supports guardrails + private async generateWithConverseApi( + systemMessage: string, + messages: Array + ): Promise { + const modelId = this.config.model; + + // Prepare messages for the Converse API format + const converseMessages = []; + + // For Bedrock Converse API, we need to handle system messages differently + // as it doesn't support the 'system' role directly + let systemInstructions = ""; + if (systemMessage) { + // Store system message to prepend to first user message + systemInstructions = systemMessage; + } + + // Convert other messages + for (let i = 0; i < messages.length; i++) { + const message = messages[i]; + + // Skip system messages + if (message.role === 'system') continue; + + // For the first user message, prepend system instructions if any + if (i === 0 && message.role === 'user' && systemInstructions) { + converseMessages.push({ + role: 'user', + content: [{ text: `[System Instructions]: ${systemInstructions}\n\n[User Message]: ${message.content}` }] + }); + } else { + // Map role to supported role (only 'user' and 'assistant' are supported) + const role = message.role === 'assistant' ? 'assistant' : 'user'; + + converseMessages.push({ + role: role, + content: [{ text: message.content as string }] + }); + } + } + + // Prepare converse command parameters + const params = { + modelId: modelId, + messages: converseMessages, + inferenceConfig: { + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + } + }; + + // Add guardrails if configured + if (this.config.guardrailId) { + params['guardrailConfig'] = { + guardrailId: this.config.guardrailId, + guardrailVersion: this.config.guardrailVersion || 'DRAFT' // Use configured version or default to DRAFT + }; + } + + // Create and send the command + const command = new ConverseCommand(params); + const response = await this.client.send(command); + + // Extract the response content + if (response.output?.message?.content?.[0]?.text) { + const content = response.output.message.content[0].text; + return removeContentTags(content, 'think'); + } + + return null; + } + + // Uses the older InvokeModel API for backwards compatibility + private async generateWithInvokeModelApi( + systemMessage: string, + messages: Array + ): Promise { + let payload; + const modelId = this.config.model; + const modelFamily = this.getModelFamily(modelId); + + // Format messages according to model provider/family + switch(modelFamily) { + case 'anthropic.claude': + // Anthropic Claude models on Bedrock + payload = { + anthropic_version: 'bedrock-2023-05-31', + max_tokens: this.config.maxTokensOutput, + messages: [ + ...(systemMessage ? [{ role: 'system', content: systemMessage }] : []), + ...messages.map(msg => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + + case 'amazon.titan': + // Amazon Titan models + payload = { + inputText: this.formatMessagesAsTitanPrompt(systemMessage, messages), + textGenerationConfig: { + maxTokenCount: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + } + }; + break; + + case 'amazon.nova': + // Amazon Nova models + payload = { + prompt: this.formatMessagesAsNovaPrompt(systemMessage, messages), + temperature: 0, + top_p: 0.1, + max_tokens: this.config.maxTokensOutput + }; + break; + + case 'meta.llama': + // Meta Llama models + payload = { + prompt: this.formatMessagesAsLlamaPrompt(systemMessage, messages), + max_gen_len: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + + case 'ai21': + // AI21 Jurassic/Jamba models + payload = { + prompt: this.formatMessagesAsAI21Prompt(systemMessage, messages), + maxTokens: this.config.maxTokensOutput, + temperature: 0, + topP: 0.1 + }; + break; + + case 'cohere': + // Cohere Command models + payload = { + prompt: this.formatMessagesAsGenericPrompt(systemMessage, messages), + max_tokens: this.config.maxTokensOutput, + temperature: 0, + p: 0.1 + }; + break; + + case 'mistral': + // Mistral models + payload = { + messages: [ + ...(systemMessage ? [{ role: 'system', content: systemMessage }] : []), + ...messages.map(msg => ({ + role: msg.role === 'assistant' ? 'assistant' : 'user', + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + + case 'stability': + // Stability AI models + payload = { + text_prompts: [ + { + text: this.formatMessagesAsGenericPrompt(systemMessage, messages) + } + ], + cfg_scale: 7, + steps: 30 + }; + break; + + case 'deepseek': + // Deepseek models + payload = { + messages: [ + ...(systemMessage ? [{ role: 'system', content: systemMessage }] : []), + ...messages.map(msg => ({ + role: msg.role, + content: msg.content + })) + ], + max_tokens: this.config.maxTokensOutput, + temperature: 0, + top_p: 0.1 + }; + break; + + default: + // Default to Claude-like format for other models + payload = { + max_tokens: this.config.maxTokensOutput, + messages: [ + ...(systemMessage ? [{ role: 'system', content: systemMessage }] : []), + ...messages.map(msg => ({ + role: msg.role, + content: msg.content + })) + ], + temperature: 0, + top_p: 0.1 + }; + break; + } + + const command = new InvokeModelCommand({ + modelId, + body: JSON.stringify(payload), + contentType: 'application/json', + accept: 'application/json' + }); + + const response = await this.client.send(command); + + // Parse the response body + const responseBody = JSON.parse(new TextDecoder().decode(response.body)); + + // Extract content based on model provider + let content; + + switch(modelFamily) { + case 'anthropic.claude': + content = responseBody.content?.[0]?.text; + break; + case 'amazon.titan': + content = responseBody.results?.[0]?.outputText; + break; + case 'amazon.nova': + content = responseBody.completion; + break; + case 'meta.llama': + content = responseBody.generation; + break; + case 'ai21': + content = responseBody.completions?.[0]?.data?.text; + break; + case 'cohere': + content = responseBody.generations?.[0]?.text; + break; + case 'mistral': + content = responseBody.outputs?.[0]?.text || responseBody.completion; + break; + case 'stability': + content = responseBody.artifacts?.[0]?.text; + break; + case 'deepseek': + content = responseBody.content?.[0]?.text || responseBody.generated_text; + break; + default: + // Try common response formats + content = responseBody.content?.[0]?.text || + responseBody.generation || + responseBody.text || + responseBody.completion || + responseBody.answer || + responseBody.response; + break; + } + + return removeContentTags(content, 'think'); + } + + private formatMessagesAsTitanPrompt( + systemMessage: string, + messages: Array + ): string { + let prompt = ''; + + if (systemMessage) { + prompt += `System: ${systemMessage}\n\n`; + } + + for (const message of messages) { + if (message.role === 'user') { + prompt += `Human: ${message.content}\n\n`; + } else if (message.role === 'assistant') { + prompt += `Assistant: ${message.content}\n\n`; + } + } + + prompt += 'Assistant: '; + return prompt; + } + + private formatMessagesAsNovaPrompt( + systemMessage: string, + messages: Array + ): string { + let prompt = ''; + + if (systemMessage) { + prompt += `${systemMessage}\n\n`; + } + + for (const message of messages) { + if (message.role === 'user') { + prompt += `USER: ${message.content}\n\n`; + } else if (message.role === 'assistant') { + prompt += `ASSISTANT: ${message.content}\n\n`; + } + } + + prompt += 'ASSISTANT: '; + return prompt; + } + + private formatMessagesAsLlamaPrompt( + systemMessage: string, + messages: Array + ): string { + let prompt = ''; + + if (systemMessage) { + prompt += `\n${systemMessage}\n\n\n`; + } + + for (const message of messages) { + if (message.role === 'user') { + prompt += `\n${message.content}\n\n\n`; + } else if (message.role === 'assistant') { + prompt += `\n${message.content}\n\n\n`; + } + } + + prompt += '\n'; + return prompt; + } + + private formatMessagesAsAI21Prompt( + systemMessage: string, + messages: Array + ): string { + let prompt = ''; + + if (systemMessage) { + prompt += `${systemMessage}\n\n`; + } + + for (const message of messages) { + if (message.role === 'user') { + prompt += `User: ${message.content}\n\n`; + } else if (message.role === 'assistant') { + prompt += `Assistant: ${message.content}\n\n`; + } + } + + prompt += 'Assistant: '; + return prompt; + } + + private formatMessagesAsGenericPrompt( + systemMessage: string, + messages: Array + ): string { + let prompt = ''; + + if (systemMessage) { + prompt += `${systemMessage}\n\n`; + } + + for (const message of messages) { + const role = message.role === 'user' ? 'User' : 'Assistant'; + prompt += `${role}: ${message.content}\n\n`; + } + + prompt += 'Assistant: '; + return prompt; + } +} \ No newline at end of file diff --git a/src/migrations/00_use_single_api_key_and_url.ts b/src/migrations/00_use_single_api_key_and_url.ts index a927f7b6..ca8b075c 100644 --- a/src/migrations/00_use_single_api_key_and_url.ts +++ b/src/migrations/00_use_single_api_key_and_url.ts @@ -31,6 +31,9 @@ export default function () { } else if (aiProvider === OCO_AI_PROVIDER_ENUM.FLOWISE) { apiKey = config['OCO_FLOWISE_API_KEY']; apiUrl = config['OCO_FLOWISE_ENDPOINT']; + } else if (aiProvider === OCO_AI_PROVIDER_ENUM.BEDROCK) { + apiKey = config['OCO_BEDROCK_API_KEY']; + apiUrl = config['OCO_BEDROCK_REGION']; } else { throw new Error( `Migration failed, set AI provider first. Run "oco config set OCO_AI_PROVIDER=", where is one of: ${Object.values( diff --git a/src/migrations/_run.ts b/src/migrations/_run.ts index 989a71ac..749b85d7 100644 --- a/src/migrations/_run.ts +++ b/src/migrations/_run.ts @@ -43,7 +43,8 @@ export const runMigrations = async () => { OCO_AI_PROVIDER_ENUM.GROQ, OCO_AI_PROVIDER_ENUM.MISTRAL, OCO_AI_PROVIDER_ENUM.MLX, - OCO_AI_PROVIDER_ENUM.OPENROUTER + OCO_AI_PROVIDER_ENUM.OPENROUTER, + OCO_AI_PROVIDER_ENUM.BEDROCK, ].includes(config.OCO_AI_PROVIDER) ) { return; diff --git a/src/utils/engine.ts b/src/utils/engine.ts index 5dcc6619..7b6bbc39 100644 --- a/src/utils/engine.ts +++ b/src/utils/engine.ts @@ -12,6 +12,7 @@ import { GroqEngine } from '../engine/groq'; import { MLXEngine } from '../engine/mlx'; import { DeepseekEngine } from '../engine/deepseek'; import { OpenRouterEngine } from '../engine/openrouter'; +import { BedrockEngine } from '../engine/bedrock'; export function parseCustomHeaders(headers: any): Record { let parsedHeaders = {}; @@ -83,6 +84,9 @@ export function getEngine(): AiEngine { case OCO_AI_PROVIDER_ENUM.OPENROUTER: return new OpenRouterEngine(DEFAULT_CONFIG); + + case OCO_AI_PROVIDER_ENUM.BEDROCK: + return new BedrockEngine(DEFAULT_CONFIG); default: return new OpenAiEngine(DEFAULT_CONFIG); diff --git a/test/unit/bedrock.test.ts b/test/unit/bedrock.test.ts new file mode 100644 index 00000000..f0071a67 --- /dev/null +++ b/test/unit/bedrock.test.ts @@ -0,0 +1,372 @@ +import { BedrockEngine } from '../../src/engine/bedrock'; +import { BedrockRuntimeClient, ConverseCommand, InvokeModelCommand } from '@aws-sdk/client-bedrock-runtime'; +import { + ConfigType, + getConfig, + OCO_AI_PROVIDER_ENUM +} from '../../src/commands/config'; +import { OpenAI } from 'openai'; + +// Mock the TextEncoder and TextDecoder +global.TextEncoder = require('util').TextEncoder; +global.TextDecoder = require('util').TextDecoder; + +describe('Bedrock', () => { + let bedrock: BedrockEngine; + let mockConfig: ConfigType; + let mockBedrockClient: BedrockRuntimeClient; + let mockExit: jest.SpyInstance; + + const mockBedrock = () => { + mockConfig = getConfig() as ConfigType; + + bedrock = new BedrockEngine({ + apiKey: mockConfig.OCO_API_KEY || '', + model: mockConfig.OCO_MODEL || '', + maxTokensInput: mockConfig.OCO_TOKENS_MAX_INPUT, + maxTokensOutput: mockConfig.OCO_TOKENS_MAX_OUTPUT + }); + + // Replace the real client with our mock + bedrock.client = mockBedrockClient; + }; + + const oldEnv = process.env; + + beforeEach(() => { + jest.resetModules(); + process.env = { ...oldEnv }; + + jest.mock('@aws-sdk/client-bedrock-runtime'); + jest.mock('../../src/commands/config'); + + jest.mock('@clack/prompts', () => ({ + intro: jest.fn(), + outro: jest.fn() + })); + + mockExit = jest.spyOn(process, 'exit').mockImplementation((() => {}) as any); + + mockConfig = getConfig() as ConfigType; + + mockConfig.OCO_AI_PROVIDER = OCO_AI_PROVIDER_ENUM.BEDROCK; + mockConfig.OCO_API_KEY = 'mock-api-key'; + mockConfig.OCO_MODEL = 'anthropic.claude-3-5-sonnet-20240620-v1:0'; + mockConfig.OCO_TOKENS_MAX_INPUT = 100000; + mockConfig.OCO_TOKENS_MAX_OUTPUT = 4096; + + // Mock BedrockRuntimeClient + mockBedrockClient = new BedrockRuntimeClient({ + region: 'us-east-1' + }); + }); + + afterEach(() => { + bedrock = undefined as any; + jest.clearAllMocks(); + }); + + afterAll(() => { + mockExit.mockRestore(); + process.env = oldEnv; + }); + + describe('getModelFamily', () => { + it('should identify Claude model correctly with different prefixes', async () => { + mockBedrock(); + + const models = [ + 'anthropic.claude-3-5-sonnet-20240620-v1:0', + 'anthropic.claude-3-7-sonnet-20250219-v1:0', + 'anthropic.claude-opus-4-20250514-v1:0', + 'anthropic.claude-sonnet-4-20250514-v1:0', + 'us-east-1.anthropic.claude-3-opus-20240229-v1:0', + 'us-west-2.anthropic.claude-3-sonnet-20240229-v1:0' + ]; + + // Need to access private method using type assertion + const getModelFamily = (bedrock as any).getModelFamily.bind(bedrock); + + for (const model of models) { + expect(getModelFamily(model)).toEqual('anthropic.claude'); + } + }); + + it('should identify different model families correctly', async () => { + mockBedrock(); + + const modelTests = [ + // Amazon models + { model: 'amazon.titan-text-express-v1', expected: 'amazon.titan' }, + { model: 'amazon.titan-text-lite-v1', expected: 'amazon.titan' }, + { model: 'amazon.titan-text-premier-v1:0', expected: 'amazon.titan' }, + { model: 'amazon.nova-premier-v1:0', expected: 'amazon.nova' }, + { model: 'amazon.nova-premier-v1:0:8k', expected: 'amazon.nova' }, + { model: 'amazon.nova-lite-v1:0:24k', expected: 'amazon.nova' }, + { model: 'amazon.nova-micro-v1:0', expected: 'amazon.nova' }, + + // Meta Llama models + { model: 'meta.llama3-8b-instruct-v1:0', expected: 'meta.llama' }, + { model: 'meta.llama3-70b-instruct-v1:0', expected: 'meta.llama' }, + { model: 'meta.llama3-1-8b-instruct-v1:0', expected: 'meta.llama' }, + { model: 'meta.llama3-2-90b-instruct-v1:0', expected: 'meta.llama' }, + { model: 'meta.llama4-scout-17b-instruct-v1:0', expected: 'meta.llama' }, + + // Cohere models + { model: 'cohere.command-text-v14', expected: 'cohere' }, + { model: 'cohere.command-r-v1:0', expected: 'cohere' }, + { model: 'cohere.command-r-plus-v1:0', expected: 'cohere' }, + { model: 'cohere.command-light-text-v14', expected: 'cohere' }, + + // AI21 models + { model: 'ai21.jamba-instruct-v1:0', expected: 'ai21' }, + { model: 'ai21.jamba-1-5-large-v1:0', expected: 'ai21' }, + { model: 'ai21.jamba-1-5-mini-v1:0', expected: 'ai21' }, + + // Mistral models + { model: 'mistral.mistral-7b-instruct-v0:2', expected: 'mistral' }, + { model: 'mistral.mistral-large-2402-v1:0', expected: 'mistral' }, + { model: 'mistral.mixtral-8x7b-instruct-v0:1', expected: 'mistral' }, + { model: 'mistral.pixtral-large-2502-v1:0', expected: 'mistral' }, + + // Other models + { model: 'stability.stable-diffusion-xl-v1', expected: 'stability' }, + { model: 'deepseek.r1-v1:0', expected: 'deepseek' }, + { model: 'unknown-model', expected: 'unknown' } + ]; + + const getModelFamily = (bedrock as any).getModelFamily.bind(bedrock); + + for (const test of modelTests) { + expect(getModelFamily(test.model)).toEqual(test.expected); + } + }); + }); + + describe('generateWithConverseApi', () => { + it('should format messages correctly for Converse API', async () => { + mockBedrock(); + + // Mock the send method to capture the command + const mockSend = jest.fn().mockResolvedValue({ + output: { + message: { + content: [{ text: 'generated content' }] + } + } + }); + + mockBedrockClient.send = mockSend; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + { role: 'user', content: 'user message' }, + { role: 'assistant', content: 'assistant message' } + ]; + + // Invoke the method + await bedrock.generateCommitMessage(messages); + + // Check that Converse command was created properly + expect(mockSend).toHaveBeenCalled(); + const command = mockSend.mock.calls[0][0]; + expect(command).toBeInstanceOf(ConverseCommand); + + // Verify the command parameters + const params = (command as any).input; + expect(params.modelId).toBe(mockConfig.OCO_MODEL); + + // Verify system message handling + const formattedMessages = params.messages; + expect(formattedMessages[0].role).toBe('user'); + expect(formattedMessages[0].content[0].text).toContain('[System Instructions]'); + expect(formattedMessages[0].content[0].text).toContain('system message'); + expect(formattedMessages[0].content[0].text).toContain('user message'); + + // Verify assistant message + expect(formattedMessages[1].role).toBe('assistant'); + expect(formattedMessages[1].content[0].text).toBe('assistant message'); + }); + }); + + describe('generateWithInvokeModelApi', () => { + it('should format payload correctly for Claude model', async () => { + mockBedrock(); + + // Force useConverseApi to false to use InvokeModelApi + bedrock = new BedrockEngine({ + apiKey: mockConfig.OCO_API_KEY || '', + model: 'anthropic.claude-3-5-sonnet-20240620-v1:0', + maxTokensInput: mockConfig.OCO_TOKENS_MAX_INPUT, + maxTokensOutput: mockConfig.OCO_TOKENS_MAX_OUTPUT, + useConverseApi: false + }); + bedrock.client = mockBedrockClient; + + // Mock the send method to capture the command + const mockSend = jest.fn().mockResolvedValue({ + body: Buffer.from(JSON.stringify({ content: [{ text: 'generated content' }] })) + }); + + mockBedrockClient.send = mockSend; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + { role: 'user', content: 'user message' } + ]; + + // Invoke the method + await bedrock.generateCommitMessage(messages); + + // Check that InvokeModel command was created properly + expect(mockSend).toHaveBeenCalled(); + const command = mockSend.mock.calls[0][0]; + expect(command).toBeInstanceOf(InvokeModelCommand); + + // Check the payload for Claude model + const payload = JSON.parse((command as any).input.body); + expect(payload.messages).toBeDefined(); + expect(payload.messages).toContainEqual({ role: 'system', content: 'system message' }); + expect(payload.messages).toContainEqual({ role: 'user', content: 'user message' }); + expect(payload.temperature).toBe(0); + expect(payload.anthropic_version).toBe('bedrock-2023-05-31'); + }); + + it('should format payload correctly for Amazon Titan model', async () => { + mockBedrock(); + + // Force useConverseApi to false to use InvokeModelApi with Titan model + bedrock = new BedrockEngine({ + apiKey: mockConfig.OCO_API_KEY || '', + model: 'amazon.titan-text-express-v1', + maxTokensInput: mockConfig.OCO_TOKENS_MAX_INPUT, + maxTokensOutput: mockConfig.OCO_TOKENS_MAX_OUTPUT, + useConverseApi: false + }); + bedrock.client = mockBedrockClient; + + // Mock the send method + const mockSend = jest.fn().mockResolvedValue({ + body: Buffer.from(JSON.stringify({ results: [{ outputText: 'generated content' }] })) + }); + + mockBedrockClient.send = mockSend; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + { role: 'user', content: 'user message' } + ]; + + // Invoke the method + await bedrock.generateCommitMessage(messages); + + // Check the command and payload + expect(mockSend).toHaveBeenCalled(); + const command = mockSend.mock.calls[0][0]; + expect(command).toBeInstanceOf(InvokeModelCommand); + + const payload = JSON.parse((command as any).input.body); + expect(payload.inputText).toBeDefined(); + expect(payload.inputText).toContain('system message'); + expect(payload.inputText).toContain('user message'); + expect(payload.textGenerationConfig).toBeDefined(); + expect(payload.textGenerationConfig.maxTokenCount).toBe(mockConfig.OCO_TOKENS_MAX_OUTPUT); + }); + + it('should format payload correctly for Meta Llama model', async () => { + mockBedrock(); + + // Setup for Llama model + bedrock = new BedrockEngine({ + apiKey: mockConfig.OCO_API_KEY || '', + model: 'meta.llama3-70b-instruct-v1:0', + maxTokensInput: mockConfig.OCO_TOKENS_MAX_INPUT, + maxTokensOutput: mockConfig.OCO_TOKENS_MAX_OUTPUT, + useConverseApi: false + }); + bedrock.client = mockBedrockClient; + + // Mock the send method + const mockSend = jest.fn().mockResolvedValue({ + body: Buffer.from(JSON.stringify({ generation: 'generated content' })) + }); + + mockBedrockClient.send = mockSend; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + { role: 'user', content: 'user message' } + ]; + + // Invoke the method + await bedrock.generateCommitMessage(messages); + + // Verify the command and payload + expect(mockSend).toHaveBeenCalled(); + const command = mockSend.mock.calls[0][0]; + expect(command).toBeInstanceOf(InvokeModelCommand); + + const payload = JSON.parse((command as any).input.body); + expect(payload.prompt).toBeDefined(); + expect(payload.prompt).toContain(''); + expect(payload.prompt).toContain(''); + expect(payload.prompt).toContain('system message'); + expect(payload.prompt).toContain('user message'); + expect(payload.max_gen_len).toBe(mockConfig.OCO_TOKENS_MAX_OUTPUT); + }); + }); + + describe('generateCommitMessage', () => { + it('should generate commit message using Converse API by default', async () => { + mockBedrock(); + + const mockSend = jest.fn().mockResolvedValue({ + output: { + message: { + content: [{ text: 'generated commit message' }] + } + } + }); + + mockBedrockClient.send = mockSend; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + { role: 'user', content: 'user message' } + ]; + + const result = await bedrock.generateCommitMessage(messages); + + expect(result).toBe('generated commit message'); + expect(mockSend).toHaveBeenCalled(); + const command = mockSend.mock.calls[0][0]; + expect(command).toBeInstanceOf(ConverseCommand); + }); + + it('should handle token count validation', async () => { + mockBedrock(); + + // Create a message that would exceed token limits + const largeMessage = { + role: 'user', + content: 'x'.repeat(mockConfig.OCO_TOKENS_MAX_INPUT) + }; + + const messages: Array = [ + { role: 'system', content: 'system message' }, + largeMessage + ]; + + // Token counting is mocked in the test environment + jest.spyOn(global, 'Error').mockImplementation((message) => { + return { message } as Error; + }); + + try { + await bedrock.generateCommitMessage(messages); + } catch (error) { + expect((error as Error).message).toBe('TOO_MUCH_TOKENS'); + } + }); + }); +}); \ No newline at end of file