tempest.games 0.2.95 → 0.2.97

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.
@@ -3181,7 +3181,7 @@ var ParentSocket = class extends CustomSocket {
3181
3181
  incompleteData = ``;
3182
3182
  unprocessedEvents = [];
3183
3183
  relays;
3184
- relayServices;
3184
+ initRelay;
3185
3185
  proc;
3186
3186
  id = `#####`;
3187
3187
  log(...args) {
@@ -3207,7 +3207,9 @@ var ParentSocket = class extends CustomSocket {
3207
3207
  this.proc = proc;
3208
3208
  this.proc.stdin.resume();
3209
3209
  this.relays = /* @__PURE__ */ new Map;
3210
- this.relayServices = [];
3210
+ this.initRelay = () => {
3211
+ this.logger.info(`\uD83D\uDD17`, `nothing to relay`);
3212
+ };
3211
3213
  this.proc.stdin.on(`data`, (buffer) => {
3212
3214
  const pieces = buffer.toString().split(`\x03`);
3213
3215
  const initialMaybeWellFormed = pieces[0];
@@ -3262,15 +3264,13 @@ var ParentSocket = class extends CustomSocket {
3262
3264
  if (this.proc.pid)
3263
3265
  this.id = this.proc.pid?.toString();
3264
3266
  this.on(`user-joins`, (userKey) => {
3265
- this.logger.info(`\uD83D\uDC64`, `user`, userKey, `joined`);
3267
+ this.logger.info(`\uD83D\uDC64`, userKey, `joined`);
3266
3268
  const relay = new SubjectSocket(userKey);
3267
3269
  this.relays.set(userKey, relay);
3268
- this.logger.info(`\uD83D\uDD17`, `attaching services:`, `[${[...this.relayServices.keys()].join(`, `)}]`);
3269
- for (const attachRelay of this.relayServices) {
3270
- const cleanupRelay = attachRelay(relay, userKey);
3271
- if (cleanupRelay)
3272
- relay.disposalFunctions.push(cleanupRelay);
3273
- }
3270
+ this.logger.info(`\uD83D\uDD17`, `attaching services for user`, userKey);
3271
+ const cleanupRelay = this.initRelay(relay, userKey);
3272
+ if (cleanupRelay)
3273
+ relay.disposalFunctions.push(cleanupRelay);
3274
3274
  this.on(userKey, (...data) => {
3275
3275
  relay.in.next(data);
3276
3276
  });
@@ -3290,7 +3290,7 @@ var ParentSocket = class extends CustomSocket {
3290
3290
  }
3291
3291
  receiveRelay(attachServices) {
3292
3292
  this.logger.info(`\uD83D\uDD17`, `running relay method`);
3293
- this.relayServices.push(attachServices);
3293
+ this.initRelay = attachServices;
3294
3294
  }
3295
3295
  };
3296
3296
  var ChildSocket = class extends CustomSocket {
@@ -3477,9 +3477,10 @@ var usersOfSockets = join({
3477
3477
  isBType: isSocketKey
3478
3478
  });
3479
3479
 
3480
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/external.js
3480
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/external.js
3481
3481
  var exports_external = {};
3482
3482
  __export(exports_external, {
3483
+ xor: () => xor,
3483
3484
  xid: () => xid2,
3484
3485
  void: () => _void2,
3485
3486
  uuidv7: () => uuidv7,
@@ -3565,6 +3566,7 @@ __export(exports_external, {
3565
3566
  lte: () => _lte,
3566
3567
  lt: () => _lt,
3567
3568
  lowercase: () => _lowercase,
3569
+ looseRecord: () => looseRecord,
3568
3570
  looseObject: () => looseObject,
3569
3571
  locales: () => exports_locales,
3570
3572
  literal: () => literal,
@@ -3593,6 +3595,7 @@ __export(exports_external, {
3593
3595
  globalRegistry: () => globalRegistry,
3594
3596
  getErrorMap: () => getErrorMap,
3595
3597
  function: () => _function,
3598
+ fromJSONSchema: () => fromJSONSchema,
3596
3599
  formatError: () => formatError,
3597
3600
  float64: () => float64,
3598
3601
  float32: () => float32,
@@ -3631,6 +3634,7 @@ __export(exports_external, {
3631
3634
  _function: () => _function,
3632
3635
  _default: () => _default2,
3633
3636
  _ZodString: () => _ZodString,
3637
+ ZodXor: () => ZodXor,
3634
3638
  ZodXID: () => ZodXID,
3635
3639
  ZodVoid: () => ZodVoid,
3636
3640
  ZodUnknown: () => ZodUnknown,
@@ -3712,7 +3716,7 @@ __export(exports_external, {
3712
3716
  $brand: () => $brand
3713
3717
  });
3714
3718
 
3715
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/index.js
3719
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/index.js
3716
3720
  var exports_core2 = {};
3717
3721
  __export(exports_core2, {
3718
3722
  version: () => version,
@@ -3728,6 +3732,7 @@ __export(exports_core2, {
3728
3732
  safeDecode: () => safeDecode,
3729
3733
  registry: () => registry,
3730
3734
  regexes: () => exports_regexes,
3735
+ process: () => process2,
3731
3736
  prettifyError: () => prettifyError,
3732
3737
  parseAsync: () => parseAsync,
3733
3738
  parse: () => parse,
@@ -3736,17 +3741,23 @@ __export(exports_core2, {
3736
3741
  isValidJWT: () => isValidJWT,
3737
3742
  isValidBase64URL: () => isValidBase64URL,
3738
3743
  isValidBase64: () => isValidBase64,
3744
+ initializeContext: () => initializeContext,
3739
3745
  globalRegistry: () => globalRegistry,
3740
3746
  globalConfig: () => globalConfig,
3741
3747
  formatError: () => formatError,
3742
3748
  flattenError: () => flattenError,
3749
+ finalize: () => finalize,
3750
+ extractDefs: () => extractDefs,
3743
3751
  encodeAsync: () => encodeAsync,
3744
3752
  encode: () => encode,
3745
3753
  describe: () => describe,
3746
3754
  decodeAsync: () => decodeAsync,
3747
3755
  decode: () => decode,
3756
+ createToJSONSchemaMethod: () => createToJSONSchemaMethod,
3757
+ createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
3748
3758
  config: () => config,
3749
3759
  clone: () => clone,
3760
+ _xor: () => _xor,
3750
3761
  _xid: () => _xid,
3751
3762
  _void: () => _void,
3752
3763
  _uuidv7: () => _uuidv7,
@@ -3881,6 +3892,7 @@ __export(exports_core2, {
3881
3892
  $input: () => $input,
3882
3893
  $constructor: () => $constructor,
3883
3894
  $brand: () => $brand,
3895
+ $ZodXor: () => $ZodXor,
3884
3896
  $ZodXID: () => $ZodXID,
3885
3897
  $ZodVoid: () => $ZodVoid,
3886
3898
  $ZodUnknown: () => $ZodUnknown,
@@ -3981,7 +3993,7 @@ __export(exports_core2, {
3981
3993
  $ZodAny: () => $ZodAny
3982
3994
  });
3983
3995
 
3984
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/core.js
3996
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/core.js
3985
3997
  var NEVER = Object.freeze({
3986
3998
  status: "aborted"
3987
3999
  });
@@ -4057,7 +4069,7 @@ function config(newConfig) {
4057
4069
  Object.assign(globalConfig, newConfig);
4058
4070
  return globalConfig;
4059
4071
  }
4060
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/util.js
4072
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/util.js
4061
4073
  var exports_util = {};
4062
4074
  __export(exports_util, {
4063
4075
  unwrapMessage: () => unwrapMessage,
@@ -4130,7 +4142,7 @@ function assertNotEqual(val) {
4130
4142
  }
4131
4143
  function assertIs(_arg) {}
4132
4144
  function assertNever(_x) {
4133
- throw new Error;
4145
+ throw new Error("Unexpected value in exhaustive check");
4134
4146
  }
4135
4147
  function assert(_) {}
4136
4148
  function getEnumValues(entries) {
@@ -4692,7 +4704,7 @@ class Class {
4692
4704
  constructor(..._args) {}
4693
4705
  }
4694
4706
 
4695
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/errors.js
4707
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/errors.js
4696
4708
  var initializer = (inst, def) => {
4697
4709
  inst.name = "$ZodError";
4698
4710
  Object.defineProperty(inst, "_zod", {
@@ -4829,7 +4841,7 @@ function prettifyError(error) {
4829
4841
  `);
4830
4842
  }
4831
4843
 
4832
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/parse.js
4844
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/parse.js
4833
4845
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
4834
4846
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
4835
4847
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -4916,7 +4928,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
4916
4928
  return _safeParseAsync(_Err)(schema, value, _ctx);
4917
4929
  };
4918
4930
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
4919
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/regexes.js
4931
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/regexes.js
4920
4932
  var exports_regexes = {};
4921
4933
  __export(exports_regexes, {
4922
4934
  xid: () => xid,
@@ -5073,7 +5085,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
5073
5085
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
5074
5086
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
5075
5087
 
5076
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/checks.js
5088
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/checks.js
5077
5089
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
5078
5090
  var _a;
5079
5091
  inst._zod ?? (inst._zod = {});
@@ -5614,7 +5626,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
5614
5626
  };
5615
5627
  });
5616
5628
 
5617
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/doc.js
5629
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/doc.js
5618
5630
  class Doc {
5619
5631
  constructor(args = []) {
5620
5632
  this.content = [];
@@ -5652,14 +5664,14 @@ class Doc {
5652
5664
  }
5653
5665
  }
5654
5666
 
5655
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/versions.js
5667
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/versions.js
5656
5668
  var version = {
5657
5669
  major: 4,
5658
- minor: 1,
5659
- patch: 13
5670
+ minor: 2,
5671
+ patch: 0
5660
5672
  };
5661
5673
 
5662
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/schemas.js
5674
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/schemas.js
5663
5675
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
5664
5676
  var _a;
5665
5677
  inst ?? (inst = {});
@@ -6561,7 +6573,62 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
6561
6573
  });
6562
6574
  };
6563
6575
  });
6576
+ function handleExclusiveUnionResults(results, final, inst, ctx) {
6577
+ const successes = results.filter((r) => r.issues.length === 0);
6578
+ if (successes.length === 1) {
6579
+ final.value = successes[0].value;
6580
+ return final;
6581
+ }
6582
+ if (successes.length === 0) {
6583
+ final.issues.push({
6584
+ code: "invalid_union",
6585
+ input: final.value,
6586
+ inst,
6587
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
6588
+ });
6589
+ } else {
6590
+ final.issues.push({
6591
+ code: "invalid_union",
6592
+ input: final.value,
6593
+ inst,
6594
+ errors: [],
6595
+ inclusive: false
6596
+ });
6597
+ }
6598
+ return final;
6599
+ }
6600
+ var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
6601
+ $ZodUnion.init(inst, def);
6602
+ def.inclusive = false;
6603
+ const single = def.options.length === 1;
6604
+ const first = def.options[0]._zod.run;
6605
+ inst._zod.parse = (payload, ctx) => {
6606
+ if (single) {
6607
+ return first(payload, ctx);
6608
+ }
6609
+ let async = false;
6610
+ const results = [];
6611
+ for (const option of def.options) {
6612
+ const result = option._zod.run({
6613
+ value: payload.value,
6614
+ issues: []
6615
+ }, ctx);
6616
+ if (result instanceof Promise) {
6617
+ results.push(result);
6618
+ async = true;
6619
+ } else {
6620
+ results.push(result);
6621
+ }
6622
+ }
6623
+ if (!async)
6624
+ return handleExclusiveUnionResults(results, payload, inst, ctx);
6625
+ return Promise.all(results).then((results2) => {
6626
+ return handleExclusiveUnionResults(results2, payload, inst, ctx);
6627
+ });
6628
+ };
6629
+ });
6564
6630
  var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
6631
+ def.inclusive = false;
6565
6632
  $ZodUnion.init(inst, def);
6566
6633
  const _super = inst._zod.parse;
6567
6634
  defineLazy(inst._zod, "propValues", () => {
@@ -6837,15 +6904,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
6837
6904
  throw new Error("Async schemas not supported in object keys currently");
6838
6905
  }
6839
6906
  if (keyResult.issues.length) {
6840
- payload.issues.push({
6841
- code: "invalid_key",
6842
- origin: "record",
6843
- issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
6844
- input: key,
6845
- path: [key],
6846
- inst
6847
- });
6848
- payload.value[keyResult.value] = keyResult.value;
6907
+ if (def.mode === "loose") {
6908
+ payload.value[key] = input[key];
6909
+ } else {
6910
+ payload.issues.push({
6911
+ code: "invalid_key",
6912
+ origin: "record",
6913
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
6914
+ input: key,
6915
+ path: [key],
6916
+ inst
6917
+ });
6918
+ }
6849
6919
  continue;
6850
6920
  }
6851
6921
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
@@ -7494,7 +7564,7 @@ function handleRefineResult(result, payload, input, inst) {
7494
7564
  payload.issues.push(issue(_iss));
7495
7565
  }
7496
7566
  }
7497
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/index.js
7567
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/index.js
7498
7568
  var exports_locales = {};
7499
7569
  __export(exports_locales, {
7500
7570
  zhTW: () => zh_TW_default,
@@ -7546,7 +7616,7 @@ __export(exports_locales, {
7546
7616
  ar: () => ar_default
7547
7617
  });
7548
7618
 
7549
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ar.js
7619
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ar.js
7550
7620
  var error = () => {
7551
7621
  const Sizable = {
7552
7622
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -7662,7 +7732,7 @@ function ar_default() {
7662
7732
  localeError: error()
7663
7733
  };
7664
7734
  }
7665
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/az.js
7735
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/az.js
7666
7736
  var error2 = () => {
7667
7737
  const Sizable = {
7668
7738
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -7777,7 +7847,7 @@ function az_default() {
7777
7847
  localeError: error2()
7778
7848
  };
7779
7849
  }
7780
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/be.js
7850
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/be.js
7781
7851
  function getBelarusianPlural(count, one, few, many) {
7782
7852
  const absCount = Math.abs(count);
7783
7853
  const lastDigit = absCount % 10;
@@ -7941,7 +8011,7 @@ function be_default() {
7941
8011
  localeError: error3()
7942
8012
  };
7943
8013
  }
7944
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/bg.js
8014
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/bg.js
7945
8015
  var parsedType = (data) => {
7946
8016
  const t = typeof data;
7947
8017
  switch (t) {
@@ -8069,7 +8139,7 @@ function bg_default() {
8069
8139
  localeError: error4()
8070
8140
  };
8071
8141
  }
8072
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ca.js
8142
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ca.js
8073
8143
  var error5 = () => {
8074
8144
  const Sizable = {
8075
8145
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -8186,7 +8256,7 @@ function ca_default() {
8186
8256
  localeError: error5()
8187
8257
  };
8188
8258
  }
8189
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/cs.js
8259
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/cs.js
8190
8260
  var error6 = () => {
8191
8261
  const Sizable = {
8192
8262
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -8321,7 +8391,7 @@ function cs_default() {
8321
8391
  localeError: error6()
8322
8392
  };
8323
8393
  }
8324
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/da.js
8394
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/da.js
8325
8395
  var error7 = () => {
8326
8396
  const Sizable = {
8327
8397
  string: { unit: "tegn", verb: "havde" },
@@ -8452,7 +8522,7 @@ function da_default() {
8452
8522
  localeError: error7()
8453
8523
  };
8454
8524
  }
8455
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/de.js
8525
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/de.js
8456
8526
  var error8 = () => {
8457
8527
  const Sizable = {
8458
8528
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -8568,7 +8638,7 @@ function de_default() {
8568
8638
  localeError: error8()
8569
8639
  };
8570
8640
  }
8571
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/en.js
8641
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/en.js
8572
8642
  var parsedType2 = (data) => {
8573
8643
  const t = typeof data;
8574
8644
  switch (t) {
@@ -8686,7 +8756,7 @@ function en_default() {
8686
8756
  localeError: error9()
8687
8757
  };
8688
8758
  }
8689
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/eo.js
8759
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/eo.js
8690
8760
  var parsedType3 = (data) => {
8691
8761
  const t = typeof data;
8692
8762
  switch (t) {
@@ -8802,7 +8872,7 @@ function eo_default() {
8802
8872
  localeError: error10()
8803
8873
  };
8804
8874
  }
8805
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/es.js
8875
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/es.js
8806
8876
  var error11 = () => {
8807
8877
  const Sizable = {
8808
8878
  string: { unit: "caracteres", verb: "tener" },
@@ -8950,7 +9020,7 @@ function es_default() {
8950
9020
  localeError: error11()
8951
9021
  };
8952
9022
  }
8953
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/fa.js
9023
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/fa.js
8954
9024
  var error12 = () => {
8955
9025
  const Sizable = {
8956
9026
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -9072,7 +9142,7 @@ function fa_default() {
9072
9142
  localeError: error12()
9073
9143
  };
9074
9144
  }
9075
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/fi.js
9145
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/fi.js
9076
9146
  var error13 = () => {
9077
9147
  const Sizable = {
9078
9148
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -9194,7 +9264,7 @@ function fi_default() {
9194
9264
  localeError: error13()
9195
9265
  };
9196
9266
  }
9197
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/fr.js
9267
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/fr.js
9198
9268
  var error14 = () => {
9199
9269
  const Sizable = {
9200
9270
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -9310,7 +9380,7 @@ function fr_default() {
9310
9380
  localeError: error14()
9311
9381
  };
9312
9382
  }
9313
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/fr-CA.js
9383
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/fr-CA.js
9314
9384
  var error15 = () => {
9315
9385
  const Sizable = {
9316
9386
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -9427,7 +9497,7 @@ function fr_CA_default() {
9427
9497
  localeError: error15()
9428
9498
  };
9429
9499
  }
9430
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/he.js
9500
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/he.js
9431
9501
  var error16 = () => {
9432
9502
  const TypeNames = {
9433
9503
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -9633,7 +9703,7 @@ function he_default() {
9633
9703
  localeError: error16()
9634
9704
  };
9635
9705
  }
9636
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/hu.js
9706
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/hu.js
9637
9707
  var error17 = () => {
9638
9708
  const Sizable = {
9639
9709
  string: { unit: "karakter", verb: "legyen" },
@@ -9749,7 +9819,7 @@ function hu_default() {
9749
9819
  localeError: error17()
9750
9820
  };
9751
9821
  }
9752
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/id.js
9822
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/id.js
9753
9823
  var error18 = () => {
9754
9824
  const Sizable = {
9755
9825
  string: { unit: "karakter", verb: "memiliki" },
@@ -9865,7 +9935,7 @@ function id_default() {
9865
9935
  localeError: error18()
9866
9936
  };
9867
9937
  }
9868
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/is.js
9938
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/is.js
9869
9939
  var parsedType4 = (data) => {
9870
9940
  const t = typeof data;
9871
9941
  switch (t) {
@@ -9982,7 +10052,7 @@ function is_default() {
9982
10052
  localeError: error19()
9983
10053
  };
9984
10054
  }
9985
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/it.js
10055
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/it.js
9986
10056
  var error20 = () => {
9987
10057
  const Sizable = {
9988
10058
  string: { unit: "caratteri", verb: "avere" },
@@ -10098,7 +10168,7 @@ function it_default() {
10098
10168
  localeError: error20()
10099
10169
  };
10100
10170
  }
10101
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ja.js
10171
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ja.js
10102
10172
  var error21 = () => {
10103
10173
  const Sizable = {
10104
10174
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -10213,7 +10283,7 @@ function ja_default() {
10213
10283
  localeError: error21()
10214
10284
  };
10215
10285
  }
10216
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ka.js
10286
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ka.js
10217
10287
  var parsedType5 = (data) => {
10218
10288
  const t = typeof data;
10219
10289
  switch (t) {
@@ -10338,7 +10408,7 @@ function ka_default() {
10338
10408
  localeError: error22()
10339
10409
  };
10340
10410
  }
10341
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/km.js
10411
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/km.js
10342
10412
  var error23 = () => {
10343
10413
  const Sizable = {
10344
10414
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -10456,11 +10526,11 @@ function km_default() {
10456
10526
  };
10457
10527
  }
10458
10528
 
10459
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/kh.js
10529
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/kh.js
10460
10530
  function kh_default() {
10461
10531
  return km_default();
10462
10532
  }
10463
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ko.js
10533
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ko.js
10464
10534
  var error24 = () => {
10465
10535
  const Sizable = {
10466
10536
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -10581,7 +10651,7 @@ function ko_default() {
10581
10651
  localeError: error24()
10582
10652
  };
10583
10653
  }
10584
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/lt.js
10654
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/lt.js
10585
10655
  var parsedType6 = (data) => {
10586
10656
  const t = typeof data;
10587
10657
  return parsedTypeFromType(t, data);
@@ -10810,7 +10880,7 @@ function lt_default() {
10810
10880
  localeError: error25()
10811
10881
  };
10812
10882
  }
10813
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/mk.js
10883
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/mk.js
10814
10884
  var error26 = () => {
10815
10885
  const Sizable = {
10816
10886
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -10927,7 +10997,7 @@ function mk_default() {
10927
10997
  localeError: error26()
10928
10998
  };
10929
10999
  }
10930
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ms.js
11000
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ms.js
10931
11001
  var error27 = () => {
10932
11002
  const Sizable = {
10933
11003
  string: { unit: "aksara", verb: "mempunyai" },
@@ -11043,7 +11113,7 @@ function ms_default() {
11043
11113
  localeError: error27()
11044
11114
  };
11045
11115
  }
11046
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/nl.js
11116
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/nl.js
11047
11117
  var error28 = () => {
11048
11118
  const Sizable = {
11049
11119
  string: { unit: "tekens", verb: "te hebben" },
@@ -11160,7 +11230,7 @@ function nl_default() {
11160
11230
  localeError: error28()
11161
11231
  };
11162
11232
  }
11163
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/no.js
11233
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/no.js
11164
11234
  var error29 = () => {
11165
11235
  const Sizable = {
11166
11236
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -11276,7 +11346,7 @@ function no_default() {
11276
11346
  localeError: error29()
11277
11347
  };
11278
11348
  }
11279
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ota.js
11349
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ota.js
11280
11350
  var error30 = () => {
11281
11351
  const Sizable = {
11282
11352
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -11392,7 +11462,7 @@ function ota_default() {
11392
11462
  localeError: error30()
11393
11463
  };
11394
11464
  }
11395
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ps.js
11465
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ps.js
11396
11466
  var error31 = () => {
11397
11467
  const Sizable = {
11398
11468
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -11514,7 +11584,7 @@ function ps_default() {
11514
11584
  localeError: error31()
11515
11585
  };
11516
11586
  }
11517
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/pl.js
11587
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/pl.js
11518
11588
  var error32 = () => {
11519
11589
  const Sizable = {
11520
11590
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -11631,7 +11701,7 @@ function pl_default() {
11631
11701
  localeError: error32()
11632
11702
  };
11633
11703
  }
11634
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/pt.js
11704
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/pt.js
11635
11705
  var error33 = () => {
11636
11706
  const Sizable = {
11637
11707
  string: { unit: "caracteres", verb: "ter" },
@@ -11747,7 +11817,7 @@ function pt_default() {
11747
11817
  localeError: error33()
11748
11818
  };
11749
11819
  }
11750
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ru.js
11820
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ru.js
11751
11821
  function getRussianPlural(count, one, few, many) {
11752
11822
  const absCount = Math.abs(count);
11753
11823
  const lastDigit = absCount % 10;
@@ -11911,7 +11981,7 @@ function ru_default() {
11911
11981
  localeError: error34()
11912
11982
  };
11913
11983
  }
11914
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/sl.js
11984
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/sl.js
11915
11985
  var error35 = () => {
11916
11986
  const Sizable = {
11917
11987
  string: { unit: "znakov", verb: "imeti" },
@@ -12028,7 +12098,7 @@ function sl_default() {
12028
12098
  localeError: error35()
12029
12099
  };
12030
12100
  }
12031
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/sv.js
12101
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/sv.js
12032
12102
  var error36 = () => {
12033
12103
  const Sizable = {
12034
12104
  string: { unit: "tecken", verb: "att ha" },
@@ -12146,7 +12216,7 @@ function sv_default() {
12146
12216
  localeError: error36()
12147
12217
  };
12148
12218
  }
12149
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ta.js
12219
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ta.js
12150
12220
  var error37 = () => {
12151
12221
  const Sizable = {
12152
12222
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -12263,7 +12333,7 @@ function ta_default() {
12263
12333
  localeError: error37()
12264
12334
  };
12265
12335
  }
12266
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/th.js
12336
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/th.js
12267
12337
  var error38 = () => {
12268
12338
  const Sizable = {
12269
12339
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -12380,7 +12450,7 @@ function th_default() {
12380
12450
  localeError: error38()
12381
12451
  };
12382
12452
  }
12383
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/tr.js
12453
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/tr.js
12384
12454
  var parsedType7 = (data) => {
12385
12455
  const t = typeof data;
12386
12456
  switch (t) {
@@ -12495,7 +12565,7 @@ function tr_default() {
12495
12565
  localeError: error39()
12496
12566
  };
12497
12567
  }
12498
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/uk.js
12568
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/uk.js
12499
12569
  var error40 = () => {
12500
12570
  const Sizable = {
12501
12571
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -12612,11 +12682,11 @@ function uk_default() {
12612
12682
  };
12613
12683
  }
12614
12684
 
12615
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ua.js
12685
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ua.js
12616
12686
  function ua_default() {
12617
12687
  return uk_default();
12618
12688
  }
12619
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/ur.js
12689
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/ur.js
12620
12690
  var error41 = () => {
12621
12691
  const Sizable = {
12622
12692
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -12733,7 +12803,7 @@ function ur_default() {
12733
12803
  localeError: error41()
12734
12804
  };
12735
12805
  }
12736
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/vi.js
12806
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/vi.js
12737
12807
  var error42 = () => {
12738
12808
  const Sizable = {
12739
12809
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -12849,7 +12919,7 @@ function vi_default() {
12849
12919
  localeError: error42()
12850
12920
  };
12851
12921
  }
12852
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/zh-CN.js
12922
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/zh-CN.js
12853
12923
  var error43 = () => {
12854
12924
  const Sizable = {
12855
12925
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -12965,7 +13035,7 @@ function zh_CN_default() {
12965
13035
  localeError: error43()
12966
13036
  };
12967
13037
  }
12968
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/zh-TW.js
13038
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/zh-TW.js
12969
13039
  var error44 = () => {
12970
13040
  const Sizable = {
12971
13041
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -13082,7 +13152,7 @@ function zh_TW_default() {
13082
13152
  localeError: error44()
13083
13153
  };
13084
13154
  }
13085
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/locales/yo.js
13155
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/locales/yo.js
13086
13156
  var error45 = () => {
13087
13157
  const Sizable = {
13088
13158
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -13197,7 +13267,7 @@ function yo_default() {
13197
13267
  localeError: error45()
13198
13268
  };
13199
13269
  }
13200
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/registries.js
13270
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/registries.js
13201
13271
  var _a;
13202
13272
  var $output = Symbol("ZodOutput");
13203
13273
  var $input = Symbol("ZodInput");
@@ -13250,7 +13320,7 @@ function registry() {
13250
13320
  }
13251
13321
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
13252
13322
  var globalRegistry = globalThis.__zod_globalRegistry;
13253
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/api.js
13323
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/api.js
13254
13324
  function _string(Class2, params) {
13255
13325
  return new Class2({
13256
13326
  type: "string",
@@ -13870,6 +13940,14 @@ function _union(Class2, options, params) {
13870
13940
  ...normalizeParams(params)
13871
13941
  });
13872
13942
  }
13943
+ function _xor(Class2, options, params) {
13944
+ return new Class2({
13945
+ type: "union",
13946
+ options,
13947
+ inclusive: false,
13948
+ ...normalizeParams(params)
13949
+ });
13950
+ }
13873
13951
  function _discriminatedUnion(Class2, discriminator, options, params) {
13874
13952
  return new Class2({
13875
13953
  type: "union",
@@ -14162,714 +14240,238 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
14162
14240
  const inst = new Class2(def);
14163
14241
  return inst;
14164
14242
  }
14165
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/to-json-schema.js
14166
- class JSONSchemaGenerator {
14167
- constructor(params) {
14168
- this.counter = 0;
14169
- this.metadataRegistry = params?.metadata ?? globalRegistry;
14170
- this.target = params?.target ?? "draft-2020-12";
14171
- this.unrepresentable = params?.unrepresentable ?? "throw";
14172
- this.override = params?.override ?? (() => {});
14173
- this.io = params?.io ?? "output";
14174
- this.seen = new Map;
14175
- }
14176
- process(schema, _params = { path: [], schemaPath: [] }) {
14177
- var _a2;
14178
- const def = schema._zod.def;
14179
- const formatMap = {
14180
- guid: "uuid",
14181
- url: "uri",
14182
- datetime: "date-time",
14183
- json_string: "json-string",
14184
- regex: ""
14243
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/to-json-schema.js
14244
+ function initializeContext(params) {
14245
+ let target = params?.target ?? "draft-2020-12";
14246
+ if (target === "draft-4")
14247
+ target = "draft-04";
14248
+ if (target === "draft-7")
14249
+ target = "draft-07";
14250
+ return {
14251
+ processors: params.processors ?? {},
14252
+ metadataRegistry: params?.metadata ?? globalRegistry,
14253
+ target,
14254
+ unrepresentable: params?.unrepresentable ?? "throw",
14255
+ override: params?.override ?? (() => {}),
14256
+ io: params?.io ?? "output",
14257
+ counter: 0,
14258
+ seen: new Map,
14259
+ cycles: params?.cycles ?? "ref",
14260
+ reused: params?.reused ?? "inline",
14261
+ external: params?.external ?? undefined
14262
+ };
14263
+ }
14264
+ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
14265
+ var _a2;
14266
+ const def = schema._zod.def;
14267
+ const seen = ctx.seen.get(schema);
14268
+ if (seen) {
14269
+ seen.count++;
14270
+ const isCycle = _params.schemaPath.includes(schema);
14271
+ if (isCycle) {
14272
+ seen.cycle = _params.path;
14273
+ }
14274
+ return seen.schema;
14275
+ }
14276
+ const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };
14277
+ ctx.seen.set(schema, result);
14278
+ const overrideSchema = schema._zod.toJSONSchema?.();
14279
+ if (overrideSchema) {
14280
+ result.schema = overrideSchema;
14281
+ } else {
14282
+ const params = {
14283
+ ..._params,
14284
+ schemaPath: [..._params.schemaPath, schema],
14285
+ path: _params.path
14185
14286
  };
14186
- const seen = this.seen.get(schema);
14187
- if (seen) {
14188
- seen.count++;
14189
- const isCycle = _params.schemaPath.includes(schema);
14190
- if (isCycle) {
14191
- seen.cycle = _params.path;
14192
- }
14193
- return seen.schema;
14194
- }
14195
- const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };
14196
- this.seen.set(schema, result);
14197
- const overrideSchema = schema._zod.toJSONSchema?.();
14198
- if (overrideSchema) {
14199
- result.schema = overrideSchema;
14287
+ const parent = schema._zod.parent;
14288
+ if (parent) {
14289
+ result.ref = parent;
14290
+ process2(parent, ctx, params);
14291
+ ctx.seen.get(parent).isParent = true;
14292
+ } else if (schema._zod.processJSONSchema) {
14293
+ schema._zod.processJSONSchema(ctx, result.schema, params);
14200
14294
  } else {
14201
- const params = {
14202
- ..._params,
14203
- schemaPath: [..._params.schemaPath, schema],
14204
- path: _params.path
14205
- };
14206
- const parent = schema._zod.parent;
14207
- if (parent) {
14208
- result.ref = parent;
14209
- this.process(parent, params);
14210
- this.seen.get(parent).isParent = true;
14211
- } else {
14212
- const _json = result.schema;
14213
- switch (def.type) {
14214
- case "string": {
14215
- const json = _json;
14216
- json.type = "string";
14217
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
14218
- if (typeof minimum === "number")
14219
- json.minLength = minimum;
14220
- if (typeof maximum === "number")
14221
- json.maxLength = maximum;
14222
- if (format) {
14223
- json.format = formatMap[format] ?? format;
14224
- if (json.format === "")
14225
- delete json.format;
14226
- }
14227
- if (contentEncoding)
14228
- json.contentEncoding = contentEncoding;
14229
- if (patterns && patterns.size > 0) {
14230
- const regexes = [...patterns];
14231
- if (regexes.length === 1)
14232
- json.pattern = regexes[0].source;
14233
- else if (regexes.length > 1) {
14234
- result.schema.allOf = [
14235
- ...regexes.map((regex) => ({
14236
- ...this.target === "draft-7" || this.target === "draft-4" || this.target === "openapi-3.0" ? { type: "string" } : {},
14237
- pattern: regex.source
14238
- }))
14239
- ];
14240
- }
14241
- }
14242
- break;
14243
- }
14244
- case "number": {
14245
- const json = _json;
14246
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
14247
- if (typeof format === "string" && format.includes("int"))
14248
- json.type = "integer";
14249
- else
14250
- json.type = "number";
14251
- if (typeof exclusiveMinimum === "number") {
14252
- if (this.target === "draft-4" || this.target === "openapi-3.0") {
14253
- json.minimum = exclusiveMinimum;
14254
- json.exclusiveMinimum = true;
14255
- } else {
14256
- json.exclusiveMinimum = exclusiveMinimum;
14257
- }
14258
- }
14259
- if (typeof minimum === "number") {
14260
- json.minimum = minimum;
14261
- if (typeof exclusiveMinimum === "number" && this.target !== "draft-4") {
14262
- if (exclusiveMinimum >= minimum)
14263
- delete json.minimum;
14264
- else
14265
- delete json.exclusiveMinimum;
14266
- }
14267
- }
14268
- if (typeof exclusiveMaximum === "number") {
14269
- if (this.target === "draft-4" || this.target === "openapi-3.0") {
14270
- json.maximum = exclusiveMaximum;
14271
- json.exclusiveMaximum = true;
14272
- } else {
14273
- json.exclusiveMaximum = exclusiveMaximum;
14274
- }
14275
- }
14276
- if (typeof maximum === "number") {
14277
- json.maximum = maximum;
14278
- if (typeof exclusiveMaximum === "number" && this.target !== "draft-4") {
14279
- if (exclusiveMaximum <= maximum)
14280
- delete json.maximum;
14281
- else
14282
- delete json.exclusiveMaximum;
14283
- }
14284
- }
14285
- if (typeof multipleOf === "number")
14286
- json.multipleOf = multipleOf;
14287
- break;
14288
- }
14289
- case "boolean": {
14290
- const json = _json;
14291
- json.type = "boolean";
14292
- break;
14293
- }
14294
- case "bigint": {
14295
- if (this.unrepresentable === "throw") {
14296
- throw new Error("BigInt cannot be represented in JSON Schema");
14297
- }
14298
- break;
14299
- }
14300
- case "symbol": {
14301
- if (this.unrepresentable === "throw") {
14302
- throw new Error("Symbols cannot be represented in JSON Schema");
14303
- }
14304
- break;
14305
- }
14306
- case "null": {
14307
- if (this.target === "openapi-3.0") {
14308
- _json.type = "string";
14309
- _json.nullable = true;
14310
- _json.enum = [null];
14311
- } else
14312
- _json.type = "null";
14313
- break;
14314
- }
14315
- case "any": {
14316
- break;
14317
- }
14318
- case "unknown": {
14319
- break;
14320
- }
14321
- case "undefined": {
14322
- if (this.unrepresentable === "throw") {
14323
- throw new Error("Undefined cannot be represented in JSON Schema");
14324
- }
14325
- break;
14326
- }
14327
- case "void": {
14328
- if (this.unrepresentable === "throw") {
14329
- throw new Error("Void cannot be represented in JSON Schema");
14330
- }
14331
- break;
14332
- }
14333
- case "never": {
14334
- _json.not = {};
14335
- break;
14336
- }
14337
- case "date": {
14338
- if (this.unrepresentable === "throw") {
14339
- throw new Error("Date cannot be represented in JSON Schema");
14340
- }
14341
- break;
14342
- }
14343
- case "array": {
14344
- const json = _json;
14345
- const { minimum, maximum } = schema._zod.bag;
14346
- if (typeof minimum === "number")
14347
- json.minItems = minimum;
14348
- if (typeof maximum === "number")
14349
- json.maxItems = maximum;
14350
- json.type = "array";
14351
- json.items = this.process(def.element, { ...params, path: [...params.path, "items"] });
14352
- break;
14353
- }
14354
- case "object": {
14355
- const json = _json;
14356
- json.type = "object";
14357
- json.properties = {};
14358
- const shape = def.shape;
14359
- for (const key in shape) {
14360
- json.properties[key] = this.process(shape[key], {
14361
- ...params,
14362
- path: [...params.path, "properties", key]
14363
- });
14364
- }
14365
- const allKeys = new Set(Object.keys(shape));
14366
- const requiredKeys = new Set([...allKeys].filter((key) => {
14367
- const v = def.shape[key]._zod;
14368
- if (this.io === "input") {
14369
- return v.optin === undefined;
14370
- } else {
14371
- return v.optout === undefined;
14372
- }
14373
- }));
14374
- if (requiredKeys.size > 0) {
14375
- json.required = Array.from(requiredKeys);
14376
- }
14377
- if (def.catchall?._zod.def.type === "never") {
14378
- json.additionalProperties = false;
14379
- } else if (!def.catchall) {
14380
- if (this.io === "output")
14381
- json.additionalProperties = false;
14382
- } else if (def.catchall) {
14383
- json.additionalProperties = this.process(def.catchall, {
14384
- ...params,
14385
- path: [...params.path, "additionalProperties"]
14386
- });
14387
- }
14388
- break;
14389
- }
14390
- case "union": {
14391
- const json = _json;
14392
- const isDiscriminated = def.discriminator !== undefined;
14393
- const options = def.options.map((x, i) => this.process(x, {
14394
- ...params,
14395
- path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i]
14396
- }));
14397
- if (isDiscriminated) {
14398
- json.oneOf = options;
14399
- } else {
14400
- json.anyOf = options;
14401
- }
14402
- break;
14403
- }
14404
- case "intersection": {
14405
- const json = _json;
14406
- const a = this.process(def.left, {
14407
- ...params,
14408
- path: [...params.path, "allOf", 0]
14409
- });
14410
- const b = this.process(def.right, {
14411
- ...params,
14412
- path: [...params.path, "allOf", 1]
14413
- });
14414
- const isSimpleIntersection = (val) => ("allOf" in val) && Object.keys(val).length === 1;
14415
- const allOf = [
14416
- ...isSimpleIntersection(a) ? a.allOf : [a],
14417
- ...isSimpleIntersection(b) ? b.allOf : [b]
14418
- ];
14419
- json.allOf = allOf;
14420
- break;
14421
- }
14422
- case "tuple": {
14423
- const json = _json;
14424
- json.type = "array";
14425
- const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items";
14426
- const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems";
14427
- const prefixItems = def.items.map((x, i) => this.process(x, {
14428
- ...params,
14429
- path: [...params.path, prefixPath, i]
14430
- }));
14431
- const rest = def.rest ? this.process(def.rest, {
14432
- ...params,
14433
- path: [...params.path, restPath, ...this.target === "openapi-3.0" ? [def.items.length] : []]
14434
- }) : null;
14435
- if (this.target === "draft-2020-12") {
14436
- json.prefixItems = prefixItems;
14437
- if (rest) {
14438
- json.items = rest;
14439
- }
14440
- } else if (this.target === "openapi-3.0") {
14441
- json.items = {
14442
- anyOf: prefixItems
14443
- };
14444
- if (rest) {
14445
- json.items.anyOf.push(rest);
14446
- }
14447
- json.minItems = prefixItems.length;
14448
- if (!rest) {
14449
- json.maxItems = prefixItems.length;
14450
- }
14451
- } else {
14452
- json.items = prefixItems;
14453
- if (rest) {
14454
- json.additionalItems = rest;
14455
- }
14456
- }
14457
- const { minimum, maximum } = schema._zod.bag;
14458
- if (typeof minimum === "number")
14459
- json.minItems = minimum;
14460
- if (typeof maximum === "number")
14461
- json.maxItems = maximum;
14462
- break;
14463
- }
14464
- case "record": {
14465
- const json = _json;
14466
- json.type = "object";
14467
- if (this.target === "draft-7" || this.target === "draft-2020-12") {
14468
- json.propertyNames = this.process(def.keyType, {
14469
- ...params,
14470
- path: [...params.path, "propertyNames"]
14471
- });
14472
- }
14473
- json.additionalProperties = this.process(def.valueType, {
14474
- ...params,
14475
- path: [...params.path, "additionalProperties"]
14476
- });
14477
- break;
14478
- }
14479
- case "map": {
14480
- if (this.unrepresentable === "throw") {
14481
- throw new Error("Map cannot be represented in JSON Schema");
14482
- }
14483
- break;
14484
- }
14485
- case "set": {
14486
- if (this.unrepresentable === "throw") {
14487
- throw new Error("Set cannot be represented in JSON Schema");
14488
- }
14489
- break;
14490
- }
14491
- case "enum": {
14492
- const json = _json;
14493
- const values = getEnumValues(def.entries);
14494
- if (values.every((v) => typeof v === "number"))
14495
- json.type = "number";
14496
- if (values.every((v) => typeof v === "string"))
14497
- json.type = "string";
14498
- json.enum = values;
14499
- break;
14500
- }
14501
- case "literal": {
14502
- const json = _json;
14503
- const vals = [];
14504
- for (const val of def.values) {
14505
- if (val === undefined) {
14506
- if (this.unrepresentable === "throw") {
14507
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14508
- } else {}
14509
- } else if (typeof val === "bigint") {
14510
- if (this.unrepresentable === "throw") {
14511
- throw new Error("BigInt literals cannot be represented in JSON Schema");
14512
- } else {
14513
- vals.push(Number(val));
14514
- }
14515
- } else {
14516
- vals.push(val);
14517
- }
14518
- }
14519
- if (vals.length === 0) {} else if (vals.length === 1) {
14520
- const val = vals[0];
14521
- json.type = val === null ? "null" : typeof val;
14522
- if (this.target === "draft-4" || this.target === "openapi-3.0") {
14523
- json.enum = [val];
14524
- } else {
14525
- json.const = val;
14526
- }
14527
- } else {
14528
- if (vals.every((v) => typeof v === "number"))
14529
- json.type = "number";
14530
- if (vals.every((v) => typeof v === "string"))
14531
- json.type = "string";
14532
- if (vals.every((v) => typeof v === "boolean"))
14533
- json.type = "string";
14534
- if (vals.every((v) => v === null))
14535
- json.type = "null";
14536
- json.enum = vals;
14537
- }
14538
- break;
14539
- }
14540
- case "file": {
14541
- const json = _json;
14542
- const file = {
14543
- type: "string",
14544
- format: "binary",
14545
- contentEncoding: "binary"
14546
- };
14547
- const { minimum, maximum, mime } = schema._zod.bag;
14548
- if (minimum !== undefined)
14549
- file.minLength = minimum;
14550
- if (maximum !== undefined)
14551
- file.maxLength = maximum;
14552
- if (mime) {
14553
- if (mime.length === 1) {
14554
- file.contentMediaType = mime[0];
14555
- Object.assign(json, file);
14556
- } else {
14557
- json.anyOf = mime.map((m) => {
14558
- const mFile = { ...file, contentMediaType: m };
14559
- return mFile;
14560
- });
14561
- }
14562
- } else {
14563
- Object.assign(json, file);
14564
- }
14565
- break;
14566
- }
14567
- case "transform": {
14568
- if (this.unrepresentable === "throw") {
14569
- throw new Error("Transforms cannot be represented in JSON Schema");
14570
- }
14571
- break;
14572
- }
14573
- case "nullable": {
14574
- const inner = this.process(def.innerType, params);
14575
- if (this.target === "openapi-3.0") {
14576
- result.ref = def.innerType;
14577
- _json.nullable = true;
14578
- } else {
14579
- _json.anyOf = [inner, { type: "null" }];
14580
- }
14581
- break;
14582
- }
14583
- case "nonoptional": {
14584
- this.process(def.innerType, params);
14585
- result.ref = def.innerType;
14586
- break;
14587
- }
14588
- case "success": {
14589
- const json = _json;
14590
- json.type = "boolean";
14591
- break;
14592
- }
14593
- case "default": {
14594
- this.process(def.innerType, params);
14595
- result.ref = def.innerType;
14596
- _json.default = JSON.parse(JSON.stringify(def.defaultValue));
14597
- break;
14598
- }
14599
- case "prefault": {
14600
- this.process(def.innerType, params);
14601
- result.ref = def.innerType;
14602
- if (this.io === "input")
14603
- _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
14604
- break;
14605
- }
14606
- case "catch": {
14607
- this.process(def.innerType, params);
14608
- result.ref = def.innerType;
14609
- let catchValue;
14610
- try {
14611
- catchValue = def.catchValue(undefined);
14612
- } catch {
14613
- throw new Error("Dynamic catch values are not supported in JSON Schema");
14614
- }
14615
- _json.default = catchValue;
14616
- break;
14617
- }
14618
- case "nan": {
14619
- if (this.unrepresentable === "throw") {
14620
- throw new Error("NaN cannot be represented in JSON Schema");
14621
- }
14622
- break;
14623
- }
14624
- case "template_literal": {
14625
- const json = _json;
14626
- const pattern = schema._zod.pattern;
14627
- if (!pattern)
14628
- throw new Error("Pattern not found in template literal");
14629
- json.type = "string";
14630
- json.pattern = pattern.source;
14631
- break;
14632
- }
14633
- case "pipe": {
14634
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
14635
- this.process(innerType, params);
14636
- result.ref = innerType;
14637
- break;
14638
- }
14639
- case "readonly": {
14640
- this.process(def.innerType, params);
14641
- result.ref = def.innerType;
14642
- _json.readOnly = true;
14643
- break;
14644
- }
14645
- case "promise": {
14646
- this.process(def.innerType, params);
14647
- result.ref = def.innerType;
14648
- break;
14649
- }
14650
- case "optional": {
14651
- this.process(def.innerType, params);
14652
- result.ref = def.innerType;
14653
- break;
14654
- }
14655
- case "lazy": {
14656
- const innerType = schema._zod.innerType;
14657
- this.process(innerType, params);
14658
- result.ref = innerType;
14659
- break;
14660
- }
14661
- case "custom": {
14662
- if (this.unrepresentable === "throw") {
14663
- throw new Error("Custom types cannot be represented in JSON Schema");
14664
- }
14665
- break;
14666
- }
14667
- case "function": {
14668
- if (this.unrepresentable === "throw") {
14669
- throw new Error("Function types cannot be represented in JSON Schema");
14670
- }
14671
- break;
14672
- }
14673
- default: {}
14674
- }
14675
- }
14295
+ const _json = result.schema;
14296
+ const processor = ctx.processors[def.type];
14297
+ if (!processor) {
14298
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
14299
+ }
14300
+ processor(schema, ctx, _json, params);
14301
+ }
14302
+ }
14303
+ const meta2 = ctx.metadataRegistry.get(schema);
14304
+ if (meta2)
14305
+ Object.assign(result.schema, meta2);
14306
+ if (ctx.io === "input" && isTransforming(schema)) {
14307
+ delete result.schema.examples;
14308
+ delete result.schema.default;
14309
+ }
14310
+ if (ctx.io === "input" && result.schema._prefault)
14311
+ (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
14312
+ delete result.schema._prefault;
14313
+ const _result = ctx.seen.get(schema);
14314
+ return _result.schema;
14315
+ }
14316
+ function extractDefs(ctx, schema) {
14317
+ const root = ctx.seen.get(schema);
14318
+ if (!root)
14319
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
14320
+ const makeURI = (entry) => {
14321
+ const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
14322
+ if (ctx.external) {
14323
+ const externalId = ctx.external.registry.get(entry[0])?.id;
14324
+ const uriGenerator = ctx.external.uri ?? ((id2) => id2);
14325
+ if (externalId) {
14326
+ return { ref: uriGenerator(externalId) };
14327
+ }
14328
+ const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
14329
+ entry[1].defId = id;
14330
+ return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
14331
+ }
14332
+ if (entry[1] === root) {
14333
+ return { ref: "#" };
14334
+ }
14335
+ const uriPrefix = `#`;
14336
+ const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
14337
+ const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
14338
+ return { defId, ref: defUriPrefix + defId };
14339
+ };
14340
+ const extractToDef = (entry) => {
14341
+ if (entry[1].schema.$ref) {
14342
+ return;
14676
14343
  }
14677
- const meta2 = this.metadataRegistry.get(schema);
14678
- if (meta2)
14679
- Object.assign(result.schema, meta2);
14680
- if (this.io === "input" && isTransforming(schema)) {
14681
- delete result.schema.examples;
14682
- delete result.schema.default;
14344
+ const seen = entry[1];
14345
+ const { ref, defId } = makeURI(entry);
14346
+ seen.def = { ...seen.schema };
14347
+ if (defId)
14348
+ seen.defId = defId;
14349
+ const schema2 = seen.schema;
14350
+ for (const key in schema2) {
14351
+ delete schema2[key];
14683
14352
  }
14684
- if (this.io === "input" && result.schema._prefault)
14685
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
14686
- delete result.schema._prefault;
14687
- const _result = this.seen.get(schema);
14688
- return _result.schema;
14689
- }
14690
- emit(schema, _params) {
14691
- const params = {
14692
- cycles: _params?.cycles ?? "ref",
14693
- reused: _params?.reused ?? "inline",
14694
- external: _params?.external ?? undefined
14695
- };
14696
- const root = this.seen.get(schema);
14697
- if (!root)
14698
- throw new Error("Unprocessed schema. This is a bug in Zod.");
14699
- const makeURI = (entry) => {
14700
- const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
14701
- if (params.external) {
14702
- const externalId = params.external.registry.get(entry[0])?.id;
14703
- const uriGenerator = params.external.uri ?? ((id2) => id2);
14704
- if (externalId) {
14705
- return { ref: uriGenerator(externalId) };
14706
- }
14707
- const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
14708
- entry[1].defId = id;
14709
- return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
14710
- }
14711
- if (entry[1] === root) {
14712
- return { ref: "#" };
14713
- }
14714
- const uriPrefix = `#`;
14715
- const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
14716
- const defId = entry[1].schema.id ?? `__schema${this.counter++}`;
14717
- return { defId, ref: defUriPrefix + defId };
14718
- };
14719
- const extractToDef = (entry) => {
14720
- if (entry[1].schema.$ref) {
14721
- return;
14722
- }
14353
+ schema2.$ref = ref;
14354
+ };
14355
+ if (ctx.cycles === "throw") {
14356
+ for (const entry of ctx.seen.entries()) {
14723
14357
  const seen = entry[1];
14724
- const { ref, defId } = makeURI(entry);
14725
- seen.def = { ...seen.schema };
14726
- if (defId)
14727
- seen.defId = defId;
14728
- const schema2 = seen.schema;
14729
- for (const key in schema2) {
14730
- delete schema2[key];
14731
- }
14732
- schema2.$ref = ref;
14733
- };
14734
- if (params.cycles === "throw") {
14735
- for (const entry of this.seen.entries()) {
14736
- const seen = entry[1];
14737
- if (seen.cycle) {
14738
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + '\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');
14739
- }
14358
+ if (seen.cycle) {
14359
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + '\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');
14740
14360
  }
14741
14361
  }
14742
- for (const entry of this.seen.entries()) {
14743
- const seen = entry[1];
14744
- if (schema === entry[0]) {
14745
- extractToDef(entry);
14746
- continue;
14747
- }
14748
- if (params.external) {
14749
- const ext = params.external.registry.get(entry[0])?.id;
14750
- if (schema !== entry[0] && ext) {
14751
- extractToDef(entry);
14752
- continue;
14753
- }
14754
- }
14755
- const id = this.metadataRegistry.get(entry[0])?.id;
14756
- if (id) {
14757
- extractToDef(entry);
14758
- continue;
14759
- }
14760
- if (seen.cycle) {
14362
+ }
14363
+ for (const entry of ctx.seen.entries()) {
14364
+ const seen = entry[1];
14365
+ if (schema === entry[0]) {
14366
+ extractToDef(entry);
14367
+ continue;
14368
+ }
14369
+ if (ctx.external) {
14370
+ const ext = ctx.external.registry.get(entry[0])?.id;
14371
+ if (schema !== entry[0] && ext) {
14761
14372
  extractToDef(entry);
14762
14373
  continue;
14763
14374
  }
14764
- if (seen.count > 1) {
14765
- if (params.reused === "ref") {
14766
- extractToDef(entry);
14767
- continue;
14768
- }
14769
- }
14770
14375
  }
14771
- const flattenRef = (zodSchema, params2) => {
14772
- const seen = this.seen.get(zodSchema);
14773
- const schema2 = seen.def ?? seen.schema;
14774
- const _cached = { ...schema2 };
14775
- if (seen.ref === null) {
14776
- return;
14777
- }
14778
- const ref = seen.ref;
14779
- seen.ref = null;
14780
- if (ref) {
14781
- flattenRef(ref, params2);
14782
- const refSchema = this.seen.get(ref).schema;
14783
- if (refSchema.$ref && (params2.target === "draft-7" || params2.target === "draft-4" || params2.target === "openapi-3.0")) {
14784
- schema2.allOf = schema2.allOf ?? [];
14785
- schema2.allOf.push(refSchema);
14786
- } else {
14787
- Object.assign(schema2, refSchema);
14788
- Object.assign(schema2, _cached);
14789
- }
14790
- }
14791
- if (!seen.isParent)
14792
- this.override({
14793
- zodSchema,
14794
- jsonSchema: schema2,
14795
- path: seen.path ?? []
14796
- });
14797
- };
14798
- for (const entry of [...this.seen.entries()].reverse()) {
14799
- flattenRef(entry[0], { target: this.target });
14800
- }
14801
- const result = {};
14802
- if (this.target === "draft-2020-12") {
14803
- result.$schema = "https://json-schema.org/draft/2020-12/schema";
14804
- } else if (this.target === "draft-7") {
14805
- result.$schema = "http://json-schema.org/draft-07/schema#";
14806
- } else if (this.target === "draft-4") {
14807
- result.$schema = "http://json-schema.org/draft-04/schema#";
14808
- } else if (this.target === "openapi-3.0") {} else {
14809
- console.warn(`Invalid target: ${this.target}`);
14810
- }
14811
- if (params.external?.uri) {
14812
- const id = params.external.registry.get(schema)?.id;
14813
- if (!id)
14814
- throw new Error("Schema is missing an `id` property");
14815
- result.$id = params.external.uri(id);
14816
- }
14817
- Object.assign(result, root.def);
14818
- const defs = params.external?.defs ?? {};
14819
- for (const entry of this.seen.entries()) {
14820
- const seen = entry[1];
14821
- if (seen.def && seen.defId) {
14822
- defs[seen.defId] = seen.def;
14823
- }
14376
+ const id = ctx.metadataRegistry.get(entry[0])?.id;
14377
+ if (id) {
14378
+ extractToDef(entry);
14379
+ continue;
14824
14380
  }
14825
- if (params.external) {} else {
14826
- if (Object.keys(defs).length > 0) {
14827
- if (this.target === "draft-2020-12") {
14828
- result.$defs = defs;
14829
- } else {
14830
- result.definitions = defs;
14831
- }
14832
- }
14381
+ if (seen.cycle) {
14382
+ extractToDef(entry);
14383
+ continue;
14833
14384
  }
14834
- try {
14835
- return JSON.parse(JSON.stringify(result));
14836
- } catch (_err) {
14837
- throw new Error("Error converting schema to JSON.");
14385
+ if (seen.count > 1) {
14386
+ if (ctx.reused === "ref") {
14387
+ extractToDef(entry);
14388
+ continue;
14389
+ }
14838
14390
  }
14839
14391
  }
14840
14392
  }
14841
- function toJSONSchema(input, _params) {
14842
- if (input instanceof $ZodRegistry) {
14843
- const gen2 = new JSONSchemaGenerator(_params);
14844
- const defs = {};
14845
- for (const entry of input._idmap.entries()) {
14846
- const [_, schema] = entry;
14847
- gen2.process(schema);
14393
+ function finalize(ctx, schema) {
14394
+ const root = ctx.seen.get(schema);
14395
+ if (!root)
14396
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
14397
+ const flattenRef = (zodSchema) => {
14398
+ const seen = ctx.seen.get(zodSchema);
14399
+ const schema2 = seen.def ?? seen.schema;
14400
+ const _cached = { ...schema2 };
14401
+ if (seen.ref === null) {
14402
+ return;
14848
14403
  }
14849
- const schemas = {};
14850
- const external = {
14851
- registry: input,
14852
- uri: _params?.uri,
14853
- defs
14854
- };
14855
- for (const entry of input._idmap.entries()) {
14856
- const [key, schema] = entry;
14857
- schemas[key] = gen2.emit(schema, {
14858
- ..._params,
14859
- external
14860
- });
14404
+ const ref = seen.ref;
14405
+ seen.ref = null;
14406
+ if (ref) {
14407
+ flattenRef(ref);
14408
+ const refSchema = ctx.seen.get(ref).schema;
14409
+ if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
14410
+ schema2.allOf = schema2.allOf ?? [];
14411
+ schema2.allOf.push(refSchema);
14412
+ } else {
14413
+ Object.assign(schema2, refSchema);
14414
+ Object.assign(schema2, _cached);
14415
+ }
14861
14416
  }
14417
+ if (!seen.isParent)
14418
+ ctx.override({
14419
+ zodSchema,
14420
+ jsonSchema: schema2,
14421
+ path: seen.path ?? []
14422
+ });
14423
+ };
14424
+ for (const entry of [...ctx.seen.entries()].reverse()) {
14425
+ flattenRef(entry[0]);
14426
+ }
14427
+ const result = {};
14428
+ if (ctx.target === "draft-2020-12") {
14429
+ result.$schema = "https://json-schema.org/draft/2020-12/schema";
14430
+ } else if (ctx.target === "draft-07") {
14431
+ result.$schema = "http://json-schema.org/draft-07/schema#";
14432
+ } else if (ctx.target === "draft-04") {
14433
+ result.$schema = "http://json-schema.org/draft-04/schema#";
14434
+ } else if (ctx.target === "openapi-3.0") {} else {}
14435
+ if (ctx.external?.uri) {
14436
+ const id = ctx.external.registry.get(schema)?.id;
14437
+ if (!id)
14438
+ throw new Error("Schema is missing an `id` property");
14439
+ result.$id = ctx.external.uri(id);
14440
+ }
14441
+ Object.assign(result, root.def ?? root.schema);
14442
+ const defs = ctx.external?.defs ?? {};
14443
+ for (const entry of ctx.seen.entries()) {
14444
+ const seen = entry[1];
14445
+ if (seen.def && seen.defId) {
14446
+ defs[seen.defId] = seen.def;
14447
+ }
14448
+ }
14449
+ if (ctx.external) {} else {
14862
14450
  if (Object.keys(defs).length > 0) {
14863
- const defsSegment = gen2.target === "draft-2020-12" ? "$defs" : "definitions";
14864
- schemas.__shared = {
14865
- [defsSegment]: defs
14866
- };
14451
+ if (ctx.target === "draft-2020-12") {
14452
+ result.$defs = defs;
14453
+ } else {
14454
+ result.definitions = defs;
14455
+ }
14867
14456
  }
14868
- return { schemas };
14869
14457
  }
14870
- const gen = new JSONSchemaGenerator(_params);
14871
- gen.process(input);
14872
- return gen.emit(input, _params);
14458
+ try {
14459
+ const finalized = JSON.parse(JSON.stringify(result));
14460
+ Object.defineProperty(finalized, "~standard", {
14461
+ value: {
14462
+ ...schema["~standard"],
14463
+ jsonSchema: {
14464
+ input: createStandardJSONSchemaMethod(schema, "input"),
14465
+ output: createStandardJSONSchemaMethod(schema, "output")
14466
+ }
14467
+ },
14468
+ enumerable: false,
14469
+ writable: false
14470
+ });
14471
+ return finalized;
14472
+ } catch (_err) {
14473
+ throw new Error("Error converting schema to JSON.");
14474
+ }
14873
14475
  }
14874
14476
  function isTransforming(_schema, _ctx) {
14875
14477
  const ctx = _ctx ?? { seen: new Set };
@@ -14922,9 +14524,604 @@ function isTransforming(_schema, _ctx) {
14922
14524
  }
14923
14525
  return false;
14924
14526
  }
14925
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/json-schema.js
14527
+ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
14528
+ const ctx = initializeContext({ ...params, processors });
14529
+ process2(schema, ctx);
14530
+ extractDefs(ctx, schema);
14531
+ return finalize(ctx, schema);
14532
+ };
14533
+ var createStandardJSONSchemaMethod = (schema, io) => (params) => {
14534
+ const { libraryOptions, target } = params ?? {};
14535
+ const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors: {} });
14536
+ process2(schema, ctx);
14537
+ extractDefs(ctx, schema);
14538
+ return finalize(ctx, schema);
14539
+ };
14540
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/json-schema-processors.js
14541
+ var formatMap = {
14542
+ guid: "uuid",
14543
+ url: "uri",
14544
+ datetime: "date-time",
14545
+ json_string: "json-string",
14546
+ regex: ""
14547
+ };
14548
+ var stringProcessor = (schema, ctx, _json, _params) => {
14549
+ const json = _json;
14550
+ json.type = "string";
14551
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
14552
+ if (typeof minimum === "number")
14553
+ json.minLength = minimum;
14554
+ if (typeof maximum === "number")
14555
+ json.maxLength = maximum;
14556
+ if (format) {
14557
+ json.format = formatMap[format] ?? format;
14558
+ if (json.format === "")
14559
+ delete json.format;
14560
+ }
14561
+ if (contentEncoding)
14562
+ json.contentEncoding = contentEncoding;
14563
+ if (patterns && patterns.size > 0) {
14564
+ const regexes = [...patterns];
14565
+ if (regexes.length === 1)
14566
+ json.pattern = regexes[0].source;
14567
+ else if (regexes.length > 1) {
14568
+ json.allOf = [
14569
+ ...regexes.map((regex) => ({
14570
+ ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
14571
+ pattern: regex.source
14572
+ }))
14573
+ ];
14574
+ }
14575
+ }
14576
+ };
14577
+ var numberProcessor = (schema, ctx, _json, _params) => {
14578
+ const json = _json;
14579
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
14580
+ if (typeof format === "string" && format.includes("int"))
14581
+ json.type = "integer";
14582
+ else
14583
+ json.type = "number";
14584
+ if (typeof exclusiveMinimum === "number") {
14585
+ if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
14586
+ json.minimum = exclusiveMinimum;
14587
+ json.exclusiveMinimum = true;
14588
+ } else {
14589
+ json.exclusiveMinimum = exclusiveMinimum;
14590
+ }
14591
+ }
14592
+ if (typeof minimum === "number") {
14593
+ json.minimum = minimum;
14594
+ if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
14595
+ if (exclusiveMinimum >= minimum)
14596
+ delete json.minimum;
14597
+ else
14598
+ delete json.exclusiveMinimum;
14599
+ }
14600
+ }
14601
+ if (typeof exclusiveMaximum === "number") {
14602
+ if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
14603
+ json.maximum = exclusiveMaximum;
14604
+ json.exclusiveMaximum = true;
14605
+ } else {
14606
+ json.exclusiveMaximum = exclusiveMaximum;
14607
+ }
14608
+ }
14609
+ if (typeof maximum === "number") {
14610
+ json.maximum = maximum;
14611
+ if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
14612
+ if (exclusiveMaximum <= maximum)
14613
+ delete json.maximum;
14614
+ else
14615
+ delete json.exclusiveMaximum;
14616
+ }
14617
+ }
14618
+ if (typeof multipleOf === "number")
14619
+ json.multipleOf = multipleOf;
14620
+ };
14621
+ var booleanProcessor = (_schema, _ctx, json, _params) => {
14622
+ json.type = "boolean";
14623
+ };
14624
+ var bigintProcessor = (_schema, ctx, _json, _params) => {
14625
+ if (ctx.unrepresentable === "throw") {
14626
+ throw new Error("BigInt cannot be represented in JSON Schema");
14627
+ }
14628
+ };
14629
+ var symbolProcessor = (_schema, ctx, _json, _params) => {
14630
+ if (ctx.unrepresentable === "throw") {
14631
+ throw new Error("Symbols cannot be represented in JSON Schema");
14632
+ }
14633
+ };
14634
+ var nullProcessor = (_schema, ctx, json, _params) => {
14635
+ if (ctx.target === "openapi-3.0") {
14636
+ json.type = "string";
14637
+ json.nullable = true;
14638
+ json.enum = [null];
14639
+ } else {
14640
+ json.type = "null";
14641
+ }
14642
+ };
14643
+ var undefinedProcessor = (_schema, ctx, _json, _params) => {
14644
+ if (ctx.unrepresentable === "throw") {
14645
+ throw new Error("Undefined cannot be represented in JSON Schema");
14646
+ }
14647
+ };
14648
+ var voidProcessor = (_schema, ctx, _json, _params) => {
14649
+ if (ctx.unrepresentable === "throw") {
14650
+ throw new Error("Void cannot be represented in JSON Schema");
14651
+ }
14652
+ };
14653
+ var neverProcessor = (_schema, _ctx, json, _params) => {
14654
+ json.not = {};
14655
+ };
14656
+ var anyProcessor = (_schema, _ctx, _json, _params) => {};
14657
+ var unknownProcessor = (_schema, _ctx, _json, _params) => {};
14658
+ var dateProcessor = (_schema, ctx, _json, _params) => {
14659
+ if (ctx.unrepresentable === "throw") {
14660
+ throw new Error("Date cannot be represented in JSON Schema");
14661
+ }
14662
+ };
14663
+ var enumProcessor = (schema, _ctx, json, _params) => {
14664
+ const def = schema._zod.def;
14665
+ const values = getEnumValues(def.entries);
14666
+ if (values.every((v) => typeof v === "number"))
14667
+ json.type = "number";
14668
+ if (values.every((v) => typeof v === "string"))
14669
+ json.type = "string";
14670
+ json.enum = values;
14671
+ };
14672
+ var literalProcessor = (schema, ctx, json, _params) => {
14673
+ const def = schema._zod.def;
14674
+ const vals = [];
14675
+ for (const val of def.values) {
14676
+ if (val === undefined) {
14677
+ if (ctx.unrepresentable === "throw") {
14678
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
14679
+ } else {}
14680
+ } else if (typeof val === "bigint") {
14681
+ if (ctx.unrepresentable === "throw") {
14682
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
14683
+ } else {
14684
+ vals.push(Number(val));
14685
+ }
14686
+ } else {
14687
+ vals.push(val);
14688
+ }
14689
+ }
14690
+ if (vals.length === 0) {} else if (vals.length === 1) {
14691
+ const val = vals[0];
14692
+ json.type = val === null ? "null" : typeof val;
14693
+ if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
14694
+ json.enum = [val];
14695
+ } else {
14696
+ json.const = val;
14697
+ }
14698
+ } else {
14699
+ if (vals.every((v) => typeof v === "number"))
14700
+ json.type = "number";
14701
+ if (vals.every((v) => typeof v === "string"))
14702
+ json.type = "string";
14703
+ if (vals.every((v) => typeof v === "boolean"))
14704
+ json.type = "boolean";
14705
+ if (vals.every((v) => v === null))
14706
+ json.type = "null";
14707
+ json.enum = vals;
14708
+ }
14709
+ };
14710
+ var nanProcessor = (_schema, ctx, _json, _params) => {
14711
+ if (ctx.unrepresentable === "throw") {
14712
+ throw new Error("NaN cannot be represented in JSON Schema");
14713
+ }
14714
+ };
14715
+ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
14716
+ const _json = json;
14717
+ const pattern = schema._zod.pattern;
14718
+ if (!pattern)
14719
+ throw new Error("Pattern not found in template literal");
14720
+ _json.type = "string";
14721
+ _json.pattern = pattern.source;
14722
+ };
14723
+ var fileProcessor = (schema, _ctx, json, _params) => {
14724
+ const _json = json;
14725
+ const file = {
14726
+ type: "string",
14727
+ format: "binary",
14728
+ contentEncoding: "binary"
14729
+ };
14730
+ const { minimum, maximum, mime } = schema._zod.bag;
14731
+ if (minimum !== undefined)
14732
+ file.minLength = minimum;
14733
+ if (maximum !== undefined)
14734
+ file.maxLength = maximum;
14735
+ if (mime) {
14736
+ if (mime.length === 1) {
14737
+ file.contentMediaType = mime[0];
14738
+ Object.assign(_json, file);
14739
+ } else {
14740
+ _json.anyOf = mime.map((m) => {
14741
+ const mFile = { ...file, contentMediaType: m };
14742
+ return mFile;
14743
+ });
14744
+ }
14745
+ } else {
14746
+ Object.assign(_json, file);
14747
+ }
14748
+ };
14749
+ var successProcessor = (_schema, _ctx, json, _params) => {
14750
+ json.type = "boolean";
14751
+ };
14752
+ var customProcessor = (_schema, ctx, _json, _params) => {
14753
+ if (ctx.unrepresentable === "throw") {
14754
+ throw new Error("Custom types cannot be represented in JSON Schema");
14755
+ }
14756
+ };
14757
+ var functionProcessor = (_schema, ctx, _json, _params) => {
14758
+ if (ctx.unrepresentable === "throw") {
14759
+ throw new Error("Function types cannot be represented in JSON Schema");
14760
+ }
14761
+ };
14762
+ var transformProcessor = (_schema, ctx, _json, _params) => {
14763
+ if (ctx.unrepresentable === "throw") {
14764
+ throw new Error("Transforms cannot be represented in JSON Schema");
14765
+ }
14766
+ };
14767
+ var mapProcessor = (_schema, ctx, _json, _params) => {
14768
+ if (ctx.unrepresentable === "throw") {
14769
+ throw new Error("Map cannot be represented in JSON Schema");
14770
+ }
14771
+ };
14772
+ var setProcessor = (_schema, ctx, _json, _params) => {
14773
+ if (ctx.unrepresentable === "throw") {
14774
+ throw new Error("Set cannot be represented in JSON Schema");
14775
+ }
14776
+ };
14777
+ var arrayProcessor = (schema, ctx, _json, params) => {
14778
+ const json = _json;
14779
+ const def = schema._zod.def;
14780
+ const { minimum, maximum } = schema._zod.bag;
14781
+ if (typeof minimum === "number")
14782
+ json.minItems = minimum;
14783
+ if (typeof maximum === "number")
14784
+ json.maxItems = maximum;
14785
+ json.type = "array";
14786
+ json.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
14787
+ };
14788
+ var objectProcessor = (schema, ctx, _json, params) => {
14789
+ const json = _json;
14790
+ const def = schema._zod.def;
14791
+ json.type = "object";
14792
+ json.properties = {};
14793
+ const shape = def.shape;
14794
+ for (const key in shape) {
14795
+ json.properties[key] = process2(shape[key], ctx, {
14796
+ ...params,
14797
+ path: [...params.path, "properties", key]
14798
+ });
14799
+ }
14800
+ const allKeys = new Set(Object.keys(shape));
14801
+ const requiredKeys = new Set([...allKeys].filter((key) => {
14802
+ const v = def.shape[key]._zod;
14803
+ if (ctx.io === "input") {
14804
+ return v.optin === undefined;
14805
+ } else {
14806
+ return v.optout === undefined;
14807
+ }
14808
+ }));
14809
+ if (requiredKeys.size > 0) {
14810
+ json.required = Array.from(requiredKeys);
14811
+ }
14812
+ if (def.catchall?._zod.def.type === "never") {
14813
+ json.additionalProperties = false;
14814
+ } else if (!def.catchall) {
14815
+ if (ctx.io === "output")
14816
+ json.additionalProperties = false;
14817
+ } else if (def.catchall) {
14818
+ json.additionalProperties = process2(def.catchall, ctx, {
14819
+ ...params,
14820
+ path: [...params.path, "additionalProperties"]
14821
+ });
14822
+ }
14823
+ };
14824
+ var unionProcessor = (schema, ctx, json, params) => {
14825
+ const def = schema._zod.def;
14826
+ const isExclusive = def.inclusive === false;
14827
+ const options = def.options.map((x, i) => process2(x, ctx, {
14828
+ ...params,
14829
+ path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
14830
+ }));
14831
+ if (isExclusive) {
14832
+ json.oneOf = options;
14833
+ } else {
14834
+ json.anyOf = options;
14835
+ }
14836
+ };
14837
+ var intersectionProcessor = (schema, ctx, json, params) => {
14838
+ const def = schema._zod.def;
14839
+ const a = process2(def.left, ctx, {
14840
+ ...params,
14841
+ path: [...params.path, "allOf", 0]
14842
+ });
14843
+ const b = process2(def.right, ctx, {
14844
+ ...params,
14845
+ path: [...params.path, "allOf", 1]
14846
+ });
14847
+ const isSimpleIntersection = (val) => ("allOf" in val) && Object.keys(val).length === 1;
14848
+ const allOf = [
14849
+ ...isSimpleIntersection(a) ? a.allOf : [a],
14850
+ ...isSimpleIntersection(b) ? b.allOf : [b]
14851
+ ];
14852
+ json.allOf = allOf;
14853
+ };
14854
+ var tupleProcessor = (schema, ctx, _json, params) => {
14855
+ const json = _json;
14856
+ const def = schema._zod.def;
14857
+ json.type = "array";
14858
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
14859
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
14860
+ const prefixItems = def.items.map((x, i) => process2(x, ctx, {
14861
+ ...params,
14862
+ path: [...params.path, prefixPath, i]
14863
+ }));
14864
+ const rest = def.rest ? process2(def.rest, ctx, {
14865
+ ...params,
14866
+ path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
14867
+ }) : null;
14868
+ if (ctx.target === "draft-2020-12") {
14869
+ json.prefixItems = prefixItems;
14870
+ if (rest) {
14871
+ json.items = rest;
14872
+ }
14873
+ } else if (ctx.target === "openapi-3.0") {
14874
+ json.items = {
14875
+ anyOf: prefixItems
14876
+ };
14877
+ if (rest) {
14878
+ json.items.anyOf.push(rest);
14879
+ }
14880
+ json.minItems = prefixItems.length;
14881
+ if (!rest) {
14882
+ json.maxItems = prefixItems.length;
14883
+ }
14884
+ } else {
14885
+ json.items = prefixItems;
14886
+ if (rest) {
14887
+ json.additionalItems = rest;
14888
+ }
14889
+ }
14890
+ const { minimum, maximum } = schema._zod.bag;
14891
+ if (typeof minimum === "number")
14892
+ json.minItems = minimum;
14893
+ if (typeof maximum === "number")
14894
+ json.maxItems = maximum;
14895
+ };
14896
+ var recordProcessor = (schema, ctx, _json, params) => {
14897
+ const json = _json;
14898
+ const def = schema._zod.def;
14899
+ json.type = "object";
14900
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
14901
+ json.propertyNames = process2(def.keyType, ctx, {
14902
+ ...params,
14903
+ path: [...params.path, "propertyNames"]
14904
+ });
14905
+ }
14906
+ json.additionalProperties = process2(def.valueType, ctx, {
14907
+ ...params,
14908
+ path: [...params.path, "additionalProperties"]
14909
+ });
14910
+ };
14911
+ var nullableProcessor = (schema, ctx, json, params) => {
14912
+ const def = schema._zod.def;
14913
+ const inner = process2(def.innerType, ctx, params);
14914
+ const seen = ctx.seen.get(schema);
14915
+ if (ctx.target === "openapi-3.0") {
14916
+ seen.ref = def.innerType;
14917
+ json.nullable = true;
14918
+ } else {
14919
+ json.anyOf = [inner, { type: "null" }];
14920
+ }
14921
+ };
14922
+ var nonoptionalProcessor = (schema, ctx, _json, params) => {
14923
+ const def = schema._zod.def;
14924
+ process2(def.innerType, ctx, params);
14925
+ const seen = ctx.seen.get(schema);
14926
+ seen.ref = def.innerType;
14927
+ };
14928
+ var defaultProcessor = (schema, ctx, json, params) => {
14929
+ const def = schema._zod.def;
14930
+ process2(def.innerType, ctx, params);
14931
+ const seen = ctx.seen.get(schema);
14932
+ seen.ref = def.innerType;
14933
+ json.default = JSON.parse(JSON.stringify(def.defaultValue));
14934
+ };
14935
+ var prefaultProcessor = (schema, ctx, json, params) => {
14936
+ const def = schema._zod.def;
14937
+ process2(def.innerType, ctx, params);
14938
+ const seen = ctx.seen.get(schema);
14939
+ seen.ref = def.innerType;
14940
+ if (ctx.io === "input")
14941
+ json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
14942
+ };
14943
+ var catchProcessor = (schema, ctx, json, params) => {
14944
+ const def = schema._zod.def;
14945
+ process2(def.innerType, ctx, params);
14946
+ const seen = ctx.seen.get(schema);
14947
+ seen.ref = def.innerType;
14948
+ let catchValue;
14949
+ try {
14950
+ catchValue = def.catchValue(undefined);
14951
+ } catch {
14952
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
14953
+ }
14954
+ json.default = catchValue;
14955
+ };
14956
+ var pipeProcessor = (schema, ctx, _json, params) => {
14957
+ const def = schema._zod.def;
14958
+ const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
14959
+ process2(innerType, ctx, params);
14960
+ const seen = ctx.seen.get(schema);
14961
+ seen.ref = innerType;
14962
+ };
14963
+ var readonlyProcessor = (schema, ctx, json, params) => {
14964
+ const def = schema._zod.def;
14965
+ process2(def.innerType, ctx, params);
14966
+ const seen = ctx.seen.get(schema);
14967
+ seen.ref = def.innerType;
14968
+ json.readOnly = true;
14969
+ };
14970
+ var promiseProcessor = (schema, ctx, _json, params) => {
14971
+ const def = schema._zod.def;
14972
+ process2(def.innerType, ctx, params);
14973
+ const seen = ctx.seen.get(schema);
14974
+ seen.ref = def.innerType;
14975
+ };
14976
+ var optionalProcessor = (schema, ctx, _json, params) => {
14977
+ const def = schema._zod.def;
14978
+ process2(def.innerType, ctx, params);
14979
+ const seen = ctx.seen.get(schema);
14980
+ seen.ref = def.innerType;
14981
+ };
14982
+ var lazyProcessor = (schema, ctx, _json, params) => {
14983
+ const innerType = schema._zod.innerType;
14984
+ process2(innerType, ctx, params);
14985
+ const seen = ctx.seen.get(schema);
14986
+ seen.ref = innerType;
14987
+ };
14988
+ var allProcessors = {
14989
+ string: stringProcessor,
14990
+ number: numberProcessor,
14991
+ boolean: booleanProcessor,
14992
+ bigint: bigintProcessor,
14993
+ symbol: symbolProcessor,
14994
+ null: nullProcessor,
14995
+ undefined: undefinedProcessor,
14996
+ void: voidProcessor,
14997
+ never: neverProcessor,
14998
+ any: anyProcessor,
14999
+ unknown: unknownProcessor,
15000
+ date: dateProcessor,
15001
+ enum: enumProcessor,
15002
+ literal: literalProcessor,
15003
+ nan: nanProcessor,
15004
+ template_literal: templateLiteralProcessor,
15005
+ file: fileProcessor,
15006
+ success: successProcessor,
15007
+ custom: customProcessor,
15008
+ function: functionProcessor,
15009
+ transform: transformProcessor,
15010
+ map: mapProcessor,
15011
+ set: setProcessor,
15012
+ array: arrayProcessor,
15013
+ object: objectProcessor,
15014
+ union: unionProcessor,
15015
+ intersection: intersectionProcessor,
15016
+ tuple: tupleProcessor,
15017
+ record: recordProcessor,
15018
+ nullable: nullableProcessor,
15019
+ nonoptional: nonoptionalProcessor,
15020
+ default: defaultProcessor,
15021
+ prefault: prefaultProcessor,
15022
+ catch: catchProcessor,
15023
+ pipe: pipeProcessor,
15024
+ readonly: readonlyProcessor,
15025
+ promise: promiseProcessor,
15026
+ optional: optionalProcessor,
15027
+ lazy: lazyProcessor
15028
+ };
15029
+ function toJSONSchema(input, params) {
15030
+ if ("_idmap" in input) {
15031
+ const registry2 = input;
15032
+ const ctx2 = initializeContext({ ...params, processors: allProcessors });
15033
+ const defs = {};
15034
+ for (const entry of registry2._idmap.entries()) {
15035
+ const [_, schema] = entry;
15036
+ process2(schema, ctx2);
15037
+ }
15038
+ const schemas = {};
15039
+ const external = {
15040
+ registry: registry2,
15041
+ uri: params?.uri,
15042
+ defs
15043
+ };
15044
+ ctx2.external = external;
15045
+ for (const entry of registry2._idmap.entries()) {
15046
+ const [key, schema] = entry;
15047
+ extractDefs(ctx2, schema);
15048
+ schemas[key] = finalize(ctx2, schema);
15049
+ }
15050
+ if (Object.keys(defs).length > 0) {
15051
+ const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
15052
+ schemas.__shared = {
15053
+ [defsSegment]: defs
15054
+ };
15055
+ }
15056
+ return { schemas };
15057
+ }
15058
+ const ctx = initializeContext({ ...params, processors: allProcessors });
15059
+ process2(input, ctx);
15060
+ extractDefs(ctx, input);
15061
+ return finalize(ctx, input);
15062
+ }
15063
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/json-schema-generator.js
15064
+ class JSONSchemaGenerator {
15065
+ get metadataRegistry() {
15066
+ return this.ctx.metadataRegistry;
15067
+ }
15068
+ get target() {
15069
+ return this.ctx.target;
15070
+ }
15071
+ get unrepresentable() {
15072
+ return this.ctx.unrepresentable;
15073
+ }
15074
+ get override() {
15075
+ return this.ctx.override;
15076
+ }
15077
+ get io() {
15078
+ return this.ctx.io;
15079
+ }
15080
+ get counter() {
15081
+ return this.ctx.counter;
15082
+ }
15083
+ set counter(value) {
15084
+ this.ctx.counter = value;
15085
+ }
15086
+ get seen() {
15087
+ return this.ctx.seen;
15088
+ }
15089
+ constructor(params) {
15090
+ let normalizedTarget = params?.target ?? "draft-2020-12";
15091
+ if (normalizedTarget === "draft-4")
15092
+ normalizedTarget = "draft-04";
15093
+ if (normalizedTarget === "draft-7")
15094
+ normalizedTarget = "draft-07";
15095
+ this.ctx = initializeContext({
15096
+ processors: allProcessors,
15097
+ target: normalizedTarget,
15098
+ ...params?.metadata && { metadata: params.metadata },
15099
+ ...params?.unrepresentable && { unrepresentable: params.unrepresentable },
15100
+ ...params?.override && { override: params.override },
15101
+ ...params?.io && { io: params.io }
15102
+ });
15103
+ }
15104
+ process(schema, _params = { path: [], schemaPath: [] }) {
15105
+ return process2(schema, this.ctx, _params);
15106
+ }
15107
+ emit(schema, _params) {
15108
+ if (_params) {
15109
+ if (_params.cycles)
15110
+ this.ctx.cycles = _params.cycles;
15111
+ if (_params.reused)
15112
+ this.ctx.reused = _params.reused;
15113
+ if (_params.external)
15114
+ this.ctx.external = _params.external;
15115
+ }
15116
+ extractDefs(this.ctx, schema);
15117
+ const result = finalize(this.ctx, schema);
15118
+ const { "~standard": _, ...plainResult } = result;
15119
+ return plainResult;
15120
+ }
15121
+ }
15122
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/core/json-schema.js
14926
15123
  var exports_json_schema = {};
14927
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/iso.js
15124
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/iso.js
14928
15125
  var exports_iso = {};
14929
15126
  __export(exports_iso, {
14930
15127
  time: () => time2,
@@ -14965,7 +15162,7 @@ function duration2(params) {
14965
15162
  return _isoDuration(ZodISODuration, params);
14966
15163
  }
14967
15164
 
14968
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/errors.js
15165
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/errors.js
14969
15166
  var initializer2 = (inst, issues) => {
14970
15167
  $ZodError.init(inst, issues);
14971
15168
  inst.name = "ZodError";
@@ -15000,7 +15197,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
15000
15197
  Parent: Error
15001
15198
  });
15002
15199
 
15003
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/parse.js
15200
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/parse.js
15004
15201
  var parse3 = /* @__PURE__ */ _parse(ZodRealError);
15005
15202
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
15006
15203
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -15014,9 +15211,16 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
15014
15211
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
15015
15212
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
15016
15213
 
15017
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/schemas.js
15214
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/schemas.js
15018
15215
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
15019
15216
  $ZodType.init(inst, def);
15217
+ Object.assign(inst["~standard"], {
15218
+ jsonSchema: {
15219
+ input: createStandardJSONSchemaMethod(inst, "input"),
15220
+ output: createStandardJSONSchemaMethod(inst, "output")
15221
+ }
15222
+ });
15223
+ inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
15020
15224
  inst.def = def;
15021
15225
  inst.type = def.type;
15022
15226
  Object.defineProperty(inst, "_def", { value: def });
@@ -15089,6 +15293,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
15089
15293
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
15090
15294
  $ZodString.init(inst, def);
15091
15295
  ZodType.init(inst, def);
15296
+ inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
15092
15297
  const bag = inst._zod.bag;
15093
15298
  inst.format = bag.format ?? null;
15094
15299
  inst.minLength = bag.minimum ?? null;
@@ -15327,6 +15532,7 @@ function hash(alg, params) {
15327
15532
  var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
15328
15533
  $ZodNumber.init(inst, def);
15329
15534
  ZodType.init(inst, def);
15535
+ inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
15330
15536
  inst.gt = (value, params) => inst.check(_gt(value, params));
15331
15537
  inst.gte = (value, params) => inst.check(_gte(value, params));
15332
15538
  inst.min = (value, params) => inst.check(_gte(value, params));
@@ -15374,6 +15580,7 @@ function uint32(params) {
15374
15580
  var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
15375
15581
  $ZodBoolean.init(inst, def);
15376
15582
  ZodType.init(inst, def);
15583
+ inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
15377
15584
  });
15378
15585
  function boolean2(params) {
15379
15586
  return _boolean(ZodBoolean, params);
@@ -15381,6 +15588,7 @@ function boolean2(params) {
15381
15588
  var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
15382
15589
  $ZodBigInt.init(inst, def);
15383
15590
  ZodType.init(inst, def);
15591
+ inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
15384
15592
  inst.gte = (value, params) => inst.check(_gte(value, params));
15385
15593
  inst.min = (value, params) => inst.check(_gte(value, params));
15386
15594
  inst.gt = (value, params) => inst.check(_gt(value, params));
@@ -15415,6 +15623,7 @@ function uint64(params) {
15415
15623
  var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
15416
15624
  $ZodSymbol.init(inst, def);
15417
15625
  ZodType.init(inst, def);
15626
+ inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
15418
15627
  });
15419
15628
  function symbol(params) {
15420
15629
  return _symbol(ZodSymbol, params);
@@ -15422,6 +15631,7 @@ function symbol(params) {
15422
15631
  var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
15423
15632
  $ZodUndefined.init(inst, def);
15424
15633
  ZodType.init(inst, def);
15634
+ inst._zod.processJSONSchema = (ctx, json, params) => undefinedProcessor(inst, ctx, json, params);
15425
15635
  });
15426
15636
  function _undefined3(params) {
15427
15637
  return _undefined2(ZodUndefined, params);
@@ -15429,6 +15639,7 @@ function _undefined3(params) {
15429
15639
  var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
15430
15640
  $ZodNull.init(inst, def);
15431
15641
  ZodType.init(inst, def);
15642
+ inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
15432
15643
  });
15433
15644
  function _null3(params) {
15434
15645
  return _null2(ZodNull, params);
@@ -15436,6 +15647,7 @@ function _null3(params) {
15436
15647
  var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
15437
15648
  $ZodAny.init(inst, def);
15438
15649
  ZodType.init(inst, def);
15650
+ inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
15439
15651
  });
15440
15652
  function any() {
15441
15653
  return _any(ZodAny);
@@ -15443,6 +15655,7 @@ function any() {
15443
15655
  var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
15444
15656
  $ZodUnknown.init(inst, def);
15445
15657
  ZodType.init(inst, def);
15658
+ inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
15446
15659
  });
15447
15660
  function unknown() {
15448
15661
  return _unknown(ZodUnknown);
@@ -15450,6 +15663,7 @@ function unknown() {
15450
15663
  var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
15451
15664
  $ZodNever.init(inst, def);
15452
15665
  ZodType.init(inst, def);
15666
+ inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
15453
15667
  });
15454
15668
  function never(params) {
15455
15669
  return _never(ZodNever, params);
@@ -15457,6 +15671,7 @@ function never(params) {
15457
15671
  var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
15458
15672
  $ZodVoid.init(inst, def);
15459
15673
  ZodType.init(inst, def);
15674
+ inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
15460
15675
  });
15461
15676
  function _void2(params) {
15462
15677
  return _void(ZodVoid, params);
@@ -15464,6 +15679,7 @@ function _void2(params) {
15464
15679
  var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
15465
15680
  $ZodDate.init(inst, def);
15466
15681
  ZodType.init(inst, def);
15682
+ inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
15467
15683
  inst.min = (value, params) => inst.check(_gte(value, params));
15468
15684
  inst.max = (value, params) => inst.check(_lte(value, params));
15469
15685
  const c = inst._zod.bag;
@@ -15476,6 +15692,7 @@ function date3(params) {
15476
15692
  var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
15477
15693
  $ZodArray.init(inst, def);
15478
15694
  ZodType.init(inst, def);
15695
+ inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
15479
15696
  inst.element = def.element;
15480
15697
  inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
15481
15698
  inst.nonempty = (params) => inst.check(_minLength(1, params));
@@ -15493,6 +15710,7 @@ function keyof(schema) {
15493
15710
  var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
15494
15711
  $ZodObjectJIT.init(inst, def);
15495
15712
  ZodType.init(inst, def);
15713
+ inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
15496
15714
  exports_util.defineLazy(inst, "shape", () => {
15497
15715
  return def.shape;
15498
15716
  });
@@ -15541,6 +15759,7 @@ function looseObject(shape, params) {
15541
15759
  var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
15542
15760
  $ZodUnion.init(inst, def);
15543
15761
  ZodType.init(inst, def);
15762
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
15544
15763
  inst.options = def.options;
15545
15764
  });
15546
15765
  function union(options, params) {
@@ -15550,6 +15769,20 @@ function union(options, params) {
15550
15769
  ...exports_util.normalizeParams(params)
15551
15770
  });
15552
15771
  }
15772
+ var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
15773
+ ZodUnion.init(inst, def);
15774
+ $ZodXor.init(inst, def);
15775
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
15776
+ inst.options = def.options;
15777
+ });
15778
+ function xor(options, params) {
15779
+ return new ZodXor({
15780
+ type: "union",
15781
+ options,
15782
+ inclusive: false,
15783
+ ...exports_util.normalizeParams(params)
15784
+ });
15785
+ }
15553
15786
  var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
15554
15787
  ZodUnion.init(inst, def);
15555
15788
  $ZodDiscriminatedUnion.init(inst, def);
@@ -15565,6 +15798,7 @@ function discriminatedUnion(discriminator, options, params) {
15565
15798
  var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
15566
15799
  $ZodIntersection.init(inst, def);
15567
15800
  ZodType.init(inst, def);
15801
+ inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
15568
15802
  });
15569
15803
  function intersection(left, right) {
15570
15804
  return new ZodIntersection({
@@ -15576,6 +15810,7 @@ function intersection(left, right) {
15576
15810
  var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
15577
15811
  $ZodTuple.init(inst, def);
15578
15812
  ZodType.init(inst, def);
15813
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
15579
15814
  inst.rest = (rest) => inst.clone({
15580
15815
  ...inst._zod.def,
15581
15816
  rest
@@ -15595,6 +15830,7 @@ function tuple(items, _paramsOrRest, _params) {
15595
15830
  var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
15596
15831
  $ZodRecord.init(inst, def);
15597
15832
  ZodType.init(inst, def);
15833
+ inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
15598
15834
  inst.keyType = def.keyType;
15599
15835
  inst.valueType = def.valueType;
15600
15836
  });
@@ -15616,9 +15852,19 @@ function partialRecord(keyType, valueType, params) {
15616
15852
  ...exports_util.normalizeParams(params)
15617
15853
  });
15618
15854
  }
15855
+ function looseRecord(keyType, valueType, params) {
15856
+ return new ZodRecord({
15857
+ type: "record",
15858
+ keyType,
15859
+ valueType,
15860
+ mode: "loose",
15861
+ ...exports_util.normalizeParams(params)
15862
+ });
15863
+ }
15619
15864
  var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
15620
15865
  $ZodMap.init(inst, def);
15621
15866
  ZodType.init(inst, def);
15867
+ inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx, json, params);
15622
15868
  inst.keyType = def.keyType;
15623
15869
  inst.valueType = def.valueType;
15624
15870
  });
@@ -15633,6 +15879,7 @@ function map(keyType, valueType, params) {
15633
15879
  var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
15634
15880
  $ZodSet.init(inst, def);
15635
15881
  ZodType.init(inst, def);
15882
+ inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx, json, params);
15636
15883
  inst.min = (...args) => inst.check(_minSize(...args));
15637
15884
  inst.nonempty = (params) => inst.check(_minSize(1, params));
15638
15885
  inst.max = (...args) => inst.check(_maxSize(...args));
@@ -15648,6 +15895,7 @@ function set(valueType, params) {
15648
15895
  var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
15649
15896
  $ZodEnum.init(inst, def);
15650
15897
  ZodType.init(inst, def);
15898
+ inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
15651
15899
  inst.enum = def.entries;
15652
15900
  inst.options = Object.values(def.entries);
15653
15901
  const keys = new Set(Object.keys(def.entries));
@@ -15700,6 +15948,7 @@ function nativeEnum(entries, params) {
15700
15948
  var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
15701
15949
  $ZodLiteral.init(inst, def);
15702
15950
  ZodType.init(inst, def);
15951
+ inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
15703
15952
  inst.values = new Set(def.values);
15704
15953
  Object.defineProperty(inst, "value", {
15705
15954
  get() {
@@ -15720,6 +15969,7 @@ function literal(value, params) {
15720
15969
  var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
15721
15970
  $ZodFile.init(inst, def);
15722
15971
  ZodType.init(inst, def);
15972
+ inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
15723
15973
  inst.min = (size, params) => inst.check(_minSize(size, params));
15724
15974
  inst.max = (size, params) => inst.check(_maxSize(size, params));
15725
15975
  inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
@@ -15730,6 +15980,7 @@ function file(params) {
15730
15980
  var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
15731
15981
  $ZodTransform.init(inst, def);
15732
15982
  ZodType.init(inst, def);
15983
+ inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);
15733
15984
  inst._zod.parse = (payload, _ctx) => {
15734
15985
  if (_ctx.direction === "backward") {
15735
15986
  throw new $ZodEncodeError(inst.constructor.name);
@@ -15767,6 +16018,7 @@ function transform(fn) {
15767
16018
  var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
15768
16019
  $ZodOptional.init(inst, def);
15769
16020
  ZodType.init(inst, def);
16021
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
15770
16022
  inst.unwrap = () => inst._zod.def.innerType;
15771
16023
  });
15772
16024
  function optional(innerType) {
@@ -15778,6 +16030,7 @@ function optional(innerType) {
15778
16030
  var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
15779
16031
  $ZodNullable.init(inst, def);
15780
16032
  ZodType.init(inst, def);
16033
+ inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
15781
16034
  inst.unwrap = () => inst._zod.def.innerType;
15782
16035
  });
15783
16036
  function nullable(innerType) {
@@ -15792,6 +16045,7 @@ function nullish2(innerType) {
15792
16045
  var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
15793
16046
  $ZodDefault.init(inst, def);
15794
16047
  ZodType.init(inst, def);
16048
+ inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
15795
16049
  inst.unwrap = () => inst._zod.def.innerType;
15796
16050
  inst.removeDefault = inst.unwrap;
15797
16051
  });
@@ -15807,6 +16061,7 @@ function _default2(innerType, defaultValue) {
15807
16061
  var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
15808
16062
  $ZodPrefault.init(inst, def);
15809
16063
  ZodType.init(inst, def);
16064
+ inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
15810
16065
  inst.unwrap = () => inst._zod.def.innerType;
15811
16066
  });
15812
16067
  function prefault(innerType, defaultValue) {
@@ -15821,6 +16076,7 @@ function prefault(innerType, defaultValue) {
15821
16076
  var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
15822
16077
  $ZodNonOptional.init(inst, def);
15823
16078
  ZodType.init(inst, def);
16079
+ inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
15824
16080
  inst.unwrap = () => inst._zod.def.innerType;
15825
16081
  });
15826
16082
  function nonoptional(innerType, params) {
@@ -15833,6 +16089,7 @@ function nonoptional(innerType, params) {
15833
16089
  var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
15834
16090
  $ZodSuccess.init(inst, def);
15835
16091
  ZodType.init(inst, def);
16092
+ inst._zod.processJSONSchema = (ctx, json, params) => successProcessor(inst, ctx, json, params);
15836
16093
  inst.unwrap = () => inst._zod.def.innerType;
15837
16094
  });
15838
16095
  function success(innerType) {
@@ -15844,6 +16101,7 @@ function success(innerType) {
15844
16101
  var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
15845
16102
  $ZodCatch.init(inst, def);
15846
16103
  ZodType.init(inst, def);
16104
+ inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
15847
16105
  inst.unwrap = () => inst._zod.def.innerType;
15848
16106
  inst.removeCatch = inst.unwrap;
15849
16107
  });
@@ -15857,6 +16115,7 @@ function _catch2(innerType, catchValue) {
15857
16115
  var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
15858
16116
  $ZodNaN.init(inst, def);
15859
16117
  ZodType.init(inst, def);
16118
+ inst._zod.processJSONSchema = (ctx, json, params) => nanProcessor(inst, ctx, json, params);
15860
16119
  });
15861
16120
  function nan(params) {
15862
16121
  return _nan(ZodNaN, params);
@@ -15864,6 +16123,7 @@ function nan(params) {
15864
16123
  var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
15865
16124
  $ZodPipe.init(inst, def);
15866
16125
  ZodType.init(inst, def);
16126
+ inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
15867
16127
  inst.in = def.in;
15868
16128
  inst.out = def.out;
15869
16129
  });
@@ -15890,6 +16150,7 @@ function codec(in_, out, params) {
15890
16150
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
15891
16151
  $ZodReadonly.init(inst, def);
15892
16152
  ZodType.init(inst, def);
16153
+ inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
15893
16154
  inst.unwrap = () => inst._zod.def.innerType;
15894
16155
  });
15895
16156
  function readonly(innerType) {
@@ -15901,6 +16162,7 @@ function readonly(innerType) {
15901
16162
  var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
15902
16163
  $ZodTemplateLiteral.init(inst, def);
15903
16164
  ZodType.init(inst, def);
16165
+ inst._zod.processJSONSchema = (ctx, json, params) => templateLiteralProcessor(inst, ctx, json, params);
15904
16166
  });
15905
16167
  function templateLiteral(parts, params) {
15906
16168
  return new ZodTemplateLiteral({
@@ -15912,6 +16174,7 @@ function templateLiteral(parts, params) {
15912
16174
  var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
15913
16175
  $ZodLazy.init(inst, def);
15914
16176
  ZodType.init(inst, def);
16177
+ inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
15915
16178
  inst.unwrap = () => inst._zod.def.getter();
15916
16179
  });
15917
16180
  function lazy(getter) {
@@ -15923,6 +16186,7 @@ function lazy(getter) {
15923
16186
  var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
15924
16187
  $ZodPromise.init(inst, def);
15925
16188
  ZodType.init(inst, def);
16189
+ inst._zod.processJSONSchema = (ctx, json, params) => promiseProcessor(inst, ctx, json, params);
15926
16190
  inst.unwrap = () => inst._zod.def.innerType;
15927
16191
  });
15928
16192
  function promise(innerType) {
@@ -15934,6 +16198,7 @@ function promise(innerType) {
15934
16198
  var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
15935
16199
  $ZodFunction.init(inst, def);
15936
16200
  ZodType.init(inst, def);
16201
+ inst._zod.processJSONSchema = (ctx, json, params) => functionProcessor(inst, ctx, json, params);
15937
16202
  });
15938
16203
  function _function(params) {
15939
16204
  return new ZodFunction({
@@ -15945,6 +16210,7 @@ function _function(params) {
15945
16210
  var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
15946
16211
  $ZodCustom.init(inst, def);
15947
16212
  ZodType.init(inst, def);
16213
+ inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
15948
16214
  });
15949
16215
  function check(fn) {
15950
16216
  const ch = new $ZodCheck({
@@ -15991,7 +16257,7 @@ function json(params) {
15991
16257
  function preprocess(fn, schema) {
15992
16258
  return pipe(transform(fn), schema);
15993
16259
  }
15994
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/compat.js
16260
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/compat.js
15995
16261
  var ZodIssueCode = {
15996
16262
  invalid_type: "invalid_type",
15997
16263
  too_big: "too_big",
@@ -16015,7 +16281,382 @@ function getErrorMap() {
16015
16281
  }
16016
16282
  var ZodFirstPartyTypeKind;
16017
16283
  (function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
16018
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/coerce.js
16284
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/from-json-schema.js
16285
+ function detectVersion(schema, defaultTarget) {
16286
+ const $schema = schema.$schema;
16287
+ if ($schema === "https://json-schema.org/draft/2020-12/schema") {
16288
+ return "draft-2020-12";
16289
+ }
16290
+ if ($schema === "http://json-schema.org/draft-07/schema#") {
16291
+ return "draft-7";
16292
+ }
16293
+ if ($schema === "http://json-schema.org/draft-04/schema#") {
16294
+ return "draft-4";
16295
+ }
16296
+ return defaultTarget ?? "draft-2020-12";
16297
+ }
16298
+ function resolveRef(ref, ctx) {
16299
+ if (!ref.startsWith("#")) {
16300
+ throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
16301
+ }
16302
+ const path = ref.slice(1).split("/").filter(Boolean);
16303
+ if (path.length === 0) {
16304
+ return ctx.rootSchema;
16305
+ }
16306
+ const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
16307
+ if (path[0] === defsKey) {
16308
+ const key = path[1];
16309
+ if (!key || !ctx.defs[key]) {
16310
+ throw new Error(`Reference not found: ${ref}`);
16311
+ }
16312
+ return ctx.defs[key];
16313
+ }
16314
+ throw new Error(`Reference not found: ${ref}`);
16315
+ }
16316
+ function convertBaseSchema(schema, ctx) {
16317
+ if (schema.not !== undefined) {
16318
+ if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
16319
+ return never();
16320
+ }
16321
+ throw new Error("not is not supported in Zod (except { not: {} } for never)");
16322
+ }
16323
+ if (schema.unevaluatedItems !== undefined) {
16324
+ throw new Error("unevaluatedItems is not supported");
16325
+ }
16326
+ if (schema.unevaluatedProperties !== undefined) {
16327
+ throw new Error("unevaluatedProperties is not supported");
16328
+ }
16329
+ if (schema.if !== undefined || schema.then !== undefined || schema.else !== undefined) {
16330
+ throw new Error("Conditional schemas (if/then/else) are not supported");
16331
+ }
16332
+ if (schema.dependentSchemas !== undefined || schema.dependentRequired !== undefined) {
16333
+ throw new Error("dependentSchemas and dependentRequired are not supported");
16334
+ }
16335
+ if (schema.$ref) {
16336
+ const refPath = schema.$ref;
16337
+ if (ctx.refs.has(refPath)) {
16338
+ return ctx.refs.get(refPath);
16339
+ }
16340
+ if (ctx.processing.has(refPath)) {
16341
+ return lazy(() => {
16342
+ if (!ctx.refs.has(refPath)) {
16343
+ throw new Error(`Circular reference not resolved: ${refPath}`);
16344
+ }
16345
+ return ctx.refs.get(refPath);
16346
+ });
16347
+ }
16348
+ ctx.processing.add(refPath);
16349
+ const resolved = resolveRef(refPath, ctx);
16350
+ const zodSchema2 = convertSchema(resolved, ctx);
16351
+ ctx.refs.set(refPath, zodSchema2);
16352
+ ctx.processing.delete(refPath);
16353
+ return zodSchema2;
16354
+ }
16355
+ if (schema.enum !== undefined) {
16356
+ const enumValues = schema.enum;
16357
+ if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
16358
+ return _null3();
16359
+ }
16360
+ if (enumValues.length === 0) {
16361
+ return never();
16362
+ }
16363
+ if (enumValues.length === 1) {
16364
+ return literal(enumValues[0]);
16365
+ }
16366
+ if (enumValues.every((v) => typeof v === "string")) {
16367
+ return _enum2(enumValues);
16368
+ }
16369
+ const literalSchemas = enumValues.map((v) => literal(v));
16370
+ if (literalSchemas.length < 2) {
16371
+ return literalSchemas[0];
16372
+ }
16373
+ return union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
16374
+ }
16375
+ if (schema.const !== undefined) {
16376
+ return literal(schema.const);
16377
+ }
16378
+ const type = schema.type;
16379
+ if (Array.isArray(type)) {
16380
+ const typeSchemas = type.map((t) => {
16381
+ const typeSchema = { ...schema, type: t };
16382
+ return convertBaseSchema(typeSchema, ctx);
16383
+ });
16384
+ if (typeSchemas.length === 0) {
16385
+ return never();
16386
+ }
16387
+ if (typeSchemas.length === 1) {
16388
+ return typeSchemas[0];
16389
+ }
16390
+ return union(typeSchemas);
16391
+ }
16392
+ if (!type) {
16393
+ return any();
16394
+ }
16395
+ let zodSchema;
16396
+ switch (type) {
16397
+ case "string": {
16398
+ let stringSchema = string2();
16399
+ if (schema.format) {
16400
+ const format = schema.format;
16401
+ if (format === "email") {
16402
+ stringSchema = stringSchema.check(email2());
16403
+ } else if (format === "uri" || format === "uri-reference") {
16404
+ stringSchema = stringSchema.check(url());
16405
+ } else if (format === "uuid" || format === "guid") {
16406
+ stringSchema = stringSchema.check(uuid2());
16407
+ } else if (format === "date-time") {
16408
+ stringSchema = stringSchema.check(exports_iso.datetime());
16409
+ } else if (format === "date") {
16410
+ stringSchema = stringSchema.check(exports_iso.date());
16411
+ } else if (format === "time") {
16412
+ stringSchema = stringSchema.check(exports_iso.time());
16413
+ } else if (format === "duration") {
16414
+ stringSchema = stringSchema.check(exports_iso.duration());
16415
+ } else if (format === "ipv4") {
16416
+ stringSchema = stringSchema.check(ipv42());
16417
+ } else if (format === "ipv6") {
16418
+ stringSchema = stringSchema.check(ipv62());
16419
+ } else if (format === "mac") {
16420
+ stringSchema = stringSchema.check(mac2());
16421
+ } else if (format === "cidr") {
16422
+ stringSchema = stringSchema.check(cidrv42());
16423
+ } else if (format === "cidr-v6") {
16424
+ stringSchema = stringSchema.check(cidrv62());
16425
+ } else if (format === "base64") {
16426
+ stringSchema = stringSchema.check(base642());
16427
+ } else if (format === "base64url") {
16428
+ stringSchema = stringSchema.check(base64url2());
16429
+ } else if (format === "e164") {
16430
+ stringSchema = stringSchema.check(e1642());
16431
+ } else if (format === "jwt") {
16432
+ stringSchema = stringSchema.check(jwt());
16433
+ } else if (format === "emoji") {
16434
+ stringSchema = stringSchema.check(emoji2());
16435
+ } else if (format === "nanoid") {
16436
+ stringSchema = stringSchema.check(nanoid2());
16437
+ } else if (format === "cuid") {
16438
+ stringSchema = stringSchema.check(cuid3());
16439
+ } else if (format === "cuid2") {
16440
+ stringSchema = stringSchema.check(cuid22());
16441
+ } else if (format === "ulid") {
16442
+ stringSchema = stringSchema.check(ulid2());
16443
+ } else if (format === "xid") {
16444
+ stringSchema = stringSchema.check(xid2());
16445
+ } else if (format === "ksuid") {
16446
+ stringSchema = stringSchema.check(ksuid2());
16447
+ }
16448
+ }
16449
+ if (typeof schema.minLength === "number") {
16450
+ stringSchema = stringSchema.min(schema.minLength);
16451
+ }
16452
+ if (typeof schema.maxLength === "number") {
16453
+ stringSchema = stringSchema.max(schema.maxLength);
16454
+ }
16455
+ if (schema.pattern) {
16456
+ stringSchema = stringSchema.regex(new RegExp(schema.pattern));
16457
+ }
16458
+ zodSchema = stringSchema;
16459
+ break;
16460
+ }
16461
+ case "number":
16462
+ case "integer": {
16463
+ let numberSchema = type === "integer" ? number2().int() : number2();
16464
+ if (typeof schema.minimum === "number") {
16465
+ numberSchema = numberSchema.min(schema.minimum);
16466
+ }
16467
+ if (typeof schema.maximum === "number") {
16468
+ numberSchema = numberSchema.max(schema.maximum);
16469
+ }
16470
+ if (typeof schema.exclusiveMinimum === "number") {
16471
+ numberSchema = numberSchema.gt(schema.exclusiveMinimum);
16472
+ } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
16473
+ numberSchema = numberSchema.gt(schema.minimum);
16474
+ }
16475
+ if (typeof schema.exclusiveMaximum === "number") {
16476
+ numberSchema = numberSchema.lt(schema.exclusiveMaximum);
16477
+ } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
16478
+ numberSchema = numberSchema.lt(schema.maximum);
16479
+ }
16480
+ if (typeof schema.multipleOf === "number") {
16481
+ numberSchema = numberSchema.multipleOf(schema.multipleOf);
16482
+ }
16483
+ zodSchema = numberSchema;
16484
+ break;
16485
+ }
16486
+ case "boolean": {
16487
+ zodSchema = boolean2();
16488
+ break;
16489
+ }
16490
+ case "null": {
16491
+ zodSchema = _null3();
16492
+ break;
16493
+ }
16494
+ case "object": {
16495
+ const shape = {};
16496
+ const properties = schema.properties || {};
16497
+ const requiredSet = new Set(schema.required || []);
16498
+ for (const [key, propSchema] of Object.entries(properties)) {
16499
+ const propZodSchema = convertSchema(propSchema, ctx);
16500
+ shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
16501
+ }
16502
+ if (schema.propertyNames) {
16503
+ const keySchema = convertSchema(schema.propertyNames, ctx);
16504
+ const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : any();
16505
+ if (Object.keys(shape).length === 0) {
16506
+ zodSchema = record(keySchema, valueSchema);
16507
+ break;
16508
+ }
16509
+ const objectSchema2 = object(shape).passthrough();
16510
+ const recordSchema = looseRecord(keySchema, valueSchema);
16511
+ zodSchema = intersection(objectSchema2, recordSchema);
16512
+ break;
16513
+ }
16514
+ if (schema.patternProperties) {
16515
+ const patternProps = schema.patternProperties;
16516
+ const patternKeys = Object.keys(patternProps);
16517
+ const looseRecords = [];
16518
+ for (const pattern of patternKeys) {
16519
+ const patternValue = convertSchema(patternProps[pattern], ctx);
16520
+ const keySchema = string2().regex(new RegExp(pattern));
16521
+ looseRecords.push(looseRecord(keySchema, patternValue));
16522
+ }
16523
+ const schemasToIntersect = [];
16524
+ if (Object.keys(shape).length > 0) {
16525
+ schemasToIntersect.push(object(shape).passthrough());
16526
+ }
16527
+ schemasToIntersect.push(...looseRecords);
16528
+ if (schemasToIntersect.length === 0) {
16529
+ zodSchema = object({}).passthrough();
16530
+ } else if (schemasToIntersect.length === 1) {
16531
+ zodSchema = schemasToIntersect[0];
16532
+ } else {
16533
+ let result = intersection(schemasToIntersect[0], schemasToIntersect[1]);
16534
+ for (let i = 2;i < schemasToIntersect.length; i++) {
16535
+ result = intersection(result, schemasToIntersect[i]);
16536
+ }
16537
+ zodSchema = result;
16538
+ }
16539
+ break;
16540
+ }
16541
+ const objectSchema = object(shape);
16542
+ if (schema.additionalProperties === false) {
16543
+ zodSchema = objectSchema.strict();
16544
+ } else if (typeof schema.additionalProperties === "object") {
16545
+ zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
16546
+ } else {
16547
+ zodSchema = objectSchema.passthrough();
16548
+ }
16549
+ break;
16550
+ }
16551
+ case "array": {
16552
+ const prefixItems = schema.prefixItems;
16553
+ const items = schema.items;
16554
+ if (prefixItems && Array.isArray(prefixItems)) {
16555
+ const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
16556
+ const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : undefined;
16557
+ if (rest) {
16558
+ zodSchema = tuple(tupleItems).rest(rest);
16559
+ } else {
16560
+ zodSchema = tuple(tupleItems);
16561
+ }
16562
+ if (typeof schema.minItems === "number") {
16563
+ zodSchema = zodSchema.check(_minLength(schema.minItems));
16564
+ }
16565
+ if (typeof schema.maxItems === "number") {
16566
+ zodSchema = zodSchema.check(_maxLength(schema.maxItems));
16567
+ }
16568
+ } else if (Array.isArray(items)) {
16569
+ const tupleItems = items.map((item) => convertSchema(item, ctx));
16570
+ const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : undefined;
16571
+ if (rest) {
16572
+ zodSchema = tuple(tupleItems).rest(rest);
16573
+ } else {
16574
+ zodSchema = tuple(tupleItems);
16575
+ }
16576
+ if (typeof schema.minItems === "number") {
16577
+ zodSchema = zodSchema.check(_minLength(schema.minItems));
16578
+ }
16579
+ if (typeof schema.maxItems === "number") {
16580
+ zodSchema = zodSchema.check(_maxLength(schema.maxItems));
16581
+ }
16582
+ } else if (items !== undefined) {
16583
+ const element = convertSchema(items, ctx);
16584
+ let arraySchema = array(element);
16585
+ if (typeof schema.minItems === "number") {
16586
+ arraySchema = arraySchema.min(schema.minItems);
16587
+ }
16588
+ if (typeof schema.maxItems === "number") {
16589
+ arraySchema = arraySchema.max(schema.maxItems);
16590
+ }
16591
+ zodSchema = arraySchema;
16592
+ } else {
16593
+ zodSchema = array(any());
16594
+ }
16595
+ break;
16596
+ }
16597
+ default:
16598
+ throw new Error(`Unsupported type: ${type}`);
16599
+ }
16600
+ if (schema.description) {
16601
+ zodSchema = zodSchema.describe(schema.description);
16602
+ }
16603
+ if (schema.default !== undefined) {
16604
+ zodSchema = zodSchema.default(schema.default);
16605
+ }
16606
+ return zodSchema;
16607
+ }
16608
+ function convertSchema(schema, ctx) {
16609
+ if (typeof schema === "boolean") {
16610
+ return schema ? any() : never();
16611
+ }
16612
+ let baseSchema = convertBaseSchema(schema, ctx);
16613
+ const hasExplicitType = schema.type || schema.enum !== undefined || schema.const !== undefined;
16614
+ if (schema.anyOf && Array.isArray(schema.anyOf)) {
16615
+ const options = schema.anyOf.map((s) => convertSchema(s, ctx));
16616
+ const anyOfUnion = union(options);
16617
+ baseSchema = hasExplicitType ? intersection(baseSchema, anyOfUnion) : anyOfUnion;
16618
+ }
16619
+ if (schema.oneOf && Array.isArray(schema.oneOf)) {
16620
+ const options = schema.oneOf.map((s) => convertSchema(s, ctx));
16621
+ const oneOfUnion = xor(options);
16622
+ baseSchema = hasExplicitType ? intersection(baseSchema, oneOfUnion) : oneOfUnion;
16623
+ }
16624
+ if (schema.allOf && Array.isArray(schema.allOf)) {
16625
+ if (schema.allOf.length === 0) {
16626
+ baseSchema = hasExplicitType ? baseSchema : any();
16627
+ } else {
16628
+ let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
16629
+ const startIdx = hasExplicitType ? 0 : 1;
16630
+ for (let i = startIdx;i < schema.allOf.length; i++) {
16631
+ result = intersection(result, convertSchema(schema.allOf[i], ctx));
16632
+ }
16633
+ baseSchema = result;
16634
+ }
16635
+ }
16636
+ if (schema.nullable === true && ctx.version === "openapi-3.0") {
16637
+ baseSchema = nullable(baseSchema);
16638
+ }
16639
+ if (schema.readOnly === true) {
16640
+ baseSchema = readonly(baseSchema);
16641
+ }
16642
+ return baseSchema;
16643
+ }
16644
+ function fromJSONSchema(schema, params) {
16645
+ if (typeof schema === "boolean") {
16646
+ return schema ? any() : never();
16647
+ }
16648
+ const version2 = detectVersion(schema, params?.defaultTarget);
16649
+ const defs = schema.$defs || schema.definitions || {};
16650
+ const ctx = {
16651
+ version: version2,
16652
+ defs,
16653
+ refs: new Map,
16654
+ processing: new Set,
16655
+ rootSchema: schema
16656
+ };
16657
+ return convertSchema(schema, ctx);
16658
+ }
16659
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/coerce.js
16019
16660
  var exports_coerce = {};
16020
16661
  __export(exports_coerce, {
16021
16662
  string: () => string3,
@@ -16040,9 +16681,9 @@ function date4(params) {
16040
16681
  return _coercedDate(ZodDate, params);
16041
16682
  }
16042
16683
 
16043
- // ../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/external.js
16684
+ // ../../node_modules/.pnpm/zod@4.2.0/node_modules/zod/v4/classic/external.js
16044
16685
  config(en_default());
16045
- // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__f44f59e63c79d6544cf3bc0348efbd42/node_modules/safegen/dist/safegen-DHhNOdib.js
16686
+ // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__cd4e7547212f4c009703727102853bfd/node_modules/safegen/dist/safegen-DHhNOdib.js
16046
16687
  function createSafeDataGenerator(gen, logger) {
16047
16688
  return function generateFromSchema({ schema, fallback, toJsonSchema = exports_external.toJSONSchema }) {
16048
16689
  const jsonSchema = toJsonSchema(schema);
@@ -16074,7 +16715,7 @@ function jsonSchemaToInstruction(jsonSchema) {
16074
16715
  `);
16075
16716
  }
16076
16717
 
16077
- // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__f44f59e63c79d6544cf3bc0348efbd42/node_modules/safegen/dist/primitives-DeHVhToL.js
16718
+ // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__cd4e7547212f4c009703727102853bfd/node_modules/safegen/dist/primitives-DeHVhToL.js
16078
16719
  function formatIssue(prompt, actual, issue2, consequence) {
16079
16720
  const lines = [
16080
16721
  `SafeGen saw that invalid data was produced for the prompt:`,
@@ -16206,7 +16847,7 @@ ${formattingInstruction}`, `choose-${instruction}-FROM-${options.join(`-`)}`, ma
16206
16847
  return selections;
16207
16848
  }
16208
16849
 
16209
- // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.1.13/node_modules/varmint/dist/varmint-workspace-manager-Bu9YnLAq.js
16850
+ // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.2.0/node_modules/varmint/dist/varmint-workspace-manager-Bu9YnLAq.js
16210
16851
  var import_cachedir = __toESM(require_cachedir(), 1);
16211
16852
  import * as fs from "fs";
16212
16853
  import * as path from "path";
@@ -16263,7 +16904,7 @@ var FilesystemStorage = class {
16263
16904
  }
16264
16905
  };
16265
16906
 
16266
- // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.1.13/node_modules/varmint/dist/varmint-workspace-manager-Bu9YnLAq.js
16907
+ // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.2.0/node_modules/varmint/dist/varmint-workspace-manager-Bu9YnLAq.js
16267
16908
  var filenameAllowList = /[^a-zA-Z0-9\-._]/g;
16268
16909
  function sanitizeFilename(filename, maxLen = 64) {
16269
16910
  if (maxLen % 2 === 1)
@@ -16419,7 +17060,7 @@ function startsWith(prefix, str) {
16419
17060
  return str.startsWith(prefix);
16420
17061
  }
16421
17062
 
16422
- // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.1.13/node_modules/varmint/dist/index.js
17063
+ // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.2.0/node_modules/varmint/dist/index.js
16423
17064
  import * as fs2 from "fs";
16424
17065
  import * as path2 from "path";
16425
17066
  import { inspect } from "util";
@@ -17188,7 +17829,7 @@ class ArrayDiff extends Diff {
17188
17829
  }
17189
17830
  var arrayDiff = new ArrayDiff;
17190
17831
 
17191
- // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.1.13/node_modules/varmint/dist/index.js
17832
+ // ../../node_modules/.pnpm/varmint@0.5.11_zod@4.2.0/node_modules/varmint/dist/index.js
17192
17833
  var import_picocolors = __toESM(require_picocolors(), 1);
17193
17834
  var pico = import_picocolors.default.createColors(true);
17194
17835
  function prettyPrintDiffInline(oldStr, newStr, opts = {}) {
@@ -17572,7 +18213,7 @@ ${inputFileContents}`);
17572
18213
  }
17573
18214
  };
17574
18215
 
17575
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/tslib.mjs
18216
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/tslib.mjs
17576
18217
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
17577
18218
  if (kind === "m")
17578
18219
  throw new TypeError("Private method is not writable");
@@ -17590,7 +18231,7 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
17590
18231
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
17591
18232
  }
17592
18233
 
17593
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/uuid.mjs
18234
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/uuid.mjs
17594
18235
  var uuid42 = function() {
17595
18236
  const { crypto: crypto2 } = globalThis;
17596
18237
  if (crypto2?.randomUUID) {
@@ -17602,7 +18243,7 @@ var uuid42 = function() {
17602
18243
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
17603
18244
  };
17604
18245
 
17605
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/errors.mjs
18246
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/errors.mjs
17606
18247
  function isAbortError(err) {
17607
18248
  return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
17608
18249
  }
@@ -17629,7 +18270,7 @@ var castToError = (err) => {
17629
18270
  return new Error(err);
17630
18271
  };
17631
18272
 
17632
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/core/error.mjs
18273
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/core/error.mjs
17633
18274
  class OpenAIError extends Error {
17634
18275
  }
17635
18276
 
@@ -17753,7 +18394,7 @@ class InvalidWebhookSignatureError extends Error {
17753
18394
  }
17754
18395
  }
17755
18396
 
17756
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/values.mjs
18397
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/values.mjs
17757
18398
  var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
17758
18399
  var isAbsoluteURL = (url2) => {
17759
18400
  return startsWithSchemeRegexp.test(url2);
@@ -17796,13 +18437,13 @@ var safeJSON = (text) => {
17796
18437
  }
17797
18438
  };
17798
18439
 
17799
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/sleep.mjs
18440
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/sleep.mjs
17800
18441
  var sleep = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
17801
18442
 
17802
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/version.mjs
18443
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/version.mjs
17803
18444
  var VERSION = "6.10.0";
17804
18445
 
17805
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/detect-platform.mjs
18446
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/detect-platform.mjs
17806
18447
  var isRunningInBrowser = () => {
17807
18448
  return typeof window !== "undefined" && typeof window.document !== "undefined" && typeof navigator !== "undefined";
17808
18449
  };
@@ -17931,7 +18572,7 @@ var getPlatformHeaders = () => {
17931
18572
  return _platformHeaders ?? (_platformHeaders = getPlatformProperties());
17932
18573
  };
17933
18574
 
17934
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/shims.mjs
18575
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/shims.mjs
17935
18576
  function getDefaultFetch() {
17936
18577
  if (typeof fetch !== "undefined") {
17937
18578
  return fetch;
@@ -18002,7 +18643,7 @@ async function CancelReadableStream(stream) {
18002
18643
  await cancelPromise;
18003
18644
  }
18004
18645
 
18005
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/request-options.mjs
18646
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/request-options.mjs
18006
18647
  var FallbackEncoder = ({ headers, body }) => {
18007
18648
  return {
18008
18649
  bodyHeaders: {
@@ -18012,7 +18653,7 @@ var FallbackEncoder = ({ headers, body }) => {
18012
18653
  };
18013
18654
  };
18014
18655
 
18015
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/qs/formats.mjs
18656
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/qs/formats.mjs
18016
18657
  var default_format = "RFC3986";
18017
18658
  var default_formatter = (v) => String(v);
18018
18659
  var formatters = {
@@ -18021,7 +18662,7 @@ var formatters = {
18021
18662
  };
18022
18663
  var RFC1738 = "RFC1738";
18023
18664
 
18024
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/qs/utils.mjs
18665
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/qs/utils.mjs
18025
18666
  var has = (obj, key) => (has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), has(obj, key));
18026
18667
  var hex_table = /* @__PURE__ */ (() => {
18027
18668
  const array2 = [];
@@ -18093,7 +18734,7 @@ function maybe_map(val, fn) {
18093
18734
  return fn(val);
18094
18735
  }
18095
18736
 
18096
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/qs/stringify.mjs
18737
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/qs/stringify.mjs
18097
18738
  var array_prefix_generators = {
18098
18739
  brackets(prefix) {
18099
18740
  return String(prefix) + "[]";
@@ -18320,7 +18961,7 @@ function stringify(object2, opts = {}) {
18320
18961
  }
18321
18962
  return joined.length > 0 ? prefix + joined : "";
18322
18963
  }
18323
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/bytes.mjs
18964
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/bytes.mjs
18324
18965
  function concatBytes(buffers) {
18325
18966
  let length = 0;
18326
18967
  for (const buffer of buffers) {
@@ -18345,7 +18986,7 @@ function decodeUTF8(bytes) {
18345
18986
  return (decodeUTF8_ ?? (decoder = new globalThis.TextDecoder, decodeUTF8_ = decoder.decode.bind(decoder)))(bytes);
18346
18987
  }
18347
18988
 
18348
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/decoders/line.mjs
18989
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/decoders/line.mjs
18349
18990
  var _LineDecoder_buffer;
18350
18991
  var _LineDecoder_carriageReturnIndex;
18351
18992
 
@@ -18425,7 +19066,7 @@ function findDoubleNewlineIndex(buffer) {
18425
19066
  return -1;
18426
19067
  }
18427
19068
 
18428
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/log.mjs
19069
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/log.mjs
18429
19070
  var levelNumbers = {
18430
19071
  off: 0,
18431
19072
  error: 200,
@@ -18497,7 +19138,7 @@ var formatRequestDetails = (details) => {
18497
19138
  return details;
18498
19139
  };
18499
19140
 
18500
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/core/streaming.mjs
19141
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/core/streaming.mjs
18501
19142
  var _Stream_client;
18502
19143
 
18503
19144
  class Stream {
@@ -18746,7 +19387,7 @@ function partition(str, delimiter) {
18746
19387
  return [str, "", ""];
18747
19388
  }
18748
19389
 
18749
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/parse.mjs
19390
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/parse.mjs
18750
19391
  async function defaultParseResponse(client, props) {
18751
19392
  const { response, requestLogID, retryOfRequestLogID, startTime } = props;
18752
19393
  const body = await (async () => {
@@ -18792,7 +19433,7 @@ function addRequestID(value, response) {
18792
19433
  });
18793
19434
  }
18794
19435
 
18795
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/core/api-promise.mjs
19436
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/core/api-promise.mjs
18796
19437
  var _APIPromise_client;
18797
19438
 
18798
19439
  class APIPromise extends Promise {
@@ -18833,7 +19474,7 @@ class APIPromise extends Promise {
18833
19474
  }
18834
19475
  _APIPromise_client = new WeakMap;
18835
19476
 
18836
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/core/pagination.mjs
19477
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/core/pagination.mjs
18837
19478
  var _AbstractPage_client;
18838
19479
 
18839
19480
  class AbstractPage {
@@ -18962,11 +19603,11 @@ class ConversationCursorPage extends AbstractPage {
18962
19603
  }
18963
19604
  }
18964
19605
 
18965
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/uploads.mjs
19606
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/uploads.mjs
18966
19607
  var checkFileSupport = () => {
18967
19608
  if (typeof File === "undefined") {
18968
- const { process: process2 } = globalThis;
18969
- const isOldNode = typeof process2?.versions?.node === "string" && parseInt(process2.versions.node.split(".")) < 20;
19609
+ const { process: process3 } = globalThis;
19610
+ const isOldNode = typeof process3?.versions?.node === "string" && parseInt(process3.versions.node.split(".")) < 20;
18970
19611
  throw new Error("`File` is not defined as a global, which is required for file uploads." + (isOldNode ? " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." : ""));
18971
19612
  }
18972
19613
  };
@@ -19053,7 +19694,7 @@ var addFormValue = async (form, key, value) => {
19053
19694
  }
19054
19695
  };
19055
19696
 
19056
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/to-file.mjs
19697
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/to-file.mjs
19057
19698
  var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
19058
19699
  var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
19059
19700
  var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
@@ -19103,14 +19744,14 @@ function propsForError(value) {
19103
19744
  const props = Object.getOwnPropertyNames(value);
19104
19745
  return `; props: [${props.map((p) => `"${p}"`).join(", ")}]`;
19105
19746
  }
19106
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/core/resource.mjs
19747
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/core/resource.mjs
19107
19748
  class APIResource {
19108
19749
  constructor(client) {
19109
19750
  this._client = client;
19110
19751
  }
19111
19752
  }
19112
19753
 
19113
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/path.mjs
19754
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/path.mjs
19114
19755
  function encodeURIPath(str) {
19115
19756
  return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
19116
19757
  }
@@ -19165,13 +19806,13 @@ ${underline}`);
19165
19806
  };
19166
19807
  var path3 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
19167
19808
 
19168
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/chat/completions/messages.mjs
19809
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/chat/completions/messages.mjs
19169
19810
  class Messages extends APIResource {
19170
19811
  list(completionID, query = {}, options) {
19171
19812
  return this._client.getAPIList(path3`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
19172
19813
  }
19173
19814
  }
19174
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/parser.mjs
19815
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/parser.mjs
19175
19816
  function isChatCompletionFunctionTool(tool) {
19176
19817
  return tool !== undefined && "function" in tool && tool.function !== undefined;
19177
19818
  }
@@ -19278,7 +19919,7 @@ function validateInputTools(tools) {
19278
19919
  }
19279
19920
  }
19280
19921
 
19281
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/chatCompletionUtils.mjs
19922
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/chatCompletionUtils.mjs
19282
19923
  var isAssistantMessage = (message) => {
19283
19924
  return message?.role === "assistant";
19284
19925
  };
@@ -19286,7 +19927,7 @@ var isToolMessage = (message) => {
19286
19927
  return message?.role === "tool";
19287
19928
  };
19288
19929
 
19289
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/EventStream.mjs
19930
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/EventStream.mjs
19290
19931
  var _EventStream_instances;
19291
19932
  var _EventStream_connectedPromise;
19292
19933
  var _EventStream_resolveConnectedPromise;
@@ -19439,12 +20080,12 @@ _EventStream_connectedPromise = new WeakMap, _EventStream_resolveConnectedPromis
19439
20080
  return this._emit("error", new OpenAIError(String(error47)));
19440
20081
  };
19441
20082
 
19442
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/RunnableFunction.mjs
20083
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/RunnableFunction.mjs
19443
20084
  function isRunnableFunctionWithParse(fn) {
19444
20085
  return typeof fn.parse === "function";
19445
20086
  }
19446
20087
 
19447
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/AbstractChatCompletionRunner.mjs
20088
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/AbstractChatCompletionRunner.mjs
19448
20089
  var _AbstractChatCompletionRunner_instances;
19449
20090
  var _AbstractChatCompletionRunner_getFinalContent;
19450
20091
  var _AbstractChatCompletionRunner_getFinalMessage;
@@ -19699,7 +20340,7 @@ _AbstractChatCompletionRunner_instances = new WeakSet, _AbstractChatCompletionRu
19699
20340
  return typeof rawContent === "string" ? rawContent : rawContent === undefined ? "undefined" : JSON.stringify(rawContent);
19700
20341
  };
19701
20342
 
19702
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/ChatCompletionRunner.mjs
20343
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/ChatCompletionRunner.mjs
19703
20344
  class ChatCompletionRunner extends AbstractChatCompletionRunner {
19704
20345
  static runTools(client, params, options) {
19705
20346
  const runner = new ChatCompletionRunner;
@@ -19718,7 +20359,7 @@ class ChatCompletionRunner extends AbstractChatCompletionRunner {
19718
20359
  }
19719
20360
  }
19720
20361
 
19721
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/_vendor/partial-json-parser/parser.mjs
20362
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/_vendor/partial-json-parser/parser.mjs
19722
20363
  var STR = 1;
19723
20364
  var NUM = 2;
19724
20365
  var ARR = 4;
@@ -19931,7 +20572,7 @@ var _parseJSON = (jsonString, allow) => {
19931
20572
  return parseAny();
19932
20573
  };
19933
20574
  var partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM);
19934
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/ChatCompletionStream.mjs
20575
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/ChatCompletionStream.mjs
19935
20576
  var _ChatCompletionStream_instances;
19936
20577
  var _ChatCompletionStream_params;
19937
20578
  var _ChatCompletionStream_choiceEventStates;
@@ -20404,7 +21045,7 @@ function assertIsEmpty(obj) {
20404
21045
  }
20405
21046
  function assertNever2(_x) {}
20406
21047
 
20407
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs
21048
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs
20408
21049
  class ChatCompletionStreamingRunner extends ChatCompletionStream {
20409
21050
  static fromReadableStream(stream) {
20410
21051
  const runner = new ChatCompletionStreamingRunner(null);
@@ -20422,7 +21063,7 @@ class ChatCompletionStreamingRunner extends ChatCompletionStream {
20422
21063
  }
20423
21064
  }
20424
21065
 
20425
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/chat/completions/completions.mjs
21066
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/chat/completions/completions.mjs
20426
21067
  class Completions extends APIResource {
20427
21068
  constructor() {
20428
21069
  super(...arguments);
@@ -20465,7 +21106,7 @@ class Completions extends APIResource {
20465
21106
  }
20466
21107
  Completions.Messages = Messages;
20467
21108
 
20468
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/chat/chat.mjs
21109
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/chat/chat.mjs
20469
21110
  class Chat extends APIResource {
20470
21111
  constructor() {
20471
21112
  super(...arguments);
@@ -20473,7 +21114,7 @@ class Chat extends APIResource {
20473
21114
  }
20474
21115
  }
20475
21116
  Chat.Completions = Completions;
20476
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/headers.mjs
21117
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/headers.mjs
20477
21118
  var brand_privateNullableHeaders = /* @__PURE__ */ Symbol("brand.privateNullableHeaders");
20478
21119
  function* iterateHeaders(headers) {
20479
21120
  if (!headers)
@@ -20536,7 +21177,7 @@ var buildHeaders = (newHeaders) => {
20536
21177
  return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
20537
21178
  };
20538
21179
 
20539
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/audio/speech.mjs
21180
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/audio/speech.mjs
20540
21181
  class Speech extends APIResource {
20541
21182
  create(body, options) {
20542
21183
  return this._client.post("/audio/speech", {
@@ -20548,7 +21189,7 @@ class Speech extends APIResource {
20548
21189
  }
20549
21190
  }
20550
21191
 
20551
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/audio/transcriptions.mjs
21192
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/audio/transcriptions.mjs
20552
21193
  class Transcriptions extends APIResource {
20553
21194
  create(body, options) {
20554
21195
  return this._client.post("/audio/transcriptions", multipartFormRequestOptions({
@@ -20560,14 +21201,14 @@ class Transcriptions extends APIResource {
20560
21201
  }
20561
21202
  }
20562
21203
 
20563
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/audio/translations.mjs
21204
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/audio/translations.mjs
20564
21205
  class Translations extends APIResource {
20565
21206
  create(body, options) {
20566
21207
  return this._client.post("/audio/translations", multipartFormRequestOptions({ body, ...options, __metadata: { model: body.model } }, this._client));
20567
21208
  }
20568
21209
  }
20569
21210
 
20570
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/audio/audio.mjs
21211
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/audio/audio.mjs
20571
21212
  class Audio extends APIResource {
20572
21213
  constructor() {
20573
21214
  super(...arguments);
@@ -20579,7 +21220,7 @@ class Audio extends APIResource {
20579
21220
  Audio.Transcriptions = Transcriptions;
20580
21221
  Audio.Translations = Translations;
20581
21222
  Audio.Speech = Speech;
20582
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/batches.mjs
21223
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/batches.mjs
20583
21224
  class Batches extends APIResource {
20584
21225
  create(body, options) {
20585
21226
  return this._client.post("/batches", { body, ...options });
@@ -20594,7 +21235,7 @@ class Batches extends APIResource {
20594
21235
  return this._client.post(path3`/batches/${batchID}/cancel`, options);
20595
21236
  }
20596
21237
  }
20597
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/assistants.mjs
21238
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/assistants.mjs
20598
21239
  class Assistants extends APIResource {
20599
21240
  create(body, options) {
20600
21241
  return this._client.post("/assistants", {
@@ -20631,7 +21272,7 @@ class Assistants extends APIResource {
20631
21272
  }
20632
21273
  }
20633
21274
 
20634
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/realtime/sessions.mjs
21275
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/realtime/sessions.mjs
20635
21276
  class Sessions extends APIResource {
20636
21277
  create(body, options) {
20637
21278
  return this._client.post("/realtime/sessions", {
@@ -20642,7 +21283,7 @@ class Sessions extends APIResource {
20642
21283
  }
20643
21284
  }
20644
21285
 
20645
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs
21286
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs
20646
21287
  class TranscriptionSessions extends APIResource {
20647
21288
  create(body, options) {
20648
21289
  return this._client.post("/realtime/transcription_sessions", {
@@ -20653,7 +21294,7 @@ class TranscriptionSessions extends APIResource {
20653
21294
  }
20654
21295
  }
20655
21296
 
20656
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/realtime/realtime.mjs
21297
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/realtime/realtime.mjs
20657
21298
  class Realtime extends APIResource {
20658
21299
  constructor() {
20659
21300
  super(...arguments);
@@ -20664,7 +21305,7 @@ class Realtime extends APIResource {
20664
21305
  Realtime.Sessions = Sessions;
20665
21306
  Realtime.TranscriptionSessions = TranscriptionSessions;
20666
21307
 
20667
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/chatkit/sessions.mjs
21308
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/chatkit/sessions.mjs
20668
21309
  class Sessions2 extends APIResource {
20669
21310
  create(body, options) {
20670
21311
  return this._client.post("/chatkit/sessions", {
@@ -20681,7 +21322,7 @@ class Sessions2 extends APIResource {
20681
21322
  }
20682
21323
  }
20683
21324
 
20684
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/chatkit/threads.mjs
21325
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/chatkit/threads.mjs
20685
21326
  class Threads extends APIResource {
20686
21327
  retrieve(threadID, options) {
20687
21328
  return this._client.get(path3`/chatkit/threads/${threadID}`, {
@@ -20707,7 +21348,7 @@ class Threads extends APIResource {
20707
21348
  }
20708
21349
  }
20709
21350
 
20710
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/chatkit/chatkit.mjs
21351
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/chatkit/chatkit.mjs
20711
21352
  class ChatKit extends APIResource {
20712
21353
  constructor() {
20713
21354
  super(...arguments);
@@ -20718,7 +21359,7 @@ class ChatKit extends APIResource {
20718
21359
  ChatKit.Sessions = Sessions2;
20719
21360
  ChatKit.Threads = Threads;
20720
21361
 
20721
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/threads/messages.mjs
21362
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/threads/messages.mjs
20722
21363
  class Messages2 extends APIResource {
20723
21364
  create(threadID, body, options) {
20724
21365
  return this._client.post(path3`/threads/${threadID}/messages`, {
@@ -20758,7 +21399,7 @@ class Messages2 extends APIResource {
20758
21399
  }
20759
21400
  }
20760
21401
 
20761
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/threads/runs/steps.mjs
21402
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/threads/runs/steps.mjs
20762
21403
  class Steps extends APIResource {
20763
21404
  retrieve(stepID, params, options) {
20764
21405
  const { thread_id, run_id, ...query } = params;
@@ -20777,7 +21418,7 @@ class Steps extends APIResource {
20777
21418
  });
20778
21419
  }
20779
21420
  }
20780
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/base64.mjs
21421
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/base64.mjs
20781
21422
  var toFloat32Array = (base64Str) => {
20782
21423
  if (typeof Buffer !== "undefined") {
20783
21424
  const buf = Buffer.from(base64Str, "base64");
@@ -20792,7 +21433,7 @@ var toFloat32Array = (base64Str) => {
20792
21433
  return Array.from(new Float32Array(bytes.buffer));
20793
21434
  }
20794
21435
  };
20795
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/internal/utils/env.mjs
21436
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/internal/utils/env.mjs
20796
21437
  var readEnv = (env) => {
20797
21438
  if (typeof globalThis.process !== "undefined") {
20798
21439
  return globalThis.process.env?.[env]?.trim() ?? undefined;
@@ -20802,7 +21443,7 @@ var readEnv = (env) => {
20802
21443
  }
20803
21444
  return;
20804
21445
  };
20805
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/AssistantStream.mjs
21446
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/AssistantStream.mjs
20806
21447
  var _AssistantStream_instances;
20807
21448
  var _a2;
20808
21449
  var _AssistantStream_events;
@@ -21341,7 +21982,7 @@ _a2 = AssistantStream, _AssistantStream_addEvent = function _AssistantStream_add
21341
21982
  };
21342
21983
  function assertNever3(_x) {}
21343
21984
 
21344
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/threads/runs/runs.mjs
21985
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/threads/runs/runs.mjs
21345
21986
  class Runs extends APIResource {
21346
21987
  constructor() {
21347
21988
  super(...arguments);
@@ -21456,7 +22097,7 @@ class Runs extends APIResource {
21456
22097
  }
21457
22098
  Runs.Steps = Steps;
21458
22099
 
21459
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/threads/threads.mjs
22100
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/threads/threads.mjs
21460
22101
  class Threads2 extends APIResource {
21461
22102
  constructor() {
21462
22103
  super(...arguments);
@@ -21508,7 +22149,7 @@ class Threads2 extends APIResource {
21508
22149
  Threads2.Runs = Runs;
21509
22150
  Threads2.Messages = Messages2;
21510
22151
 
21511
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/beta/beta.mjs
22152
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/beta/beta.mjs
21512
22153
  class Beta extends APIResource {
21513
22154
  constructor() {
21514
22155
  super(...arguments);
@@ -21522,13 +22163,13 @@ Beta.Realtime = Realtime;
21522
22163
  Beta.ChatKit = ChatKit;
21523
22164
  Beta.Assistants = Assistants;
21524
22165
  Beta.Threads = Threads2;
21525
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/completions.mjs
22166
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/completions.mjs
21526
22167
  class Completions2 extends APIResource {
21527
22168
  create(body, options) {
21528
22169
  return this._client.post("/completions", { body, ...options, stream: body.stream ?? false });
21529
22170
  }
21530
22171
  }
21531
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/containers/files/content.mjs
22172
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/containers/files/content.mjs
21532
22173
  class Content extends APIResource {
21533
22174
  retrieve(fileID, params, options) {
21534
22175
  const { container_id } = params;
@@ -21540,7 +22181,7 @@ class Content extends APIResource {
21540
22181
  }
21541
22182
  }
21542
22183
 
21543
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/containers/files/files.mjs
22184
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/containers/files/files.mjs
21544
22185
  class Files extends APIResource {
21545
22186
  constructor() {
21546
22187
  super(...arguments);
@@ -21569,7 +22210,7 @@ class Files extends APIResource {
21569
22210
  }
21570
22211
  Files.Content = Content;
21571
22212
 
21572
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/containers/containers.mjs
22213
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/containers/containers.mjs
21573
22214
  class Containers extends APIResource {
21574
22215
  constructor() {
21575
22216
  super(...arguments);
@@ -21592,7 +22233,7 @@ class Containers extends APIResource {
21592
22233
  }
21593
22234
  }
21594
22235
  Containers.Files = Files;
21595
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/conversations/items.mjs
22236
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/conversations/items.mjs
21596
22237
  class Items extends APIResource {
21597
22238
  create(conversationID, params, options) {
21598
22239
  const { include, ...body } = params;
@@ -21615,7 +22256,7 @@ class Items extends APIResource {
21615
22256
  }
21616
22257
  }
21617
22258
 
21618
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/conversations/conversations.mjs
22259
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/conversations/conversations.mjs
21619
22260
  class Conversations extends APIResource {
21620
22261
  constructor() {
21621
22262
  super(...arguments);
@@ -21635,7 +22276,7 @@ class Conversations extends APIResource {
21635
22276
  }
21636
22277
  }
21637
22278
  Conversations.Items = Items;
21638
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/embeddings.mjs
22279
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/embeddings.mjs
21639
22280
  class Embeddings extends APIResource {
21640
22281
  create(body, options) {
21641
22282
  const hasUserProvidedEncodingFormat = !!body.encoding_format;
@@ -21665,7 +22306,7 @@ class Embeddings extends APIResource {
21665
22306
  });
21666
22307
  }
21667
22308
  }
21668
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/evals/runs/output-items.mjs
22309
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/evals/runs/output-items.mjs
21669
22310
  class OutputItems extends APIResource {
21670
22311
  retrieve(outputItemID, params, options) {
21671
22312
  const { eval_id, run_id } = params;
@@ -21677,7 +22318,7 @@ class OutputItems extends APIResource {
21677
22318
  }
21678
22319
  }
21679
22320
 
21680
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/evals/runs/runs.mjs
22321
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/evals/runs/runs.mjs
21681
22322
  class Runs2 extends APIResource {
21682
22323
  constructor() {
21683
22324
  super(...arguments);
@@ -21707,7 +22348,7 @@ class Runs2 extends APIResource {
21707
22348
  }
21708
22349
  Runs2.OutputItems = OutputItems;
21709
22350
 
21710
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/evals/evals.mjs
22351
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/evals/evals.mjs
21711
22352
  class Evals extends APIResource {
21712
22353
  constructor() {
21713
22354
  super(...arguments);
@@ -21730,7 +22371,7 @@ class Evals extends APIResource {
21730
22371
  }
21731
22372
  }
21732
22373
  Evals.Runs = Runs2;
21733
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/files.mjs
22374
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/files.mjs
21734
22375
  class Files2 extends APIResource {
21735
22376
  create(body, options) {
21736
22377
  return this._client.post("/files", multipartFormRequestOptions({ body, ...options }, this._client));
@@ -21767,11 +22408,11 @@ class Files2 extends APIResource {
21767
22408
  return file2;
21768
22409
  }
21769
22410
  }
21770
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/methods.mjs
22411
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/methods.mjs
21771
22412
  class Methods extends APIResource {
21772
22413
  }
21773
22414
 
21774
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/alpha/graders.mjs
22415
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/alpha/graders.mjs
21775
22416
  class Graders extends APIResource {
21776
22417
  run(body, options) {
21777
22418
  return this._client.post("/fine_tuning/alpha/graders/run", { body, ...options });
@@ -21781,7 +22422,7 @@ class Graders extends APIResource {
21781
22422
  }
21782
22423
  }
21783
22424
 
21784
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs
22425
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs
21785
22426
  class Alpha extends APIResource {
21786
22427
  constructor() {
21787
22428
  super(...arguments);
@@ -21790,7 +22431,7 @@ class Alpha extends APIResource {
21790
22431
  }
21791
22432
  Alpha.Graders = Graders;
21792
22433
 
21793
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
22434
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
21794
22435
  class Permissions extends APIResource {
21795
22436
  create(fineTunedModelCheckpoint, body, options) {
21796
22437
  return this._client.getAPIList(path3`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, { body, method: "post", ...options });
@@ -21807,7 +22448,7 @@ class Permissions extends APIResource {
21807
22448
  }
21808
22449
  }
21809
22450
 
21810
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs
22451
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs
21811
22452
  class Checkpoints extends APIResource {
21812
22453
  constructor() {
21813
22454
  super(...arguments);
@@ -21816,14 +22457,14 @@ class Checkpoints extends APIResource {
21816
22457
  }
21817
22458
  Checkpoints.Permissions = Permissions;
21818
22459
 
21819
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
22460
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
21820
22461
  class Checkpoints2 extends APIResource {
21821
22462
  list(fineTuningJobID, query = {}, options) {
21822
22463
  return this._client.getAPIList(path3`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
21823
22464
  }
21824
22465
  }
21825
22466
 
21826
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs
22467
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs
21827
22468
  class Jobs extends APIResource {
21828
22469
  constructor() {
21829
22470
  super(...arguments);
@@ -21853,7 +22494,7 @@ class Jobs extends APIResource {
21853
22494
  }
21854
22495
  Jobs.Checkpoints = Checkpoints2;
21855
22496
 
21856
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/fine-tuning/fine-tuning.mjs
22497
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/fine-tuning/fine-tuning.mjs
21857
22498
  class FineTuning extends APIResource {
21858
22499
  constructor() {
21859
22500
  super(...arguments);
@@ -21867,11 +22508,11 @@ FineTuning.Methods = Methods;
21867
22508
  FineTuning.Jobs = Jobs;
21868
22509
  FineTuning.Checkpoints = Checkpoints;
21869
22510
  FineTuning.Alpha = Alpha;
21870
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/graders/grader-models.mjs
22511
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/graders/grader-models.mjs
21871
22512
  class GraderModels extends APIResource {
21872
22513
  }
21873
22514
 
21874
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/graders/graders.mjs
22515
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/graders/graders.mjs
21875
22516
  class Graders2 extends APIResource {
21876
22517
  constructor() {
21877
22518
  super(...arguments);
@@ -21879,7 +22520,7 @@ class Graders2 extends APIResource {
21879
22520
  }
21880
22521
  }
21881
22522
  Graders2.GraderModels = GraderModels;
21882
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/images.mjs
22523
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/images.mjs
21883
22524
  class Images extends APIResource {
21884
22525
  createVariation(body, options) {
21885
22526
  return this._client.post("/images/variations", multipartFormRequestOptions({ body, ...options }, this._client));
@@ -21891,7 +22532,7 @@ class Images extends APIResource {
21891
22532
  return this._client.post("/images/generations", { body, ...options, stream: body.stream ?? false });
21892
22533
  }
21893
22534
  }
21894
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/models.mjs
22535
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/models.mjs
21895
22536
  class Models extends APIResource {
21896
22537
  retrieve(model, options) {
21897
22538
  return this._client.get(path3`/models/${model}`, options);
@@ -21903,13 +22544,13 @@ class Models extends APIResource {
21903
22544
  return this._client.delete(path3`/models/${model}`, options);
21904
22545
  }
21905
22546
  }
21906
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/moderations.mjs
22547
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/moderations.mjs
21907
22548
  class Moderations extends APIResource {
21908
22549
  create(body, options) {
21909
22550
  return this._client.post("/moderations", { body, ...options });
21910
22551
  }
21911
22552
  }
21912
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/realtime/calls.mjs
22553
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/realtime/calls.mjs
21913
22554
  class Calls extends APIResource {
21914
22555
  accept(callID, body, options) {
21915
22556
  return this._client.post(path3`/realtime/calls/${callID}/accept`, {
@@ -21940,14 +22581,14 @@ class Calls extends APIResource {
21940
22581
  }
21941
22582
  }
21942
22583
 
21943
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/realtime/client-secrets.mjs
22584
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/realtime/client-secrets.mjs
21944
22585
  class ClientSecrets extends APIResource {
21945
22586
  create(body, options) {
21946
22587
  return this._client.post("/realtime/client_secrets", { body, ...options });
21947
22588
  }
21948
22589
  }
21949
22590
 
21950
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/realtime/realtime.mjs
22591
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/realtime/realtime.mjs
21951
22592
  class Realtime2 extends APIResource {
21952
22593
  constructor() {
21953
22594
  super(...arguments);
@@ -21957,7 +22598,7 @@ class Realtime2 extends APIResource {
21957
22598
  }
21958
22599
  Realtime2.ClientSecrets = ClientSecrets;
21959
22600
  Realtime2.Calls = Calls;
21960
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/ResponsesParser.mjs
22601
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/ResponsesParser.mjs
21961
22602
  function maybeParseResponse(response, params) {
21962
22603
  if (!params || !hasAutoParseableInput2(params)) {
21963
22604
  return {
@@ -22078,7 +22719,7 @@ function addOutputText(rsp) {
22078
22719
  rsp.output_text = texts.join("");
22079
22720
  }
22080
22721
 
22081
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/responses/ResponseStream.mjs
22722
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/responses/ResponseStream.mjs
22082
22723
  var _ResponseStream_instances;
22083
22724
  var _ResponseStream_params;
22084
22725
  var _ResponseStream_currentResponseSnapshot;
@@ -22337,21 +22978,21 @@ function finalizeResponse(snapshot, params) {
22337
22978
  return maybeParseResponse(snapshot, params);
22338
22979
  }
22339
22980
 
22340
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/responses/input-items.mjs
22981
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/responses/input-items.mjs
22341
22982
  class InputItems extends APIResource {
22342
22983
  list(responseID, query = {}, options) {
22343
22984
  return this._client.getAPIList(path3`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
22344
22985
  }
22345
22986
  }
22346
22987
 
22347
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/responses/input-tokens.mjs
22988
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/responses/input-tokens.mjs
22348
22989
  class InputTokens extends APIResource {
22349
22990
  count(body = {}, options) {
22350
22991
  return this._client.post("/responses/input_tokens", { body, ...options });
22351
22992
  }
22352
22993
  }
22353
22994
 
22354
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/responses/responses.mjs
22995
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/responses/responses.mjs
22355
22996
  class Responses extends APIResource {
22356
22997
  constructor() {
22357
22998
  super(...arguments);
@@ -22399,14 +23040,14 @@ class Responses extends APIResource {
22399
23040
  }
22400
23041
  Responses.InputItems = InputItems;
22401
23042
  Responses.InputTokens = InputTokens;
22402
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/uploads/parts.mjs
23043
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/uploads/parts.mjs
22403
23044
  class Parts extends APIResource {
22404
23045
  create(uploadID, body, options) {
22405
23046
  return this._client.post(path3`/uploads/${uploadID}/parts`, multipartFormRequestOptions({ body, ...options }, this._client));
22406
23047
  }
22407
23048
  }
22408
23049
 
22409
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/uploads/uploads.mjs
23050
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/uploads/uploads.mjs
22410
23051
  class Uploads extends APIResource {
22411
23052
  constructor() {
22412
23053
  super(...arguments);
@@ -22423,7 +23064,7 @@ class Uploads extends APIResource {
22423
23064
  }
22424
23065
  }
22425
23066
  Uploads.Parts = Parts;
22426
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/lib/Util.mjs
23067
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/lib/Util.mjs
22427
23068
  var allSettledWithThrow = async (promises) => {
22428
23069
  const results = await Promise.allSettled(promises);
22429
23070
  const rejected = results.filter((result) => result.status === "rejected");
@@ -22442,7 +23083,7 @@ var allSettledWithThrow = async (promises) => {
22442
23083
  return values2;
22443
23084
  };
22444
23085
 
22445
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/vector-stores/file-batches.mjs
23086
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/vector-stores/file-batches.mjs
22446
23087
  class FileBatches extends APIResource {
22447
23088
  create(vectorStoreID, body, options) {
22448
23089
  return this._client.post(path3`/vector_stores/${vectorStoreID}/file_batches`, {
@@ -22532,7 +23173,7 @@ class FileBatches extends APIResource {
22532
23173
  }
22533
23174
  }
22534
23175
 
22535
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/vector-stores/files.mjs
23176
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/vector-stores/files.mjs
22536
23177
  class Files3 extends APIResource {
22537
23178
  create(vectorStoreID, body, options) {
22538
23179
  return this._client.post(path3`/vector_stores/${vectorStoreID}/files`, {
@@ -22623,7 +23264,7 @@ class Files3 extends APIResource {
22623
23264
  }
22624
23265
  }
22625
23266
 
22626
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/vector-stores/vector-stores.mjs
23267
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/vector-stores/vector-stores.mjs
22627
23268
  class VectorStores extends APIResource {
22628
23269
  constructor() {
22629
23270
  super(...arguments);
@@ -22674,7 +23315,7 @@ class VectorStores extends APIResource {
22674
23315
  }
22675
23316
  VectorStores.Files = Files3;
22676
23317
  VectorStores.FileBatches = FileBatches;
22677
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/videos.mjs
23318
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/videos.mjs
22678
23319
  class Videos extends APIResource {
22679
23320
  create(body, options) {
22680
23321
  return this._client.post("/videos", maybeMultipartFormRequestOptions({ body, ...options }, this._client));
@@ -22700,7 +23341,7 @@ class Videos extends APIResource {
22700
23341
  return this._client.post(path3`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
22701
23342
  }
22702
23343
  }
22703
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/resources/webhooks.mjs
23344
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/resources/webhooks.mjs
22704
23345
  var _Webhooks_instances;
22705
23346
  var _Webhooks_validateSecret;
22706
23347
  var _Webhooks_getRequiredHeader;
@@ -22766,7 +23407,7 @@ _Webhooks_instances = new WeakSet, _Webhooks_validateSecret = function _Webhooks
22766
23407
  }
22767
23408
  return value;
22768
23409
  };
22769
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/client.mjs
23410
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/client.mjs
22770
23411
  var _OpenAI_instances;
22771
23412
  var _a3;
22772
23413
  var _OpenAI_encoder;
@@ -23208,7 +23849,7 @@ OpenAI.Conversations = Conversations;
23208
23849
  OpenAI.Evals = Evals;
23209
23850
  OpenAI.Containers = Containers;
23210
23851
  OpenAI.Videos = Videos;
23211
- // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.1.13/node_modules/openai/azure.mjs
23852
+ // ../../node_modules/.pnpm/openai@6.10.0_ws@8.18.3_zod@4.2.0/node_modules/openai/azure.mjs
23212
23853
  var _deployments_endpoints = new Set([
23213
23854
  "/completions",
23214
23855
  "/chat/completions",
@@ -23220,7 +23861,7 @@ var _deployments_endpoints = new Set([
23220
23861
  "/batches",
23221
23862
  "/images/edits"
23222
23863
  ]);
23223
- // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__f44f59e63c79d6544cf3bc0348efbd42/node_modules/safegen/dist/openai/index.js
23864
+ // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__cd4e7547212f4c009703727102853bfd/node_modules/safegen/dist/openai/index.js
23224
23865
  function buildOpenAiRequestParams(model, ...params) {
23225
23866
  const [instruction, jsonSchema, _, previouslyFailedResponses] = params;
23226
23867
  const messages = [{
@@ -33539,7 +34180,7 @@ function Connection(options, queues = {}, { onopen = noop2, onend = noop2, onclo
33539
34180
  const clientKey = await hmac(saltedPassword, "Client Key");
33540
34181
  const auth = "n=*,r=" + nonce + "," + "r=" + res.r + ",s=" + res.s + ",i=" + res.i + ",c=biws,r=" + res.r;
33541
34182
  serverSignature = (await hmac(await hmac(saltedPassword, "Server Key"), auth)).toString("base64");
33542
- const payload = "c=biws,r=" + res.r + ",p=" + xor(clientKey, Buffer.from(await hmac(await sha256(clientKey), auth))).toString("base64");
34183
+ const payload = "c=biws,r=" + res.r + ",p=" + xor2(clientKey, Buffer.from(await hmac(await sha256(clientKey), auth))).toString("base64");
33543
34184
  write(bytes_default().p().str(payload).end());
33544
34185
  }
33545
34186
  function SASLFinal(x2) {
@@ -33760,7 +34401,7 @@ function hmac(key, x2) {
33760
34401
  function sha256(x2) {
33761
34402
  return crypto2.createHash("sha256").update(x2).digest();
33762
34403
  }
33763
- function xor(a2, b3) {
34404
+ function xor2(a2, b3) {
33764
34405
  const length = Math.max(a2.length, b3.length);
33765
34406
  const buffer2 = Buffer.allocUnsafe(length);
33766
34407
  for (let i2 = 0;i2 < length; i2++)
@@ -34573,6 +35214,9 @@ class Index {
34573
35214
  this.config = { ...config2, table };
34574
35215
  }
34575
35216
  }
35217
+ function index(name) {
35218
+ return new IndexBuilderOn(false, name);
35219
+ }
34576
35220
  function uniqueIndex(name) {
34577
35221
  return new IndexBuilderOn(true, name);
34578
35222
  }
@@ -34774,8 +35418,8 @@ class PgDialect {
34774
35418
  return;
34775
35419
  }
34776
35420
  const joinsArray = [];
34777
- for (const [index, joinMeta] of joins.entries()) {
34778
- if (index === 0) {
35421
+ for (const [index2, joinMeta] of joins.entries()) {
35422
+ if (index2 === 0) {
34779
35423
  joinsArray.push(sql` `);
34780
35424
  }
34781
35425
  const table = joinMeta.table;
@@ -34796,7 +35440,7 @@ class PgDialect {
34796
35440
  } else {
34797
35441
  joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join${lateralSql} ${table}${onSql}`);
34798
35442
  }
34799
- if (index < joins.length - 1) {
35443
+ if (index2 < joins.length - 1) {
34800
35444
  joinsArray.push(sql` `);
34801
35445
  }
34802
35446
  }
@@ -36629,7 +37273,7 @@ function drizzle(...params) {
36629
37273
  drizzle2.mock = mock;
36630
37274
  })(drizzle || (drizzle = {}));
36631
37275
 
36632
- // ../../node_modules/.pnpm/@t3-oss+env-core@0.13.8_arktype@2.1.28_typescript@5.9.3_zod@4.1.13/node_modules/@t3-oss/env-core/dist/src-Bb3GbGAa.js
37276
+ // ../../node_modules/.pnpm/@t3-oss+env-core@0.13.10_arktype@2.1.29_typescript@5.9.3_zod@4.2.0/node_modules/@t3-oss/env-core/dist/standard.js
36633
37277
  function ensureSynchronous(value, message) {
36634
37278
  if (value instanceof Promise)
36635
37279
  throw new Error(message);
@@ -36654,17 +37298,21 @@ function parseWithDictionary(dictionary, value) {
36654
37298
  return { issues };
36655
37299
  return { value: result };
36656
37300
  }
37301
+
37302
+ // ../../node_modules/.pnpm/@t3-oss+env-core@0.13.10_arktype@2.1.29_typescript@5.9.3_zod@4.2.0/node_modules/@t3-oss/env-core/dist/index.js
36657
37303
  function createEnv(opts) {
36658
37304
  const runtimeEnv = opts.runtimeEnvStrict ?? opts.runtimeEnv ?? process.env;
36659
- const emptyStringAsUndefined = opts.emptyStringAsUndefined ?? false;
36660
- if (emptyStringAsUndefined) {
37305
+ if (opts.emptyStringAsUndefined ?? false) {
36661
37306
  for (const [key, value] of Object.entries(runtimeEnv))
36662
37307
  if (value === "")
36663
37308
  delete runtimeEnv[key];
36664
37309
  }
36665
- const skip = !!opts.skipValidation;
36666
- if (skip)
37310
+ if (!!opts.skipValidation) {
37311
+ if (opts.extends)
37312
+ for (const preset of opts.extends)
37313
+ preset.skipValidation = true;
36667
37314
  return runtimeEnv;
37315
+ }
36668
37316
  const _client = typeof opts.client === "object" ? opts.client : {};
36669
37317
  const _server = typeof opts.server === "object" ? opts.server : {};
36670
37318
  const _shared = typeof opts.shared === "object" ? opts.shared : {};
@@ -36677,7 +37325,7 @@ function createEnv(opts) {
36677
37325
  ..._client,
36678
37326
  ..._shared
36679
37327
  };
36680
- const parsed = opts.createFinalSchema?.(finalSchemaShape, isServer)["~standard"].validate(runtimeEnv) ?? parseWithDictionary(finalSchemaShape, runtimeEnv);
37328
+ const parsed = opts.createFinalSchema?.(finalSchemaShape, isServer)?.["~standard"].validate(runtimeEnv) ?? parseWithDictionary(finalSchemaShape, runtimeEnv);
36681
37329
  ensureSynchronous(parsed, "Validation must be synchronous");
36682
37330
  const onValidationError = opts.onValidationError ?? ((issues) => {
36683
37331
  console.error("\u274C Invalid environment variables:", issues);
@@ -36703,7 +37351,7 @@ function createEnv(opts) {
36703
37351
  return Object.assign(acc, curr);
36704
37352
  }, {});
36705
37353
  const fullObj = Object.assign(extendedObj, parsed.value);
36706
- const env2 = new Proxy(fullObj, { get(target, prop) {
37354
+ return new Proxy(fullObj, { get(target, prop) {
36707
37355
  if (typeof prop !== "string")
36708
37356
  return;
36709
37357
  if (ignoreProp(prop))
@@ -36712,7 +37360,6 @@ function createEnv(opts) {
36712
37360
  return onInvalidAccess(prop);
36713
37361
  return Reflect.get(target, prop);
36714
37362
  } });
36715
- return env2;
36716
37363
  }
36717
37364
 
36718
37365
  // ../../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/arrays.js
@@ -41711,15 +42358,15 @@ class SequenceNode extends BaseConstraint {
41711
42358
  impliedSiblings = this.minLengthNode ? this.maxLengthNode ? [this.minLengthNode, this.maxLengthNode] : [this.minLengthNode] : this.maxLengthNode ? [this.maxLengthNode] : [];
41712
42359
  defaultValueMorphs = getDefaultableMorphs(this);
41713
42360
  defaultValueMorphsReference = this.defaultValueMorphs.length ? registeredReference(this.defaultValueMorphs) : undefined;
41714
- elementAtIndex(data, index) {
41715
- if (index < this.prevariadic.length)
41716
- return this.tuple[index];
42361
+ elementAtIndex(data, index2) {
42362
+ if (index2 < this.prevariadic.length)
42363
+ return this.tuple[index2];
41717
42364
  const firstPostfixIndex = data.length - this.postfixLength;
41718
- if (index >= firstPostfixIndex)
41719
- return { kind: "postfix", node: this.postfix[index - firstPostfixIndex] };
42365
+ if (index2 >= firstPostfixIndex)
42366
+ return { kind: "postfix", node: this.postfix[index2 - firstPostfixIndex] };
41720
42367
  return {
41721
42368
  kind: "variadic",
41722
- node: this.variadic ?? throwInternalError(`Unexpected attempt to access index ${index} on ${this}`)
42369
+ node: this.variadic ?? throwInternalError(`Unexpected attempt to access index ${index2} on ${this}`)
41723
42370
  };
41724
42371
  }
41725
42372
  traverseAllows = (data, ctx) => {
@@ -41936,7 +42583,7 @@ var elementIsRequired = (el) => el.kind === "prefix" || el.kind === "postfix";
41936
42583
  // ../../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/structure/structure.js
41937
42584
  var createStructuralWriter = (childStringProp) => (node) => {
41938
42585
  if (node.props.length || node.index) {
41939
- const parts = node.index?.map((index) => index[childStringProp]) ?? [];
42586
+ const parts = node.index?.map((index2) => index2[childStringProp]) ?? [];
41940
42587
  for (const prop of node.props)
41941
42588
  parts.push(prop[childStringProp]);
41942
42589
  if (node.undeclared)
@@ -42116,8 +42763,8 @@ var implementation22 = implementNode({
42116
42763
  throwParseError(writeDuplicateKeyMessage(requiredProp.key));
42117
42764
  seen[requiredProp.key] = true;
42118
42765
  if (inner.index) {
42119
- for (const index of inner.index) {
42120
- const intersection2 = intersectPropsAndIndex(requiredProp, index, $2);
42766
+ for (const index2 of inner.index) {
42767
+ const intersection2 = intersectPropsAndIndex(requiredProp, index2, $2);
42121
42768
  if (intersection2 instanceof Disjoint)
42122
42769
  return intersection2;
42123
42770
  }
@@ -42131,8 +42778,8 @@ var implementation22 = implementNode({
42131
42778
  throwParseError(writeDuplicateKeyMessage(optionalProp.key));
42132
42779
  seen[optionalProp.key] = true;
42133
42780
  if (inner.index) {
42134
- for (const index of inner.index) {
42135
- const intersection2 = intersectPropsAndIndex(optionalProp, index, $2);
42781
+ for (const index2 of inner.index) {
42782
+ const intersection2 = intersectPropsAndIndex(optionalProp, index2, $2);
42136
42783
  if (intersection2 instanceof Disjoint)
42137
42784
  return intersection2;
42138
42785
  if (intersection2 !== null) {
@@ -42211,11 +42858,11 @@ class StructureNode extends BaseConstraint {
42211
42858
  if (this.sequence.variadic)
42212
42859
  value = value?.and(this.sequence.element) ?? this.sequence.element;
42213
42860
  } else {
42214
- const index = Number.parseInt(key);
42215
- if (index < this.sequence.prevariadic.length) {
42216
- const fixedElement = this.sequence.prevariadic[index].node;
42861
+ const index2 = Number.parseInt(key);
42862
+ if (index2 < this.sequence.prevariadic.length) {
42863
+ const fixedElement = this.sequence.prevariadic[index2].node;
42217
42864
  value = value?.and(fixedElement) ?? fixedElement;
42218
- required2 ||= index < this.sequence.prefixLength;
42865
+ required2 ||= index2 < this.sequence.prefixLength;
42219
42866
  } else if (this.sequence.variadic) {
42220
42867
  const nonFixedElement = this.$.node("union", this.sequence.variadicOrPostfix);
42221
42868
  value = value?.and(nonFixedElement) ?? nonFixedElement;
@@ -42283,7 +42930,7 @@ class StructureNode extends BaseConstraint {
42283
42930
  if (result.optional)
42284
42931
  result.optional = result.optional.filter((prop) => shouldKeep(prop.key));
42285
42932
  if (result.index)
42286
- result.index = result.index.filter((index) => shouldKeep(index.signature));
42933
+ result.index = result.index.filter((index2) => shouldKeep(index2.signature));
42287
42934
  return result;
42288
42935
  }
42289
42936
  traverseAllows = (data, ctx) => this._traverse("Allows", data, ctx);
@@ -42358,8 +43005,8 @@ class StructureNode extends BaseConstraint {
42358
43005
  if (this.props.length)
42359
43006
  parts.push(`k in ${this.propsByKeyReference}`);
42360
43007
  if (this.index) {
42361
- for (const index of this.index)
42362
- parts.push(js.invoke(index.signature, { kind: "Allows", arg: "k" }));
43008
+ for (const index2 of this.index)
43009
+ parts.push(js.invoke(index2.signature, { kind: "Allows", arg: "k" }));
42363
43010
  }
42364
43011
  if (this.sequence)
42365
43012
  parts.push("$ark.intrinsic.nonNegativeIntegerString.allows(k)");
@@ -42461,13 +43108,13 @@ class StructureNode extends BaseConstraint {
42461
43108
  }
42462
43109
  }
42463
43110
  if (this.index) {
42464
- for (const index of this.index) {
42465
- const valueJsonSchema = index.value.toJsonSchemaRecurse(ctx);
42466
- if (index.signature.equals($ark.intrinsic.string)) {
43111
+ for (const index2 of this.index) {
43112
+ const valueJsonSchema = index2.value.toJsonSchemaRecurse(ctx);
43113
+ if (index2.signature.equals($ark.intrinsic.string)) {
42467
43114
  schema.additionalProperties = valueJsonSchema;
42468
43115
  continue;
42469
43116
  }
42470
- for (const keyBranch of index.signature.branches) {
43117
+ for (const keyBranch of index2.signature.branches) {
42471
43118
  if (!keyBranch.extends($ark.intrinsic.string)) {
42472
43119
  schema = ctx.fallback.symbolKey({
42473
43120
  code: "symbolKey",
@@ -42528,8 +43175,8 @@ var constructStructuralMorphCacheKey = (node) => {
42528
43175
  for (const n2 of node.optional)
42529
43176
  cacheKey += n2.compiledKey + " | ";
42530
43177
  if (node.index)
42531
- for (const index of node.index)
42532
- cacheKey += index.signature.id + " | ";
43178
+ for (const index2 of node.index)
43179
+ cacheKey += index2.signature.id + " | ";
42533
43180
  if (node.sequence) {
42534
43181
  if (node.sequence.maxLength === null)
42535
43182
  cacheKey += intrinsic.nonNegativeIntegerString.id;
@@ -43144,10 +43791,10 @@ var intrinsic = {
43144
43791
  emptyStructure: node("structure", {}, { prereduced: true })
43145
43792
  };
43146
43793
  $ark.intrinsic = { ...intrinsic };
43147
- // ../../node_modules/.pnpm/arkregex@0.0.4/node_modules/arkregex/out/regex.js
43794
+ // ../../node_modules/.pnpm/arkregex@0.0.5/node_modules/arkregex/out/regex.js
43148
43795
  var regex = (src, flags) => new RegExp(src, flags);
43149
43796
  Object.assign(regex, { as: regex });
43150
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/date.js
43797
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operand/date.js
43151
43798
  var isDateLiteral = (value) => typeof value === "string" && value[0] === "d" && (value[1] === "'" || value[1] === '"') && value[value.length - 1] === value[1];
43152
43799
  var isValidDate = (d2) => d2.toString() !== "Invalid Date";
43153
43800
  var extractDateLiteralSource = (literal2) => literal2.slice(2, -1);
@@ -43166,7 +43813,7 @@ var maybeParseDate = (source, errorOnFail) => {
43166
43813
  return errorOnFail ? throwParseError(errorOnFail === true ? writeInvalidDateMessage(source) : errorOnFail) : undefined;
43167
43814
  };
43168
43815
 
43169
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/enclosed.js
43816
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operand/enclosed.js
43170
43817
  var regexExecArray = rootSchema({
43171
43818
  proto: "Array",
43172
43819
  sequence: "string",
@@ -43240,12 +43887,12 @@ var enclosingCharDescriptions = {
43240
43887
  };
43241
43888
  var writeUnterminatedEnclosedMessage = (fragment2, enclosingStart) => `${enclosingStart}${fragment2} requires a closing ${enclosingCharDescriptions[enclosingTokens[enclosingStart]]}`;
43242
43889
 
43243
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/ast/validate.js
43890
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/ast/validate.js
43244
43891
  var writePrefixedPrivateReferenceMessage = (name) => `Private type references should not include '#'. Use '${name}' instead.`;
43245
43892
  var shallowOptionalMessage = "Optional definitions like 'string?' are only valid as properties in an object or tuple";
43246
43893
  var shallowDefaultableMessage = "Defaultable definitions like 'number = 0' are only valid as properties in an object or tuple";
43247
43894
 
43248
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/tokens.js
43895
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/tokens.js
43249
43896
  var terminatingChars = {
43250
43897
  "<": 1,
43251
43898
  ">": 1,
@@ -43263,7 +43910,7 @@ var terminatingChars = {
43263
43910
  };
43264
43911
  var lookaheadIsFinalizing = (lookahead, unscanned) => lookahead === ">" ? unscanned[0] === "=" ? unscanned[1] === "=" : unscanned.trimStart() === "" || isKeyOf(unscanned.trimStart()[0], terminatingChars) : lookahead === "=" ? unscanned[0] !== "=" : lookahead === "," || lookahead === "?";
43265
43912
 
43266
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/genericArgs.js
43913
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operand/genericArgs.js
43267
43914
  var parseGenericArgs = (name, g2, s2) => _parseGenericArgs(name, g2, s2, []);
43268
43915
  var _parseGenericArgs = (name, g2, s2, argNodes) => {
43269
43916
  const argState = s2.parseUntilFinalizer();
@@ -43280,7 +43927,7 @@ var _parseGenericArgs = (name, g2, s2, argNodes) => {
43280
43927
  };
43281
43928
  var writeInvalidGenericArgCountMessage = (name, params, argDefs) => `${name}<${params.join(", ")}> requires exactly ${params.length} args (got ${argDefs.length}${argDefs.length === 0 ? "" : `: ${argDefs.join(", ")}`})`;
43282
43929
 
43283
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/unenclosed.js
43930
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operand/unenclosed.js
43284
43931
  var parseUnenclosed = (s2) => {
43285
43932
  const token = s2.scanner.shiftUntilLookahead(terminatingChars);
43286
43933
  if (token === "keyof")
@@ -43328,10 +43975,10 @@ var writeMissingOperandMessage = (s2) => {
43328
43975
  var writeMissingRightOperandMessage = (token, unscanned = "") => `Token '${token}' requires a right operand${unscanned ? ` before '${unscanned}'` : ""}`;
43329
43976
  var writeExpressionExpectedMessage = (unscanned) => `Expected an expression${unscanned ? ` before '${unscanned}'` : ""}`;
43330
43977
 
43331
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operand/operand.js
43978
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operand/operand.js
43332
43979
  var parseOperand = (s2) => s2.scanner.lookahead === "" ? s2.error(writeMissingOperandMessage(s2)) : s2.scanner.lookahead === "(" ? s2.shiftedBy(1).reduceGroupOpen() : s2.scanner.lookaheadIsIn(enclosingChar) ? parseEnclosed(s2, s2.scanner.shift()) : s2.scanner.lookaheadIsIn(whitespaceChars) ? parseOperand(s2.shiftedBy(1)) : s2.scanner.lookahead === "d" ? s2.scanner.nextLookahead in enclosingQuote ? parseEnclosed(s2, `${s2.scanner.shift()}${s2.scanner.shift()}`) : parseUnenclosed(s2) : s2.scanner.lookahead === "x" ? s2.scanner.nextLookahead === "/" ? s2.shiftedBy(2) && parseEnclosed(s2, "x/") : parseUnenclosed(s2) : parseUnenclosed(s2);
43333
43980
 
43334
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/shared.js
43981
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/reduce/shared.js
43335
43982
  var minComparators = {
43336
43983
  ">": true,
43337
43984
  ">=": true
@@ -43351,7 +43998,7 @@ var writeOpenRangeMessage = (min2, comparator) => `Left bounds are only valid wh
43351
43998
  var writeUnpairableComparatorMessage = (comparator) => `Left-bounded expressions must specify their limits using < or <= (was ${comparator})`;
43352
43999
  var writeMultipleLeftBoundsMessage = (openLimit, openComparator, limit2, comparator) => `An expression may have at most one left bound (parsed ${openLimit}${invertedComparators[openComparator]}, ${limit2}${invertedComparators[comparator]})`;
43353
44000
 
43354
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/bounds.js
44001
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operator/bounds.js
43355
44002
  var parseBound = (s2, start) => {
43356
44003
  const comparator = shiftComparator(s2, start);
43357
44004
  if (s2.root.hasKind("unit")) {
@@ -43422,14 +44069,14 @@ var parseRightBound = (s2, comparator) => {
43422
44069
  };
43423
44070
  var writeInvalidLimitMessage = (comparator, limit2, boundKind) => `Comparator ${boundKind === "left" ? invertedComparators[comparator] : comparator} must be ${boundKind === "left" ? "preceded" : "followed"} by a corresponding literal (was ${limit2})`;
43424
44071
 
43425
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/brand.js
44072
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operator/brand.js
43426
44073
  var parseBrand = (s2) => {
43427
44074
  s2.scanner.shiftUntilNonWhitespace();
43428
44075
  const brandName = s2.scanner.shiftUntilLookahead(terminatingChars);
43429
44076
  s2.root = s2.root.brand(brandName);
43430
44077
  };
43431
44078
 
43432
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/divisor.js
44079
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operator/divisor.js
43433
44080
  var parseDivisor = (s2) => {
43434
44081
  s2.scanner.shiftUntilNonWhitespace();
43435
44082
  const divisorToken = s2.scanner.shiftUntilLookahead(terminatingChars);
@@ -43442,7 +44089,7 @@ var parseDivisor = (s2) => {
43442
44089
  };
43443
44090
  var writeInvalidDivisorMessage = (divisor2) => `% operator must be followed by a non-zero integer literal (was ${divisor2})`;
43444
44091
 
43445
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/operator.js
44092
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operator/operator.js
43446
44093
  var parseOperator = (s2) => {
43447
44094
  const lookahead = s2.scanner.shift();
43448
44095
  return lookahead === "" ? s2.finalize("") : lookahead === "[" ? s2.scanner.shift() === "]" ? s2.setRoot(s2.root.array()) : s2.error(incompleteArrayTokenMessage) : lookahead === "|" ? s2.scanner.lookahead === ">" ? s2.shiftedBy(1).pushRootToBranch("|>") : s2.pushRootToBranch(lookahead) : lookahead === "&" ? s2.pushRootToBranch(lookahead) : lookahead === ")" ? s2.finalizeGroup() : lookaheadIsFinalizing(lookahead, s2.scanner.unscanned) ? s2.finalize(lookahead) : isKeyOf(lookahead, comparatorStartChars) ? parseBound(s2, lookahead) : lookahead === "%" ? parseDivisor(s2) : lookahead === "#" ? parseBrand(s2) : (lookahead in whitespaceChars) ? parseOperator(s2) : s2.error(writeUnexpectedCharacterMessage(lookahead));
@@ -43450,7 +44097,7 @@ var parseOperator = (s2) => {
43450
44097
  var writeUnexpectedCharacterMessage = (char2, shouldBe = "") => `'${char2}' is not allowed here${shouldBe && ` (should be ${shouldBe})`}`;
43451
44098
  var incompleteArrayTokenMessage = `Missing expected ']'`;
43452
44099
 
43453
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/shift/operator/default.js
44100
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/shift/operator/default.js
43454
44101
  var parseDefault = (s2) => {
43455
44102
  const baseNode = s2.unsetRoot();
43456
44103
  s2.parseOperand();
@@ -43462,7 +44109,7 @@ var parseDefault = (s2) => {
43462
44109
  };
43463
44110
  var writeNonLiteralDefaultMessage = (defaultDef) => `Default value '${defaultDef}' must be a literal value`;
43464
44111
 
43465
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/string.js
44112
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/string.js
43466
44113
  var parseString = (def, ctx) => {
43467
44114
  const aliasResolution = ctx.$.maybeResolveRoot(def);
43468
44115
  if (aliasResolution)
@@ -43501,7 +44148,7 @@ var parseUntilFinalizer = (s2) => {
43501
44148
  };
43502
44149
  var next = (s2) => s2.hasRoot() ? s2.parseOperator() : s2.parseOperand();
43503
44150
 
43504
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/reduce/dynamic.js
44151
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/reduce/dynamic.js
43505
44152
  class RuntimeState {
43506
44153
  root;
43507
44154
  branches = {
@@ -43638,7 +44285,7 @@ class RuntimeState {
43638
44285
  }
43639
44286
  }
43640
44287
 
43641
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/generic.js
44288
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/generic.js
43642
44289
  var emptyGenericParameterMessage = "An empty string is not a valid generic parameter name";
43643
44290
  var parseGenericParamName = (scanner2, result, ctx) => {
43644
44291
  scanner2.shiftUntilNonWhitespace();
@@ -43666,7 +44313,7 @@ var _parseOptionalConstraint = (scanner2, name, result, ctx) => {
43666
44313
  result.push([name, s2.root]);
43667
44314
  return parseGenericParamName(scanner2, result, ctx);
43668
44315
  };
43669
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/fn.js
44316
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/fn.js
43670
44317
  class InternalFnParser extends Callable {
43671
44318
  constructor($2) {
43672
44319
  const attach = {
@@ -43718,7 +44365,7 @@ class InternalTypedFn extends Callable {
43718
44365
  var badFnReturnTypeMessage = `":" must be followed by exactly one return type e.g:
43719
44366
  fn("string", ":", "number")(s => s.length)`;
43720
44367
 
43721
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/match.js
44368
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/match.js
43722
44369
  class InternalMatchParser extends Callable {
43723
44370
  $;
43724
44371
  constructor($2) {
@@ -43812,7 +44459,7 @@ var throwOnDefault = (errors5) => errors5.throw();
43812
44459
  var chainedAtMessage = `A key matcher must be specified before the first case i.e. match.at('foo') or match.in<object>().at('bar')`;
43813
44460
  var doubleAtMessage = `At most one key matcher may be specified per expression`;
43814
44461
 
43815
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/property.js
44462
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/property.js
43816
44463
  var parseProperty = (def, ctx) => {
43817
44464
  if (isArray2(def)) {
43818
44465
  if (def[1] === "=")
@@ -43825,7 +44472,7 @@ var parseProperty = (def, ctx) => {
43825
44472
  var invalidOptionalKeyKindMessage = `Only required keys may make their values optional, e.g. { [mySymbol]: ['number', '?'] }`;
43826
44473
  var invalidDefaultableKeyKindMessage = `Only required keys may specify default values, e.g. { value: 'number = 0' }`;
43827
44474
 
43828
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/objectLiteral.js
44475
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/objectLiteral.js
43829
44476
  var parseObjectLiteral = (def, ctx) => {
43830
44477
  let spread;
43831
44478
  const structure3 = {};
@@ -43910,7 +44557,7 @@ var preparseKey = (key) => typeof key === "symbol" ? { kind: "required", normali
43910
44557
  };
43911
44558
  var writeInvalidSpreadTypeMessage = (def) => `Spread operand must resolve to an object literal type (was ${def})`;
43912
44559
 
43913
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleExpressions.js
44560
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/tupleExpressions.js
43914
44561
  var maybeParseTupleExpression = (def, ctx) => isIndexZeroExpression(def) ? indexZeroParsers[def[0]](def, ctx) : isIndexOneExpression(def) ? indexOneParsers[def[1]](def, ctx) : null;
43915
44562
  var parseKeyOfTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[1], ctx).keyof();
43916
44563
  var parseBranchTuple = (def, ctx) => {
@@ -43971,7 +44618,7 @@ var indexZeroParsers = defineIndexZeroParsers({
43971
44618
  var isIndexZeroExpression = (def) => indexZeroParsers[def[0]] !== undefined;
43972
44619
  var writeInvalidConstructorMessage = (actual) => `Expected a constructor following 'instanceof' operator (was ${actual})`;
43973
44620
 
43974
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/tupleLiteral.js
44621
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/tupleLiteral.js
43975
44622
  var parseTupleLiteral = (def, ctx) => {
43976
44623
  let sequences = [{}];
43977
44624
  let i2 = 0;
@@ -44067,7 +44714,7 @@ var requiredPostOptionalMessage = "A required element may not follow an optional
44067
44714
  var optionalOrDefaultableAfterVariadicMessage = "An optional element may not follow a variadic element";
44068
44715
  var defaultablePostOptionalMessage = "A defaultable element may not follow an optional element without a default";
44069
44716
 
44070
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/parser/definition.js
44717
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/parser/definition.js
44071
44718
  var parseCache = {};
44072
44719
  var parseInnerDefinition = (def, ctx) => {
44073
44720
  if (typeof def === "string") {
@@ -44131,7 +44778,7 @@ var parseStandardSchema = (def, ctx) => ctx.$.intrinsic.unknown.pipe((v2, ctx2)
44131
44778
  var parseTuple = (def, ctx) => maybeParseTupleExpression(def, ctx) ?? parseTupleLiteral(def, ctx);
44132
44779
  var writeBadDefinitionTypeMessage = (actual) => `Type definitions must be strings or objects (was ${actual})`;
44133
44780
 
44134
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/type.js
44781
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/type.js
44135
44782
  class InternalTypeParser extends Callable {
44136
44783
  constructor($2) {
44137
44784
  const attach = Object.assign({
@@ -44173,7 +44820,7 @@ class InternalTypeParser extends Callable {
44173
44820
  }
44174
44821
  }
44175
44822
 
44176
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/scope.js
44823
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/scope.js
44177
44824
  var $arkTypeRegistry = $ark;
44178
44825
 
44179
44826
  class InternalScope extends BaseScope {
@@ -44267,7 +44914,7 @@ var scope2 = Object.assign(InternalScope.scope, {
44267
44914
  });
44268
44915
  var Scope = InternalScope;
44269
44916
 
44270
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/builtins.js
44917
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/builtins.js
44271
44918
  class MergeHkt extends Hkt {
44272
44919
  description = 'merge an object\'s properties onto another like `Merge(User, { isAdmin: "true" })`';
44273
44920
  }
@@ -44277,7 +44924,7 @@ var arkBuiltins = Scope.module({
44277
44924
  Merge
44278
44925
  });
44279
44926
 
44280
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/Array.js
44927
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/Array.js
44281
44928
  class liftFromHkt extends Hkt {
44282
44929
  }
44283
44930
  var liftFrom = genericNode("element")((args2) => {
@@ -44294,7 +44941,7 @@ var arkArray = Scope.module({
44294
44941
  name: "Array"
44295
44942
  });
44296
44943
 
44297
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/FormData.js
44944
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/FormData.js
44298
44945
  var value = rootSchema(["string", registry2.FileConstructor]);
44299
44946
  var parsedFormDataValue = value.rawOr(value.array());
44300
44947
  var parsed = rootSchema({
@@ -44331,7 +44978,7 @@ var arkFormData = Scope.module({
44331
44978
  name: "FormData"
44332
44979
  });
44333
44980
 
44334
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/TypedArray.js
44981
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/TypedArray.js
44335
44982
  var TypedArray = Scope.module({
44336
44983
  Int8: ["instanceof", Int8Array],
44337
44984
  Uint8: ["instanceof", Uint8Array],
@@ -44348,7 +44995,7 @@ var TypedArray = Scope.module({
44348
44995
  name: "TypedArray"
44349
44996
  });
44350
44997
 
44351
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/constructors.js
44998
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/constructors.js
44352
44999
  var omittedPrototypes = {
44353
45000
  Boolean: 1,
44354
45001
  Number: 1,
@@ -44361,7 +45008,7 @@ var arkPrototypes = Scope.module({
44361
45008
  FormData: arkFormData
44362
45009
  });
44363
45010
 
44364
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/number.js
45011
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/number.js
44365
45012
  var epoch = rootSchema({
44366
45013
  domain: {
44367
45014
  domain: "number",
@@ -44404,7 +45051,7 @@ var number4 = Scope.module({
44404
45051
  name: "number"
44405
45052
  });
44406
45053
 
44407
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/string.js
45054
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/string.js
44408
45055
  var regexStringNode = (regex2, description, jsonSchemaFormat) => {
44409
45056
  const schema = {
44410
45057
  domain: "string",
@@ -44795,7 +45442,7 @@ var string4 = Scope.module({
44795
45442
  name: "string"
44796
45443
  });
44797
45444
 
44798
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/ts.js
45445
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/ts.js
44799
45446
  var arkTsKeywords = Scope.module({
44800
45447
  bigint: intrinsic.bigint,
44801
45448
  boolean: intrinsic.boolean,
@@ -44883,7 +45530,7 @@ var arkTsGenerics = Scope.module({
44883
45530
  Required: Required2
44884
45531
  });
44885
45532
 
44886
- // ../../node_modules/.pnpm/arktype@2.1.28/node_modules/arktype/out/keywords/keywords.js
45533
+ // ../../node_modules/.pnpm/arktype@2.1.29/node_modules/arktype/out/keywords/keywords.js
44887
45534
  var ark = scope2({
44888
45535
  ...arkTsKeywords,
44889
45536
  ...arkTsGenerics,
@@ -44958,6 +45605,7 @@ var env3 = createEnv({
44958
45605
  var exports_tempest_db_schema = {};
44959
45606
  __export(exports_tempest_db_schema, {
44960
45607
  users: () => users,
45608
+ userSessions: () => userSessions,
44961
45609
  untrackedUserColumnNames: () => untrackedUserColumnNames,
44962
45610
  twoFactorMethod: () => twoFactorMethod,
44963
45611
  trackedUserColumnName: () => trackedUserColumnName,
@@ -45059,6 +45707,11 @@ var banishedIps = pgTable(`banishedIps`, {
45059
45707
  banishedAtIso: iso8601().notNull().default(ISO_NOW),
45060
45708
  banishedUntilIso: iso8601()
45061
45709
  });
45710
+ var userSessions = pgTable(`userSessions`, {
45711
+ sessionKey: uuid5().notNull().primaryKey(),
45712
+ userId: uuid5().notNull().references(() => users.id, { onDelete: `cascade` }),
45713
+ createdAtIso: iso8601().notNull().default(ISO_NOW)
45714
+ }, (table) => [index(`userIdIndex`).on(table.userId)]);
45062
45715
 
45063
45716
  // src/database/tempest-db-manager.ts
45064
45717
  var __dirname = "/home/runner/work/wayforge/wayforge/apps/tempest.games/src/database";
@@ -45141,11 +45794,11 @@ var FilesystemStorage2 = class {
45141
45794
  rmSync4(filePath);
45142
45795
  }
45143
45796
  }
45144
- key(index) {
45797
+ key(index2) {
45145
45798
  return readdirSync4(this.rootDir).sort((a2, b3) => {
45146
45799
  const aStat = statSync2(a2);
45147
45800
  return statSync2(b3).ctimeMs - aStat.ctimeMs;
45148
- })[index] ?? null;
45801
+ })[index2] ?? null;
45149
45802
  }
45150
45803
  clear() {
45151
45804
  rmSync4(this.rootDir, { recursive: true });
@@ -45237,7 +45890,7 @@ async function getLogs(logger, logFilePath = `/var/log/nginx/access.log`, now =
45237
45890
  });
45238
45891
  }
45239
45892
 
45240
- // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__f44f59e63c79d6544cf3bc0348efbd42/node_modules/safegen/dist/arktype/index.js
45893
+ // ../../node_modules/.pnpm/safegen@0.8.2_@floating-ui+react-dom@2.1.6_react-dom@19.2.3_react@19.2.3__react@19.2.3__cd4e7547212f4c009703727102853bfd/node_modules/safegen/dist/arktype/index.js
45241
45894
  function arktypeToJsonSchema(type2) {
45242
45895
  return type2.toJsonSchema();
45243
45896
  }