@codexhost/cli-linux-arm64 0.24.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +3166 -3040
  4. package/app/console-web.js +1156 -585
  5. package/app/desktop-controller.mjs +645 -264
  6. package/app/host-runtime.mjs +10906 -10282
  7. package/app/plugins/antigravity/plugin.mjs +515 -369
  8. package/app/plugins/claude-code/plugin.mjs +583 -438
  9. package/app/plugins/codebuddy/plugin.mjs +551 -429
  10. package/app/plugins/codex-usage/plugin.mjs +344 -224
  11. package/app/plugins/copilot/plugin.mjs +408 -286
  12. package/app/plugins/cursor-cli/plugin.mjs +499 -360
  13. package/app/plugins/deepseek-harness/plugin.mjs +759 -520
  14. package/app/plugins/devin/plugin.mjs +385 -265
  15. package/app/plugins/grok/plugin.mjs +638 -516
  16. package/app/plugins/hermes/plugin.mjs +456 -334
  17. package/app/plugins/kimi-code/plugin.mjs +454 -332
  18. package/app/plugins/kiro-cli/plugin.mjs +445 -325
  19. package/app/plugins/omp/plugin.mjs +707 -339
  20. package/app/plugins/opencode/plugin.mjs +873 -741
  21. package/app/plugins/pi/plugin.mjs +481 -359
  22. package/app/plugins/qoder/plugin.mjs +682 -560
  23. package/app/plugins/qoder-cn/plugin.mjs +682 -560
  24. package/app/plugins/qwen-code/plugin.mjs +475 -355
  25. package/app/plugins/workbuddy/plugin.mjs +549 -429
  26. package/app/plugins/zcode/plugin.mjs +352 -232
  27. package/app/renderer-extension.js +1706 -945
  28. package/app/web/assets/{index-IvFk9KT-.js → index-DUOvhHbV.js} +82 -82
  29. package/app/web/codexhost-settings.js +416 -51
  30. package/app/web/index.html +1 -1
  31. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
  32. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
  33. package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +1 -1
  34. package/app/web/plugins/deepseek-ai__dsh-client-shortcuts/client.js +1 -1
  35. package/app/web/plugins/deepseek-ai__dsh-client-ui-brand-official/client.js +1 -1
  36. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -74
  37. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +72 -72
  38. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +97 -97
  39. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +1 -1
  40. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
  41. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
  42. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  43. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
  44. package/app/web-modules/server.mjs +2132 -1312
  45. package/bin/codexhost +0 -0
  46. package/libexec/codexhost-shim +0 -0
  47. package/libexec/codexhost-updater +0 -0
  48. package/package.json +1 -1
@@ -3112,27 +3112,27 @@ var require_utils = __commonJS({
3112
3112
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3113
3113
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3114
3114
  var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3115
- function stringArrayToHexStripped(input) {
3115
+ function stringArrayToHexStripped(input2) {
3116
3116
  let acc = "";
3117
3117
  let code = 0;
3118
3118
  let i = 0;
3119
- for (i = 0; i < input.length; i++) {
3120
- code = input[i].charCodeAt(0);
3119
+ for (i = 0; i < input2.length; i++) {
3120
+ code = input2[i].charCodeAt(0);
3121
3121
  if (code === 48) {
3122
3122
  continue;
3123
3123
  }
3124
3124
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3125
3125
  return "";
3126
3126
  }
3127
- acc += input[i];
3127
+ acc += input2[i];
3128
3128
  break;
3129
3129
  }
3130
- for (i += 1; i < input.length; i++) {
3131
- code = input[i].charCodeAt(0);
3130
+ for (i += 1; i < input2.length; i++) {
3131
+ code = input2[i].charCodeAt(0);
3132
3132
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3133
3133
  return "";
3134
3134
  }
3135
- acc += input[i];
3135
+ acc += input2[i];
3136
3136
  }
3137
3137
  return acc;
3138
3138
  }
@@ -3154,7 +3154,7 @@ var require_utils = __commonJS({
3154
3154
  }
3155
3155
  return true;
3156
3156
  }
3157
- function getIPV6(input) {
3157
+ function getIPV6(input2) {
3158
3158
  let tokenCount2 = 0;
3159
3159
  const output = { error: false, address: "", zone: "" };
3160
3160
  const address = [];
@@ -3162,8 +3162,8 @@ var require_utils = __commonJS({
3162
3162
  let endipv6Encountered = false;
3163
3163
  let endIpv6 = false;
3164
3164
  let consume = consumeHextets;
3165
- for (let i = 0; i < input.length; i++) {
3166
- const cursor = input[i];
3165
+ for (let i = 0; i < input2.length; i++) {
3166
+ const cursor = input2[i];
3167
3167
  if (cursor === "[" || cursor === "]") {
3168
3168
  continue;
3169
3169
  }
@@ -3178,7 +3178,7 @@ var require_utils = __commonJS({
3178
3178
  output.error = true;
3179
3179
  break;
3180
3180
  }
3181
- if (i > 0 && input[i - 1] === ":") {
3181
+ if (i > 0 && input2[i - 1] === ":") {
3182
3182
  endipv6Encountered = true;
3183
3183
  }
3184
3184
  address.push(":");
@@ -3230,37 +3230,37 @@ var require_utils = __commonJS({
3230
3230
  return ind;
3231
3231
  }
3232
3232
  function removeDotSegments(path10) {
3233
- let input = path10;
3233
+ let input2 = path10;
3234
3234
  const output = [];
3235
3235
  let nextSlash = -1;
3236
3236
  let len = 0;
3237
- while (len = input.length) {
3237
+ while (len = input2.length) {
3238
3238
  if (len === 1) {
3239
- if (input === ".") {
3239
+ if (input2 === ".") {
3240
3240
  break;
3241
- } else if (input === "/") {
3241
+ } else if (input2 === "/") {
3242
3242
  output.push("/");
3243
3243
  break;
3244
3244
  } else {
3245
- output.push(input);
3245
+ output.push(input2);
3246
3246
  break;
3247
3247
  }
3248
3248
  } else if (len === 2) {
3249
- if (input[0] === ".") {
3250
- if (input[1] === ".") {
3249
+ if (input2[0] === ".") {
3250
+ if (input2[1] === ".") {
3251
3251
  break;
3252
- } else if (input[1] === "/") {
3253
- input = input.slice(2);
3252
+ } else if (input2[1] === "/") {
3253
+ input2 = input2.slice(2);
3254
3254
  continue;
3255
3255
  }
3256
- } else if (input[0] === "/") {
3257
- if (input[1] === "." || input[1] === "/") {
3256
+ } else if (input2[0] === "/") {
3257
+ if (input2[1] === "." || input2[1] === "/") {
3258
3258
  output.push("/");
3259
3259
  break;
3260
3260
  }
3261
3261
  }
3262
3262
  } else if (len === 3) {
3263
- if (input === "/..") {
3263
+ if (input2 === "/..") {
3264
3264
  if (output.length !== 0) {
3265
3265
  output.pop();
3266
3266
  }
@@ -3268,24 +3268,24 @@ var require_utils = __commonJS({
3268
3268
  break;
3269
3269
  }
3270
3270
  }
3271
- if (input[0] === ".") {
3272
- if (input[1] === ".") {
3273
- if (input[2] === "/") {
3274
- input = input.slice(3);
3271
+ if (input2[0] === ".") {
3272
+ if (input2[1] === ".") {
3273
+ if (input2[2] === "/") {
3274
+ input2 = input2.slice(3);
3275
3275
  continue;
3276
3276
  }
3277
- } else if (input[1] === "/") {
3278
- input = input.slice(2);
3277
+ } else if (input2[1] === "/") {
3278
+ input2 = input2.slice(2);
3279
3279
  continue;
3280
3280
  }
3281
- } else if (input[0] === "/") {
3282
- if (input[1] === ".") {
3283
- if (input[2] === "/") {
3284
- input = input.slice(2);
3281
+ } else if (input2[0] === "/") {
3282
+ if (input2[1] === ".") {
3283
+ if (input2[2] === "/") {
3284
+ input2 = input2.slice(2);
3285
3285
  continue;
3286
- } else if (input[2] === ".") {
3287
- if (input[3] === "/") {
3288
- input = input.slice(3);
3286
+ } else if (input2[2] === ".") {
3287
+ if (input2[3] === "/") {
3288
+ input2 = input2.slice(3);
3289
3289
  if (output.length !== 0) {
3290
3290
  output.pop();
3291
3291
  }
@@ -3294,12 +3294,12 @@ var require_utils = __commonJS({
3294
3294
  }
3295
3295
  }
3296
3296
  }
3297
- if ((nextSlash = input.indexOf("/", 1)) === -1) {
3298
- output.push(input);
3297
+ if ((nextSlash = input2.indexOf("/", 1)) === -1) {
3298
+ output.push(input2);
3299
3299
  break;
3300
3300
  } else {
3301
- output.push(input.slice(0, nextSlash));
3302
- input = input.slice(nextSlash);
3301
+ output.push(input2.slice(0, nextSlash));
3302
+ input2 = input2.slice(nextSlash);
3303
3303
  }
3304
3304
  }
3305
3305
  return output.join("");
@@ -3312,14 +3312,14 @@ var require_utils = __commonJS({
3312
3312
  re.lastIndex = 0;
3313
3313
  return host.replace(re, (ch) => HOST_DELIMS[ch]);
3314
3314
  }
3315
- function normalizePercentEncoding(input, decodeUnreserved = false) {
3316
- if (input.indexOf("%") === -1) {
3317
- return input;
3315
+ function normalizePercentEncoding(input2, decodeUnreserved = false) {
3316
+ if (input2.indexOf("%") === -1) {
3317
+ return input2;
3318
3318
  }
3319
3319
  let output = "";
3320
- for (let i = 0; i < input.length; i++) {
3321
- if (input[i] === "%" && i + 2 < input.length) {
3322
- const hex3 = input.slice(i + 1, i + 3);
3320
+ for (let i = 0; i < input2.length; i++) {
3321
+ if (input2[i] === "%" && i + 2 < input2.length) {
3322
+ const hex3 = input2.slice(i + 1, i + 3);
3323
3323
  if (isHexPair(hex3)) {
3324
3324
  const normalizedHex = hex3.toUpperCase();
3325
3325
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3332,15 +3332,15 @@ var require_utils = __commonJS({
3332
3332
  continue;
3333
3333
  }
3334
3334
  }
3335
- output += input[i];
3335
+ output += input2[i];
3336
3336
  }
3337
3337
  return output;
3338
3338
  }
3339
- function normalizePathEncoding(input) {
3339
+ function normalizePathEncoding(input2) {
3340
3340
  let output = "";
3341
- for (let i = 0; i < input.length; i++) {
3342
- if (input[i] === "%" && i + 2 < input.length) {
3343
- const hex3 = input.slice(i + 1, i + 3);
3341
+ for (let i = 0; i < input2.length; i++) {
3342
+ if (input2[i] === "%" && i + 2 < input2.length) {
3343
+ const hex3 = input2.slice(i + 1, i + 3);
3344
3344
  if (isHexPair(hex3)) {
3345
3345
  const normalizedHex = hex3.toUpperCase();
3346
3346
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3353,26 +3353,26 @@ var require_utils = __commonJS({
3353
3353
  continue;
3354
3354
  }
3355
3355
  }
3356
- if (isPathCharacter(input[i])) {
3357
- output += input[i];
3356
+ if (isPathCharacter(input2[i])) {
3357
+ output += input2[i];
3358
3358
  } else {
3359
- output += escape(input[i]);
3359
+ output += escape(input2[i]);
3360
3360
  }
3361
3361
  }
3362
3362
  return output;
3363
3363
  }
3364
- function escapePreservingEscapes(input) {
3364
+ function escapePreservingEscapes(input2) {
3365
3365
  let output = "";
3366
- for (let i = 0; i < input.length; i++) {
3367
- if (input[i] === "%" && i + 2 < input.length) {
3368
- const hex3 = input.slice(i + 1, i + 3);
3366
+ for (let i = 0; i < input2.length; i++) {
3367
+ if (input2[i] === "%" && i + 2 < input2.length) {
3368
+ const hex3 = input2.slice(i + 1, i + 3);
3369
3369
  if (isHexPair(hex3)) {
3370
3370
  output += "%" + hex3.toUpperCase();
3371
3371
  i += 2;
3372
3372
  continue;
3373
3373
  }
3374
3374
  }
3375
- output += escape(input[i]);
3375
+ output += escape(input2[i]);
3376
3376
  }
3377
3377
  return output;
3378
3378
  }
@@ -4321,7 +4321,7 @@ var require_core = __commonJS({
4321
4321
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
4322
4322
  if (!errors || errors.length === 0)
4323
4323
  return "No errors";
4324
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
4324
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
4325
4325
  }
4326
4326
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
4327
4327
  const rules = this.RULES.all;
@@ -10219,7 +10219,7 @@ var require_core3 = __commonJS({
10219
10219
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
10220
10220
  if (!errors || errors.length === 0)
10221
10221
  return "No errors";
10222
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
10222
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
10223
10223
  }
10224
10224
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
10225
10225
  const rules = this.RULES.all;
@@ -12732,8 +12732,8 @@ var VERSION_MANAGER_ROOTS = "<version-managers>";
12732
12732
  function installRootExtensions(platform) {
12733
12733
  return platform === "win32" ? [".exe", ".cmd"] : [""];
12734
12734
  }
12735
- function resolveHomeDirectory(input) {
12736
- return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os.homedir();
12735
+ function resolveHomeDirectory(input2) {
12736
+ return input2.homeDirectory ?? environmentValue(input2.environment, "HOME") ?? environmentValue(input2.environment, "USERPROFILE") ?? os.homedir();
12737
12737
  }
12738
12738
  function templateVariables(environment, platform, home) {
12739
12739
  const pathFlavor = targetPath(platform);
@@ -12766,36 +12766,36 @@ function expandInstallRoot(template, environment, platform, home) {
12766
12766
  });
12767
12767
  return unresolved ? void 0 : joinTemplate(platform, substituted);
12768
12768
  }
12769
- function installRootDirectories(spec, input, dependencies, platform, home) {
12769
+ function installRootDirectories(spec, input2, dependencies, platform, home) {
12770
12770
  const templates = (platform === "win32" ? spec.installRoots?.windows : spec.installRoots?.posix) ?? [];
12771
12771
  const directories = [];
12772
12772
  for (const template of templates) {
12773
12773
  if (template === VERSION_MANAGER_ROOTS) {
12774
12774
  directories.push(...versionManagerBinaryDirectories({
12775
12775
  platform,
12776
- environment: input.environment,
12776
+ environment: input2.environment,
12777
12777
  home,
12778
12778
  ...dependencies.subdirectories ? { subdirectories: dependencies.subdirectories } : {}
12779
12779
  }));
12780
12780
  continue;
12781
12781
  }
12782
- const directory = expandInstallRoot(template, input.environment, platform, home);
12782
+ const directory = expandInstallRoot(template, input2.environment, platform, home);
12783
12783
  if (directory !== void 0)
12784
12784
  directories.push(directory);
12785
12785
  }
12786
12786
  return directories;
12787
12787
  }
12788
- function harnessCandidates(spec, input, dependencies = {}) {
12789
- const platform = input.platform ?? process.platform;
12788
+ function harnessCandidates(spec, input2, dependencies = {}) {
12789
+ const platform = input2.platform ?? process.platform;
12790
12790
  const pathFlavor = targetPath(platform);
12791
- const configured = input.command ?? (spec.commandEnvironmentVariable ? environmentValue(input.environment, spec.commandEnvironmentVariable) : void 0);
12791
+ const configured = input2.command ?? (spec.commandEnvironmentVariable ? environmentValue(input2.environment, spec.commandEnvironmentVariable) : void 0);
12792
12792
  const command = configured ?? spec.command;
12793
12793
  if (pathFlavor.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
12794
12794
  return [{ candidate: command, source: "configured" }];
12795
12795
  }
12796
12796
  const candidates = [];
12797
- const extensions = executableExtensions(command, platform, input.environment);
12798
- for (const directory of pathDirectories(input.environment, platform)) {
12797
+ const extensions = executableExtensions(command, platform, input2.environment);
12798
+ for (const directory of pathDirectories(input2.environment, platform)) {
12799
12799
  for (const extension of extensions) {
12800
12800
  candidates.push({
12801
12801
  candidate: pathFlavor.join(directory, command + extension),
@@ -12805,8 +12805,8 @@ function harnessCandidates(spec, input, dependencies = {}) {
12805
12805
  }
12806
12806
  if (configured !== void 0)
12807
12807
  return candidates;
12808
- const home = resolveHomeDirectory(input);
12809
- for (const directory of installRootDirectories(spec, input, dependencies, platform, home)) {
12808
+ const home = resolveHomeDirectory(input2);
12809
+ for (const directory of installRootDirectories(spec, input2, dependencies, platform, home)) {
12810
12810
  for (const extension of installRootExtensions(platform)) {
12811
12811
  candidates.push({
12812
12812
  candidate: pathFlavor.join(directory, spec.command + extension),
@@ -12816,12 +12816,12 @@ function harnessCandidates(spec, input, dependencies = {}) {
12816
12816
  }
12817
12817
  return candidates;
12818
12818
  }
12819
- function resolveHarnessExecutable(spec, input, dependencies = {}) {
12820
- const platform = input.platform ?? process.platform;
12819
+ function resolveHarnessExecutable(spec, input2, dependencies = {}) {
12820
+ const platform = input2.platform ?? process.platform;
12821
12821
  const isExecutable = dependencies.isExecutable ?? ((candidate) => isExecutableFile(candidate, platform));
12822
12822
  const runnable = spec.runnableCandidate ?? ((candidate) => candidate);
12823
12823
  const context = { platform, isExecutable };
12824
- for (const { candidate, source } of harnessCandidates(spec, input, dependencies)) {
12824
+ for (const { candidate, source } of harnessCandidates(spec, input2, dependencies)) {
12825
12825
  const executable = runnable(candidate, context);
12826
12826
  if (executable !== void 0 && isExecutable(executable))
12827
12827
  return { executable, source };
@@ -12832,13 +12832,13 @@ function resolveHarnessExecutable(spec, input, dependencies = {}) {
12832
12832
  // ../../harness-discovery/dist/installation.js
12833
12833
  import { execFile } from "node:child_process";
12834
12834
  import { homedir } from "node:os";
12835
- function runInstallationCommand(command, args, environment, timeout = 3e4) {
12835
+ function runInstallationCommand(command, args, environment, timeout = 3e4, cwd) {
12836
12836
  const env = withNodeRuntimeOnPath(environment);
12837
12837
  const invocation = /\.[cm]?js$/i.test(command) ? commandInvocation(process.execPath, [command, ...args], env) : commandInvocation(command, args, env);
12838
12838
  return new Promise((resolve, reject) => {
12839
12839
  const child = execFile(invocation.command, invocation.arguments, {
12840
12840
  env,
12841
- cwd: env.HOME ?? env.USERPROFILE ?? homedir(),
12841
+ cwd: cwd ?? env.HOME ?? env.USERPROFILE ?? homedir(),
12842
12842
  encoding: "utf8",
12843
12843
  timeout,
12844
12844
  killSignal: "SIGKILL",
@@ -12901,7 +12901,7 @@ function createInstallationManager(options) {
12901
12901
  const check2 = () => checking ??= options.check().finally(() => {
12902
12902
  checking = void 0;
12903
12903
  });
12904
- return (action) => {
12904
+ return (action, confirmedVersion) => {
12905
12905
  if (updating)
12906
12906
  return updating;
12907
12907
  if (action === "check")
@@ -12912,6 +12912,8 @@ function createInstallationManager(options) {
12912
12912
  return before;
12913
12913
  if (!before.canUpdate)
12914
12914
  throw new Error(before.message ?? "This installation cannot be updated automatically");
12915
+ if ((before.latestVerifiedVersion !== void 0 || confirmedVersion !== void 0) && before.latestVersion !== confirmedVersion)
12916
+ return { ...before, confirmationRequired: true };
12915
12917
  await options.update(before);
12916
12918
  const after = await check2();
12917
12919
  if (after.currentVersion === before.currentVersion)
@@ -13702,8 +13704,8 @@ function cached(getter) {
13702
13704
  }
13703
13705
  };
13704
13706
  }
13705
- function nullish(input) {
13706
- return input === null || input === void 0;
13707
+ function nullish(input2) {
13708
+ return input2 === null || input2 === void 0;
13707
13709
  }
13708
13710
  function cleanRegex(source) {
13709
13711
  const start = source.startsWith("^") ? 1 : 0;
@@ -13790,8 +13792,8 @@ function randomString(length = 10) {
13790
13792
  function esc(str) {
13791
13793
  return JSON.stringify(str);
13792
13794
  }
13793
- function slugify(input) {
13794
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
13795
+ function slugify(input2) {
13796
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
13795
13797
  }
13796
13798
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
13797
13799
  };
@@ -14196,19 +14198,19 @@ function finalizeIssue(iss, ctx, config2) {
14196
14198
  }
14197
14199
  return rest;
14198
14200
  }
14199
- function getSizableOrigin(input) {
14200
- if (input instanceof Set)
14201
+ function getSizableOrigin(input2) {
14202
+ if (input2 instanceof Set)
14201
14203
  return "set";
14202
- if (input instanceof Map)
14204
+ if (input2 instanceof Map)
14203
14205
  return "map";
14204
- if (input instanceof File)
14206
+ if (input2 instanceof File)
14205
14207
  return "file";
14206
14208
  return "unknown";
14207
14209
  }
14208
- function getLengthableOrigin(input) {
14209
- if (Array.isArray(input))
14210
+ function getLengthableOrigin(input2) {
14211
+ if (Array.isArray(input2))
14210
14212
  return "array";
14211
- if (typeof input === "string")
14213
+ if (typeof input2 === "string")
14212
14214
  return "string";
14213
14215
  return "unknown";
14214
14216
  }
@@ -14234,12 +14236,12 @@ function parsedType(data) {
14234
14236
  return t9;
14235
14237
  }
14236
14238
  function issue(...args) {
14237
- const [iss, input, inst] = args;
14239
+ const [iss, input2, inst] = args;
14238
14240
  if (typeof iss === "string") {
14239
14241
  return {
14240
14242
  message: iss,
14241
14243
  code: "custom",
14242
- input,
14244
+ input: input2,
14243
14245
  inst
14244
14246
  };
14245
14247
  }
@@ -14783,23 +14785,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14783
14785
  bag.pattern = integer;
14784
14786
  });
14785
14787
  inst._zod.check = (payload) => {
14786
- const input = payload.value;
14788
+ const input2 = payload.value;
14787
14789
  if (isInt) {
14788
- if (!Number.isInteger(input)) {
14790
+ if (!Number.isInteger(input2)) {
14789
14791
  payload.issues.push({
14790
14792
  expected: origin,
14791
14793
  format: def.format,
14792
14794
  code: "invalid_type",
14793
14795
  continue: false,
14794
- input,
14796
+ input: input2,
14795
14797
  inst
14796
14798
  });
14797
14799
  return;
14798
14800
  }
14799
- if (!Number.isSafeInteger(input)) {
14800
- if (input > 0) {
14801
+ if (!Number.isSafeInteger(input2)) {
14802
+ if (input2 > 0) {
14801
14803
  payload.issues.push({
14802
- input,
14804
+ input: input2,
14803
14805
  code: "too_big",
14804
14806
  maximum: Number.MAX_SAFE_INTEGER,
14805
14807
  note: "Integers must be within the safe integer range.",
@@ -14810,7 +14812,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14810
14812
  });
14811
14813
  } else {
14812
14814
  payload.issues.push({
14813
- input,
14815
+ input: input2,
14814
14816
  code: "too_small",
14815
14817
  minimum: Number.MIN_SAFE_INTEGER,
14816
14818
  note: "Integers must be within the safe integer range.",
@@ -14823,10 +14825,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14823
14825
  return;
14824
14826
  }
14825
14827
  }
14826
- if (input < minimum) {
14828
+ if (input2 < minimum) {
14827
14829
  payload.issues.push({
14828
14830
  origin: "number",
14829
- input,
14831
+ input: input2,
14830
14832
  code: "too_small",
14831
14833
  minimum,
14832
14834
  inclusive: true,
@@ -14834,10 +14836,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14834
14836
  continue: !def.abort
14835
14837
  });
14836
14838
  }
14837
- if (input > maximum) {
14839
+ if (input2 > maximum) {
14838
14840
  payload.issues.push({
14839
14841
  origin: "number",
14840
- input,
14842
+ input: input2,
14841
14843
  code: "too_big",
14842
14844
  maximum,
14843
14845
  inclusive: true,
@@ -14857,11 +14859,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
14857
14859
  bag.maximum = maximum;
14858
14860
  });
14859
14861
  inst._zod.check = (payload) => {
14860
- const input = payload.value;
14861
- if (input < minimum) {
14862
+ const input2 = payload.value;
14863
+ if (input2 < minimum) {
14862
14864
  payload.issues.push({
14863
14865
  origin: "bigint",
14864
- input,
14866
+ input: input2,
14865
14867
  code: "too_small",
14866
14868
  minimum,
14867
14869
  inclusive: true,
@@ -14869,10 +14871,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
14869
14871
  continue: !def.abort
14870
14872
  });
14871
14873
  }
14872
- if (input > maximum) {
14874
+ if (input2 > maximum) {
14873
14875
  payload.issues.push({
14874
14876
  origin: "bigint",
14875
- input,
14877
+ input: input2,
14876
14878
  code: "too_big",
14877
14879
  maximum,
14878
14880
  inclusive: true,
@@ -14895,16 +14897,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
14895
14897
  inst2._zod.bag.maximum = def.maximum;
14896
14898
  });
14897
14899
  inst._zod.check = (payload) => {
14898
- const input = payload.value;
14899
- const size = input.size;
14900
+ const input2 = payload.value;
14901
+ const size = input2.size;
14900
14902
  if (size <= def.maximum)
14901
14903
  return;
14902
14904
  payload.issues.push({
14903
- origin: getSizableOrigin(input),
14905
+ origin: getSizableOrigin(input2),
14904
14906
  code: "too_big",
14905
14907
  maximum: def.maximum,
14906
14908
  inclusive: true,
14907
- input,
14909
+ input: input2,
14908
14910
  inst,
14909
14911
  continue: !def.abort
14910
14912
  });
@@ -14923,16 +14925,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
14923
14925
  inst2._zod.bag.minimum = def.minimum;
14924
14926
  });
14925
14927
  inst._zod.check = (payload) => {
14926
- const input = payload.value;
14927
- const size = input.size;
14928
+ const input2 = payload.value;
14929
+ const size = input2.size;
14928
14930
  if (size >= def.minimum)
14929
14931
  return;
14930
14932
  payload.issues.push({
14931
- origin: getSizableOrigin(input),
14933
+ origin: getSizableOrigin(input2),
14932
14934
  code: "too_small",
14933
14935
  minimum: def.minimum,
14934
14936
  inclusive: true,
14935
- input,
14937
+ input: input2,
14936
14938
  inst,
14937
14939
  continue: !def.abort
14938
14940
  });
@@ -14952,13 +14954,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
14952
14954
  bag.size = def.size;
14953
14955
  });
14954
14956
  inst._zod.check = (payload) => {
14955
- const input = payload.value;
14956
- const size = input.size;
14957
+ const input2 = payload.value;
14958
+ const size = input2.size;
14957
14959
  if (size === def.size)
14958
14960
  return;
14959
14961
  const tooBig = size > def.size;
14960
14962
  payload.issues.push({
14961
- origin: getSizableOrigin(input),
14963
+ origin: getSizableOrigin(input2),
14962
14964
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
14963
14965
  inclusive: true,
14964
14966
  exact: true,
@@ -14981,17 +14983,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
14981
14983
  inst2._zod.bag.maximum = def.maximum;
14982
14984
  });
14983
14985
  inst._zod.check = (payload) => {
14984
- const input = payload.value;
14985
- const length = input.length;
14986
+ const input2 = payload.value;
14987
+ const length = input2.length;
14986
14988
  if (length <= def.maximum)
14987
14989
  return;
14988
- const origin = getLengthableOrigin(input);
14990
+ const origin = getLengthableOrigin(input2);
14989
14991
  payload.issues.push({
14990
14992
  origin,
14991
14993
  code: "too_big",
14992
14994
  maximum: def.maximum,
14993
14995
  inclusive: true,
14994
- input,
14996
+ input: input2,
14995
14997
  inst,
14996
14998
  continue: !def.abort
14997
14999
  });
@@ -15010,17 +15012,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
15010
15012
  inst2._zod.bag.minimum = def.minimum;
15011
15013
  });
15012
15014
  inst._zod.check = (payload) => {
15013
- const input = payload.value;
15014
- const length = input.length;
15015
+ const input2 = payload.value;
15016
+ const length = input2.length;
15015
15017
  if (length >= def.minimum)
15016
15018
  return;
15017
- const origin = getLengthableOrigin(input);
15019
+ const origin = getLengthableOrigin(input2);
15018
15020
  payload.issues.push({
15019
15021
  origin,
15020
15022
  code: "too_small",
15021
15023
  minimum: def.minimum,
15022
15024
  inclusive: true,
15023
- input,
15025
+ input: input2,
15024
15026
  inst,
15025
15027
  continue: !def.abort
15026
15028
  });
@@ -15040,11 +15042,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
15040
15042
  bag.length = def.length;
15041
15043
  });
15042
15044
  inst._zod.check = (payload) => {
15043
- const input = payload.value;
15044
- const length = input.length;
15045
+ const input2 = payload.value;
15046
+ const length = input2.length;
15045
15047
  if (length === def.length)
15046
15048
  return;
15047
- const origin = getLengthableOrigin(input);
15049
+ const origin = getLengthableOrigin(input2);
15048
15050
  const tooBig = length > def.length;
15049
15051
  payload.issues.push({
15050
15052
  origin,
@@ -15715,15 +15717,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
15715
15717
  payload.value = Number(payload.value);
15716
15718
  } catch (_) {
15717
15719
  }
15718
- const input = payload.value;
15719
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
15720
+ const input2 = payload.value;
15721
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
15720
15722
  return payload;
15721
15723
  }
15722
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
15724
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
15723
15725
  payload.issues.push({
15724
15726
  expected: "number",
15725
15727
  code: "invalid_type",
15726
- input,
15728
+ input: input2,
15727
15729
  inst,
15728
15730
  ...received ? { received } : {}
15729
15731
  });
@@ -15743,13 +15745,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
15743
15745
  payload.value = Boolean(payload.value);
15744
15746
  } catch (_) {
15745
15747
  }
15746
- const input = payload.value;
15747
- if (typeof input === "boolean")
15748
+ const input2 = payload.value;
15749
+ if (typeof input2 === "boolean")
15748
15750
  return payload;
15749
15751
  payload.issues.push({
15750
15752
  expected: "boolean",
15751
15753
  code: "invalid_type",
15752
- input,
15754
+ input: input2,
15753
15755
  inst
15754
15756
  });
15755
15757
  return payload;
@@ -15782,13 +15784,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
15782
15784
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
15783
15785
  $ZodType.init(inst, def);
15784
15786
  inst._zod.parse = (payload, _ctx) => {
15785
- const input = payload.value;
15786
- if (typeof input === "symbol")
15787
+ const input2 = payload.value;
15788
+ if (typeof input2 === "symbol")
15787
15789
  return payload;
15788
15790
  payload.issues.push({
15789
15791
  expected: "symbol",
15790
15792
  code: "invalid_type",
15791
- input,
15793
+ input: input2,
15792
15794
  inst
15793
15795
  });
15794
15796
  return payload;
@@ -15799,13 +15801,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
15799
15801
  inst._zod.pattern = _undefined;
15800
15802
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
15801
15803
  inst._zod.parse = (payload, _ctx) => {
15802
- const input = payload.value;
15803
- if (typeof input === "undefined")
15804
+ const input2 = payload.value;
15805
+ if (typeof input2 === "undefined")
15804
15806
  return payload;
15805
15807
  payload.issues.push({
15806
15808
  expected: "undefined",
15807
15809
  code: "invalid_type",
15808
- input,
15810
+ input: input2,
15809
15811
  inst
15810
15812
  });
15811
15813
  return payload;
@@ -15816,13 +15818,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
15816
15818
  inst._zod.pattern = _null;
15817
15819
  inst._zod.values = /* @__PURE__ */ new Set([null]);
15818
15820
  inst._zod.parse = (payload, _ctx) => {
15819
- const input = payload.value;
15820
- if (input === null)
15821
+ const input2 = payload.value;
15822
+ if (input2 === null)
15821
15823
  return payload;
15822
15824
  payload.issues.push({
15823
15825
  expected: "null",
15824
15826
  code: "invalid_type",
15825
- input,
15827
+ input: input2,
15826
15828
  inst
15827
15829
  });
15828
15830
  return payload;
@@ -15851,13 +15853,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
15851
15853
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
15852
15854
  $ZodType.init(inst, def);
15853
15855
  inst._zod.parse = (payload, _ctx) => {
15854
- const input = payload.value;
15855
- if (typeof input === "undefined")
15856
+ const input2 = payload.value;
15857
+ if (typeof input2 === "undefined")
15856
15858
  return payload;
15857
15859
  payload.issues.push({
15858
15860
  expected: "void",
15859
15861
  code: "invalid_type",
15860
- input,
15862
+ input: input2,
15861
15863
  inst
15862
15864
  });
15863
15865
  return payload;
@@ -15872,15 +15874,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
15872
15874
  } catch (_err) {
15873
15875
  }
15874
15876
  }
15875
- const input = payload.value;
15876
- const isDate = input instanceof Date;
15877
- const isValidDate = isDate && !Number.isNaN(input.getTime());
15877
+ const input2 = payload.value;
15878
+ const isDate = input2 instanceof Date;
15879
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
15878
15880
  if (isValidDate)
15879
15881
  return payload;
15880
15882
  payload.issues.push({
15881
15883
  expected: "date",
15882
15884
  code: "invalid_type",
15883
- input,
15885
+ input: input2,
15884
15886
  ...isDate ? { received: "Invalid Date" } : {},
15885
15887
  inst
15886
15888
  });
@@ -15896,20 +15898,20 @@ function handleArrayResult(result, final, index) {
15896
15898
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15897
15899
  $ZodType.init(inst, def);
15898
15900
  inst._zod.parse = (payload, ctx) => {
15899
- const input = payload.value;
15900
- if (!Array.isArray(input)) {
15901
+ const input2 = payload.value;
15902
+ if (!Array.isArray(input2)) {
15901
15903
  payload.issues.push({
15902
15904
  expected: "array",
15903
15905
  code: "invalid_type",
15904
- input,
15906
+ input: input2,
15905
15907
  inst
15906
15908
  });
15907
15909
  return payload;
15908
15910
  }
15909
- payload.value = Array(input.length);
15911
+ payload.value = Array(input2.length);
15910
15912
  const proms = [];
15911
- for (let i = 0; i < input.length; i++) {
15912
- const item = input[i];
15913
+ for (let i = 0; i < input2.length; i++) {
15914
+ const item = input2[i];
15913
15915
  const result = def.element._zod.run({
15914
15916
  value: item,
15915
15917
  issues: []
@@ -15926,8 +15928,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15926
15928
  return payload;
15927
15929
  };
15928
15930
  });
15929
- function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
15930
- const isPresent = key in input;
15931
+ function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
15932
+ const isPresent = key in input2;
15931
15933
  if (result.issues.length) {
15932
15934
  if (isOptionalIn && isOptionalOut && !isPresent) {
15933
15935
  return;
@@ -15969,14 +15971,14 @@ function normalizeDef(def) {
15969
15971
  optionalKeys: new Set(okeys)
15970
15972
  };
15971
15973
  }
15972
- function handleCatchall(proms, input, payload, ctx, def, inst) {
15974
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
15973
15975
  const unrecognized = [];
15974
15976
  const keySet = def.keySet;
15975
15977
  const _catchall = def.catchall._zod;
15976
15978
  const t9 = _catchall.def.type;
15977
15979
  const isOptionalIn = _catchall.optin === "optional";
15978
15980
  const isOptionalOut = _catchall.optout === "optional";
15979
- for (const key in input) {
15981
+ for (const key in input2) {
15980
15982
  if (key === "__proto__")
15981
15983
  continue;
15982
15984
  if (keySet.has(key))
@@ -15985,18 +15987,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
15985
15987
  unrecognized.push(key);
15986
15988
  continue;
15987
15989
  }
15988
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
15990
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
15989
15991
  if (r instanceof Promise) {
15990
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
15992
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
15991
15993
  } else {
15992
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
15994
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
15993
15995
  }
15994
15996
  }
15995
15997
  if (unrecognized.length) {
15996
15998
  payload.issues.push({
15997
15999
  code: "unrecognized_keys",
15998
16000
  keys: unrecognized,
15999
- input,
16001
+ input: input2,
16000
16002
  inst
16001
16003
  });
16002
16004
  }
@@ -16040,12 +16042,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16040
16042
  let value;
16041
16043
  inst._zod.parse = (payload, ctx) => {
16042
16044
  value ?? (value = _normalized.value);
16043
- const input = payload.value;
16044
- if (!isObject2(input)) {
16045
+ const input2 = payload.value;
16046
+ if (!isObject2(input2)) {
16045
16047
  payload.issues.push({
16046
16048
  expected: "object",
16047
16049
  code: "invalid_type",
16048
- input,
16050
+ input: input2,
16049
16051
  inst
16050
16052
  });
16051
16053
  return payload;
@@ -16057,17 +16059,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16057
16059
  const el3 = shape[key];
16058
16060
  const isOptionalIn = el3._zod.optin === "optional";
16059
16061
  const isOptionalOut = el3._zod.optout === "optional";
16060
- const r = el3._zod.run({ value: input[key], issues: [] }, ctx);
16062
+ const r = el3._zod.run({ value: input2[key], issues: [] }, ctx);
16061
16063
  if (r instanceof Promise) {
16062
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
16064
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
16063
16065
  } else {
16064
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
16066
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
16065
16067
  }
16066
16068
  }
16067
16069
  if (!catchall) {
16068
16070
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
16069
16071
  }
16070
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
16072
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
16071
16073
  };
16072
16074
  });
16073
16075
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -16176,12 +16178,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16176
16178
  let value;
16177
16179
  inst._zod.parse = (payload, ctx) => {
16178
16180
  value ?? (value = _normalized.value);
16179
- const input = payload.value;
16180
- if (!isObject2(input)) {
16181
+ const input2 = payload.value;
16182
+ if (!isObject2(input2)) {
16181
16183
  payload.issues.push({
16182
16184
  expected: "object",
16183
16185
  code: "invalid_type",
16184
- input,
16186
+ input: input2,
16185
16187
  inst
16186
16188
  });
16187
16189
  return payload;
@@ -16192,7 +16194,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16192
16194
  payload = fastpass(payload, ctx);
16193
16195
  if (!catchall)
16194
16196
  return payload;
16195
- return handleCatchall([], input, payload, ctx, value, inst);
16197
+ return handleCatchall([], input2, payload, ctx, value, inst);
16196
16198
  }
16197
16199
  return superParse(payload, ctx);
16198
16200
  };
@@ -16352,17 +16354,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16352
16354
  return map2;
16353
16355
  });
16354
16356
  inst._zod.parse = (payload, ctx) => {
16355
- const input = payload.value;
16356
- if (!isObject(input)) {
16357
+ const input2 = payload.value;
16358
+ if (!isObject(input2)) {
16357
16359
  payload.issues.push({
16358
16360
  code: "invalid_type",
16359
16361
  expected: "object",
16360
- input,
16362
+ input: input2,
16361
16363
  inst
16362
16364
  });
16363
16365
  return payload;
16364
16366
  }
16365
- const opt = disc.value.get(input?.[def.discriminator]);
16367
+ const opt = disc.value.get(input2?.[def.discriminator]);
16366
16368
  if (opt) {
16367
16369
  return opt._zod.run(payload, ctx);
16368
16370
  }
@@ -16375,7 +16377,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16375
16377
  note: "No matching discriminator",
16376
16378
  discriminator: def.discriminator,
16377
16379
  options: Array.from(disc.value.keys()),
16378
- input,
16380
+ input: input2,
16379
16381
  path: [def.discriminator],
16380
16382
  inst
16381
16383
  });
@@ -16385,9 +16387,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16385
16387
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
16386
16388
  $ZodType.init(inst, def);
16387
16389
  inst._zod.parse = (payload, ctx) => {
16388
- const input = payload.value;
16389
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
16390
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
16390
+ const input2 = payload.value;
16391
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
16392
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
16391
16393
  const async = left instanceof Promise || right instanceof Promise;
16392
16394
  if (async) {
16393
16395
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -16484,10 +16486,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16484
16486
  $ZodType.init(inst, def);
16485
16487
  const items = def.items;
16486
16488
  inst._zod.parse = (payload, ctx) => {
16487
- const input = payload.value;
16488
- if (!Array.isArray(input)) {
16489
+ const input2 = payload.value;
16490
+ if (!Array.isArray(input2)) {
16489
16491
  payload.issues.push({
16490
- input,
16492
+ input: input2,
16491
16493
  inst,
16492
16494
  expected: "tuple",
16493
16495
  code: "invalid_type"
@@ -16499,23 +16501,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16499
16501
  const optinStart = getTupleOptStart(items, "optin");
16500
16502
  const optoutStart = getTupleOptStart(items, "optout");
16501
16503
  if (!def.rest) {
16502
- if (input.length < optinStart) {
16504
+ if (input2.length < optinStart) {
16503
16505
  payload.issues.push({
16504
16506
  code: "too_small",
16505
16507
  minimum: optinStart,
16506
16508
  inclusive: true,
16507
- input,
16509
+ input: input2,
16508
16510
  inst,
16509
16511
  origin: "array"
16510
16512
  });
16511
16513
  return payload;
16512
16514
  }
16513
- if (input.length > items.length) {
16515
+ if (input2.length > items.length) {
16514
16516
  payload.issues.push({
16515
16517
  code: "too_big",
16516
16518
  maximum: items.length,
16517
16519
  inclusive: true,
16518
- input,
16520
+ input: input2,
16519
16521
  inst,
16520
16522
  origin: "array"
16521
16523
  });
@@ -16523,7 +16525,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16523
16525
  }
16524
16526
  const itemResults = new Array(items.length);
16525
16527
  for (let i = 0; i < items.length; i++) {
16526
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
16528
+ const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
16527
16529
  if (r instanceof Promise) {
16528
16530
  proms.push(r.then((rr3) => {
16529
16531
  itemResults[i] = rr3;
@@ -16534,7 +16536,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16534
16536
  }
16535
16537
  if (def.rest) {
16536
16538
  let i = items.length - 1;
16537
- const rest = input.slice(items.length);
16539
+ const rest = input2.slice(items.length);
16538
16540
  for (const el3 of rest) {
16539
16541
  i++;
16540
16542
  const result = def.rest._zod.run({ value: el3, issues: [] }, ctx);
@@ -16546,9 +16548,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16546
16548
  }
16547
16549
  }
16548
16550
  if (proms.length) {
16549
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
16551
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
16550
16552
  }
16551
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
16553
+ return handleTupleResults(itemResults, payload, items, input2, optoutStart);
16552
16554
  };
16553
16555
  });
16554
16556
  function getTupleOptStart(items, key) {
@@ -16564,10 +16566,10 @@ function handleTupleResult(result, final, index) {
16564
16566
  }
16565
16567
  final.value[index] = result.value;
16566
16568
  }
16567
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
16569
+ function handleTupleResults(itemResults, final, items, input2, optoutStart) {
16568
16570
  for (let i = 0; i < items.length; i++) {
16569
16571
  const r = itemResults[i];
16570
- const isPresent = i < input.length;
16572
+ const isPresent = i < input2.length;
16571
16573
  if (r.issues.length) {
16572
16574
  if (!isPresent && i >= optoutStart) {
16573
16575
  final.value.length = i;
@@ -16577,7 +16579,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
16577
16579
  }
16578
16580
  final.value[i] = r.value;
16579
16581
  }
16580
- for (let i = final.value.length - 1; i >= input.length; i--) {
16582
+ for (let i = final.value.length - 1; i >= input2.length; i--) {
16581
16583
  if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
16582
16584
  final.value.length = i;
16583
16585
  } else {
@@ -16589,12 +16591,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
16589
16591
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16590
16592
  $ZodType.init(inst, def);
16591
16593
  inst._zod.parse = (payload, ctx) => {
16592
- const input = payload.value;
16593
- if (!isPlainObject(input)) {
16594
+ const input2 = payload.value;
16595
+ if (!isPlainObject(input2)) {
16594
16596
  payload.issues.push({
16595
16597
  expected: "record",
16596
16598
  code: "invalid_type",
16597
- input,
16599
+ input: input2,
16598
16600
  inst
16599
16601
  });
16600
16602
  return payload;
@@ -16623,7 +16625,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16623
16625
  continue;
16624
16626
  }
16625
16627
  const outKey = keyResult.value;
16626
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16628
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16627
16629
  if (result instanceof Promise) {
16628
16630
  proms.push(result.then((result2) => {
16629
16631
  if (result2.issues.length) {
@@ -16640,7 +16642,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16640
16642
  }
16641
16643
  }
16642
16644
  let unrecognized;
16643
- for (const key in input) {
16645
+ for (const key in input2) {
16644
16646
  if (!recordKeys.has(key)) {
16645
16647
  unrecognized = unrecognized ?? [];
16646
16648
  unrecognized.push(key);
@@ -16649,17 +16651,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16649
16651
  if (unrecognized && unrecognized.length > 0) {
16650
16652
  payload.issues.push({
16651
16653
  code: "unrecognized_keys",
16652
- input,
16654
+ input: input2,
16653
16655
  inst,
16654
16656
  keys: unrecognized
16655
16657
  });
16656
16658
  }
16657
16659
  } else {
16658
16660
  payload.value = {};
16659
- for (const key of Reflect.ownKeys(input)) {
16661
+ for (const key of Reflect.ownKeys(input2)) {
16660
16662
  if (key === "__proto__")
16661
16663
  continue;
16662
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
16664
+ if (!Object.prototype.propertyIsEnumerable.call(input2, key))
16663
16665
  continue;
16664
16666
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
16665
16667
  if (keyResult instanceof Promise) {
@@ -16677,7 +16679,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16677
16679
  }
16678
16680
  if (keyResult.issues.length) {
16679
16681
  if (def.mode === "loose") {
16680
- payload.value[key] = input[key];
16682
+ payload.value[key] = input2[key];
16681
16683
  } else {
16682
16684
  payload.issues.push({
16683
16685
  code: "invalid_key",
@@ -16690,7 +16692,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16690
16692
  }
16691
16693
  continue;
16692
16694
  }
16693
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16695
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16694
16696
  if (result instanceof Promise) {
16695
16697
  proms.push(result.then((result2) => {
16696
16698
  if (result2.issues.length) {
@@ -16715,27 +16717,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16715
16717
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16716
16718
  $ZodType.init(inst, def);
16717
16719
  inst._zod.parse = (payload, ctx) => {
16718
- const input = payload.value;
16719
- if (!(input instanceof Map)) {
16720
+ const input2 = payload.value;
16721
+ if (!(input2 instanceof Map)) {
16720
16722
  payload.issues.push({
16721
16723
  expected: "map",
16722
16724
  code: "invalid_type",
16723
- input,
16725
+ input: input2,
16724
16726
  inst
16725
16727
  });
16726
16728
  return payload;
16727
16729
  }
16728
16730
  const proms = [];
16729
16731
  payload.value = /* @__PURE__ */ new Map();
16730
- for (const [key, value] of input) {
16732
+ for (const [key, value] of input2) {
16731
16733
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
16732
16734
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
16733
16735
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
16734
16736
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
16735
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
16737
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
16736
16738
  }));
16737
16739
  } else {
16738
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
16740
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
16739
16741
  }
16740
16742
  }
16741
16743
  if (proms.length)
@@ -16743,7 +16745,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16743
16745
  return payload;
16744
16746
  };
16745
16747
  });
16746
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16748
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
16747
16749
  if (keyResult.issues.length) {
16748
16750
  if (propertyKeyTypes.has(typeof key)) {
16749
16751
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -16751,7 +16753,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16751
16753
  final.issues.push({
16752
16754
  code: "invalid_key",
16753
16755
  origin: "map",
16754
- input,
16756
+ input: input2,
16755
16757
  inst,
16756
16758
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
16757
16759
  });
@@ -16764,7 +16766,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16764
16766
  final.issues.push({
16765
16767
  origin: "map",
16766
16768
  code: "invalid_element",
16767
- input,
16769
+ input: input2,
16768
16770
  inst,
16769
16771
  key,
16770
16772
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -16776,10 +16778,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16776
16778
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
16777
16779
  $ZodType.init(inst, def);
16778
16780
  inst._zod.parse = (payload, ctx) => {
16779
- const input = payload.value;
16780
- if (!(input instanceof Set)) {
16781
+ const input2 = payload.value;
16782
+ if (!(input2 instanceof Set)) {
16781
16783
  payload.issues.push({
16782
- input,
16784
+ input: input2,
16783
16785
  inst,
16784
16786
  expected: "set",
16785
16787
  code: "invalid_type"
@@ -16788,7 +16790,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
16788
16790
  }
16789
16791
  const proms = [];
16790
16792
  payload.value = /* @__PURE__ */ new Set();
16791
- for (const item of input) {
16793
+ for (const item of input2) {
16792
16794
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
16793
16795
  if (result instanceof Promise) {
16794
16796
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -16813,14 +16815,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
16813
16815
  inst._zod.values = valuesSet;
16814
16816
  inst._zod.pattern = new RegExp(`^(${values.filter((k3) => propertyKeyTypes.has(typeof k3)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
16815
16817
  inst._zod.parse = (payload, _ctx) => {
16816
- const input = payload.value;
16817
- if (valuesSet.has(input)) {
16818
+ const input2 = payload.value;
16819
+ if (valuesSet.has(input2)) {
16818
16820
  return payload;
16819
16821
  }
16820
16822
  payload.issues.push({
16821
16823
  code: "invalid_value",
16822
16824
  values,
16823
- input,
16825
+ input: input2,
16824
16826
  inst
16825
16827
  });
16826
16828
  return payload;
@@ -16835,14 +16837,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
16835
16837
  inst._zod.values = values;
16836
16838
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
16837
16839
  inst._zod.parse = (payload, _ctx) => {
16838
- const input = payload.value;
16839
- if (values.has(input)) {
16840
+ const input2 = payload.value;
16841
+ if (values.has(input2)) {
16840
16842
  return payload;
16841
16843
  }
16842
16844
  payload.issues.push({
16843
16845
  code: "invalid_value",
16844
16846
  values: def.values,
16845
- input,
16847
+ input: input2,
16846
16848
  inst
16847
16849
  });
16848
16850
  return payload;
@@ -16851,13 +16853,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
16851
16853
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
16852
16854
  $ZodType.init(inst, def);
16853
16855
  inst._zod.parse = (payload, _ctx) => {
16854
- const input = payload.value;
16855
- if (input instanceof File)
16856
+ const input2 = payload.value;
16857
+ if (input2 instanceof File)
16856
16858
  return payload;
16857
16859
  payload.issues.push({
16858
16860
  expected: "file",
16859
16861
  code: "invalid_type",
16860
- input,
16862
+ input: input2,
16861
16863
  inst
16862
16864
  });
16863
16865
  return payload;
@@ -16887,8 +16889,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
16887
16889
  return payload;
16888
16890
  };
16889
16891
  });
16890
- function handleOptionalResult(result, input) {
16891
- if (input === void 0 && (result.issues.length || result.fallback)) {
16892
+ function handleOptionalResult(result, input2) {
16893
+ if (input2 === void 0 && (result.issues.length || result.fallback)) {
16892
16894
  return { issues: [], value: void 0 };
16893
16895
  }
16894
16896
  return result;
@@ -16906,11 +16908,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
16906
16908
  });
16907
16909
  inst._zod.parse = (payload, ctx) => {
16908
16910
  if (def.innerType._zod.optin === "optional") {
16909
- const input = payload.value;
16911
+ const input2 = payload.value;
16910
16912
  const result = def.innerType._zod.run(payload, ctx);
16911
16913
  if (result instanceof Promise)
16912
- return result.then((r) => handleOptionalResult(r, input));
16913
- return handleOptionalResult(result, input);
16914
+ return result.then((r) => handleOptionalResult(r, input2));
16915
+ return handleOptionalResult(result, input2);
16914
16916
  }
16915
16917
  if (payload.value === void 0) {
16916
16918
  return payload;
@@ -17335,20 +17337,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
17335
17337
  return payload;
17336
17338
  };
17337
17339
  inst._zod.check = (payload) => {
17338
- const input = payload.value;
17339
- const r = def.fn(input);
17340
+ const input2 = payload.value;
17341
+ const r = def.fn(input2);
17340
17342
  if (r instanceof Promise) {
17341
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
17343
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
17342
17344
  }
17343
- handleRefineResult(r, payload, input, inst);
17345
+ handleRefineResult(r, payload, input2, inst);
17344
17346
  return;
17345
17347
  };
17346
17348
  });
17347
- function handleRefineResult(result, payload, input, inst) {
17349
+ function handleRefineResult(result, payload, input2, inst) {
17348
17350
  if (!result) {
17349
17351
  const _iss = {
17350
17352
  code: "custom",
17351
- input,
17353
+ input: input2,
17352
17354
  inst,
17353
17355
  // incorporates params.error into issue reporting
17354
17356
  path: [...inst._zod.def.path ?? []],
@@ -20635,8 +20637,8 @@ function ko_default() {
20635
20637
  }
20636
20638
 
20637
20639
  // ../../../node_modules/zod/v4/locales/lt.js
20638
- var capitalizeFirstCharacter = (text) => {
20639
- return text.charAt(0).toUpperCase() + text.slice(1);
20640
+ var capitalizeFirstCharacter = (text2) => {
20641
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
20640
20642
  };
20641
20643
  function getUnitTypeFromNumber(number4) {
20642
20644
  const abs = Math.abs(number4);
@@ -24036,23 +24038,23 @@ function _overwrite(tx) {
24036
24038
  }
24037
24039
  // @__NO_SIDE_EFFECTS__
24038
24040
  function _normalize(form) {
24039
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
24041
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
24040
24042
  }
24041
24043
  // @__NO_SIDE_EFFECTS__
24042
24044
  function _trim() {
24043
- return /* @__PURE__ */ _overwrite((input) => input.trim());
24045
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
24044
24046
  }
24045
24047
  // @__NO_SIDE_EFFECTS__
24046
24048
  function _toLowerCase() {
24047
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
24049
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
24048
24050
  }
24049
24051
  // @__NO_SIDE_EFFECTS__
24050
24052
  function _toUpperCase() {
24051
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
24053
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
24052
24054
  }
24053
24055
  // @__NO_SIDE_EFFECTS__
24054
24056
  function _slugify() {
24055
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
24057
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
24056
24058
  }
24057
24059
  // @__NO_SIDE_EFFECTS__
24058
24060
  function _array(Class2, element, params) {
@@ -24357,8 +24359,8 @@ function _stringbool(Classes, _params) {
24357
24359
  type: "pipe",
24358
24360
  in: stringSchema,
24359
24361
  out: booleanSchema,
24360
- transform: ((input, payload) => {
24361
- let data = input;
24362
+ transform: ((input2, payload) => {
24363
+ let data = input2;
24362
24364
  if (params.case !== "sensitive")
24363
24365
  data = data.toLowerCase();
24364
24366
  if (truthySet.has(data)) {
@@ -24377,8 +24379,8 @@ function _stringbool(Classes, _params) {
24377
24379
  return {};
24378
24380
  }
24379
24381
  }),
24380
- reverseTransform: ((input, _payload) => {
24381
- if (input === true) {
24382
+ reverseTransform: ((input2, _payload) => {
24383
+ if (input2 === true) {
24382
24384
  return truthyArray[0] || "true";
24383
24385
  } else {
24384
24386
  return falsyArray[0] || "false";
@@ -25274,9 +25276,9 @@ var allProcessors = {
25274
25276
  optional: optionalProcessor,
25275
25277
  lazy: lazyProcessor
25276
25278
  };
25277
- function toJSONSchema(input, params) {
25278
- if ("_idmap" in input) {
25279
- const registry2 = input;
25279
+ function toJSONSchema(input2, params) {
25280
+ if ("_idmap" in input2) {
25281
+ const registry2 = input2;
25280
25282
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
25281
25283
  const defs = {};
25282
25284
  for (const entry of registry2._idmap.entries()) {
@@ -25304,9 +25306,9 @@ function toJSONSchema(input, params) {
25304
25306
  return { schemas };
25305
25307
  }
25306
25308
  const ctx = initializeContext({ ...params, processors: allProcessors });
25307
- process2(input, ctx);
25308
- extractDefs(ctx, input);
25309
- return finalize(ctx, input);
25309
+ process2(input2, ctx);
25310
+ extractDefs(ctx, input2);
25311
+ return finalize(ctx, input2);
25310
25312
  }
25311
25313
 
25312
25314
  // ../../../node_modules/zod/v4/core/json-schema-generator.js
@@ -27583,7 +27585,7 @@ var codexhostErrorSchema = external_exports.strictObject({
27583
27585
 
27584
27586
  // ../../shared-contracts/dist/harness-presentation.js
27585
27587
  var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
27586
- var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
27588
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
27587
27589
  var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
27588
27590
  label: displayText(256).optional(),
27589
27591
  description: displayText(1024).optional()
@@ -27672,7 +27674,7 @@ var usageMeasurementsSchema = external_exports.object({
27672
27674
  outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
27673
27675
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
27674
27676
  }).strict();
27675
- var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
27677
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
27676
27678
  var composerIndicatorsSchema = external_exports.array(external_exports.object({
27677
27679
  kind: external_exports.literal("countdown"),
27678
27680
  id: external_exports.string().min(1).max(64),
@@ -28055,6 +28057,8 @@ var externalThreadInspectionSchema = external_exports.object({
28055
28057
  effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
28056
28058
  availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
28057
28059
  effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
28060
+ /** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
28061
+ catalog: harnessModelCatalogSchema.optional(),
28058
28062
  history: harnessHistoryCapabilitiesSchema,
28059
28063
  usage: threadUsageSnapshotSchema.optional(),
28060
28064
  locked: external_exports.literal(true)
@@ -28113,9 +28117,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
28113
28117
  }).strict();
28114
28118
  var threadSteeringContextSchema = external_exports.object({
28115
28119
  kind: external_exports.literal("application"),
28116
- value: external_exports.string().transform((text, context) => {
28120
+ value: external_exports.string().transform((text2, context) => {
28117
28121
  try {
28118
- return JSON.parse(text);
28122
+ return JSON.parse(text2);
28119
28123
  } catch {
28120
28124
  context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
28121
28125
  return external_exports.NEVER;
@@ -28250,8 +28254,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
28250
28254
  const { username, password } = new URL(value);
28251
28255
  return !username && !password && !/[\\\s]/u.test(value);
28252
28256
  }, "URL must not contain credentials, backslashes, or whitespace");
28253
- function localizedText(text) {
28254
- return external_exports.strictObject({ en: text, "zh-CN": text });
28257
+ function localizedText(text2) {
28258
+ return external_exports.strictObject({ en: text2, "zh-CN": text2 });
28255
28259
  }
28256
28260
  var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
28257
28261
  var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
@@ -28368,8 +28372,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
28368
28372
  function isGitHubDesktopExtensionZipballUrl(url2) {
28369
28373
  return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
28370
28374
  }
28371
- var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input) => {
28372
- const url2 = new URL(input);
28375
+ var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
28376
+ const url2 = new URL(input2);
28373
28377
  return /\.zip$/iu.test(url2.pathname) || isGitHubDesktopExtensionZipballUrl(url2) || url2.origin === "https://github.com" && /^\/[\w-]+\/[\w.-]+\/zipball(?:\/.+)?\/?$/u.test(url2.pathname) || url2.origin === "https://codeload.github.com" && /^\/[\w-]+\/[\w.-]+\/(?:zip|zipball|legacy\.zip)\/.+$/u.test(url2.pathname);
28374
28378
  }, "Expected a .zip download URL or a GitHub zipball URL");
28375
28379
  var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
@@ -28720,6 +28724,8 @@ var CLIENT_CHANNEL_METHODS = [
28720
28724
  "codexhost/workspace/read",
28721
28725
  "codexhost/thread/tree/read",
28722
28726
  "codexhost/thread/pins/list",
28727
+ "codexhost/thread/sections/list",
28728
+ "codexhost/thread/sections/move",
28723
28729
  "codexhost/thread/pins/set",
28724
28730
  "codexhost/harness/plugins/list",
28725
28731
  "codexhost/harness/inspect",
@@ -28758,8 +28764,21 @@ var CLIENT_CHANNEL_METHODS = [
28758
28764
  "codexhost/update/check",
28759
28765
  "codexhost/update/start",
28760
28766
  "codexhost/update/status",
28767
+ "codexhost/announcement/get",
28768
+ "codexhost/announcement/acknowledge",
28761
28769
  "codexhost/sessions/loaded/list"
28762
28770
  ];
28771
+ var clientThreadSectionsSchema = external_exports.object({
28772
+ sections: external_exports.array(external_exports.object({
28773
+ id: external_exports.string().min(1),
28774
+ name: external_exports.string().min(1),
28775
+ threads: external_exports.array(jsonObjectSchema)
28776
+ }).strict())
28777
+ }).strict();
28778
+ var clientThreadSectionMoveSchema = external_exports.object({
28779
+ threadId: external_exports.string().min(1).max(1024),
28780
+ sectionId: external_exports.string().min(1).max(1024).nullable()
28781
+ }).strict();
28763
28782
  var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
28764
28783
  var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
28765
28784
  var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
@@ -29301,8 +29320,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
29301
29320
  operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
29302
29321
  initializeOnly: external_exports.boolean().optional(),
29303
29322
  expectedRevision: external_exports.number().int().nonnegative().optional()
29304
- }).superRefine((input, ctx) => {
29305
- for (const operation of input.operations) {
29323
+ }).superRefine((input2, ctx) => {
29324
+ for (const operation of input2.operations) {
29306
29325
  if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
29307
29326
  ctx.addIssue({
29308
29327
  code: "custom",
@@ -29704,13 +29723,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
29704
29723
  // ../../shared-contracts/dist/harness-installation.js
29705
29724
  var harnessInstallationParamsSchema = external_exports.object({
29706
29725
  harnessId: harnessIdSchema,
29707
- action: external_exports.enum(["check", "update", "install"])
29708
- }).strict();
29726
+ action: external_exports.enum(["check", "update", "install"]),
29727
+ confirmedVersion: external_exports.string().min(1).max(128).optional()
29728
+ }).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
29709
29729
  var harnessInstallationStateSchema = external_exports.object({
29710
29730
  currentVersion: external_exports.string().min(1).max(128),
29711
29731
  latestVersion: external_exports.string().min(1).max(128),
29712
29732
  updateAvailable: external_exports.boolean(),
29713
29733
  canUpdate: external_exports.boolean(),
29734
+ /** Present when the Adapter has a verified list and the available target is outside it. */
29735
+ latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
29736
+ /** Update preflight stopped before running the installer; latestVersion needs confirmation. */
29737
+ confirmationRequired: external_exports.literal(true).optional(),
29714
29738
  /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
29715
29739
  versionKind: external_exports.enum(["cli", "application"]).optional(),
29716
29740
  /** Official download opened by the user; does not imply an automatic installation. */
@@ -30040,6 +30064,38 @@ var updateStatusResultSchema = external_exports.strictObject({
30040
30064
  status: updateStatusSchema.nullable()
30041
30065
  });
30042
30066
 
30067
+ // ../../shared-contracts/dist/release-announcement.js
30068
+ var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
30069
+ var releaseAnnouncementThemeSchema = external_exports.strictObject({
30070
+ icon: external_exports.string().min(1).max(16).optional(),
30071
+ title: external_exports.string().min(1).max(120),
30072
+ body: external_exports.string().min(1).max(1200),
30073
+ contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
30074
+ });
30075
+ var releaseAnnouncementContentSchema = external_exports.strictObject({
30076
+ summary: external_exports.string().min(1).max(600).optional(),
30077
+ themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
30078
+ });
30079
+ var releaseAnnouncementSchema = external_exports.strictObject({
30080
+ version: updateSemanticVersionSchema,
30081
+ publishedAt: external_exports.iso.datetime(),
30082
+ url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
30083
+ zh: releaseAnnouncementContentSchema.nullable(),
30084
+ en: releaseAnnouncementContentSchema.nullable()
30085
+ }).refine((value) => value.zh !== null || value.en !== null, {
30086
+ message: "an announcement needs at least one language"
30087
+ });
30088
+ var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
30089
+ manual: external_exports.boolean().optional()
30090
+ });
30091
+ var releaseAnnouncementGetResultSchema = external_exports.strictObject({
30092
+ announcement: releaseAnnouncementSchema.nullable(),
30093
+ unread: external_exports.boolean()
30094
+ });
30095
+ var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
30096
+ version: updateSemanticVersionSchema
30097
+ });
30098
+
30043
30099
  // ../../shared-contracts/dist/thread-watch-notice.js
30044
30100
  var THREAD_WATCH_NOTICE_OUTCOMES = [
30045
30101
  "completed",
@@ -30087,17 +30143,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
30087
30143
 
30088
30144
  // ../../shared-contracts/dist/remote-sessions.js
30089
30145
  var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
30090
- var identity = external_exports.string().min(1).max(1024);
30146
+ var REMOTE_IDENTITY_MAX_LENGTH = 1024;
30147
+ var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
30091
30148
  var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
30092
30149
  var thread = { ...target, threadId: identity };
30150
+ var text = external_exports.string().min(1).max(8e3);
30151
+ var input = { text, requestId: identity };
30152
+ var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
30153
+ external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
30154
+ external_exports.object({
30155
+ accepted: external_exports.literal(false),
30156
+ code: external_exports.enum([
30157
+ "remote/queue-unavailable",
30158
+ "remote/steer-unavailable",
30159
+ "remote/turn-changed",
30160
+ "remote/send-rejected",
30161
+ "session/queue-item-not-found",
30162
+ "session/queue-item-starting"
30163
+ ]),
30164
+ message: external_exports.string()
30165
+ })
30166
+ ]);
30167
+ var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
30168
+ external_exports.object({ available: external_exports.literal(false) }),
30169
+ external_exports.object({
30170
+ available: external_exports.literal(true),
30171
+ items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
30172
+ })
30173
+ ]);
30093
30174
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
30094
30175
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
30176
+ external_exports.strictObject({
30177
+ kind: external_exports.literal("create"),
30178
+ ...target,
30179
+ cwd: external_exports.string().min(1).max(8192),
30180
+ epoch: identity
30181
+ }),
30182
+ external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
30183
+ external_exports.strictObject({
30184
+ kind: external_exports.literal("inspectHarness"),
30185
+ ...target,
30186
+ epoch: identity,
30187
+ cwd: external_exports.string().min(1).max(8192),
30188
+ harnessId: identity
30189
+ }),
30190
+ external_exports.strictObject({
30191
+ kind: external_exports.literal("startSelected"),
30192
+ ...target,
30193
+ epoch: identity,
30194
+ cwd: external_exports.string().min(1).max(8192),
30195
+ harnessId: identity,
30196
+ model: external_exports.string().min(1).max(4096),
30197
+ serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
30198
+ reasoningEffort: identity.optional()
30199
+ }),
30095
30200
  external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
30096
30201
  external_exports.strictObject({
30097
30202
  kind: external_exports.literal("list"),
30098
30203
  ...target,
30099
30204
  cursor: external_exports.string().nullable(),
30100
- archived: external_exports.boolean()
30205
+ archived: external_exports.boolean(),
30206
+ includeLoaded: external_exports.literal(true).optional()
30101
30207
  }),
30102
30208
  external_exports.strictObject({
30103
30209
  kind: external_exports.literal("read"),
@@ -30127,9 +30233,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
30127
30233
  kind: external_exports.literal("prompt"),
30128
30234
  ...thread,
30129
30235
  epoch: identity,
30130
- text: external_exports.string().min(1).max(8e3),
30236
+ text,
30131
30237
  requestId: identity.optional()
30132
30238
  }),
30239
+ external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
30240
+ external_exports.strictObject({
30241
+ kind: external_exports.literal("delivery"),
30242
+ ...thread,
30243
+ epoch: identity,
30244
+ action: external_exports.discriminatedUnion("kind", [
30245
+ external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
30246
+ external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
30247
+ external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
30248
+ external_exports.strictObject({
30249
+ kind: external_exports.literal("start"),
30250
+ itemId: identity,
30251
+ onlyIfHead: external_exports.literal(true).optional()
30252
+ })
30253
+ ])
30254
+ }),
30133
30255
  external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
30134
30256
  external_exports.strictObject({
30135
30257
  kind: external_exports.literal("rename"),
@@ -30299,14 +30421,14 @@ function discoverySpec(variant) {
30299
30421
  }
30300
30422
  var qoderDiscoverySpec = discoverySpec("global");
30301
30423
  var qoderCnDiscoverySpec = discoverySpec("cn");
30302
- function resolveQoderExecutable(input = {}, dependencies = {}) {
30303
- const platform = input.platform ?? process.platform;
30304
- const cn3 = input.variant === "cn";
30424
+ function resolveQoderExecutable(input2 = {}, dependencies = {}) {
30425
+ const platform = input2.platform ?? process.platform;
30426
+ const cn3 = input2.variant === "cn";
30305
30427
  const spec = cn3 ? qoderCnDiscoverySpec : qoderDiscoverySpec;
30306
30428
  const resolution = resolveHarnessExecutable(spec, {
30307
- ...input.command ? { command: input.command } : {},
30308
- environment: input.environment ?? process.env,
30309
- ...input.homeDirectory ? { homeDirectory: input.homeDirectory } : {},
30429
+ ...input2.command ? { command: input2.command } : {},
30430
+ environment: input2.environment ?? process.env,
30431
+ ...input2.homeDirectory ? { homeDirectory: input2.homeDirectory } : {},
30310
30432
  platform
30311
30433
  }, dependencies);
30312
30434
  if (!resolution)
@@ -30506,8 +30628,8 @@ function mapQoderException(error51) {
30506
30628
 
30507
30629
  // dist/qoder-login-check.js
30508
30630
  import { execFile as execFile2 } from "node:child_process";
30509
- function qoderLoginRequired(text) {
30510
- return /\bnot logged in\b|\bauthentication (?:required|expired)\b/i.test(text);
30631
+ function qoderLoginRequired(text2) {
30632
+ return /\bnot logged in\b|\bauthentication (?:required|expired)\b/i.test(text2);
30511
30633
  }
30512
30634
  function checkQoderLogin(executable, environment, cwd) {
30513
30635
  return new Promise((resolve) => {
@@ -30991,8 +31113,8 @@ function parseQoderCommandInvocation(command, catalog = QODER_FALLBACK_COMMAND_C
30991
31113
  };
30992
31114
  }
30993
31115
  }
30994
- const text = typeof args?.text === "string" ? args.text.trim() : "";
30995
- const prompt = text.length > 0 ? `${descriptor.invocation} ${text}` : descriptor.invocation;
31116
+ const text2 = typeof args?.text === "string" ? args.text.trim() : "";
31117
+ const prompt = text2.length > 0 ? `${descriptor.invocation} ${text2}` : descriptor.invocation;
30996
31118
  return {
30997
31119
  ok: true,
30998
31120
  value: {
@@ -31006,9 +31128,9 @@ function parseQoderCommandInvocation(command, catalog = QODER_FALLBACK_COMMAND_C
31006
31128
  var qoderHarnessId = harnessIdSchema.parse("qoder");
31007
31129
  function extractUserText(message) {
31008
31130
  const raw = message.message?.content;
31009
- let text = "";
31131
+ let text2 = "";
31010
31132
  if (typeof raw === "string") {
31011
- text = raw;
31133
+ text2 = raw;
31012
31134
  } else if (Array.isArray(raw)) {
31013
31135
  const parts = [];
31014
31136
  for (const block of raw) {
@@ -31019,18 +31141,18 @@ function extractUserText(message) {
31019
31141
  }
31020
31142
  }
31021
31143
  }
31022
- text = parts.join("\n");
31144
+ text2 = parts.join("\n");
31023
31145
  }
31024
- text = text.replace(/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/gu, "").trim();
31025
- const cmdNameMatch = /<command-name>\s*(\/[^\s<]+)\s*<\/command-name>/u.exec(text);
31146
+ text2 = text2.replace(/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/gu, "").trim();
31147
+ const cmdNameMatch = /<command-name>\s*(\/[^\s<]+)\s*<\/command-name>/u.exec(text2);
31026
31148
  if (cmdNameMatch?.[1]) {
31027
31149
  return cmdNameMatch[1];
31028
31150
  }
31029
- const cmdMsgMatch = /<command-message>([\s\S]*?)<\/command-message>/u.exec(text);
31151
+ const cmdMsgMatch = /<command-message>([\s\S]*?)<\/command-message>/u.exec(text2);
31030
31152
  if (cmdMsgMatch?.[1]) {
31031
31153
  return cmdMsgMatch[1].trim();
31032
31154
  }
31033
- return text;
31155
+ return text2;
31034
31156
  }
31035
31157
  function isHumanUser(message) {
31036
31158
  if (message.type !== "user")
@@ -31045,8 +31167,8 @@ function isHumanUser(message) {
31045
31167
  return false;
31046
31168
  }
31047
31169
  }
31048
- const text = extractUserText(message);
31049
- return text.trim().length > 0;
31170
+ const text2 = extractUserText(message);
31171
+ return text2.trim().length > 0;
31050
31172
  }
31051
31173
  function collectToolResults(messages) {
31052
31174
  const results = /* @__PURE__ */ new Map();
@@ -31108,7 +31230,7 @@ function mapQoderSnapshot(messages, sessionId, harnessId = qoderHarnessId) {
31108
31230
  formatVersion: 1
31109
31231
  });
31110
31232
  const userText = extractUserText(user);
31111
- const input = userText.length > 0 ? [{ type: "text", text: userText }] : [];
31233
+ const input2 = userText.length > 0 ? [{ type: "text", text: userText }] : [];
31112
31234
  const hasError = turnMessages.some((m) => m.type === "assistant" && (m.isApiErrorMessage || typeof m.message === "object" && m.message !== null && Boolean(m.message.error)));
31113
31235
  const lastAssistant = checkpointMessage?.message;
31114
31236
  const hasIncompleteTool = turnMessages.some((message) => {
@@ -31243,7 +31365,7 @@ function mapQoderSnapshot(messages, sessionId, harnessId = qoderHarnessId) {
31243
31365
  turns.push({
31244
31366
  nativeTurnRef,
31245
31367
  ...checkpoint ? { checkpoint } : {},
31246
- input,
31368
+ input: input2,
31247
31369
  items,
31248
31370
  outcome
31249
31371
  });
@@ -32239,41 +32361,41 @@ var ZodType2 = class {
32239
32361
  get description() {
32240
32362
  return this._def.description;
32241
32363
  }
32242
- _getType(input) {
32243
- return getParsedType2(input.data);
32364
+ _getType(input2) {
32365
+ return getParsedType2(input2.data);
32244
32366
  }
32245
- _getOrReturnCtx(input, ctx) {
32367
+ _getOrReturnCtx(input2, ctx) {
32246
32368
  return ctx || {
32247
- common: input.parent.common,
32248
- data: input.data,
32249
- parsedType: getParsedType2(input.data),
32369
+ common: input2.parent.common,
32370
+ data: input2.data,
32371
+ parsedType: getParsedType2(input2.data),
32250
32372
  schemaErrorMap: this._def.errorMap,
32251
- path: input.path,
32252
- parent: input.parent
32373
+ path: input2.path,
32374
+ parent: input2.parent
32253
32375
  };
32254
32376
  }
32255
- _processInputParams(input) {
32377
+ _processInputParams(input2) {
32256
32378
  return {
32257
32379
  status: new ParseStatus(),
32258
32380
  ctx: {
32259
- common: input.parent.common,
32260
- data: input.data,
32261
- parsedType: getParsedType2(input.data),
32381
+ common: input2.parent.common,
32382
+ data: input2.data,
32383
+ parsedType: getParsedType2(input2.data),
32262
32384
  schemaErrorMap: this._def.errorMap,
32263
- path: input.path,
32264
- parent: input.parent
32385
+ path: input2.path,
32386
+ parent: input2.parent
32265
32387
  }
32266
32388
  };
32267
32389
  }
32268
- _parseSync(input) {
32269
- const result = this._parse(input);
32390
+ _parseSync(input2) {
32391
+ const result = this._parse(input2);
32270
32392
  if (isAsync(result)) {
32271
32393
  throw new Error("Synchronous parse encountered promise.");
32272
32394
  }
32273
32395
  return result;
32274
32396
  }
32275
- _parseAsync(input) {
32276
- const result = this._parse(input);
32397
+ _parseAsync(input2) {
32398
+ const result = this._parse(input2);
32277
32399
  return Promise.resolve(result);
32278
32400
  }
32279
32401
  parse(data, params) {
@@ -32599,13 +32721,13 @@ function isValidCidr(ip, version2) {
32599
32721
  return false;
32600
32722
  }
32601
32723
  var ZodString2 = class _ZodString2 extends ZodType2 {
32602
- _parse(input) {
32724
+ _parse(input2) {
32603
32725
  if (this._def.coerce) {
32604
- input.data = String(input.data);
32726
+ input2.data = String(input2.data);
32605
32727
  }
32606
- const parsedType2 = this._getType(input);
32728
+ const parsedType2 = this._getType(input2);
32607
32729
  if (parsedType2 !== ZodParsedType.string) {
32608
- const ctx2 = this._getOrReturnCtx(input);
32730
+ const ctx2 = this._getOrReturnCtx(input2);
32609
32731
  addIssueToContext(ctx2, {
32610
32732
  code: ZodIssueCode2.invalid_type,
32611
32733
  expected: ZodParsedType.string,
@@ -32617,8 +32739,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32617
32739
  let ctx = void 0;
32618
32740
  for (const check2 of this._def.checks) {
32619
32741
  if (check2.kind === "min") {
32620
- if (input.data.length < check2.value) {
32621
- ctx = this._getOrReturnCtx(input, ctx);
32742
+ if (input2.data.length < check2.value) {
32743
+ ctx = this._getOrReturnCtx(input2, ctx);
32622
32744
  addIssueToContext(ctx, {
32623
32745
  code: ZodIssueCode2.too_small,
32624
32746
  minimum: check2.value,
@@ -32630,8 +32752,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32630
32752
  status.dirty();
32631
32753
  }
32632
32754
  } else if (check2.kind === "max") {
32633
- if (input.data.length > check2.value) {
32634
- ctx = this._getOrReturnCtx(input, ctx);
32755
+ if (input2.data.length > check2.value) {
32756
+ ctx = this._getOrReturnCtx(input2, ctx);
32635
32757
  addIssueToContext(ctx, {
32636
32758
  code: ZodIssueCode2.too_big,
32637
32759
  maximum: check2.value,
@@ -32643,10 +32765,10 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32643
32765
  status.dirty();
32644
32766
  }
32645
32767
  } else if (check2.kind === "length") {
32646
- const tooBig = input.data.length > check2.value;
32647
- const tooSmall = input.data.length < check2.value;
32768
+ const tooBig = input2.data.length > check2.value;
32769
+ const tooSmall = input2.data.length < check2.value;
32648
32770
  if (tooBig || tooSmall) {
32649
- ctx = this._getOrReturnCtx(input, ctx);
32771
+ ctx = this._getOrReturnCtx(input2, ctx);
32650
32772
  if (tooBig) {
32651
32773
  addIssueToContext(ctx, {
32652
32774
  code: ZodIssueCode2.too_big,
@@ -32669,8 +32791,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32669
32791
  status.dirty();
32670
32792
  }
32671
32793
  } else if (check2.kind === "email") {
32672
- if (!emailRegex.test(input.data)) {
32673
- ctx = this._getOrReturnCtx(input, ctx);
32794
+ if (!emailRegex.test(input2.data)) {
32795
+ ctx = this._getOrReturnCtx(input2, ctx);
32674
32796
  addIssueToContext(ctx, {
32675
32797
  validation: "email",
32676
32798
  code: ZodIssueCode2.invalid_string,
@@ -32682,8 +32804,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32682
32804
  if (!emojiRegex) {
32683
32805
  emojiRegex = new RegExp(_emojiRegex, "u");
32684
32806
  }
32685
- if (!emojiRegex.test(input.data)) {
32686
- ctx = this._getOrReturnCtx(input, ctx);
32807
+ if (!emojiRegex.test(input2.data)) {
32808
+ ctx = this._getOrReturnCtx(input2, ctx);
32687
32809
  addIssueToContext(ctx, {
32688
32810
  validation: "emoji",
32689
32811
  code: ZodIssueCode2.invalid_string,
@@ -32692,8 +32814,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32692
32814
  status.dirty();
32693
32815
  }
32694
32816
  } else if (check2.kind === "uuid") {
32695
- if (!uuidRegex.test(input.data)) {
32696
- ctx = this._getOrReturnCtx(input, ctx);
32817
+ if (!uuidRegex.test(input2.data)) {
32818
+ ctx = this._getOrReturnCtx(input2, ctx);
32697
32819
  addIssueToContext(ctx, {
32698
32820
  validation: "uuid",
32699
32821
  code: ZodIssueCode2.invalid_string,
@@ -32702,8 +32824,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32702
32824
  status.dirty();
32703
32825
  }
32704
32826
  } else if (check2.kind === "nanoid") {
32705
- if (!nanoidRegex.test(input.data)) {
32706
- ctx = this._getOrReturnCtx(input, ctx);
32827
+ if (!nanoidRegex.test(input2.data)) {
32828
+ ctx = this._getOrReturnCtx(input2, ctx);
32707
32829
  addIssueToContext(ctx, {
32708
32830
  validation: "nanoid",
32709
32831
  code: ZodIssueCode2.invalid_string,
@@ -32712,8 +32834,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32712
32834
  status.dirty();
32713
32835
  }
32714
32836
  } else if (check2.kind === "cuid") {
32715
- if (!cuidRegex.test(input.data)) {
32716
- ctx = this._getOrReturnCtx(input, ctx);
32837
+ if (!cuidRegex.test(input2.data)) {
32838
+ ctx = this._getOrReturnCtx(input2, ctx);
32717
32839
  addIssueToContext(ctx, {
32718
32840
  validation: "cuid",
32719
32841
  code: ZodIssueCode2.invalid_string,
@@ -32722,8 +32844,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32722
32844
  status.dirty();
32723
32845
  }
32724
32846
  } else if (check2.kind === "cuid2") {
32725
- if (!cuid2Regex.test(input.data)) {
32726
- ctx = this._getOrReturnCtx(input, ctx);
32847
+ if (!cuid2Regex.test(input2.data)) {
32848
+ ctx = this._getOrReturnCtx(input2, ctx);
32727
32849
  addIssueToContext(ctx, {
32728
32850
  validation: "cuid2",
32729
32851
  code: ZodIssueCode2.invalid_string,
@@ -32732,8 +32854,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32732
32854
  status.dirty();
32733
32855
  }
32734
32856
  } else if (check2.kind === "ulid") {
32735
- if (!ulidRegex.test(input.data)) {
32736
- ctx = this._getOrReturnCtx(input, ctx);
32857
+ if (!ulidRegex.test(input2.data)) {
32858
+ ctx = this._getOrReturnCtx(input2, ctx);
32737
32859
  addIssueToContext(ctx, {
32738
32860
  validation: "ulid",
32739
32861
  code: ZodIssueCode2.invalid_string,
@@ -32743,9 +32865,9 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32743
32865
  }
32744
32866
  } else if (check2.kind === "url") {
32745
32867
  try {
32746
- new URL(input.data);
32868
+ new URL(input2.data);
32747
32869
  } catch {
32748
- ctx = this._getOrReturnCtx(input, ctx);
32870
+ ctx = this._getOrReturnCtx(input2, ctx);
32749
32871
  addIssueToContext(ctx, {
32750
32872
  validation: "url",
32751
32873
  code: ZodIssueCode2.invalid_string,
@@ -32755,9 +32877,9 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32755
32877
  }
32756
32878
  } else if (check2.kind === "regex") {
32757
32879
  check2.regex.lastIndex = 0;
32758
- const testResult = check2.regex.test(input.data);
32880
+ const testResult = check2.regex.test(input2.data);
32759
32881
  if (!testResult) {
32760
- ctx = this._getOrReturnCtx(input, ctx);
32882
+ ctx = this._getOrReturnCtx(input2, ctx);
32761
32883
  addIssueToContext(ctx, {
32762
32884
  validation: "regex",
32763
32885
  code: ZodIssueCode2.invalid_string,
@@ -32766,10 +32888,10 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32766
32888
  status.dirty();
32767
32889
  }
32768
32890
  } else if (check2.kind === "trim") {
32769
- input.data = input.data.trim();
32891
+ input2.data = input2.data.trim();
32770
32892
  } else if (check2.kind === "includes") {
32771
- if (!input.data.includes(check2.value, check2.position)) {
32772
- ctx = this._getOrReturnCtx(input, ctx);
32893
+ if (!input2.data.includes(check2.value, check2.position)) {
32894
+ ctx = this._getOrReturnCtx(input2, ctx);
32773
32895
  addIssueToContext(ctx, {
32774
32896
  code: ZodIssueCode2.invalid_string,
32775
32897
  validation: { includes: check2.value, position: check2.position },
@@ -32778,12 +32900,12 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32778
32900
  status.dirty();
32779
32901
  }
32780
32902
  } else if (check2.kind === "toLowerCase") {
32781
- input.data = input.data.toLowerCase();
32903
+ input2.data = input2.data.toLowerCase();
32782
32904
  } else if (check2.kind === "toUpperCase") {
32783
- input.data = input.data.toUpperCase();
32905
+ input2.data = input2.data.toUpperCase();
32784
32906
  } else if (check2.kind === "startsWith") {
32785
- if (!input.data.startsWith(check2.value)) {
32786
- ctx = this._getOrReturnCtx(input, ctx);
32907
+ if (!input2.data.startsWith(check2.value)) {
32908
+ ctx = this._getOrReturnCtx(input2, ctx);
32787
32909
  addIssueToContext(ctx, {
32788
32910
  code: ZodIssueCode2.invalid_string,
32789
32911
  validation: { startsWith: check2.value },
@@ -32792,8 +32914,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32792
32914
  status.dirty();
32793
32915
  }
32794
32916
  } else if (check2.kind === "endsWith") {
32795
- if (!input.data.endsWith(check2.value)) {
32796
- ctx = this._getOrReturnCtx(input, ctx);
32917
+ if (!input2.data.endsWith(check2.value)) {
32918
+ ctx = this._getOrReturnCtx(input2, ctx);
32797
32919
  addIssueToContext(ctx, {
32798
32920
  code: ZodIssueCode2.invalid_string,
32799
32921
  validation: { endsWith: check2.value },
@@ -32803,8 +32925,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32803
32925
  }
32804
32926
  } else if (check2.kind === "datetime") {
32805
32927
  const regex = datetimeRegex(check2);
32806
- if (!regex.test(input.data)) {
32807
- ctx = this._getOrReturnCtx(input, ctx);
32928
+ if (!regex.test(input2.data)) {
32929
+ ctx = this._getOrReturnCtx(input2, ctx);
32808
32930
  addIssueToContext(ctx, {
32809
32931
  code: ZodIssueCode2.invalid_string,
32810
32932
  validation: "datetime",
@@ -32814,8 +32936,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32814
32936
  }
32815
32937
  } else if (check2.kind === "date") {
32816
32938
  const regex = dateRegex;
32817
- if (!regex.test(input.data)) {
32818
- ctx = this._getOrReturnCtx(input, ctx);
32939
+ if (!regex.test(input2.data)) {
32940
+ ctx = this._getOrReturnCtx(input2, ctx);
32819
32941
  addIssueToContext(ctx, {
32820
32942
  code: ZodIssueCode2.invalid_string,
32821
32943
  validation: "date",
@@ -32825,8 +32947,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32825
32947
  }
32826
32948
  } else if (check2.kind === "time") {
32827
32949
  const regex = timeRegex(check2);
32828
- if (!regex.test(input.data)) {
32829
- ctx = this._getOrReturnCtx(input, ctx);
32950
+ if (!regex.test(input2.data)) {
32951
+ ctx = this._getOrReturnCtx(input2, ctx);
32830
32952
  addIssueToContext(ctx, {
32831
32953
  code: ZodIssueCode2.invalid_string,
32832
32954
  validation: "time",
@@ -32835,8 +32957,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32835
32957
  status.dirty();
32836
32958
  }
32837
32959
  } else if (check2.kind === "duration") {
32838
- if (!durationRegex.test(input.data)) {
32839
- ctx = this._getOrReturnCtx(input, ctx);
32960
+ if (!durationRegex.test(input2.data)) {
32961
+ ctx = this._getOrReturnCtx(input2, ctx);
32840
32962
  addIssueToContext(ctx, {
32841
32963
  validation: "duration",
32842
32964
  code: ZodIssueCode2.invalid_string,
@@ -32845,8 +32967,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32845
32967
  status.dirty();
32846
32968
  }
32847
32969
  } else if (check2.kind === "ip") {
32848
- if (!isValidIP(input.data, check2.version)) {
32849
- ctx = this._getOrReturnCtx(input, ctx);
32970
+ if (!isValidIP(input2.data, check2.version)) {
32971
+ ctx = this._getOrReturnCtx(input2, ctx);
32850
32972
  addIssueToContext(ctx, {
32851
32973
  validation: "ip",
32852
32974
  code: ZodIssueCode2.invalid_string,
@@ -32855,8 +32977,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32855
32977
  status.dirty();
32856
32978
  }
32857
32979
  } else if (check2.kind === "jwt") {
32858
- if (!isValidJWT2(input.data, check2.alg)) {
32859
- ctx = this._getOrReturnCtx(input, ctx);
32980
+ if (!isValidJWT2(input2.data, check2.alg)) {
32981
+ ctx = this._getOrReturnCtx(input2, ctx);
32860
32982
  addIssueToContext(ctx, {
32861
32983
  validation: "jwt",
32862
32984
  code: ZodIssueCode2.invalid_string,
@@ -32865,8 +32987,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32865
32987
  status.dirty();
32866
32988
  }
32867
32989
  } else if (check2.kind === "cidr") {
32868
- if (!isValidCidr(input.data, check2.version)) {
32869
- ctx = this._getOrReturnCtx(input, ctx);
32990
+ if (!isValidCidr(input2.data, check2.version)) {
32991
+ ctx = this._getOrReturnCtx(input2, ctx);
32870
32992
  addIssueToContext(ctx, {
32871
32993
  validation: "cidr",
32872
32994
  code: ZodIssueCode2.invalid_string,
@@ -32875,8 +32997,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32875
32997
  status.dirty();
32876
32998
  }
32877
32999
  } else if (check2.kind === "base64") {
32878
- if (!base64Regex.test(input.data)) {
32879
- ctx = this._getOrReturnCtx(input, ctx);
33000
+ if (!base64Regex.test(input2.data)) {
33001
+ ctx = this._getOrReturnCtx(input2, ctx);
32880
33002
  addIssueToContext(ctx, {
32881
33003
  validation: "base64",
32882
33004
  code: ZodIssueCode2.invalid_string,
@@ -32885,8 +33007,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32885
33007
  status.dirty();
32886
33008
  }
32887
33009
  } else if (check2.kind === "base64url") {
32888
- if (!base64urlRegex.test(input.data)) {
32889
- ctx = this._getOrReturnCtx(input, ctx);
33010
+ if (!base64urlRegex.test(input2.data)) {
33011
+ ctx = this._getOrReturnCtx(input2, ctx);
32890
33012
  addIssueToContext(ctx, {
32891
33013
  validation: "base64url",
32892
33014
  code: ZodIssueCode2.invalid_string,
@@ -32898,7 +33020,7 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32898
33020
  util.assertNever(check2);
32899
33021
  }
32900
33022
  }
32901
- return { status: status.value, value: input.data };
33023
+ return { status: status.value, value: input2.data };
32902
33024
  }
32903
33025
  _regex(regex, validation, message) {
32904
33026
  return this.refinement((data) => regex.test(data), {
@@ -33159,13 +33281,13 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33159
33281
  this.max = this.lte;
33160
33282
  this.step = this.multipleOf;
33161
33283
  }
33162
- _parse(input) {
33284
+ _parse(input2) {
33163
33285
  if (this._def.coerce) {
33164
- input.data = Number(input.data);
33286
+ input2.data = Number(input2.data);
33165
33287
  }
33166
- const parsedType2 = this._getType(input);
33288
+ const parsedType2 = this._getType(input2);
33167
33289
  if (parsedType2 !== ZodParsedType.number) {
33168
- const ctx2 = this._getOrReturnCtx(input);
33290
+ const ctx2 = this._getOrReturnCtx(input2);
33169
33291
  addIssueToContext(ctx2, {
33170
33292
  code: ZodIssueCode2.invalid_type,
33171
33293
  expected: ZodParsedType.number,
@@ -33177,8 +33299,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33177
33299
  const status = new ParseStatus();
33178
33300
  for (const check2 of this._def.checks) {
33179
33301
  if (check2.kind === "int") {
33180
- if (!util.isInteger(input.data)) {
33181
- ctx = this._getOrReturnCtx(input, ctx);
33302
+ if (!util.isInteger(input2.data)) {
33303
+ ctx = this._getOrReturnCtx(input2, ctx);
33182
33304
  addIssueToContext(ctx, {
33183
33305
  code: ZodIssueCode2.invalid_type,
33184
33306
  expected: "integer",
@@ -33188,9 +33310,9 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33188
33310
  status.dirty();
33189
33311
  }
33190
33312
  } else if (check2.kind === "min") {
33191
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
33313
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
33192
33314
  if (tooSmall) {
33193
- ctx = this._getOrReturnCtx(input, ctx);
33315
+ ctx = this._getOrReturnCtx(input2, ctx);
33194
33316
  addIssueToContext(ctx, {
33195
33317
  code: ZodIssueCode2.too_small,
33196
33318
  minimum: check2.value,
@@ -33202,9 +33324,9 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33202
33324
  status.dirty();
33203
33325
  }
33204
33326
  } else if (check2.kind === "max") {
33205
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
33327
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
33206
33328
  if (tooBig) {
33207
- ctx = this._getOrReturnCtx(input, ctx);
33329
+ ctx = this._getOrReturnCtx(input2, ctx);
33208
33330
  addIssueToContext(ctx, {
33209
33331
  code: ZodIssueCode2.too_big,
33210
33332
  maximum: check2.value,
@@ -33216,8 +33338,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33216
33338
  status.dirty();
33217
33339
  }
33218
33340
  } else if (check2.kind === "multipleOf") {
33219
- if (floatSafeRemainder2(input.data, check2.value) !== 0) {
33220
- ctx = this._getOrReturnCtx(input, ctx);
33341
+ if (floatSafeRemainder2(input2.data, check2.value) !== 0) {
33342
+ ctx = this._getOrReturnCtx(input2, ctx);
33221
33343
  addIssueToContext(ctx, {
33222
33344
  code: ZodIssueCode2.not_multiple_of,
33223
33345
  multipleOf: check2.value,
@@ -33226,8 +33348,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33226
33348
  status.dirty();
33227
33349
  }
33228
33350
  } else if (check2.kind === "finite") {
33229
- if (!Number.isFinite(input.data)) {
33230
- ctx = this._getOrReturnCtx(input, ctx);
33351
+ if (!Number.isFinite(input2.data)) {
33352
+ ctx = this._getOrReturnCtx(input2, ctx);
33231
33353
  addIssueToContext(ctx, {
33232
33354
  code: ZodIssueCode2.not_finite,
33233
33355
  message: check2.message
@@ -33238,7 +33360,7 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33238
33360
  util.assertNever(check2);
33239
33361
  }
33240
33362
  }
33241
- return { status: status.value, value: input.data };
33363
+ return { status: status.value, value: input2.data };
33242
33364
  }
33243
33365
  gte(value, message) {
33244
33366
  return this.setLimit("min", value, true, errorUtil.toString(message));
@@ -33390,25 +33512,25 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33390
33512
  this.min = this.gte;
33391
33513
  this.max = this.lte;
33392
33514
  }
33393
- _parse(input) {
33515
+ _parse(input2) {
33394
33516
  if (this._def.coerce) {
33395
33517
  try {
33396
- input.data = BigInt(input.data);
33518
+ input2.data = BigInt(input2.data);
33397
33519
  } catch {
33398
- return this._getInvalidInput(input);
33520
+ return this._getInvalidInput(input2);
33399
33521
  }
33400
33522
  }
33401
- const parsedType2 = this._getType(input);
33523
+ const parsedType2 = this._getType(input2);
33402
33524
  if (parsedType2 !== ZodParsedType.bigint) {
33403
- return this._getInvalidInput(input);
33525
+ return this._getInvalidInput(input2);
33404
33526
  }
33405
33527
  let ctx = void 0;
33406
33528
  const status = new ParseStatus();
33407
33529
  for (const check2 of this._def.checks) {
33408
33530
  if (check2.kind === "min") {
33409
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
33531
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
33410
33532
  if (tooSmall) {
33411
- ctx = this._getOrReturnCtx(input, ctx);
33533
+ ctx = this._getOrReturnCtx(input2, ctx);
33412
33534
  addIssueToContext(ctx, {
33413
33535
  code: ZodIssueCode2.too_small,
33414
33536
  type: "bigint",
@@ -33419,9 +33541,9 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33419
33541
  status.dirty();
33420
33542
  }
33421
33543
  } else if (check2.kind === "max") {
33422
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
33544
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
33423
33545
  if (tooBig) {
33424
- ctx = this._getOrReturnCtx(input, ctx);
33546
+ ctx = this._getOrReturnCtx(input2, ctx);
33425
33547
  addIssueToContext(ctx, {
33426
33548
  code: ZodIssueCode2.too_big,
33427
33549
  type: "bigint",
@@ -33432,8 +33554,8 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33432
33554
  status.dirty();
33433
33555
  }
33434
33556
  } else if (check2.kind === "multipleOf") {
33435
- if (input.data % check2.value !== BigInt(0)) {
33436
- ctx = this._getOrReturnCtx(input, ctx);
33557
+ if (input2.data % check2.value !== BigInt(0)) {
33558
+ ctx = this._getOrReturnCtx(input2, ctx);
33437
33559
  addIssueToContext(ctx, {
33438
33560
  code: ZodIssueCode2.not_multiple_of,
33439
33561
  multipleOf: check2.value,
@@ -33445,10 +33567,10 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33445
33567
  util.assertNever(check2);
33446
33568
  }
33447
33569
  }
33448
- return { status: status.value, value: input.data };
33570
+ return { status: status.value, value: input2.data };
33449
33571
  }
33450
- _getInvalidInput(input) {
33451
- const ctx = this._getOrReturnCtx(input);
33572
+ _getInvalidInput(input2) {
33573
+ const ctx = this._getOrReturnCtx(input2);
33452
33574
  addIssueToContext(ctx, {
33453
33575
  code: ZodIssueCode2.invalid_type,
33454
33576
  expected: ZodParsedType.bigint,
@@ -33557,13 +33679,13 @@ ZodBigInt2.create = (params) => {
33557
33679
  });
33558
33680
  };
33559
33681
  var ZodBoolean2 = class extends ZodType2 {
33560
- _parse(input) {
33682
+ _parse(input2) {
33561
33683
  if (this._def.coerce) {
33562
- input.data = Boolean(input.data);
33684
+ input2.data = Boolean(input2.data);
33563
33685
  }
33564
- const parsedType2 = this._getType(input);
33686
+ const parsedType2 = this._getType(input2);
33565
33687
  if (parsedType2 !== ZodParsedType.boolean) {
33566
- const ctx = this._getOrReturnCtx(input);
33688
+ const ctx = this._getOrReturnCtx(input2);
33567
33689
  addIssueToContext(ctx, {
33568
33690
  code: ZodIssueCode2.invalid_type,
33569
33691
  expected: ZodParsedType.boolean,
@@ -33571,7 +33693,7 @@ var ZodBoolean2 = class extends ZodType2 {
33571
33693
  });
33572
33694
  return INVALID;
33573
33695
  }
33574
- return OK(input.data);
33696
+ return OK(input2.data);
33575
33697
  }
33576
33698
  };
33577
33699
  ZodBoolean2.create = (params) => {
@@ -33582,13 +33704,13 @@ ZodBoolean2.create = (params) => {
33582
33704
  });
33583
33705
  };
33584
33706
  var ZodDate2 = class _ZodDate extends ZodType2 {
33585
- _parse(input) {
33707
+ _parse(input2) {
33586
33708
  if (this._def.coerce) {
33587
- input.data = new Date(input.data);
33709
+ input2.data = new Date(input2.data);
33588
33710
  }
33589
- const parsedType2 = this._getType(input);
33711
+ const parsedType2 = this._getType(input2);
33590
33712
  if (parsedType2 !== ZodParsedType.date) {
33591
- const ctx2 = this._getOrReturnCtx(input);
33713
+ const ctx2 = this._getOrReturnCtx(input2);
33592
33714
  addIssueToContext(ctx2, {
33593
33715
  code: ZodIssueCode2.invalid_type,
33594
33716
  expected: ZodParsedType.date,
@@ -33596,8 +33718,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33596
33718
  });
33597
33719
  return INVALID;
33598
33720
  }
33599
- if (Number.isNaN(input.data.getTime())) {
33600
- const ctx2 = this._getOrReturnCtx(input);
33721
+ if (Number.isNaN(input2.data.getTime())) {
33722
+ const ctx2 = this._getOrReturnCtx(input2);
33601
33723
  addIssueToContext(ctx2, {
33602
33724
  code: ZodIssueCode2.invalid_date
33603
33725
  });
@@ -33607,8 +33729,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33607
33729
  let ctx = void 0;
33608
33730
  for (const check2 of this._def.checks) {
33609
33731
  if (check2.kind === "min") {
33610
- if (input.data.getTime() < check2.value) {
33611
- ctx = this._getOrReturnCtx(input, ctx);
33732
+ if (input2.data.getTime() < check2.value) {
33733
+ ctx = this._getOrReturnCtx(input2, ctx);
33612
33734
  addIssueToContext(ctx, {
33613
33735
  code: ZodIssueCode2.too_small,
33614
33736
  message: check2.message,
@@ -33620,8 +33742,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33620
33742
  status.dirty();
33621
33743
  }
33622
33744
  } else if (check2.kind === "max") {
33623
- if (input.data.getTime() > check2.value) {
33624
- ctx = this._getOrReturnCtx(input, ctx);
33745
+ if (input2.data.getTime() > check2.value) {
33746
+ ctx = this._getOrReturnCtx(input2, ctx);
33625
33747
  addIssueToContext(ctx, {
33626
33748
  code: ZodIssueCode2.too_big,
33627
33749
  message: check2.message,
@@ -33638,7 +33760,7 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33638
33760
  }
33639
33761
  return {
33640
33762
  status: status.value,
33641
- value: new Date(input.data.getTime())
33763
+ value: new Date(input2.data.getTime())
33642
33764
  };
33643
33765
  }
33644
33766
  _addCheck(check2) {
@@ -33691,10 +33813,10 @@ ZodDate2.create = (params) => {
33691
33813
  });
33692
33814
  };
33693
33815
  var ZodSymbol2 = class extends ZodType2 {
33694
- _parse(input) {
33695
- const parsedType2 = this._getType(input);
33816
+ _parse(input2) {
33817
+ const parsedType2 = this._getType(input2);
33696
33818
  if (parsedType2 !== ZodParsedType.symbol) {
33697
- const ctx = this._getOrReturnCtx(input);
33819
+ const ctx = this._getOrReturnCtx(input2);
33698
33820
  addIssueToContext(ctx, {
33699
33821
  code: ZodIssueCode2.invalid_type,
33700
33822
  expected: ZodParsedType.symbol,
@@ -33702,7 +33824,7 @@ var ZodSymbol2 = class extends ZodType2 {
33702
33824
  });
33703
33825
  return INVALID;
33704
33826
  }
33705
- return OK(input.data);
33827
+ return OK(input2.data);
33706
33828
  }
33707
33829
  };
33708
33830
  ZodSymbol2.create = (params) => {
@@ -33712,10 +33834,10 @@ ZodSymbol2.create = (params) => {
33712
33834
  });
33713
33835
  };
33714
33836
  var ZodUndefined2 = class extends ZodType2 {
33715
- _parse(input) {
33716
- const parsedType2 = this._getType(input);
33837
+ _parse(input2) {
33838
+ const parsedType2 = this._getType(input2);
33717
33839
  if (parsedType2 !== ZodParsedType.undefined) {
33718
- const ctx = this._getOrReturnCtx(input);
33840
+ const ctx = this._getOrReturnCtx(input2);
33719
33841
  addIssueToContext(ctx, {
33720
33842
  code: ZodIssueCode2.invalid_type,
33721
33843
  expected: ZodParsedType.undefined,
@@ -33723,7 +33845,7 @@ var ZodUndefined2 = class extends ZodType2 {
33723
33845
  });
33724
33846
  return INVALID;
33725
33847
  }
33726
- return OK(input.data);
33848
+ return OK(input2.data);
33727
33849
  }
33728
33850
  };
33729
33851
  ZodUndefined2.create = (params) => {
@@ -33733,10 +33855,10 @@ ZodUndefined2.create = (params) => {
33733
33855
  });
33734
33856
  };
33735
33857
  var ZodNull2 = class extends ZodType2 {
33736
- _parse(input) {
33737
- const parsedType2 = this._getType(input);
33858
+ _parse(input2) {
33859
+ const parsedType2 = this._getType(input2);
33738
33860
  if (parsedType2 !== ZodParsedType.null) {
33739
- const ctx = this._getOrReturnCtx(input);
33861
+ const ctx = this._getOrReturnCtx(input2);
33740
33862
  addIssueToContext(ctx, {
33741
33863
  code: ZodIssueCode2.invalid_type,
33742
33864
  expected: ZodParsedType.null,
@@ -33744,7 +33866,7 @@ var ZodNull2 = class extends ZodType2 {
33744
33866
  });
33745
33867
  return INVALID;
33746
33868
  }
33747
- return OK(input.data);
33869
+ return OK(input2.data);
33748
33870
  }
33749
33871
  };
33750
33872
  ZodNull2.create = (params) => {
@@ -33758,8 +33880,8 @@ var ZodAny2 = class extends ZodType2 {
33758
33880
  super(...arguments);
33759
33881
  this._any = true;
33760
33882
  }
33761
- _parse(input) {
33762
- return OK(input.data);
33883
+ _parse(input2) {
33884
+ return OK(input2.data);
33763
33885
  }
33764
33886
  };
33765
33887
  ZodAny2.create = (params) => {
@@ -33773,8 +33895,8 @@ var ZodUnknown2 = class extends ZodType2 {
33773
33895
  super(...arguments);
33774
33896
  this._unknown = true;
33775
33897
  }
33776
- _parse(input) {
33777
- return OK(input.data);
33898
+ _parse(input2) {
33899
+ return OK(input2.data);
33778
33900
  }
33779
33901
  };
33780
33902
  ZodUnknown2.create = (params) => {
@@ -33784,8 +33906,8 @@ ZodUnknown2.create = (params) => {
33784
33906
  });
33785
33907
  };
33786
33908
  var ZodNever2 = class extends ZodType2 {
33787
- _parse(input) {
33788
- const ctx = this._getOrReturnCtx(input);
33909
+ _parse(input2) {
33910
+ const ctx = this._getOrReturnCtx(input2);
33789
33911
  addIssueToContext(ctx, {
33790
33912
  code: ZodIssueCode2.invalid_type,
33791
33913
  expected: ZodParsedType.never,
@@ -33801,10 +33923,10 @@ ZodNever2.create = (params) => {
33801
33923
  });
33802
33924
  };
33803
33925
  var ZodVoid2 = class extends ZodType2 {
33804
- _parse(input) {
33805
- const parsedType2 = this._getType(input);
33926
+ _parse(input2) {
33927
+ const parsedType2 = this._getType(input2);
33806
33928
  if (parsedType2 !== ZodParsedType.undefined) {
33807
- const ctx = this._getOrReturnCtx(input);
33929
+ const ctx = this._getOrReturnCtx(input2);
33808
33930
  addIssueToContext(ctx, {
33809
33931
  code: ZodIssueCode2.invalid_type,
33810
33932
  expected: ZodParsedType.void,
@@ -33812,7 +33934,7 @@ var ZodVoid2 = class extends ZodType2 {
33812
33934
  });
33813
33935
  return INVALID;
33814
33936
  }
33815
- return OK(input.data);
33937
+ return OK(input2.data);
33816
33938
  }
33817
33939
  };
33818
33940
  ZodVoid2.create = (params) => {
@@ -33822,8 +33944,8 @@ ZodVoid2.create = (params) => {
33822
33944
  });
33823
33945
  };
33824
33946
  var ZodArray2 = class _ZodArray extends ZodType2 {
33825
- _parse(input) {
33826
- const { ctx, status } = this._processInputParams(input);
33947
+ _parse(input2) {
33948
+ const { ctx, status } = this._processInputParams(input2);
33827
33949
  const def = this._def;
33828
33950
  if (ctx.parsedType !== ZodParsedType.array) {
33829
33951
  addIssueToContext(ctx, {
@@ -33963,10 +34085,10 @@ var ZodObject2 = class _ZodObject extends ZodType2 {
33963
34085
  this._cached = { shape, keys };
33964
34086
  return this._cached;
33965
34087
  }
33966
- _parse(input) {
33967
- const parsedType2 = this._getType(input);
34088
+ _parse(input2) {
34089
+ const parsedType2 = this._getType(input2);
33968
34090
  if (parsedType2 !== ZodParsedType.object) {
33969
- const ctx2 = this._getOrReturnCtx(input);
34091
+ const ctx2 = this._getOrReturnCtx(input2);
33970
34092
  addIssueToContext(ctx2, {
33971
34093
  code: ZodIssueCode2.invalid_type,
33972
34094
  expected: ZodParsedType.object,
@@ -33974,7 +34096,7 @@ var ZodObject2 = class _ZodObject extends ZodType2 {
33974
34096
  });
33975
34097
  return INVALID;
33976
34098
  }
33977
- const { status, ctx } = this._processInputParams(input);
34099
+ const { status, ctx } = this._processInputParams(input2);
33978
34100
  const { shape, keys: shapeKeys } = this._getCached();
33979
34101
  const extraKeys = [];
33980
34102
  if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) {
@@ -34287,8 +34409,8 @@ ZodObject2.lazycreate = (shape, params) => {
34287
34409
  });
34288
34410
  };
34289
34411
  var ZodUnion2 = class extends ZodType2 {
34290
- _parse(input) {
34291
- const { ctx } = this._processInputParams(input);
34412
+ _parse(input2) {
34413
+ const { ctx } = this._processInputParams(input2);
34292
34414
  const options = this._def.options;
34293
34415
  function handleResults(results) {
34294
34416
  for (const result of results) {
@@ -34409,8 +34531,8 @@ var getDiscriminator = (type) => {
34409
34531
  }
34410
34532
  };
34411
34533
  var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {
34412
- _parse(input) {
34413
- const { ctx } = this._processInputParams(input);
34534
+ _parse(input2) {
34535
+ const { ctx } = this._processInputParams(input2);
34414
34536
  if (ctx.parsedType !== ZodParsedType.object) {
34415
34537
  addIssueToContext(ctx, {
34416
34538
  code: ZodIssueCode2.invalid_type,
@@ -34523,8 +34645,8 @@ function mergeValues2(a, b) {
34523
34645
  }
34524
34646
  }
34525
34647
  var ZodIntersection2 = class extends ZodType2 {
34526
- _parse(input) {
34527
- const { status, ctx } = this._processInputParams(input);
34648
+ _parse(input2) {
34649
+ const { status, ctx } = this._processInputParams(input2);
34528
34650
  const handleParsed = (parsedLeft, parsedRight) => {
34529
34651
  if (isAborted(parsedLeft) || isAborted(parsedRight)) {
34530
34652
  return INVALID;
@@ -34576,8 +34698,8 @@ ZodIntersection2.create = (left, right, params) => {
34576
34698
  });
34577
34699
  };
34578
34700
  var ZodTuple2 = class _ZodTuple extends ZodType2 {
34579
- _parse(input) {
34580
- const { status, ctx } = this._processInputParams(input);
34701
+ _parse(input2) {
34702
+ const { status, ctx } = this._processInputParams(input2);
34581
34703
  if (ctx.parsedType !== ZodParsedType.array) {
34582
34704
  addIssueToContext(ctx, {
34583
34705
  code: ZodIssueCode2.invalid_type,
@@ -34649,8 +34771,8 @@ var ZodRecord2 = class _ZodRecord extends ZodType2 {
34649
34771
  get valueSchema() {
34650
34772
  return this._def.valueType;
34651
34773
  }
34652
- _parse(input) {
34653
- const { status, ctx } = this._processInputParams(input);
34774
+ _parse(input2) {
34775
+ const { status, ctx } = this._processInputParams(input2);
34654
34776
  if (ctx.parsedType !== ZodParsedType.object) {
34655
34777
  addIssueToContext(ctx, {
34656
34778
  code: ZodIssueCode2.invalid_type,
@@ -34702,8 +34824,8 @@ var ZodMap2 = class extends ZodType2 {
34702
34824
  get valueSchema() {
34703
34825
  return this._def.valueType;
34704
34826
  }
34705
- _parse(input) {
34706
- const { status, ctx } = this._processInputParams(input);
34827
+ _parse(input2) {
34828
+ const { status, ctx } = this._processInputParams(input2);
34707
34829
  if (ctx.parsedType !== ZodParsedType.map) {
34708
34830
  addIssueToContext(ctx, {
34709
34831
  code: ZodIssueCode2.invalid_type,
@@ -34762,8 +34884,8 @@ ZodMap2.create = (keyType, valueType, params) => {
34762
34884
  });
34763
34885
  };
34764
34886
  var ZodSet2 = class _ZodSet extends ZodType2 {
34765
- _parse(input) {
34766
- const { status, ctx } = this._processInputParams(input);
34887
+ _parse(input2) {
34888
+ const { status, ctx } = this._processInputParams(input2);
34767
34889
  if (ctx.parsedType !== ZodParsedType.set) {
34768
34890
  addIssueToContext(ctx, {
34769
34891
  code: ZodIssueCode2.invalid_type,
@@ -34851,8 +34973,8 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
34851
34973
  super(...arguments);
34852
34974
  this.validate = this.implement;
34853
34975
  }
34854
- _parse(input) {
34855
- const { ctx } = this._processInputParams(input);
34976
+ _parse(input2) {
34977
+ const { ctx } = this._processInputParams(input2);
34856
34978
  if (ctx.parsedType !== ZodParsedType.function) {
34857
34979
  addIssueToContext(ctx, {
34858
34980
  code: ZodIssueCode2.invalid_type,
@@ -34955,8 +35077,8 @@ var ZodLazy2 = class extends ZodType2 {
34955
35077
  get schema() {
34956
35078
  return this._def.getter();
34957
35079
  }
34958
- _parse(input) {
34959
- const { ctx } = this._processInputParams(input);
35080
+ _parse(input2) {
35081
+ const { ctx } = this._processInputParams(input2);
34960
35082
  const lazySchema = this._def.getter();
34961
35083
  return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
34962
35084
  }
@@ -34969,9 +35091,9 @@ ZodLazy2.create = (getter, params) => {
34969
35091
  });
34970
35092
  };
34971
35093
  var ZodLiteral2 = class extends ZodType2 {
34972
- _parse(input) {
34973
- if (input.data !== this._def.value) {
34974
- const ctx = this._getOrReturnCtx(input);
35094
+ _parse(input2) {
35095
+ if (input2.data !== this._def.value) {
35096
+ const ctx = this._getOrReturnCtx(input2);
34975
35097
  addIssueToContext(ctx, {
34976
35098
  received: ctx.data,
34977
35099
  code: ZodIssueCode2.invalid_literal,
@@ -34979,7 +35101,7 @@ var ZodLiteral2 = class extends ZodType2 {
34979
35101
  });
34980
35102
  return INVALID;
34981
35103
  }
34982
- return { status: "valid", value: input.data };
35104
+ return { status: "valid", value: input2.data };
34983
35105
  }
34984
35106
  get value() {
34985
35107
  return this._def.value;
@@ -35000,9 +35122,9 @@ function createZodEnum(values, params) {
35000
35122
  });
35001
35123
  }
35002
35124
  var ZodEnum2 = class _ZodEnum extends ZodType2 {
35003
- _parse(input) {
35004
- if (typeof input.data !== "string") {
35005
- const ctx = this._getOrReturnCtx(input);
35125
+ _parse(input2) {
35126
+ if (typeof input2.data !== "string") {
35127
+ const ctx = this._getOrReturnCtx(input2);
35006
35128
  const expectedValues = this._def.values;
35007
35129
  addIssueToContext(ctx, {
35008
35130
  expected: util.joinValues(expectedValues),
@@ -35014,8 +35136,8 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35014
35136
  if (!this._cache) {
35015
35137
  this._cache = new Set(this._def.values);
35016
35138
  }
35017
- if (!this._cache.has(input.data)) {
35018
- const ctx = this._getOrReturnCtx(input);
35139
+ if (!this._cache.has(input2.data)) {
35140
+ const ctx = this._getOrReturnCtx(input2);
35019
35141
  const expectedValues = this._def.values;
35020
35142
  addIssueToContext(ctx, {
35021
35143
  received: ctx.data,
@@ -35024,7 +35146,7 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35024
35146
  });
35025
35147
  return INVALID;
35026
35148
  }
35027
- return OK(input.data);
35149
+ return OK(input2.data);
35028
35150
  }
35029
35151
  get options() {
35030
35152
  return this._def.values;
@@ -35065,9 +35187,9 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35065
35187
  };
35066
35188
  ZodEnum2.create = createZodEnum;
35067
35189
  var ZodNativeEnum = class extends ZodType2 {
35068
- _parse(input) {
35190
+ _parse(input2) {
35069
35191
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
35070
- const ctx = this._getOrReturnCtx(input);
35192
+ const ctx = this._getOrReturnCtx(input2);
35071
35193
  if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
35072
35194
  const expectedValues = util.objectValues(nativeEnumValues);
35073
35195
  addIssueToContext(ctx, {
@@ -35080,7 +35202,7 @@ var ZodNativeEnum = class extends ZodType2 {
35080
35202
  if (!this._cache) {
35081
35203
  this._cache = new Set(util.getValidEnumValues(this._def.values));
35082
35204
  }
35083
- if (!this._cache.has(input.data)) {
35205
+ if (!this._cache.has(input2.data)) {
35084
35206
  const expectedValues = util.objectValues(nativeEnumValues);
35085
35207
  addIssueToContext(ctx, {
35086
35208
  received: ctx.data,
@@ -35089,7 +35211,7 @@ var ZodNativeEnum = class extends ZodType2 {
35089
35211
  });
35090
35212
  return INVALID;
35091
35213
  }
35092
- return OK(input.data);
35214
+ return OK(input2.data);
35093
35215
  }
35094
35216
  get enum() {
35095
35217
  return this._def.values;
@@ -35106,8 +35228,8 @@ var ZodPromise2 = class extends ZodType2 {
35106
35228
  unwrap() {
35107
35229
  return this._def.type;
35108
35230
  }
35109
- _parse(input) {
35110
- const { ctx } = this._processInputParams(input);
35231
+ _parse(input2) {
35232
+ const { ctx } = this._processInputParams(input2);
35111
35233
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
35112
35234
  addIssueToContext(ctx, {
35113
35235
  code: ZodIssueCode2.invalid_type,
@@ -35139,8 +35261,8 @@ var ZodEffects = class extends ZodType2 {
35139
35261
  sourceType() {
35140
35262
  return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
35141
35263
  }
35142
- _parse(input) {
35143
- const { status, ctx } = this._processInputParams(input);
35264
+ _parse(input2) {
35265
+ const { status, ctx } = this._processInputParams(input2);
35144
35266
  const effect = this._def.effect || null;
35145
35267
  const checkCtx = {
35146
35268
  addIssue: (arg) => {
@@ -35272,12 +35394,12 @@ ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
35272
35394
  });
35273
35395
  };
35274
35396
  var ZodOptional2 = class extends ZodType2 {
35275
- _parse(input) {
35276
- const parsedType2 = this._getType(input);
35397
+ _parse(input2) {
35398
+ const parsedType2 = this._getType(input2);
35277
35399
  if (parsedType2 === ZodParsedType.undefined) {
35278
35400
  return OK(void 0);
35279
35401
  }
35280
- return this._def.innerType._parse(input);
35402
+ return this._def.innerType._parse(input2);
35281
35403
  }
35282
35404
  unwrap() {
35283
35405
  return this._def.innerType;
@@ -35291,12 +35413,12 @@ ZodOptional2.create = (type, params) => {
35291
35413
  });
35292
35414
  };
35293
35415
  var ZodNullable2 = class extends ZodType2 {
35294
- _parse(input) {
35295
- const parsedType2 = this._getType(input);
35416
+ _parse(input2) {
35417
+ const parsedType2 = this._getType(input2);
35296
35418
  if (parsedType2 === ZodParsedType.null) {
35297
35419
  return OK(null);
35298
35420
  }
35299
- return this._def.innerType._parse(input);
35421
+ return this._def.innerType._parse(input2);
35300
35422
  }
35301
35423
  unwrap() {
35302
35424
  return this._def.innerType;
@@ -35310,8 +35432,8 @@ ZodNullable2.create = (type, params) => {
35310
35432
  });
35311
35433
  };
35312
35434
  var ZodDefault2 = class extends ZodType2 {
35313
- _parse(input) {
35314
- const { ctx } = this._processInputParams(input);
35435
+ _parse(input2) {
35436
+ const { ctx } = this._processInputParams(input2);
35315
35437
  let data = ctx.data;
35316
35438
  if (ctx.parsedType === ZodParsedType.undefined) {
35317
35439
  data = this._def.defaultValue();
@@ -35335,8 +35457,8 @@ ZodDefault2.create = (type, params) => {
35335
35457
  });
35336
35458
  };
35337
35459
  var ZodCatch2 = class extends ZodType2 {
35338
- _parse(input) {
35339
- const { ctx } = this._processInputParams(input);
35460
+ _parse(input2) {
35461
+ const { ctx } = this._processInputParams(input2);
35340
35462
  const newCtx = {
35341
35463
  ...ctx,
35342
35464
  common: {
@@ -35388,10 +35510,10 @@ ZodCatch2.create = (type, params) => {
35388
35510
  });
35389
35511
  };
35390
35512
  var ZodNaN2 = class extends ZodType2 {
35391
- _parse(input) {
35392
- const parsedType2 = this._getType(input);
35513
+ _parse(input2) {
35514
+ const parsedType2 = this._getType(input2);
35393
35515
  if (parsedType2 !== ZodParsedType.nan) {
35394
- const ctx = this._getOrReturnCtx(input);
35516
+ const ctx = this._getOrReturnCtx(input2);
35395
35517
  addIssueToContext(ctx, {
35396
35518
  code: ZodIssueCode2.invalid_type,
35397
35519
  expected: ZodParsedType.nan,
@@ -35399,7 +35521,7 @@ var ZodNaN2 = class extends ZodType2 {
35399
35521
  });
35400
35522
  return INVALID;
35401
35523
  }
35402
- return { status: "valid", value: input.data };
35524
+ return { status: "valid", value: input2.data };
35403
35525
  }
35404
35526
  };
35405
35527
  ZodNaN2.create = (params) => {
@@ -35409,8 +35531,8 @@ ZodNaN2.create = (params) => {
35409
35531
  });
35410
35532
  };
35411
35533
  var ZodBranded = class extends ZodType2 {
35412
- _parse(input) {
35413
- const { ctx } = this._processInputParams(input);
35534
+ _parse(input2) {
35535
+ const { ctx } = this._processInputParams(input2);
35414
35536
  const data = ctx.data;
35415
35537
  return this._def.type._parse({
35416
35538
  data,
@@ -35423,8 +35545,8 @@ var ZodBranded = class extends ZodType2 {
35423
35545
  }
35424
35546
  };
35425
35547
  var ZodPipeline = class _ZodPipeline extends ZodType2 {
35426
- _parse(input) {
35427
- const { status, ctx } = this._processInputParams(input);
35548
+ _parse(input2) {
35549
+ const { status, ctx } = this._processInputParams(input2);
35428
35550
  if (ctx.common.async) {
35429
35551
  const handleAsync = async () => {
35430
35552
  const inResult = await this._def.in._parseAsync({
@@ -35478,8 +35600,8 @@ var ZodPipeline = class _ZodPipeline extends ZodType2 {
35478
35600
  }
35479
35601
  };
35480
35602
  var ZodReadonly2 = class extends ZodType2 {
35481
- _parse(input) {
35482
- const result = this._def.innerType._parse(input);
35603
+ _parse(input2) {
35604
+ const result = this._def.innerType._parse(input2);
35483
35605
  const freeze = (data) => {
35484
35606
  if (isValid(data)) {
35485
35607
  data.value = Object.freeze(data.value);
@@ -39647,12 +39769,12 @@ var AjvJsonSchemaValidator = class {
39647
39769
  */
39648
39770
  getValidator(schema) {
39649
39771
  const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
39650
- return (input) => {
39651
- const valid = ajvValidator(input);
39772
+ return (input2) => {
39773
+ const valid = ajvValidator(input2);
39652
39774
  if (valid) {
39653
39775
  return {
39654
39776
  valid: true,
39655
- data: input,
39777
+ data: input2,
39656
39778
  errorMessage: void 0
39657
39779
  };
39658
39780
  } else {
@@ -53894,9 +54016,9 @@ var QoderSession = class {
53894
54016
  for (const [index, block] of content.entries()) {
53895
54017
  if (message.uuid && typeof block === "object" && block !== null) {
53896
54018
  const raw = block;
53897
- const text = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
53898
- if (typeof text === "string") {
53899
- const key = JSON.stringify([message.uuid, index, raw.type, text]);
54019
+ const text2 = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
54020
+ if (typeof text2 === "string") {
54021
+ const key = JSON.stringify([message.uuid, index, raw.type, text2]);
53900
54022
  if (this.#activeTurn.projectedTextSnapshots.has(key))
53901
54023
  continue;
53902
54024
  this.#activeTurn.projectedTextSnapshots.add(key);
@@ -54231,19 +54353,19 @@ var QoderSession = class {
54231
54353
  });
54232
54354
  }
54233
54355
  }
54234
- async #handleCanUseTool(toolName, input, context) {
54356
+ async #handleCanUseTool(toolName, input2, context) {
54235
54357
  if (this.#closed || !this.#activeTurn || this.#activeTurn.cancellationRequested) {
54236
54358
  return { behavior: "deny", message: "Session is not active", interrupt: true };
54237
54359
  }
54238
54360
  const interactionId = hostInteractionIdSchema.parse(randomUUID());
54239
54361
  const turnId = this.#activeTurn.turnId;
54240
54362
  if (toolName === "AskUserQuestion") {
54241
- return this.#bridgeAskUserQuestion(interactionId, turnId, input, context);
54363
+ return this.#bridgeAskUserQuestion(interactionId, turnId, input2, context);
54242
54364
  }
54243
- return this.#bridgeToolApproval(interactionId, turnId, toolName, input, context);
54365
+ return this.#bridgeToolApproval(interactionId, turnId, toolName, input2, context);
54244
54366
  }
54245
- async #bridgeAskUserQuestion(interactionId, turnId, input, context) {
54246
- const raw = input;
54367
+ async #bridgeAskUserQuestion(interactionId, turnId, input2, context) {
54368
+ const raw = input2;
54247
54369
  const rawQuestions = Array.isArray(raw?.questions) ? raw.questions : [];
54248
54370
  const questionPrompts = [];
54249
54371
  const questions = rawQuestions.map((qItem, idx) => {
@@ -54313,7 +54435,7 @@ var QoderSession = class {
54313
54435
  id: interactionId,
54314
54436
  interaction,
54315
54437
  questionPrompts,
54316
- rawInput: input,
54438
+ rawInput: input2,
54317
54439
  toolUseID: context.toolUseID,
54318
54440
  resolve: (result) => {
54319
54441
  cleanup();
@@ -54323,7 +54445,7 @@ var QoderSession = class {
54323
54445
  this.#emitInteraction(interaction);
54324
54446
  });
54325
54447
  }
54326
- async #bridgeToolApproval(interactionId, turnId, toolName, input, context) {
54448
+ async #bridgeToolApproval(interactionId, turnId, toolName, input2, context) {
54327
54449
  const actions = [
54328
54450
  { id: "allowOnce", label: "Allow", effect: "allowOnce" },
54329
54451
  { id: "deny", label: "Deny", effect: "deny" }
@@ -54333,7 +54455,7 @@ var QoderSession = class {
54333
54455
  interactionId,
54334
54456
  turnId,
54335
54457
  title: `Approve tool: ${toolName}`,
54336
- description: typeof input === "object" && input !== null ? JSON.stringify(input) : String(input),
54458
+ description: typeof input2 === "object" && input2 !== null ? JSON.stringify(input2) : String(input2),
54337
54459
  subject: { type: "nativeAction" },
54338
54460
  actions
54339
54461
  };
@@ -54360,7 +54482,7 @@ var QoderSession = class {
54360
54482
  this.#pendingInteractions.set(interactionId, {
54361
54483
  id: interactionId,
54362
54484
  interaction,
54363
- rawInput: input,
54485
+ rawInput: input2,
54364
54486
  toolUseID: context.toolUseID,
54365
54487
  resolve: (result) => {
54366
54488
  cleanup();
@@ -55120,15 +55242,15 @@ function sessionImportTitle(value, maxLength = HARNESS_SESSION_IMPORT_TITLE_MAX_
55120
55242
  return normalized;
55121
55243
  return `${characters.slice(0, maxLength - 1).join("").trimEnd()}…`;
55122
55244
  }
55123
- function sessionImportCandidate(input) {
55124
- const time3 = typeof input.updatedAt === "number" ? input.updatedAt : typeof input.updatedAt === "string" ? Date.parse(input.updatedAt) : Number.NaN;
55245
+ function sessionImportCandidate(input2) {
55246
+ const time3 = typeof input2.updatedAt === "number" ? input2.updatedAt : typeof input2.updatedAt === "string" ? Date.parse(input2.updatedAt) : Number.NaN;
55125
55247
  const parsed = harnessSessionImportCandidateSchema.safeParse({
55126
- nativeSessionId: input.nativeSessionId,
55127
- cwd: input.cwd,
55128
- title: typeof input.title === "string" && input.title.trim().length > 0 ? input.title : null,
55248
+ nativeSessionId: input2.nativeSessionId,
55249
+ cwd: input2.cwd,
55250
+ title: typeof input2.title === "string" && input2.title.trim().length > 0 ? input2.title : null,
55129
55251
  updatedAt: Math.floor(time3),
55130
55252
  // Unknown must stay unknown; only an explicit boolean is a native statement.
55131
- running: typeof input.running === "boolean" ? input.running : null
55253
+ running: typeof input2.running === "boolean" ? input2.running : null
55132
55254
  });
55133
55255
  return parsed.success ? parsed.data : null;
55134
55256
  }
@@ -55500,22 +55622,22 @@ async function readQoderUsage(file2, signal) {
55500
55622
  messages.set(id4, message);
55501
55623
  if (!isRecord2(usage) || message.at === null)
55502
55624
  continue;
55503
- const input = usage.input_tokens;
55625
+ const input2 = usage.input_tokens;
55504
55626
  const output = usage.output_tokens;
55505
55627
  const cached2 = usage.cache_read_input_tokens;
55506
55628
  const written = usage.cache_creation_input_tokens;
55507
- if (!count2(input) || !count2(output) || !count2(cached2) || !count2(written))
55629
+ if (!count2(input2) || !count2(output) || !count2(cached2) || !count2(written))
55508
55630
  continue;
55509
55631
  const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
55510
55632
  const oneHour = split?.ephemeral_1h_input_tokens;
55511
55633
  const details = isRecord2(usage.output_tokens_details) ? usage.output_tokens_details : null;
55512
55634
  const thinking = details?.thinking_tokens;
55513
- const unreported = input === 0 && output === 0 && cached2 === 0 && written === 0;
55635
+ const unreported = input2 === 0 && output === 0 && cached2 === 0 && written === 0;
55514
55636
  const entry = parseHarnessUsageEntry({
55515
55637
  id: id4,
55516
55638
  occurredAtMs: message.at,
55517
55639
  ...typeof model2 === "string" && model2 ? { model: model2 } : {},
55518
- inputTokens: input + cached2 + written,
55640
+ inputTokens: input2 + cached2 + written,
55519
55641
  cachedInputTokens: cached2,
55520
55642
  cacheWriteInputTokens: written,
55521
55643
  ...count2(oneHour) ? { cacheWrite1hInputTokens: oneHour } : {},
@@ -55577,7 +55699,7 @@ var QoderAdapter = class {
55577
55699
  this.#platform = options.platform ?? process.platform;
55578
55700
  const startDaemon = options.startDaemon ?? (options.queryFactory === void 0 && typeof runtime.sdk.startDaemon === "function" ? (config2) => runtime.sdk.startDaemon(config2) : void 0);
55579
55701
  this.#daemons = startDaemon ? new QoderDaemonPool(startDaemon) : void 0;
55580
- this.#queryFactory = options.queryFactory ?? ((input) => runtime.sdk.query(input));
55702
+ this.#queryFactory = options.queryFactory ?? ((input2) => runtime.sdk.query(input2));
55581
55703
  this.#forkSession = options.forkSession ?? runtime.sdk.forkSession;
55582
55704
  this.#getSessionMessages = options.getSessionMessages ?? runtime.sdk.getSessionMessages;
55583
55705
  this.#getSessionInfo = options.getSessionInfo ?? runtime.sdk.getSessionInfo;
@@ -55588,16 +55710,16 @@ var QoderAdapter = class {
55588
55710
  getSessionInfo: this.#getSessionInfo
55589
55711
  });
55590
55712
  this.#getAvailableModels = options.getAvailableModels;
55591
- this.#resolveExecutable = options.resolveExecutable ?? ((input, dependencies) => resolveQoderExecutable({ ...input, variant: this.#variant }, dependencies));
55713
+ this.#resolveExecutable = options.resolveExecutable ?? ((input2, dependencies) => resolveQoderExecutable({ ...input2, variant: this.#variant }, dependencies));
55592
55714
  }
55593
55715
  /** Leases a daemon owning this launch config, or undefined when daemons are not managed. */
55594
- async #leaseDaemon(input) {
55716
+ async #leaseDaemon(input2) {
55595
55717
  if (!this.#daemons)
55596
55718
  return void 0;
55597
55719
  return this.#daemons.acquire({
55598
- auth: qoderAuthForEnvironment(this.#variant, input.environment),
55599
- env: input.environment,
55600
- ...input.pathToQoderCLIExecutable ? { pathToQoderCLIExecutable: input.pathToQoderCLIExecutable } : {}
55720
+ auth: qoderAuthForEnvironment(this.#variant, input2.environment),
55721
+ env: input2.environment,
55722
+ ...input2.pathToQoderCLIExecutable ? { pathToQoderCLIExecutable: input2.pathToQoderCLIExecutable } : {}
55601
55723
  });
55602
55724
  }
55603
55725
  /** Query options for a probe; launch config goes to the daemon when one is leased. */
@@ -55648,15 +55770,15 @@ var QoderAdapter = class {
55648
55770
  await lease?.release();
55649
55771
  }
55650
55772
  }
55651
- async inspect(input) {
55652
- const cacheKey = input?.cwd ?? "";
55773
+ async inspect(input2) {
55774
+ const cacheKey = input2?.cwd ?? "";
55653
55775
  if (this.#closed) {
55654
55776
  return {
55655
55777
  status: "unavailable",
55656
55778
  error: { code: "invalidState", message: "Qoder adapter is closed", retryable: false }
55657
55779
  };
55658
55780
  }
55659
- if (input?.refresh) {
55781
+ if (input2?.refresh) {
55660
55782
  this.#inspections.clear();
55661
55783
  this.#inFlightInspections.clear();
55662
55784
  } else {
@@ -55693,7 +55815,7 @@ var QoderAdapter = class {
55693
55815
  const probeQuery = this.#queryFactory({
55694
55816
  prompt: "",
55695
55817
  options: {
55696
- cwd: input?.cwd ?? process.cwd(),
55818
+ cwd: input2?.cwd ?? process.cwd(),
55697
55819
  abortController: controller,
55698
55820
  stderr: (chunk) => {
55699
55821
  stderr = (stderr + chunk).slice(-8192);
@@ -55714,7 +55836,7 @@ var QoderAdapter = class {
55714
55836
  }
55715
55837
  }
55716
55838
  } catch (error51) {
55717
- const needsLogin = qoderLoginRequired(stderr + (lease?.stderr() ?? "")) || error51 instanceof Error && error51.message === "Transport closed" && qoderAuthForEnvironment(this.#variant, this.#environment).type === "qodercli" && await checkQoderLogin(executable, this.#environment, input?.cwd);
55839
+ const needsLogin = qoderLoginRequired(stderr + (lease?.stderr() ?? "")) || error51 instanceof Error && error51.message === "Transport closed" && qoderAuthForEnvironment(this.#variant, this.#environment).type === "qodercli" && await checkQoderLogin(executable, this.#environment, input2?.cwd);
55718
55840
  const result2 = {
55719
55841
  status: "unavailable",
55720
55842
  error: needsLogin ? {
@@ -55772,14 +55894,14 @@ var QoderAdapter = class {
55772
55894
  this.#inFlightInspections.set(cacheKey, task);
55773
55895
  return task;
55774
55896
  }
55775
- async open(input) {
55776
- if ("model" in input && input.model && !qoderModelValue(input.model)) {
55897
+ async open(input2) {
55898
+ if ("model" in input2 && input2.model && !qoderModelValue(input2.model)) {
55777
55899
  return {
55778
55900
  ok: false,
55779
55901
  error: { code: "invalidRequest", message: "Invalid Qoder Model Ref", retryable: false }
55780
55902
  };
55781
55903
  }
55782
- if ("permissionModeId" in input && input.permissionModeId && !mapToQoderPermissionMode(input.permissionModeId)) {
55904
+ if ("permissionModeId" in input2 && input2.permissionModeId && !mapToQoderPermissionMode(input2.permissionModeId)) {
55783
55905
  return {
55784
55906
  ok: false,
55785
55907
  error: {
@@ -55789,8 +55911,8 @@ var QoderAdapter = class {
55789
55911
  }
55790
55912
  };
55791
55913
  }
55792
- let permissionModeId = "permissionModeId" in input ? input.permissionModeId : void 0;
55793
- if (input.kind === "create" && input.executionPolicy === "unattended-full-access") {
55914
+ let permissionModeId = "permissionModeId" in input2 ? input2.permissionModeId : void 0;
55915
+ if (input2.kind === "create" && input2.executionPolicy === "unattended-full-access") {
55794
55916
  if (permissionModeId && !["bypassPermissions", "yolo"].includes(permissionModeId)) {
55795
55917
  return {
55796
55918
  ok: false,
@@ -55803,7 +55925,7 @@ var QoderAdapter = class {
55803
55925
  }
55804
55926
  permissionModeId = harnessPermissionModeIdSchema.parse("bypassPermissions");
55805
55927
  }
55806
- const environment = qoderEnvironment(input.environment ?? this.#environment);
55928
+ const environment = qoderEnvironment(input2.environment ?? this.#environment);
55807
55929
  let pathToQoderCLIExecutable;
55808
55930
  try {
55809
55931
  pathToQoderCLIExecutable = this.#resolveExecutable({
@@ -55815,11 +55937,11 @@ var QoderAdapter = class {
55815
55937
  }
55816
55938
  let sessionId;
55817
55939
  let openResumeId;
55818
- if (input.kind === "create") {
55940
+ if (input2.kind === "create") {
55819
55941
  sessionId = randomUUID2();
55820
- } else if (input.kind === "resume") {
55821
- const id4 = input.nativeRef?.nativeSessionId;
55822
- if (!id4 || typeof id4 !== "string" || input.nativeRef.harnessId !== this.harnessId) {
55942
+ } else if (input2.kind === "resume") {
55943
+ const id4 = input2.nativeRef?.nativeSessionId;
55944
+ if (!id4 || typeof id4 !== "string" || input2.nativeRef.harnessId !== this.harnessId) {
55823
55945
  return {
55824
55946
  ok: false,
55825
55947
  error: {
@@ -55831,9 +55953,9 @@ var QoderAdapter = class {
55831
55953
  }
55832
55954
  sessionId = id4;
55833
55955
  openResumeId = id4;
55834
- } else if (input.kind === "fork") {
55835
- const sourceRef = nativeSessionRefSchema.safeParse(input.sourceRef);
55836
- const checkpoint = nativeCheckpointRefSchema.safeParse(input.checkpoint);
55956
+ } else if (input2.kind === "fork") {
55957
+ const sourceRef = nativeSessionRefSchema.safeParse(input2.sourceRef);
55958
+ const checkpoint = nativeCheckpointRefSchema.safeParse(input2.checkpoint);
55837
55959
  if (!sourceRef.success || sourceRef.data.harnessId !== this.harnessId || !checkpoint.success || checkpoint.data.harnessId !== this.harnessId || checkpoint.data.nativeSessionId !== sourceRef.data.nativeSessionId) {
55838
55960
  return {
55839
55961
  ok: false,
@@ -55846,10 +55968,10 @@ var QoderAdapter = class {
55846
55968
  }
55847
55969
  let sourceInfo;
55848
55970
  try {
55849
- sourceInfo = await this.#getSessionInfo(sourceRef.data.nativeSessionId, { dir: input.cwd });
55971
+ sourceInfo = await this.#getSessionInfo(sourceRef.data.nativeSessionId, { dir: input2.cwd });
55850
55972
  } catch {
55851
55973
  }
55852
- if (sourceInfo?.cwd && path9.resolve(sourceInfo.cwd) !== path9.resolve(input.cwd)) {
55974
+ if (sourceInfo?.cwd && path9.resolve(sourceInfo.cwd) !== path9.resolve(input2.cwd)) {
55853
55975
  return {
55854
55976
  ok: false,
55855
55977
  error: {
@@ -55862,7 +55984,7 @@ var QoderAdapter = class {
55862
55984
  let derivedSessionId;
55863
55985
  try {
55864
55986
  const forked = await this.#forkSession(sourceRef.data.nativeSessionId, {
55865
- dir: input.cwd,
55987
+ dir: input2.cwd,
55866
55988
  upToMessageId: checkpoint.data.checkpointId
55867
55989
  });
55868
55990
  derivedSessionId = forked.sessionId;
@@ -55880,8 +56002,8 @@ var QoderAdapter = class {
55880
56002
  }
55881
56003
  sessionId = derivedSessionId;
55882
56004
  openResumeId = derivedSessionId;
55883
- } else if (input.kind === "rollbackLastTurn") {
55884
- const sourceRef = nativeSessionRefSchema.safeParse(input.sourceRef);
56005
+ } else if (input2.kind === "rollbackLastTurn") {
56006
+ const sourceRef = nativeSessionRefSchema.safeParse(input2.sourceRef);
55885
56007
  if (!sourceRef.success || sourceRef.data.harnessId !== this.harnessId) {
55886
56008
  return {
55887
56009
  ok: false,
@@ -55895,7 +56017,7 @@ var QoderAdapter = class {
55895
56017
  let sourceMessages;
55896
56018
  try {
55897
56019
  sourceMessages = await this.#getSessionMessages(sourceRef.data.nativeSessionId, {
55898
- dir: input.cwd,
56020
+ dir: input2.cwd,
55899
56021
  view: "historical"
55900
56022
  });
55901
56023
  } catch (error51) {
@@ -55938,7 +56060,7 @@ var QoderAdapter = class {
55938
56060
  let derivedSessionId;
55939
56061
  try {
55940
56062
  const forked = await this.#forkSession(sourceRef.data.nativeSessionId, {
55941
- dir: input.cwd,
56063
+ dir: input2.cwd,
55942
56064
  upToMessageId: checkpointId
55943
56065
  });
55944
56066
  derivedSessionId = forked.sessionId;
@@ -55967,7 +56089,7 @@ var QoderAdapter = class {
55967
56089
  }
55968
56090
  };
55969
56091
  }
55970
- const inspection = await this.inspect({ cwd: input.cwd });
56092
+ const inspection = await this.inspect({ cwd: input2.cwd });
55971
56093
  if (inspection.status !== "ready")
55972
56094
  return { ok: false, error: inspection.error };
55973
56095
  const catalog = inspection.catalog;
@@ -55984,11 +56106,11 @@ var QoderAdapter = class {
55984
56106
  session = new QoderSession({
55985
56107
  variant: this.#variant,
55986
56108
  sessionId,
55987
- cwd: input.cwd,
56109
+ cwd: input2.cwd,
55988
56110
  environment,
55989
- ..."model" in input && input.model ? { model: input.model } : {},
56111
+ ..."model" in input2 && input2.model ? { model: input2.model } : {},
55990
56112
  ...permissionModeId ? { permissionModeId } : {},
55991
- ..."thinkingOptionId" in input && input.thinkingOptionId ? { thinkingOptionId: input.thinkingOptionId } : {},
56113
+ ..."thinkingOptionId" in input2 && input2.thinkingOptionId ? { thinkingOptionId: input2.thinkingOptionId } : {},
55992
56114
  ...catalog ? { catalog } : {},
55993
56115
  ...openResumeId ? { resume: openResumeId } : {},
55994
56116
  queryFactory: this.#queryFactory,