@fro.bot/systematic 3.18.0 → 3.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ function resolveReviewArtifactPath(input, cwd, options = {}) {
172
172
  return { ok: true, path: canonicalTarget }
173
173
  }
174
174
 
175
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/util.js
175
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/util.js
176
176
  function getEnumValues(entries) {
177
177
  const numericValues = Object.values(entries).filter(
178
178
  (v) => typeof v === 'number',
@@ -189,19 +189,24 @@ function jsonStringifyReplacer(_, value) {
189
189
  if (typeof value === 'bigint') return value.toString()
190
190
  return value
191
191
  }
192
- function cached(getter) {
193
- const set = false
194
- return {
195
- get value() {
196
- if (!set) {
197
- const value = getter()
198
- Object.defineProperty(this, 'value', { value })
199
- return value
200
- }
201
- throw new Error('cached value already set')
202
- },
192
+
193
+ class Cached {
194
+ constructor(getter) {
195
+ this._getter = getter
196
+ this._value = undefined
197
+ }
198
+ get value() {
199
+ const getter = this._getter
200
+ if (getter !== undefined) {
201
+ this._value = getter()
202
+ this._getter = undefined
203
+ }
204
+ return this._value
203
205
  }
204
206
  }
207
+ function cached(getter) {
208
+ return new Cached(getter)
209
+ }
205
210
  function nullish(input) {
206
211
  return input === null || input === undefined
207
212
  }
@@ -225,6 +230,49 @@ function assignProp(target, prop, value) {
225
230
  configurable: true,
226
231
  })
227
232
  }
233
+ function rawShape(def) {
234
+ const desc = Object.getOwnPropertyDescriptor(def, 'shape')
235
+ return desc?.get ? desc.get.raw : desc?.value
236
+ }
237
+ function sourceShape(schema) {
238
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape
239
+ }
240
+ function deferProp(target, key, getter) {
241
+ Object.defineProperty(target, key, {
242
+ get() {
243
+ const value = getter()
244
+ assignProp(this, key, value)
245
+ return value
246
+ },
247
+ enumerable: true,
248
+ configurable: true,
249
+ })
250
+ }
251
+ function putProp(target, key, value) {
252
+ if (key in target) assignProp(target, key, value)
253
+ else target[key] = value
254
+ }
255
+ function mirrorShape(target, source, keys, wrap) {
256
+ const raw = sourceShape(source)
257
+ for (const key of keys) {
258
+ const desc = Object.getOwnPropertyDescriptor(raw, key)
259
+ if (!desc.enumerable) continue
260
+ if (desc.get) {
261
+ deferProp(target, key, () => {
262
+ const value = source._zod.def.shape[key]
263
+ return wrap ? wrap(value, key) : value
264
+ })
265
+ } else putProp(target, key, wrap ? wrap(desc.value, key) : desc.value)
266
+ }
267
+ }
268
+ function mirrorProps(target, source) {
269
+ for (const key of Reflect.ownKeys(source)) {
270
+ const desc = Object.getOwnPropertyDescriptor(source, key)
271
+ if (!desc.enumerable) continue
272
+ if (desc.get) deferProp(target, key, () => source[key])
273
+ else putProp(target, key, desc.value)
274
+ }
275
+ }
228
276
  function mergeDefs(...defs) {
229
277
  const mergedDescriptors = {}
230
278
  for (const def of defs) {
@@ -331,6 +379,16 @@ var NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
331
379
  ],
332
380
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE],
333
381
  }))()
382
+ var BIGINT_FORMAT_RANGES = {
383
+ int64: [
384
+ /* @__PURE__ */ BigInt('-9223372036854775808'),
385
+ /* @__PURE__ */ BigInt('9223372036854775807'),
386
+ ],
387
+ uint64: [
388
+ /* @__PURE__ */ BigInt(0),
389
+ /* @__PURE__ */ BigInt('18446744073709551615'),
390
+ ],
391
+ }
334
392
  function pick(schema, mask) {
335
393
  const currDef = schema._zod.def
336
394
  const checks = currDef.checks
@@ -340,22 +398,20 @@ function pick(schema, mask) {
340
398
  '.pick() cannot be used on object schemas containing refinements',
341
399
  )
342
400
  }
343
- const def = mergeDefs(schema._zod.def, {
344
- get shape() {
345
- const newShape = {}
346
- for (const key of Reflect.ownKeys(mask)) {
347
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
348
- throw new Error(`Unrecognized key: "${String(key)}"`)
349
- }
350
- if (!mask[key]) continue
351
- assignProp(newShape, key, currDef.shape[key])
352
- }
353
- assignProp(this, 'shape', newShape)
354
- return newShape
355
- },
356
- checks: [],
357
- })
358
- return clone(schema, def)
401
+ const newShape = {}
402
+ mirrorShape(newShape, schema, maskedKeys(schema, mask))
403
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }))
404
+ }
405
+ function maskedKeys(schema, mask) {
406
+ const raw = sourceShape(schema)
407
+ const keys = []
408
+ for (const key of Reflect.ownKeys(mask)) {
409
+ if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {
410
+ throw new Error(`Unrecognized key: "${String(key)}"`)
411
+ }
412
+ if (mask[key]) keys.push(key)
413
+ }
414
+ return keys
359
415
  }
360
416
  function omit(schema, mask) {
361
417
  const currDef = schema._zod.def
@@ -366,22 +422,14 @@ function omit(schema, mask) {
366
422
  '.omit() cannot be used on object schemas containing refinements',
367
423
  )
368
424
  }
369
- const def = mergeDefs(schema._zod.def, {
370
- get shape() {
371
- const newShape = { ...schema._zod.def.shape }
372
- for (const key of Reflect.ownKeys(mask)) {
373
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
374
- throw new Error(`Unrecognized key: "${String(key)}"`)
375
- }
376
- if (!mask[key]) continue
377
- delete newShape[key]
378
- }
379
- assignProp(this, 'shape', newShape)
380
- return newShape
381
- },
382
- checks: [],
383
- })
384
- return clone(schema, def)
425
+ const omitted = new Set(maskedKeys(schema, mask))
426
+ const newShape = {}
427
+ mirrorShape(
428
+ newShape,
429
+ schema,
430
+ Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)),
431
+ )
432
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }))
385
433
  }
386
434
  function extend(schema, shape) {
387
435
  if (!isPlainObject(shape)) {
@@ -390,7 +438,7 @@ function extend(schema, shape) {
390
438
  const checks = schema._zod.def.checks
391
439
  const hasChecks = checks && checks.length > 0
392
440
  if (hasChecks) {
393
- const existingShape = schema._zod.def.shape
441
+ const existingShape = sourceShape(schema)
394
442
  for (const key of Reflect.ownKeys(shape)) {
395
443
  if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {
396
444
  throw new Error(
@@ -399,27 +447,25 @@ function extend(schema, shape) {
399
447
  }
400
448
  }
401
449
  }
402
- const def = mergeDefs(schema._zod.def, {
403
- get shape() {
404
- const _shape = { ...schema._zod.def.shape, ...shape }
405
- assignProp(this, 'shape', _shape)
406
- return _shape
407
- },
408
- })
409
- return clone(schema, def)
450
+ return clone(
451
+ schema,
452
+ mergeDefs(schema._zod.def, { shape: extended(schema, shape) }),
453
+ )
454
+ }
455
+ function extended(schema, shape) {
456
+ const newShape = {}
457
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)))
458
+ mirrorProps(newShape, shape)
459
+ return newShape
410
460
  }
411
461
  function safeExtend(schema, shape) {
412
462
  if (!isPlainObject(shape)) {
413
463
  throw new Error('Invalid input to safeExtend: expected a plain object')
414
464
  }
415
- const def = mergeDefs(schema._zod.def, {
416
- get shape() {
417
- const _shape = { ...schema._zod.def.shape, ...shape }
418
- assignProp(this, 'shape', _shape)
419
- return _shape
420
- },
421
- })
422
- return clone(schema, def)
465
+ return clone(
466
+ schema,
467
+ mergeDefs(schema._zod.def, { shape: extended(schema, shape) }),
468
+ )
423
469
  }
424
470
  function merge(a, b) {
425
471
  if (!b?._zod?.def) {
@@ -432,12 +478,11 @@ function merge(a, b) {
432
478
  '.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.',
433
479
  )
434
480
  }
481
+ const newShape = {}
482
+ mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)))
483
+ mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)))
435
484
  const def = mergeDefs(a._zod.def, {
436
- get shape() {
437
- const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }
438
- assignProp(this, 'shape', _shape)
439
- return _shape
440
- },
485
+ shape: newShape,
441
486
  get catchall() {
442
487
  return b._zod.def.catchall
443
488
  },
@@ -454,69 +499,36 @@ function partial(Class, schema, mask, name = 'partial') {
454
499
  `.${name}() cannot be used on object schemas containing refinements`,
455
500
  )
456
501
  }
457
- const def = mergeDefs(schema._zod.def, {
458
- get shape() {
459
- const oldShape = schema._zod.def.shape
460
- const shape = { ...oldShape }
461
- if (mask) {
462
- for (const key of Reflect.ownKeys(mask)) {
463
- if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {
464
- throw new Error(`Unrecognized key: "${String(key)}"`)
465
- }
466
- if (!mask[key]) continue
467
- shape[key] = Class
468
- ? new Class({
469
- type: 'optional',
470
- innerType: oldShape[key],
471
- })
472
- : oldShape[key]
473
- }
474
- } else {
475
- for (const key of Reflect.ownKeys(oldShape)) {
476
- shape[key] = Class
477
- ? new Class({
478
- type: 'optional',
479
- innerType: oldShape[key],
480
- })
481
- : oldShape[key]
482
- }
483
- }
484
- assignProp(this, 'shape', shape)
485
- return shape
486
- },
487
- checks: [],
488
- })
489
- return clone(schema, def)
502
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined
503
+ const newShape = {}
504
+ mirrorShape(
505
+ newShape,
506
+ schema,
507
+ Reflect.ownKeys(sourceShape(schema)),
508
+ Class &&
509
+ ((value, key) =>
510
+ selected && !selected.has(key)
511
+ ? value
512
+ : new Class({ type: 'optional', innerType: value })),
513
+ )
514
+ return clone(
515
+ schema,
516
+ mergeDefs(schema._zod.def, { shape: newShape, checks: [] }),
517
+ )
490
518
  }
491
519
  function required(Class, schema, mask) {
492
- const def = mergeDefs(schema._zod.def, {
493
- get shape() {
494
- const oldShape = schema._zod.def.shape
495
- const shape = { ...oldShape }
496
- if (mask) {
497
- for (const key of Reflect.ownKeys(mask)) {
498
- if (!Object.prototype.hasOwnProperty.call(shape, key)) {
499
- throw new Error(`Unrecognized key: "${String(key)}"`)
500
- }
501
- if (!mask[key]) continue
502
- shape[key] = new Class({
503
- type: 'nonoptional',
504
- innerType: oldShape[key],
505
- })
506
- }
507
- } else {
508
- for (const key of Reflect.ownKeys(oldShape)) {
509
- shape[key] = new Class({
510
- type: 'nonoptional',
511
- innerType: oldShape[key],
512
- })
513
- }
514
- }
515
- assignProp(this, 'shape', shape)
516
- return shape
517
- },
518
- })
519
- return clone(schema, def)
520
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined
521
+ const newShape = {}
522
+ mirrorShape(
523
+ newShape,
524
+ schema,
525
+ Reflect.ownKeys(sourceShape(schema)),
526
+ (value, key) =>
527
+ selected && !selected.has(key)
528
+ ? value
529
+ : new Class({ type: 'nonoptional', innerType: value }),
530
+ )
531
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }))
520
532
  }
521
533
  function aborted(x, startIndex = 0) {
522
534
  if (x.aborted === true) return true
@@ -570,19 +582,24 @@ function finalizeIssue(iss, ctx, config) {
570
582
  unwrapMessage(config.customError?.(iss)) ??
571
583
  unwrapMessage(config.localeError?.(iss)) ??
572
584
  'Invalid input')
573
- const {
574
- inst: _inst,
575
- schema: _schema,
576
- continue: _continue,
577
- input: _input,
578
- ...rest
579
- } = iss
580
- rest.path ?? (rest.path = [])
581
- rest.message = message
585
+ const full = {}
586
+ for (const k of Object.keys(iss)) {
587
+ if (
588
+ k === 'inst' ||
589
+ k === 'schema' ||
590
+ k === 'continue' ||
591
+ k === 'input' ||
592
+ k === '__proto__'
593
+ )
594
+ continue
595
+ full[k] = iss[k]
596
+ }
597
+ full.path ?? (full.path = [])
598
+ full.message = message
582
599
  if (ctx?.reportInput) {
583
- rest.input = _input
600
+ full.input = iss.input
584
601
  }
585
- return rest
602
+ return full
586
603
  }
587
604
  var highSurrogate = /[\uD800-\uDBFF]/
588
605
  function codePointLength(str) {
@@ -650,6 +667,9 @@ function members(proto, table) {
650
667
  Object.defineProperty(proto, key, { ...desc, enumerable: false })
651
668
  else defineBound(proto, key, desc.value)
652
669
  }
670
+ for (const sym of Object.getOwnPropertySymbols(table)) {
671
+ defineBound(proto, sym, table[sym])
672
+ }
653
673
  }
654
674
  function own(inst, key, value, enumerable = true) {
655
675
  Object.defineProperty(inst, key, {
@@ -663,6 +683,22 @@ function own(inst, key, value, enumerable = true) {
663
683
  function hide(inst, key, value) {
664
684
  return own(inst, key, value, false)
665
685
  }
686
+ function derived(computes, table) {
687
+ for (const key in computes) {
688
+ const compute = computes[key]
689
+ Object.defineProperty(table, key, {
690
+ configurable: true,
691
+ enumerable: true,
692
+ get() {
693
+ return own(this, key, compute(this))
694
+ },
695
+ set(value) {
696
+ own(this, key, value)
697
+ },
698
+ })
699
+ }
700
+ return table
701
+ }
666
702
  function defineBound(proto, key, fn) {
667
703
  Object.defineProperty(proto, key, {
668
704
  configurable: true,
@@ -760,7 +796,7 @@ function constantCatch(value) {
760
796
  return fn
761
797
  }
762
798
 
763
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/core.js
799
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/core.js
764
800
  var _a
765
801
  var _zodDesc = { value: undefined, enumerable: false }
766
802
  var _E = 'captureStackTrace' in Error ? Error : null
@@ -875,7 +911,7 @@ function config(newConfig) {
875
911
  if (newConfig) Object.assign(globalConfig, newConfig)
876
912
  return globalConfig
877
913
  }
878
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
914
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/errors.js
879
915
  function _getMessage() {
880
916
  const internals = this._zod
881
917
  internals.message ??
@@ -895,7 +931,6 @@ var _messageDesc = {
895
931
  enumerable: true,
896
932
  configurable: true,
897
933
  }
898
- var _zodDesc2 = { value: undefined, enumerable: false }
899
934
  var _issuesDesc = { value: undefined, enumerable: false }
900
935
  var _installedToString = /* @__PURE__ */ new WeakSet([
901
936
  Object.prototype,
@@ -903,11 +938,8 @@ var _installedToString = /* @__PURE__ */ new WeakSet([
903
938
  ])
904
939
  var initializer = (inst, def) => {
905
940
  inst.name = '$ZodError'
906
- _zodDesc2.value = inst._zod
907
- Object.defineProperty(inst, '_zod', _zodDesc2)
908
941
  _issuesDesc.value = def
909
942
  Object.defineProperty(inst, 'issues', _issuesDesc)
910
- _zodDesc2.value = undefined
911
943
  _issuesDesc.value = undefined
912
944
  Object.defineProperty(inst, 'message', _messageDesc)
913
945
  const proto = Object.getPrototypeOf(inst)
@@ -1016,7 +1048,7 @@ function formatError(error, mapper = (issue) => issue.message) {
1016
1048
  return fieldErrors
1017
1049
  }
1018
1050
 
1019
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/parse.js
1051
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/parse.js
1020
1052
  function finalizeParams(callee, params) {
1021
1053
  return { callee: params?.callee ?? callee, Err: params?.Err }
1022
1054
  }
@@ -1061,29 +1093,71 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
1061
1093
  throw new $ZodAsyncError()
1062
1094
  }
1063
1095
  return result.issues.length
1064
- ? {
1065
- success: false,
1066
- error: new (_Err ?? $ZodError)(
1067
- result.issues.map((iss) => finalizeIssue(iss, ctx, config())),
1068
- ),
1069
- }
1096
+ ? failure(_Err, result.issues, ctx)
1070
1097
  : { success: true, data: result.value }
1071
1098
  }
1072
- var safeParse = /* @__PURE__ */ _safeParse($ZodRealError)
1099
+ function failure(Err, issues, ctx) {
1100
+ let error
1101
+ return {
1102
+ success: false,
1103
+ get error() {
1104
+ if (!error) {
1105
+ error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())))
1106
+ issues = undefined
1107
+ ctx = undefined
1108
+ }
1109
+ return error
1110
+ },
1111
+ set error(e) {
1112
+ error = e
1113
+ issues = undefined
1114
+ ctx = undefined
1115
+ },
1116
+ }
1117
+ }
1073
1118
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1074
1119
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true }
1075
1120
  let result = schema._zod.run({ value, issues: [] }, ctx)
1076
1121
  if (result instanceof Promise) result = await result
1077
1122
  return result.issues.length
1078
- ? {
1079
- success: false,
1080
- error: new _Err(
1081
- result.issues.map((iss) => finalizeIssue(iss, ctx, config())),
1082
- ),
1083
- }
1123
+ ? failure(_Err, result.issues, ctx)
1084
1124
  : { success: true, data: result.value }
1085
1125
  }
1086
- var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError)
1126
+ var COMPILE_INVALID = /* @__PURE__ */ Symbol.for('zod.compile.invalid')
1127
+ var COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for('zod.compile.fallback')
1128
+ var validate = (schema, value, _ctx) => {
1129
+ const validator = schema._zod.bag.validator
1130
+ if (validator !== undefined) {
1131
+ if (validator(value) !== COMPILE_INVALID) return true
1132
+ if (validator.definite === true && _ctx === undefined) return false
1133
+ }
1134
+ return validateFallback(schema, value, _ctx)
1135
+ }
1136
+ function validateFallback(schema, value, _ctx) {
1137
+ const ctx = _ctx
1138
+ ? { ..._ctx, async: false, abortEarly: true }
1139
+ : { async: false, abortEarly: true }
1140
+ const fallbackRun = schema._zod.bag.fallbackRun
1141
+ let result
1142
+ if (fallbackRun) {
1143
+ ctx[COMPILE_FALLBACK] = true
1144
+ result = fallbackRun({ value, issues: [] }, ctx)
1145
+ } else {
1146
+ result = schema._zod.run({ value, issues: [] }, ctx)
1147
+ }
1148
+ if (result instanceof Promise) {
1149
+ throw new $ZodAsyncError()
1150
+ }
1151
+ return result.issues.length === 0
1152
+ }
1153
+ var validateAsync = async (schema, value, _ctx) => {
1154
+ const ctx = _ctx
1155
+ ? { ..._ctx, async: true, abortEarly: true }
1156
+ : { async: true, abortEarly: true }
1157
+ let result = schema._zod.run({ value, issues: [] }, ctx)
1158
+ if (result instanceof Promise) result = await result
1159
+ return result.issues.length === 0
1160
+ }
1087
1161
  var _encode = (_Err) => {
1088
1162
  const parse = _parse(_Err)
1089
1163
  const fn = (schema, value, _ctx, _params) => {
@@ -1136,7 +1210,7 @@ var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1136
1210
  var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1137
1211
  return _safeParseAsync(_Err)(schema, value, _ctx)
1138
1212
  }
1139
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/regexes.js
1213
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/regexes.js
1140
1214
  var cuid = /^[cC][0-9a-z]{6,}$/
1141
1215
  var cuid2 = /^[0-9a-z]+$/
1142
1216
  var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/
@@ -1158,8 +1232,8 @@ var uuid = (version) => {
1158
1232
  )
1159
1233
  }
1160
1234
  var email =
1161
- /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
1162
- var _emoji = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`
1235
+ /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
1236
+ var _emoji = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`
1163
1237
  function emoji() {
1164
1238
  return new RegExp(_emoji, 'u')
1165
1239
  }
@@ -1173,7 +1247,7 @@ var cidrv6 =
1173
1247
  /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/
1174
1248
  var base64 =
1175
1249
  /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/
1176
- var base64url = /^[A-Za-z0-9_-]*$/
1250
+ var base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/
1177
1251
  var httpProtocol = /^https?$/
1178
1252
  var e164 = /^\+[1-9]\d{6,14}$/
1179
1253
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`
@@ -1207,19 +1281,13 @@ function datetime(args) {
1207
1281
  : qualified
1208
1282
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`)
1209
1283
  }
1210
- var string = (params) => {
1211
- const regex = params
1212
- ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ''}}`
1213
- : `[\\s\\S]*`
1214
- return new RegExp(`^${regex}$`)
1215
- }
1216
- var integer = /^-?\d+$/
1284
+ var anyString = /^[\s\S]{0,}$/
1217
1285
  var number = /^-?\d+(?:\.\d+)?$/
1218
1286
  var boolean = /^(?:true|false)$/i
1219
1287
  var lowercase = /^[^A-Z]*$/
1220
1288
  var uppercase = /^[^a-z]*$/
1221
1289
 
1222
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/checks.js
1290
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/checks.js
1223
1291
  var $ZodCheck = /* @__PURE__ */ $constructor('$ZodCheck', (inst, def) => {
1224
1292
  var _a
1225
1293
  inst._zod ?? (inst._zod = {})
@@ -1240,16 +1308,6 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor(
1240
1308
  (inst, def) => {
1241
1309
  $ZodCheck.init(inst, def)
1242
1310
  const origin = numericOriginMap[typeof def.value]
1243
- inst._zod.onattach.push((inst) => {
1244
- const bag = inst._zod.bag
1245
- const curr =
1246
- (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ??
1247
- Number.POSITIVE_INFINITY
1248
- if (def.value < curr) {
1249
- if (def.inclusive) bag.maximum = def.value
1250
- else bag.exclusiveMaximum = def.value
1251
- }
1252
- })
1253
1311
  inst._zod.check = (payload) => {
1254
1312
  if (
1255
1313
  def.inclusive ? payload.value <= def.value : payload.value < def.value
@@ -1274,16 +1332,6 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor(
1274
1332
  (inst, def) => {
1275
1333
  $ZodCheck.init(inst, def)
1276
1334
  const origin = numericOriginMap[typeof def.value]
1277
- inst._zod.onattach.push((inst) => {
1278
- const bag = inst._zod.bag
1279
- const curr =
1280
- (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ??
1281
- Number.NEGATIVE_INFINITY
1282
- if (def.value > curr) {
1283
- if (def.inclusive) bag.minimum = def.value
1284
- else bag.exclusiveMinimum = def.value
1285
- }
1286
- })
1287
1335
  inst._zod.check = (payload) => {
1288
1336
  if (
1289
1337
  def.inclusive ? payload.value >= def.value : payload.value > def.value
@@ -1307,10 +1355,6 @@ var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor(
1307
1355
  '$ZodCheckMultipleOf',
1308
1356
  (inst, def) => {
1309
1357
  $ZodCheck.init(inst, def)
1310
- inst._zod.onattach.push((inst) => {
1311
- var _a
1312
- ;(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value)
1313
- })
1314
1358
  inst._zod.check = (payload) => {
1315
1359
  if (typeof payload.value !== typeof def.value)
1316
1360
  throw new Error('Cannot mix number and bigint in multiple_of check.')
@@ -1338,13 +1382,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor(
1338
1382
  const isInt = def.format?.includes('int')
1339
1383
  const origin = isInt ? 'int' : 'number'
1340
1384
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]
1341
- inst._zod.onattach.push((inst) => {
1342
- const bag = inst._zod.bag
1343
- bag.format = def.format
1344
- bag.minimum = minimum
1345
- bag.maximum = maximum
1346
- if (isInt) bag.pattern = integer
1347
- })
1348
1385
  inst._zod.check = (payload) => {
1349
1386
  const input = payload.value
1350
1387
  if (isInt) {
@@ -1417,10 +1454,6 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor(
1417
1454
  var _a
1418
1455
  $ZodCheck.init(inst, def)
1419
1456
  ;(_a = inst._zod.def).when ?? (_a.when = _whenHasLength)
1420
- inst._zod.onattach.push((inst) => {
1421
- const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY
1422
- if (def.maximum < curr) inst._zod.bag.maximum = def.maximum
1423
- })
1424
1457
  inst._zod.check = (payload) => {
1425
1458
  const input = payload.value
1426
1459
  const units = input.length
@@ -1448,10 +1481,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor(
1448
1481
  var _a
1449
1482
  $ZodCheck.init(inst, def)
1450
1483
  ;(_a = inst._zod.def).when ?? (_a.when = _whenHasLength)
1451
- inst._zod.onattach.push((inst) => {
1452
- const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY
1453
- if (def.minimum > curr) inst._zod.bag.minimum = def.minimum
1454
- })
1455
1484
  inst._zod.check = (payload) => {
1456
1485
  const input = payload.value
1457
1486
  const units = input.length
@@ -1481,12 +1510,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor(
1481
1510
  var _a
1482
1511
  $ZodCheck.init(inst, def)
1483
1512
  ;(_a = inst._zod.def).when ?? (_a.when = _whenHasLength)
1484
- inst._zod.onattach.push((inst) => {
1485
- const bag = inst._zod.bag
1486
- bag.minimum = def.length
1487
- bag.maximum = def.length
1488
- bag.length = def.length
1489
- })
1490
1513
  inst._zod.check = (payload) => {
1491
1514
  const input = payload.value
1492
1515
  const units = input.length
@@ -1518,14 +1541,6 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor(
1518
1541
  (inst, def) => {
1519
1542
  var _a, _b
1520
1543
  $ZodCheck.init(inst, def)
1521
- inst._zod.onattach.push((inst) => {
1522
- const bag = inst._zod.bag
1523
- bag.format = def.format
1524
- if (def.pattern) {
1525
- bag.patterns ?? (bag.patterns = new Set())
1526
- bag.patterns.add(def.pattern)
1527
- }
1528
- })
1529
1544
  if (def.pattern)
1530
1545
  (_a = inst._zod).check ??
1531
1546
  (_a.check = (payload) => {
@@ -1588,11 +1603,6 @@ var $ZodCheckIncludes = /* @__PURE__ */ $constructor(
1588
1603
  : escapedRegex,
1589
1604
  )
1590
1605
  def.pattern = pattern
1591
- inst._zod.onattach.push((inst) => {
1592
- const bag = inst._zod.bag
1593
- bag.patterns ?? (bag.patterns = new Set())
1594
- bag.patterns.add(pattern)
1595
- })
1596
1606
  inst._zod.check = (payload) => {
1597
1607
  if (payload.value.includes(def.includes, def.position)) return
1598
1608
  payload.issues.push({
@@ -1613,11 +1623,6 @@ var $ZodCheckStartsWith = /* @__PURE__ */ $constructor(
1613
1623
  $ZodCheck.init(inst, def)
1614
1624
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`)
1615
1625
  def.pattern ?? (def.pattern = pattern)
1616
- inst._zod.onattach.push((inst) => {
1617
- const bag = inst._zod.bag
1618
- bag.patterns ?? (bag.patterns = new Set())
1619
- bag.patterns.add(pattern)
1620
- })
1621
1626
  inst._zod.check = (payload) => {
1622
1627
  if (payload.value.startsWith(def.prefix)) return
1623
1628
  payload.issues.push({
@@ -1638,11 +1643,6 @@ var $ZodCheckEndsWith = /* @__PURE__ */ $constructor(
1638
1643
  $ZodCheck.init(inst, def)
1639
1644
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`)
1640
1645
  def.pattern ?? (def.pattern = pattern)
1641
- inst._zod.onattach.push((inst) => {
1642
- const bag = inst._zod.bag
1643
- bag.patterns ?? (bag.patterns = new Set())
1644
- bag.patterns.add(pattern)
1645
- })
1646
1646
  inst._zod.check = (payload) => {
1647
1647
  if (payload.value.endsWith(def.suffix)) return
1648
1648
  payload.issues.push({
@@ -1667,7 +1667,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor(
1667
1667
  },
1668
1668
  )
1669
1669
 
1670
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/doc.js
1670
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/doc.js
1671
1671
  class Doc {
1672
1672
  constructor(args = [], closed = {}) {
1673
1673
  this.content = []
@@ -1677,8 +1677,11 @@ class Doc {
1677
1677
  }
1678
1678
  indented(fn) {
1679
1679
  this.indent += 1
1680
- fn(this)
1681
- this.indent -= 1
1680
+ try {
1681
+ fn(this)
1682
+ } finally {
1683
+ this.indent -= 1
1684
+ }
1682
1685
  }
1683
1686
  write(arg) {
1684
1687
  if (typeof arg === 'function') {
@@ -1715,14 +1718,14 @@ ${content.join(`
1715
1718
  }
1716
1719
  }
1717
1720
 
1718
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/versions.js
1721
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/versions.js
1719
1722
  var version = {
1720
1723
  major: 4,
1721
- minor: 5,
1722
- patch: 4,
1724
+ minor: 6,
1725
+ patch: 0,
1723
1726
  }
1724
1727
 
1725
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/schemas.js
1728
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/schemas.js
1726
1729
  var $ZodType = /* @__PURE__ */ $constructor(
1727
1730
  '$ZodType',
1728
1731
  (inst, def) => {
@@ -1835,16 +1838,23 @@ var $ZodType = /* @__PURE__ */ $constructor(
1835
1838
  },
1836
1839
  },
1837
1840
  )
1838
- var toStandardResult = (r) =>
1839
- r.success ? { value: r.data } : { issues: r.error?.issues }
1841
+ var toStandardResult = (r, ctx) =>
1842
+ r.issues.length
1843
+ ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) }
1844
+ : { value: r.value }
1845
+ async function validateAsync2(inst, value) {
1846
+ const ctx = { async: true }
1847
+ return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx)
1848
+ }
1840
1849
  function standardProps(inst) {
1841
1850
  return {
1842
1851
  validate: (value) => {
1852
+ const ctx = { async: false }
1843
1853
  try {
1844
- return toStandardResult(safeParse(inst, value))
1845
- } catch (_) {
1846
- return safeParseAsync(inst, value).then(toStandardResult)
1847
- }
1854
+ const r = inst._zod.run({ value, issues: [] }, ctx)
1855
+ if (!(r instanceof Promise)) return toStandardResult(r, ctx)
1856
+ } catch (_) {}
1857
+ return validateAsync2(inst, value)
1848
1858
  },
1849
1859
  vendor: 'zod',
1850
1860
  version: 1,
@@ -1852,8 +1862,7 @@ function standardProps(inst) {
1852
1862
  }
1853
1863
  var $ZodString = /* @__PURE__ */ $constructor('$ZodString', (inst, def) => {
1854
1864
  $ZodType.init(inst, def)
1855
- inst._zod.pattern =
1856
- [...(inst?._zod.bag?.patterns ?? [])].pop() ?? string(inst._zod.bag)
1865
+ inst._zod.pattern = def.pattern ?? anyString
1857
1866
  inst._zod.parse = (payload, _) => {
1858
1867
  if (def.coerce)
1859
1868
  try {
@@ -2035,12 +2044,6 @@ var $ZodISODateTime = /* @__PURE__ */ $constructor(
2035
2044
  (inst, def) => {
2036
2045
  def.pattern ?? (def.pattern = datetime(def))
2037
2046
  $ZodStringFormat.init(inst, def)
2038
- if (def.local || def.precision === -1) {
2039
- inst._zod.bag.laxFormat = true
2040
- inst._zod.onattach.push((s) => {
2041
- s._zod.bag.laxFormat = true
2042
- })
2043
- }
2044
2047
  },
2045
2048
  )
2046
2049
  var $ZodISODate = /* @__PURE__ */ $constructor('$ZodISODate', (inst, def) => {
@@ -2061,7 +2064,6 @@ var $ZodISODuration = /* @__PURE__ */ $constructor(
2061
2064
  var $ZodIPv4 = /* @__PURE__ */ $constructor('$ZodIPv4', (inst, def) => {
2062
2065
  def.pattern ?? (def.pattern = ipv4)
2063
2066
  $ZodStringFormat.init(inst, def)
2064
- inst._zod.bag.format = `ipv4`
2065
2067
  })
2066
2068
  var ipv6Alphabet = /^[0-9a-fA-F:.]+$/
2067
2069
  function isValidIPv6(value) {
@@ -2076,7 +2078,6 @@ function isValidIPv6(value) {
2076
2078
  var $ZodIPv6 = /* @__PURE__ */ $constructor('$ZodIPv6', (inst, def) => {
2077
2079
  def.pattern ?? (def.pattern = ipv6)
2078
2080
  $ZodStringFormat.init(inst, def)
2079
- inst._zod.bag.format = `ipv6`
2080
2081
  inst._zod.check = (payload) => {
2081
2082
  if (!isValidIPv6(payload.value)) {
2082
2083
  payload.issues.push({
@@ -2129,10 +2130,10 @@ function isValidBase64(data) {
2129
2130
  return false
2130
2131
  }
2131
2132
  }
2133
+ var base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/
2132
2134
  var $ZodBase64 = /* @__PURE__ */ $constructor('$ZodBase64', (inst, def) => {
2133
- def.pattern ?? (def.pattern = base64)
2135
+ def.pattern ?? (def.pattern = base64Charset)
2134
2136
  $ZodStringFormat.init(inst, def)
2135
- inst._zod.bag.contentEncoding = 'base64'
2136
2137
  inst._zod.check = (payload) => {
2137
2138
  if (isValidBase64(payload.value)) return
2138
2139
  payload.issues.push({
@@ -2144,8 +2145,9 @@ var $ZodBase64 = /* @__PURE__ */ $constructor('$ZodBase64', (inst, def) => {
2144
2145
  })
2145
2146
  }
2146
2147
  })
2148
+ var base64urlCharset = /^[A-Za-z0-9_-]*$/
2147
2149
  function isValidBase64URL(data) {
2148
- if (!base64url.test(data)) return false
2150
+ if (!base64urlCharset.test(data)) return false
2149
2151
  const base64 = data.replace(/[-_]/g, (c) => (c === '-' ? '+' : '/'))
2150
2152
  const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, '=')
2151
2153
  return isValidBase64(padded)
@@ -2153,9 +2155,8 @@ function isValidBase64URL(data) {
2153
2155
  var $ZodBase64URL = /* @__PURE__ */ $constructor(
2154
2156
  '$ZodBase64URL',
2155
2157
  (inst, def) => {
2156
- def.pattern ?? (def.pattern = base64url)
2158
+ def.pattern ?? (def.pattern = base64urlCharset)
2157
2159
  $ZodStringFormat.init(inst, def)
2158
- inst._zod.bag.contentEncoding = 'base64url'
2159
2160
  inst._zod.check = (payload) => {
2160
2161
  if (isValidBase64URL(payload.value)) return
2161
2162
  payload.issues.push({
@@ -2206,7 +2207,7 @@ var $ZodJWT = /* @__PURE__ */ $constructor('$ZodJWT', (inst, def) => {
2206
2207
  })
2207
2208
  var $ZodNumber = /* @__PURE__ */ $constructor('$ZodNumber', (inst, def) => {
2208
2209
  $ZodType.init(inst, def)
2209
- inst._zod.pattern = inst._zod.bag.pattern ?? number
2210
+ inst._zod.pattern = number
2210
2211
  inst._zod.parse = (payload, _ctx) => {
2211
2212
  if (def.coerce)
2212
2213
  try {
@@ -2305,6 +2306,7 @@ var $ZodArray = /* @__PURE__ */ $constructor('$ZodArray', (inst, def) => {
2305
2306
  ? memo.alloc(inst, payload, Array(input.length), ctx)
2306
2307
  : Array(input.length)
2307
2308
  const proms = []
2309
+ const abortEarly = ctx?.abortEarly
2308
2310
  for (let i = 0; i < input.length; i++) {
2309
2311
  const item = input[i]
2310
2312
  const result = def.element._zod.run(
@@ -2320,6 +2322,7 @@ var $ZodArray = /* @__PURE__ */ $constructor('$ZodArray', (inst, def) => {
2320
2322
  )
2321
2323
  } else {
2322
2324
  handleArrayResult(result, payload, i)
2325
+ if (abortEarly && result.issues.length !== 0 && aborted(result)) break
2323
2326
  }
2324
2327
  }
2325
2328
  if (proms.length) {
@@ -2382,14 +2385,19 @@ function normalizeDef(def) {
2382
2385
  optionalKeys: new Set(okeys),
2383
2386
  }
2384
2387
  }
2385
- function handleCatchall(proms, input, payload, ctx, def, inst) {
2388
+ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
2386
2389
  const unrecognized = []
2387
2390
  const keySet = def.keySet
2388
2391
  const _catchall = def.catchall._zod
2389
2392
  const t = _catchall.def.type
2390
2393
  const optin = _catchall.optin
2391
2394
  const optout = _catchall.optout
2395
+ let seen = 0
2392
2396
  for (const key in input) {
2397
+ if (abortEarly && payload.issues.length !== seen) {
2398
+ if (aborted(payload, seen)) break
2399
+ seen = payload.issues.length
2400
+ }
2393
2401
  if (keySet.has(key)) continue
2394
2402
  if (key === '__proto__') {
2395
2403
  if (t === 'never') unrecognized.push(key)
@@ -2424,23 +2432,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2424
2432
  return payload
2425
2433
  })
2426
2434
  }
2427
- var propShapes = new WeakMap()
2428
2435
  var $ZodObject = /* @__PURE__ */ $constructor('$ZodObject', (inst, def) => {
2429
2436
  $ZodType.init(inst, def)
2430
2437
  const desc = Object.getOwnPropertyDescriptor(def, 'shape')
2431
- if (!desc?.get) {
2432
- const sh = def.shape
2433
- propShapes.set(def, sh)
2434
- Object.defineProperty(def, 'shape', {
2435
- get: () => {
2436
- const newSh = { ...sh }
2437
- Object.defineProperty(def, 'shape', {
2438
- value: newSh,
2439
- })
2440
- propShapes.set(def, newSh)
2441
- return newSh
2442
- },
2443
- })
2438
+ const sh = desc?.get ? desc.get.raw : (def.shape ?? {})
2439
+ if (sh) {
2440
+ const get = () => {
2441
+ const newSh = { ...sh }
2442
+ Object.defineProperty(def, 'shape', { value: newSh })
2443
+ get.raw = newSh
2444
+ return newSh
2445
+ }
2446
+ get.raw = sh
2447
+ Object.defineProperty(def, 'shape', { get })
2444
2448
  }
2445
2449
  const _normalized = cached(() => normalizeDef(def))
2446
2450
  defineLazyInternal(inst, 'propValues', (zod) => {
@@ -2478,7 +2482,13 @@ var $ZodObject = /* @__PURE__ */ $constructor('$ZodObject', (inst, def) => {
2478
2482
  payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {}
2479
2483
  const proms = []
2480
2484
  const shape = value.shape
2485
+ const abortEarly = ctx?.abortEarly
2486
+ let seen = payload.issues.length
2481
2487
  for (const key of value.allKeys) {
2488
+ if (abortEarly && payload.issues.length !== seen) {
2489
+ if (aborted(payload, seen)) break
2490
+ seen = payload.issues.length
2491
+ }
2482
2492
  if (key === '__proto__') continue
2483
2493
  const el = shape[key]
2484
2494
  const optin = el._zod.optin
@@ -2497,7 +2507,15 @@ var $ZodObject = /* @__PURE__ */ $constructor('$ZodObject', (inst, def) => {
2497
2507
  if (!catchall) {
2498
2508
  return proms.length ? Promise.all(proms).then(() => payload) : payload
2499
2509
  }
2500
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst)
2510
+ return handleCatchall(
2511
+ proms,
2512
+ input,
2513
+ payload,
2514
+ ctx,
2515
+ _normalized.value,
2516
+ inst,
2517
+ abortEarly === true,
2518
+ )
2501
2519
  }
2502
2520
  })
2503
2521
  var $ZodObjectJIT = /* @__PURE__ */ $constructor(
@@ -2514,10 +2532,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor(
2514
2532
  const parseStr = (k) =>
2515
2533
  `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`
2516
2534
  const prefixStr = (id, k) => `
2535
+ let ${id}_ab = false;
2517
2536
  for (let i = 0; i < ${id}.issues.length; i++) {
2518
2537
  const iss = ${id}.issues[i];
2519
2538
  iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
2520
2539
  payload.issues.push(iss);
2540
+ if (iss.continue !== true) ${id}_ab = true;
2541
+ }
2542
+ if (${id}_ab && ctx && ctx.abortEarly) {
2543
+ payload.value = newResult;
2544
+ return payload;
2521
2545
  }`
2522
2546
  doc.write(`const input = payload.value;`)
2523
2547
  const ids = Object.create(null)
@@ -2570,6 +2594,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor(
2570
2594
  input: undefined,
2571
2595
  path: [${k}]
2572
2596
  });
2597
+ if (ctx && ctx.abortEarly) {
2598
+ payload.value = newResult;
2599
+ return payload;
2600
+ }
2573
2601
  }
2574
2602
 
2575
2603
  if (${id}_present) {
@@ -2620,7 +2648,15 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor(
2620
2648
  if (!fastpass) fastpass = generateFastpass(def.shape)
2621
2649
  payload = fastpass(payload, ctx)
2622
2650
  if (!catchall) return payload
2623
- return handleCatchall([], input, payload, ctx, value, inst)
2651
+ return handleCatchall(
2652
+ [],
2653
+ input,
2654
+ payload,
2655
+ ctx,
2656
+ value,
2657
+ inst,
2658
+ ctx?.abortEarly === true,
2659
+ )
2624
2660
  }
2625
2661
  return superParse(payload, ctx)
2626
2662
  }
@@ -2734,7 +2770,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2734
2770
  return propValues
2735
2771
  })
2736
2772
  def.options.forEach((option, i) => {
2737
- const propShape = propShapes.get(option._zod.def)
2773
+ const propShape = rawShape(option._zod.def)
2738
2774
  if (
2739
2775
  propShape &&
2740
2776
  !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)
@@ -2917,12 +2953,16 @@ var $ZodEnum = /* @__PURE__ */ $constructor('$ZodEnum', (inst, def) => {
2917
2953
  const values = getEnumValues(def.entries)
2918
2954
  const valuesSet = new Set(values)
2919
2955
  inst._zod.values = valuesSet
2920
- const patternValues = values.filter((k) => propertyKeyTypes.has(typeof k))
2921
- inst._zod.pattern = new RegExp(
2922
- patternValues.length
2923
- ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join('|')})$`
2924
- : '^[^\\s\\S]$',
2925
- )
2956
+ defineLazyInternal(inst, 'pattern', (zod) => {
2957
+ const patternValues = getEnumValues(zod.def.entries).filter((k) =>
2958
+ propertyKeyTypes.has(typeof k),
2959
+ )
2960
+ return new RegExp(
2961
+ patternValues.length
2962
+ ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join('|')})$`
2963
+ : '^[^\\s\\S]$',
2964
+ )
2965
+ })
2926
2966
  inst._zod.parse = (payload, _ctx) => {
2927
2967
  const input = payload.value
2928
2968
  if (valuesSet.has(input)) {
@@ -2941,11 +2981,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor('$ZodLiteral', (inst, def) => {
2941
2981
  $ZodType.init(inst, def)
2942
2982
  const values = new Set(def.values)
2943
2983
  inst._zod.values = values
2944
- inst._zod.pattern = new RegExp(
2945
- def.values.length
2946
- ? `^(${def.values.map((o) => (typeof o === 'string' ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o))).join('|')})$`
2947
- : '^[^\\s\\S]$',
2948
- )
2984
+ defineLazyInternal(inst, 'pattern', (zod) => {
2985
+ const vals = zod.def.values
2986
+ return new RegExp(
2987
+ vals.length
2988
+ ? `^(${vals.map((o) => (typeof o === 'string' ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o))).join('|')})$`
2989
+ : '^[^\\s\\S]$',
2990
+ )
2991
+ })
2949
2992
  inst._zod.parse = (payload, _ctx) => {
2950
2993
  const input = payload.value
2951
2994
  if (values.has(input)) {
@@ -3239,7 +3282,85 @@ function handleRefineResult(result, payload, input, inst) {
3239
3282
  payload.issues.push(issue(_iss))
3240
3283
  }
3241
3284
  }
3242
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
3285
+ function handlePropertiesResult(result, payload, key) {
3286
+ if (result.issues.length) {
3287
+ payload.issues.push(...prefixIssues(key, result.issues))
3288
+ }
3289
+ }
3290
+ var $ZodProperties = /* @__PURE__ */ $constructor(
3291
+ '$ZodProperties',
3292
+ (inst, def) => {
3293
+ $ZodType.init(inst, def)
3294
+ $ZodCheck.init(inst, def)
3295
+ const memo = globalConfig.memoizer
3296
+ memo?.attach(inst)
3297
+ let entries
3298
+ const runShape = (payload, ctx) => {
3299
+ entries ??
3300
+ (entries = Reflect.ownKeys(def.shape).map((key) => [
3301
+ key,
3302
+ def.shape[key],
3303
+ ]))
3304
+ const input = payload.value
3305
+ let proms
3306
+ for (const [key, schema] of entries) {
3307
+ const result = schema._zod.run({ value: input[key], issues: [] }, ctx)
3308
+ if (result instanceof Promise) {
3309
+ proms ?? (proms = [])
3310
+ proms.push(
3311
+ result.then((result) =>
3312
+ handlePropertiesResult(result, payload, key),
3313
+ ),
3314
+ )
3315
+ } else {
3316
+ handlePropertiesResult(result, payload, key)
3317
+ }
3318
+ }
3319
+ if (proms)
3320
+ return Promise.all(proms).then(() => {
3321
+ return
3322
+ })
3323
+ return
3324
+ }
3325
+ inst._zod.parse = (payload, ctx) => {
3326
+ const input = payload.value
3327
+ if (
3328
+ input === null ||
3329
+ (typeof input !== 'object' && typeof input !== 'function')
3330
+ ) {
3331
+ payload.issues.push({
3332
+ expected: 'object',
3333
+ code: 'invalid_type',
3334
+ input,
3335
+ inst,
3336
+ })
3337
+ return payload
3338
+ }
3339
+ if (ctx.direction === 'backward') ctx = { ...ctx, direction: 'forward' }
3340
+ if (memo) memo.alloc(inst, payload, input, ctx)
3341
+ const result = runShape(payload, ctx)
3342
+ return result instanceof Promise ? result.then(() => payload) : payload
3343
+ }
3344
+ inst._zod.check = (payload) => {
3345
+ if (payload.value == null) {
3346
+ payload.issues.push({
3347
+ expected: 'object',
3348
+ code: 'invalid_type',
3349
+ input: payload.value,
3350
+ inst,
3351
+ })
3352
+ return
3353
+ }
3354
+ return runShape(payload, {})
3355
+ }
3356
+ },
3357
+ {
3358
+ *[Symbol.iterator]() {
3359
+ yield this
3360
+ },
3361
+ },
3362
+ )
3363
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/memoizer.js
3243
3364
  class $ZodCyclicError extends Error {
3244
3365
  constructor() {
3245
3366
  super(`Cannot parse a reference cycle that closes through a transform`)
@@ -3248,29 +3369,61 @@ class $ZodCyclicError extends Error {
3248
3369
  }
3249
3370
  var STATE = '~memo'
3250
3371
  var NO_ISSUES = []
3372
+ function isRef(value) {
3373
+ return (
3374
+ value !== null && (typeof value === 'object' || typeof value === 'function')
3375
+ )
3376
+ }
3251
3377
  function cloneIssues(issues) {
3252
3378
  return issues.map((iss) =>
3253
3379
  iss.path ? { ...iss, path: iss.path.slice() } : { ...iss },
3254
3380
  )
3255
3381
  }
3256
3382
  var recursive = /* @__PURE__ */ new WeakMap()
3257
- function isRecursive(inst, stack) {
3383
+ var NONE = 0
3384
+ var ASSUMED = 1
3385
+ var PROVEN = 2
3386
+ function isRecursive(inst, stack, resolve) {
3258
3387
  const cached = recursive.get(inst)
3259
- if (cached !== undefined) return cached
3260
- if (stack.has(inst)) return true
3388
+ if (cached !== undefined) return cached ? PROVEN : NONE
3389
+ if (stack.has(inst)) return PROVEN
3261
3390
  stack.add(inst)
3262
- let result = false
3391
+ let result = NONE
3263
3392
  const check = (child) => {
3264
- if (!result && child?._zod && isRecursive(child, stack)) result = true
3393
+ if (result !== PROVEN && child?._zod) {
3394
+ const answer = isRecursive(child, stack, resolve)
3395
+ if (answer > result) result = answer
3396
+ }
3397
+ }
3398
+ const shape = (sh, spread) => {
3399
+ let answer = NONE
3400
+ for (const key of Reflect.ownKeys(sh)) {
3401
+ const desc = Object.getOwnPropertyDescriptor(sh, key)
3402
+ if (spread && !desc.enumerable) continue
3403
+ const child = desc.get
3404
+ ? ASSUMED
3405
+ : desc.value?._zod
3406
+ ? isRecursive(desc.value, stack, resolve)
3407
+ : NONE
3408
+ if (child > answer) answer = child
3409
+ }
3410
+ return answer
3411
+ }
3412
+ const merge = (answer) => {
3413
+ if (answer > result) result = answer
3265
3414
  }
3266
3415
  const def = inst._zod.def
3267
3416
  const kind = def.type
3268
3417
  switch (kind) {
3269
3418
  case 'object': {
3270
- for (const key of Reflect.ownKeys(def.shape)) check(def.shape[key])
3419
+ const raw = rawShape(def)
3420
+ merge(raw ? shape(raw, true) : ASSUMED)
3271
3421
  check(def.catchall)
3272
3422
  break
3273
3423
  }
3424
+ case 'properties':
3425
+ merge(shape(def.shape, false))
3426
+ break
3274
3427
  case 'array':
3275
3428
  check(def.element)
3276
3429
  break
@@ -3312,9 +3465,12 @@ function isRecursive(inst, stack) {
3312
3465
  check(def.input)
3313
3466
  check(def.output)
3314
3467
  break
3315
- case 'lazy':
3316
- check(inst._zod.innerType)
3468
+ case 'lazy': {
3469
+ const inner =
3470
+ def._cachedInner ?? (resolve ? inst._zod.innerType : undefined)
3471
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED)
3317
3472
  break
3473
+ }
3318
3474
  case 'template_literal':
3319
3475
  case 'string':
3320
3476
  case 'number':
@@ -3348,13 +3504,16 @@ function isRecursive(inst, stack) {
3348
3504
  }
3349
3505
  }
3350
3506
  stack.delete(inst)
3351
- recursive.set(inst, result)
3352
- return result
3507
+ return settle(inst, result)
3508
+ }
3509
+ function settle(inst, answer) {
3510
+ if (answer !== ASSUMED) recursive.set(inst, answer === PROVEN)
3511
+ return answer
3353
3512
  }
3354
3513
  function bucketFor(state, inst) {
3355
3514
  let bucket = state.buckets.get(inst)
3356
3515
  if (!bucket) {
3357
- bucket = new Map()
3516
+ bucket = new WeakMap()
3358
3517
  state.buckets.set(inst, bucket)
3359
3518
  }
3360
3519
  return bucket
@@ -3388,6 +3547,7 @@ var memo = {
3388
3547
  attach(inst) {
3389
3548
  var _a
3390
3549
  let isRecursiveInst
3550
+ let rechecked = false
3391
3551
  let lastCtx
3392
3552
  let lastBucket
3393
3553
  ;(_a = inst._zod).deferred ?? (_a.deferred = [])
@@ -3395,19 +3555,20 @@ var memo = {
3395
3555
  const base = inst._zod.parse
3396
3556
  const wrapped = (payload, ctx) => {
3397
3557
  if (isRecursiveInst === undefined) {
3398
- isRecursiveInst = isRecursive(inst, new Set())
3399
- if (!isRecursiveInst) {
3558
+ const walked = isRecursive(inst, new Set(), false)
3559
+ if (walked === NONE) {
3400
3560
  inst._zod.parse = base
3401
3561
  if (inst._zod.run === wrapped) inst._zod.run = base
3402
3562
  return base(payload, ctx)
3403
3563
  }
3564
+ if (walked === PROVEN || rechecked) isRecursiveInst = true
3565
+ else rechecked = true
3404
3566
  }
3405
3567
  const input = payload.value
3406
- if (input === null || typeof input !== 'object')
3407
- return base(payload, ctx)
3568
+ if (!isRef(input)) return base(payload, ctx)
3408
3569
  let state = ctx[STATE]
3409
3570
  if (!state) {
3410
- state = { buckets: new Map(), backEdges: undefined }
3571
+ state = { buckets: new WeakMap(), backEdges: undefined }
3411
3572
  ctx[STATE] = state
3412
3573
  }
3413
3574
  let bucket
@@ -3426,7 +3587,7 @@ var memo = {
3426
3587
  payload.issues.push(...cloneIssues(hit.issues))
3427
3588
  } else {
3428
3589
  payload.memo = true
3429
- state.backEdges ?? (state.backEdges = new Set())
3590
+ state.backEdges ?? (state.backEdges = new WeakSet())
3430
3591
  state.backEdges.add(hit.value)
3431
3592
  }
3432
3593
  return payload
@@ -3459,14 +3620,9 @@ function memoizer() {
3459
3620
  }
3460
3621
  function isBackEdge(ctx, value) {
3461
3622
  const backEdges = ctx[STATE]?.backEdges
3462
- return (
3463
- backEdges !== undefined &&
3464
- value !== null &&
3465
- typeof value === 'object' &&
3466
- backEdges.has(value)
3467
- )
3623
+ return backEdges !== undefined && isRef(value) && backEdges.has(value)
3468
3624
  }
3469
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
3625
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/locales/en.js
3470
3626
  var error = () => {
3471
3627
  const Sizable = {
3472
3628
  string: { unit: 'characters', verb: 'to have' },
@@ -3507,6 +3663,7 @@ var error = () => {
3507
3663
  json_string: 'JSON string',
3508
3664
  e164: 'E.164 number',
3509
3665
  credit_card: 'credit card number',
3666
+ iban: 'IBAN',
3510
3667
  jwt: 'JWT',
3511
3668
  template_literal: 'input',
3512
3669
  }
@@ -3594,7 +3751,7 @@ function en_default() {
3594
3751
  localeError: error(),
3595
3752
  }
3596
3753
  }
3597
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
3754
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/registries.js
3598
3755
  var _a2
3599
3756
  class $ZodRegistry {
3600
3757
  constructor() {
@@ -3642,7 +3799,7 @@ function registry() {
3642
3799
  ;(_a2 = globalThis).__zod_globalRegistry ??
3643
3800
  (_a2.__zod_globalRegistry = registry())
3644
3801
  var globalRegistry = globalThis.__zod_globalRegistry
3645
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
3802
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/api.js
3646
3803
  function _string(Class, params) {
3647
3804
  return new Class({
3648
3805
  type: 'string',
@@ -4090,7 +4247,7 @@ function _check(fn, params) {
4090
4247
  ch._zod.check = fn
4091
4248
  return ch
4092
4249
  }
4093
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
4250
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/to-json-schema.js
4094
4251
  function assignProps(target, ...sources) {
4095
4252
  for (const source of sources) {
4096
4253
  for (const key of Reflect.ownKeys(source)) {
@@ -4133,7 +4290,7 @@ function handleUnrepresentable(schema, ctx, json, params, message) {
4133
4290
  Object.assign(json, result)
4134
4291
  return true
4135
4292
  }
4136
- function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
4293
+ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
4137
4294
  var _a
4138
4295
  const def = schema._zod.def
4139
4296
  const seen = ctx.seen.get(schema)
@@ -4173,7 +4330,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
4173
4330
  const parent = schema._zod.parent
4174
4331
  if (parent) {
4175
4332
  if (!result.ref) result.ref = parent
4176
- process2(parent, ctx, params)
4333
+ processSchema(parent, ctx, params)
4177
4334
  ctx.seen.get(parent).isParent = true
4178
4335
  }
4179
4336
  }
@@ -4284,7 +4441,6 @@ function extractDefs(ctx, schema) {
4284
4441
  if (seen.count > 1) {
4285
4442
  if (ctx.reused === 'ref') {
4286
4443
  extractToDef(entry)
4287
- continue
4288
4444
  }
4289
4445
  }
4290
4446
  }
@@ -4628,7 +4784,7 @@ var createToJSONSchemaMethod =
4628
4784
  (schema, processors = {}) =>
4629
4785
  (params) => {
4630
4786
  const ctx = initializeContext({ ...params, processors })
4631
- process2(schema, ctx)
4787
+ processSchema(schema, ctx)
4632
4788
  extractDefs(ctx, schema)
4633
4789
  return finalize(ctx, schema)
4634
4790
  }
@@ -4642,11 +4798,90 @@ var createStandardJSONSchemaMethod =
4642
4798
  io,
4643
4799
  processors,
4644
4800
  })
4645
- process2(schema, ctx)
4801
+ processSchema(schema, ctx)
4646
4802
  extractDefs(ctx, schema)
4647
4803
  return finalize(ctx, schema)
4648
4804
  }
4649
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js
4805
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/core/json-schema-processors.js
4806
+ var narrowMin = (agg, key, value) => {
4807
+ if (agg[key] === undefined || value > agg[key]) agg[key] = value
4808
+ }
4809
+ var narrowMax = (agg, key, value) => {
4810
+ if (agg[key] === undefined || value < agg[key]) agg[key] = value
4811
+ }
4812
+ var narrowBoth = (agg, value) => {
4813
+ narrowMin(agg, 'minimum', value)
4814
+ narrowMax(agg, 'maximum', value)
4815
+ }
4816
+ var addDivisor = (agg, value) => {
4817
+ agg.multipleOf ?? (agg.multipleOf = [])
4818
+ if (!agg.multipleOf.includes(value)) agg.multipleOf.push(value)
4819
+ }
4820
+ var addPattern = (agg, pattern) => {
4821
+ agg.patterns ?? (agg.patterns = new Set())
4822
+ agg.patterns.add(pattern)
4823
+ }
4824
+ var intersectMime = (agg, mime) => {
4825
+ agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime]
4826
+ }
4827
+ var setFormat = (agg, format) => {
4828
+ agg.format = format
4829
+ if (format.includes('int')) agg.isInt = true
4830
+ }
4831
+ var minContributor = (agg, def) => narrowMin(agg, 'minimum', def.minimum)
4832
+ var maxContributor = (agg, def) => narrowMax(agg, 'maximum', def.maximum)
4833
+ var formatContributor = (ranges) => (agg, def) => {
4834
+ setFormat(agg, def.format)
4835
+ const [minimum, maximum] = ranges[def.format]
4836
+ narrowMin(agg, 'minimum', minimum)
4837
+ narrowMax(agg, 'maximum', maximum)
4838
+ }
4839
+ var contributors = {
4840
+ greater_than: (agg, def) =>
4841
+ narrowMin(agg, def.inclusive ? 'minimum' : 'exclusiveMinimum', def.value),
4842
+ less_than: (agg, def) =>
4843
+ narrowMax(agg, def.inclusive ? 'maximum' : 'exclusiveMaximum', def.value),
4844
+ multiple_of: (agg, def) => addDivisor(agg, def.value),
4845
+ number_format: formatContributor(NUMBER_FORMAT_RANGES),
4846
+ bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
4847
+ min_length: minContributor,
4848
+ max_length: maxContributor,
4849
+ length_equals: (agg, def) => narrowBoth(agg, def.length),
4850
+ min_size: minContributor,
4851
+ max_size: maxContributor,
4852
+ size_equals: (agg, def) => narrowBoth(agg, def.size),
4853
+ string_format: (agg, def) => {
4854
+ setFormat(agg, def.format)
4855
+ if (def.pattern) addPattern(agg, def.pattern)
4856
+ if (def.format === 'base64' || def.format === 'base64url')
4857
+ agg.contentEncoding = def.format
4858
+ if (def.local || def.precision === -1) agg.laxFormat = true
4859
+ },
4860
+ mime_type: (agg, def) => intersectMime(agg, def.mime),
4861
+ }
4862
+ function aggregateChecks(schema) {
4863
+ const agg = {}
4864
+ const def = schema._zod.def
4865
+ const list = schema._zod.traits.has('$ZodCheck')
4866
+ ? [schema, ...(def.checks ?? [])]
4867
+ : (def.checks ?? [])
4868
+ for (const ch of list) contributors[ch._zod.def.check]?.(agg, ch._zod.def)
4869
+ const bag = schema._zod.bag
4870
+ if (bag.minimum !== undefined) narrowMin(agg, 'minimum', bag.minimum)
4871
+ if (bag.exclusiveMinimum !== undefined)
4872
+ narrowMin(agg, 'exclusiveMinimum', bag.exclusiveMinimum)
4873
+ if (bag.maximum !== undefined) narrowMax(agg, 'maximum', bag.maximum)
4874
+ if (bag.exclusiveMaximum !== undefined)
4875
+ narrowMax(agg, 'exclusiveMaximum', bag.exclusiveMaximum)
4876
+ if (bag.multipleOf !== undefined) addDivisor(agg, bag.multipleOf)
4877
+ if (bag.format !== undefined) {
4878
+ agg.format ?? (agg.format = bag.format)
4879
+ if (bag.format.includes('int')) agg.isInt = true
4880
+ }
4881
+ if (bag.mime) intersectMime(agg, bag.mime)
4882
+ for (const pattern of bag.patterns ?? []) addPattern(agg, pattern)
4883
+ return agg
4884
+ }
4650
4885
  var formatMap = {
4651
4886
  guid: 'uuid',
4652
4887
  url: 'uri',
@@ -4654,11 +4889,16 @@ var formatMap = {
4654
4889
  json_string: 'json-string',
4655
4890
  regex: '',
4656
4891
  }
4892
+ var exactPatterns = new Map([
4893
+ [base64Charset, base64],
4894
+ [base64urlCharset, base64url],
4895
+ ])
4896
+ var exactPattern = (p) => exactPatterns.get(p) ?? p
4657
4897
  var stringProcessor = (schema, ctx, _json, _params) => {
4658
4898
  const json = _json
4659
4899
  json.type = 'string'
4660
4900
  const { minimum, maximum, format, patterns, contentEncoding, laxFormat } =
4661
- schema._zod.bag
4901
+ aggregateChecks(schema)
4662
4902
  if (typeof minimum === 'number') json.minLength = minimum
4663
4903
  if (typeof maximum === 'number') json.maxLength = maximum
4664
4904
  if (format) {
@@ -4670,7 +4910,7 @@ var stringProcessor = (schema, ctx, _json, _params) => {
4670
4910
  }
4671
4911
  if (contentEncoding) json.contentEncoding = contentEncoding
4672
4912
  if (patterns && patterns.size > 0) {
4673
- const patternList = [...patterns]
4913
+ const patternList = [...patterns].map(exactPattern)
4674
4914
  if (patternList.length === 1) json.pattern = patternList[0].source
4675
4915
  else if (patternList.length > 1) {
4676
4916
  json.allOf = [
@@ -4691,14 +4931,12 @@ var numberProcessor = (schema, ctx, _json, params) => {
4691
4931
  const {
4692
4932
  minimum,
4693
4933
  maximum,
4694
- format,
4695
4934
  multipleOf,
4696
4935
  exclusiveMaximum,
4697
4936
  exclusiveMinimum,
4698
- } = schema._zod.bag
4699
- if (typeof format === 'string' && format.includes('int'))
4700
- json.type = 'integer'
4701
- else json.type = 'number'
4937
+ isInt,
4938
+ } = aggregateChecks(schema)
4939
+ json.type = isInt ? 'integer' : 'number'
4702
4940
  const exMin =
4703
4941
  typeof exclusiveMinimum === 'number' &&
4704
4942
  exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY)
@@ -4726,17 +4964,27 @@ var numberProcessor = (schema, ctx, _json, params) => {
4726
4964
  } else if (typeof maximum === 'number') {
4727
4965
  json.maximum = maximum
4728
4966
  }
4729
- if (typeof multipleOf === 'number') {
4730
- if (Number.isFinite(multipleOf) && multipleOf !== 0)
4731
- json.multipleOf = Math.abs(multipleOf)
4732
- else
4733
- handleUnrepresentable(
4734
- schema,
4735
- ctx,
4736
- json,
4737
- params,
4738
- `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`,
4739
- )
4967
+ if (multipleOf) {
4968
+ const divisors = new Set()
4969
+ for (const divisor of multipleOf) {
4970
+ if (Number.isFinite(divisor) && divisor !== 0)
4971
+ divisors.add(Math.abs(divisor))
4972
+ else
4973
+ handleUnrepresentable(
4974
+ schema,
4975
+ ctx,
4976
+ json,
4977
+ params,
4978
+ `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`,
4979
+ )
4980
+ }
4981
+ const [first, ...rest] = divisors
4982
+ if (first !== undefined) json.multipleOf = first
4983
+ if (rest.length)
4984
+ json.allOf = [
4985
+ ...(json.allOf ?? []),
4986
+ ...rest.map((m) => ({ multipleOf: m })),
4987
+ ]
4740
4988
  }
4741
4989
  }
4742
4990
  var booleanProcessor = (_schema, _ctx, json, _params) => {
@@ -4830,11 +5078,11 @@ var transformProcessor = (schema, ctx, json, params) => {
4830
5078
  var arrayProcessor = (schema, ctx, _json, params) => {
4831
5079
  const json = _json
4832
5080
  const def = schema._zod.def
4833
- const { minimum, maximum } = schema._zod.bag
5081
+ const { minimum, maximum } = aggregateChecks(schema)
4834
5082
  if (typeof minimum === 'number') json.minItems = minimum
4835
5083
  if (typeof maximum === 'number') json.maxItems = maximum
4836
5084
  json.type = 'array'
4837
- json.items = process2(def.element, ctx, {
5085
+ json.items = processSchema(def.element, ctx, {
4838
5086
  ...params,
4839
5087
  path: [...params.path, 'items'],
4840
5088
  })
@@ -4872,7 +5120,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
4872
5120
  assignProp(
4873
5121
  json.properties,
4874
5122
  key,
4875
- process2(shape[key], ctx, {
5123
+ processSchema(shape[key], ctx, {
4876
5124
  ...params,
4877
5125
  path: [...params.path, 'properties', key],
4878
5126
  }),
@@ -4897,7 +5145,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
4897
5145
  } else if (!def.catchall) {
4898
5146
  if (ctx.io === 'output') json.additionalProperties = false
4899
5147
  } else if (def.catchall) {
4900
- json.additionalProperties = process2(def.catchall, ctx, {
5148
+ json.additionalProperties = processSchema(def.catchall, ctx, {
4901
5149
  ...params,
4902
5150
  path: [...params.path, 'additionalProperties'],
4903
5151
  })
@@ -4907,7 +5155,7 @@ var unionProcessor = (schema, ctx, json, params) => {
4907
5155
  const def = schema._zod.def
4908
5156
  const isExclusive = def.inclusive === false
4909
5157
  const options = def.options.map((x, i) =>
4910
- process2(x, ctx, {
5158
+ processSchema(x, ctx, {
4911
5159
  ...params,
4912
5160
  path: [...params.path, isExclusive ? 'oneOf' : 'anyOf', i],
4913
5161
  }),
@@ -4920,11 +5168,11 @@ var unionProcessor = (schema, ctx, json, params) => {
4920
5168
  }
4921
5169
  var intersectionProcessor = (schema, ctx, json, params) => {
4922
5170
  const def = schema._zod.def
4923
- const a = process2(def.left, ctx, {
5171
+ const a = processSchema(def.left, ctx, {
4924
5172
  ...params,
4925
5173
  path: [...params.path, 'allOf', 0],
4926
5174
  })
4927
- const b = process2(def.right, ctx, {
5175
+ const b = processSchema(def.right, ctx, {
4928
5176
  ...params,
4929
5177
  path: [...params.path, 'allOf', 1],
4930
5178
  })
@@ -4940,7 +5188,7 @@ var intersectionProcessor = (schema, ctx, json, params) => {
4940
5188
  var pendingRecords = new WeakMap()
4941
5189
  var nullableProcessor = (schema, ctx, json, params) => {
4942
5190
  const def = schema._zod.def
4943
- const inner = process2(def.innerType, ctx, params)
5191
+ const inner = processSchema(def.innerType, ctx, params)
4944
5192
  const seen = ctx.seen.get(schema)
4945
5193
  if (ctx.target === 'openapi-3.0') {
4946
5194
  seen.ref = def.innerType
@@ -4951,7 +5199,7 @@ var nullableProcessor = (schema, ctx, json, params) => {
4951
5199
  }
4952
5200
  var nonoptionalProcessor = (schema, ctx, _json, params) => {
4953
5201
  const def = schema._zod.def
4954
- process2(def.innerType, ctx, params)
5202
+ processSchema(def.innerType, ctx, params)
4955
5203
  const seen = ctx.seen.get(schema)
4956
5204
  seen.ref = def.innerType
4957
5205
  }
@@ -4975,7 +5223,7 @@ function serializeDefaultValue(value, schema, ctx, json, params) {
4975
5223
  }
4976
5224
  var defaultProcessor = (schema, ctx, json, params) => {
4977
5225
  const def = schema._zod.def
4978
- process2(def.innerType, ctx, params)
5226
+ processSchema(def.innerType, ctx, params)
4979
5227
  const seen = ctx.seen.get(schema)
4980
5228
  seen.ref = def.innerType
4981
5229
  const value = serializeDefaultValue(
@@ -4989,7 +5237,7 @@ var defaultProcessor = (schema, ctx, json, params) => {
4989
5237
  }
4990
5238
  var prefaultProcessor = (schema, ctx, json, params) => {
4991
5239
  const def = schema._zod.def
4992
- process2(def.innerType, ctx, params)
5240
+ processSchema(def.innerType, ctx, params)
4993
5241
  const seen = ctx.seen.get(schema)
4994
5242
  seen.ref = def.innerType
4995
5243
  if (ctx.io !== 'input') return
@@ -5004,7 +5252,7 @@ var prefaultProcessor = (schema, ctx, json, params) => {
5004
5252
  }
5005
5253
  var catchProcessor = (schema, ctx, json, params) => {
5006
5254
  const def = schema._zod.def
5007
- process2(def.innerType, ctx, params)
5255
+ processSchema(def.innerType, ctx, params)
5008
5256
  const seen = ctx.seen.get(schema)
5009
5257
  seen.ref = def.innerType
5010
5258
  let catchValue
@@ -5027,24 +5275,24 @@ var pipeProcessor = (schema, ctx, _json, params) => {
5027
5275
  const inIsTransform = def.in._zod.traits.has('$ZodTransform')
5028
5276
  const innerType =
5029
5277
  ctx.io === 'input' ? (inIsTransform ? def.out : def.in) : def.out
5030
- process2(innerType, ctx, params)
5278
+ processSchema(innerType, ctx, params)
5031
5279
  const seen = ctx.seen.get(schema)
5032
5280
  seen.ref = innerType
5033
5281
  }
5034
5282
  var readonlyProcessor = (schema, ctx, json, params) => {
5035
5283
  const def = schema._zod.def
5036
- process2(def.innerType, ctx, params)
5284
+ processSchema(def.innerType, ctx, params)
5037
5285
  const seen = ctx.seen.get(schema)
5038
5286
  seen.ref = def.innerType
5039
5287
  json.readOnly = true
5040
5288
  }
5041
5289
  var optionalProcessor = (schema, ctx, _json, params) => {
5042
5290
  const def = schema._zod.def
5043
- process2(def.innerType, ctx, params)
5291
+ processSchema(def.innerType, ctx, params)
5044
5292
  const seen = ctx.seen.get(schema)
5045
5293
  seen.ref = def.innerType
5046
5294
  }
5047
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
5295
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/classic/errors.js
5048
5296
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([
5049
5297
  Object.prototype,
5050
5298
  Error.prototype,
@@ -5108,11 +5356,11 @@ var ZodRealError = /* @__PURE__ */ $constructor(
5108
5356
  },
5109
5357
  )
5110
5358
 
5111
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/parse.js
5112
- var parse3 = /* @__PURE__ */ _parse(ZodRealError)
5113
- var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError)
5114
- var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError)
5115
- var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError)
5359
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/classic/parse.js
5360
+ var parse2 = /* @__PURE__ */ _parse(ZodRealError)
5361
+ var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError)
5362
+ var safeParse = /* @__PURE__ */ _safeParse(ZodRealError)
5363
+ var safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError)
5116
5364
  var encode = /* @__PURE__ */ _encode(ZodRealError)
5117
5365
  var decode = /* @__PURE__ */ _decode(ZodRealError)
5118
5366
  var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError)
@@ -5122,7 +5370,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError)
5122
5370
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError)
5123
5371
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError)
5124
5372
 
5125
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
5373
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/classic/schemas.js
5126
5374
  function _ensureDefaultLocale() {
5127
5375
  if (!globalConfig.localeError) config(en_default())
5128
5376
  }
@@ -5254,16 +5502,16 @@ var ZodType = /* @__PURE__ */ $constructor(
5254
5502
  own(this, '~standard', value)
5255
5503
  },
5256
5504
  parse: function _parse(data, params) {
5257
- return parse3(this, data, params, { callee: _parse })
5505
+ return parse2(this, data, params, { callee: _parse })
5258
5506
  },
5259
5507
  parseAsync: async function _parseAsync(data, params) {
5260
- return await parseAsync2(this, data, params, { callee: _parseAsync })
5508
+ return await parseAsync(this, data, params, { callee: _parseAsync })
5261
5509
  },
5262
5510
  safeParse(data, params) {
5263
- return safeParse2(this, data, params)
5511
+ return safeParse(this, data, params)
5264
5512
  },
5265
5513
  async safeParseAsync(data, params) {
5266
- return safeParseAsync2(this, data, params)
5514
+ return safeParseAsync(this, data, params)
5267
5515
  },
5268
5516
  get spa() {
5269
5517
  return this?.safeParseAsync
@@ -5271,6 +5519,12 @@ var ZodType = /* @__PURE__ */ $constructor(
5271
5519
  set spa(value) {
5272
5520
  own(this, 'spa', value)
5273
5521
  },
5522
+ validate(data, params) {
5523
+ return validate(this, data, params)
5524
+ },
5525
+ validateAsync(data, params) {
5526
+ return validateAsync(this, data, params)
5527
+ },
5274
5528
  encode: function _encode(data, params) {
5275
5529
  return encode(this, data, params, { callee: _encode })
5276
5530
  },
@@ -5313,58 +5567,61 @@ var _ZodString = /* @__PURE__ */ $constructor(
5313
5567
  ZodType.init(inst, def)
5314
5568
  inst._zod.processJSONSchema = (ctx, json, params) =>
5315
5569
  stringProcessor(inst, ctx, json, params)
5316
- const bag = inst._zod.bag
5317
- inst.format = bag.format ?? null
5318
- inst.minLength = bag.minimum ?? null
5319
- inst.maxLength = bag.maximum ?? null
5320
5570
  },
5321
- {
5322
- regex(...args) {
5323
- return this.check(_regex(...args))
5324
- },
5325
- includes(...args) {
5326
- return this.check(_includes(...args))
5327
- },
5328
- startsWith(...args) {
5329
- return this.check(_startsWith(...args))
5330
- },
5331
- endsWith(...args) {
5332
- return this.check(_endsWith(...args))
5333
- },
5334
- min(...args) {
5335
- return this.check(_minLength(...args))
5336
- },
5337
- max(...args) {
5338
- return this.check(_maxLength(...args))
5339
- },
5340
- length(...args) {
5341
- return this.check(_length(...args))
5342
- },
5343
- nonempty(...args) {
5344
- return this.check(_minLength(1, ...args))
5345
- },
5346
- lowercase(params) {
5347
- return this.check(_lowercase(params))
5348
- },
5349
- uppercase(params) {
5350
- return this.check(_uppercase(params))
5351
- },
5352
- trim() {
5353
- return this.check(_trim())
5354
- },
5355
- normalize(...args) {
5356
- return this.check(_normalize(...args))
5357
- },
5358
- toLowerCase() {
5359
- return this.check(_toLowerCase())
5360
- },
5361
- toUpperCase() {
5362
- return this.check(_toUpperCase())
5363
- },
5364
- slugify() {
5365
- return this.check(_slugify())
5571
+ /* @__PURE__ */ derived(
5572
+ {
5573
+ format: (inst) => aggregateChecks(inst).format ?? null,
5574
+ minLength: (inst) => aggregateChecks(inst).minimum ?? null,
5575
+ maxLength: (inst) => aggregateChecks(inst).maximum ?? null,
5576
+ },
5577
+ {
5578
+ regex(...args) {
5579
+ return this.check(_regex(...args))
5580
+ },
5581
+ includes(...args) {
5582
+ return this.check(_includes(...args))
5583
+ },
5584
+ startsWith(...args) {
5585
+ return this.check(_startsWith(...args))
5586
+ },
5587
+ endsWith(...args) {
5588
+ return this.check(_endsWith(...args))
5589
+ },
5590
+ min(...args) {
5591
+ return this.check(_minLength(...args))
5592
+ },
5593
+ max(...args) {
5594
+ return this.check(_maxLength(...args))
5595
+ },
5596
+ length(...args) {
5597
+ return this.check(_length(...args))
5598
+ },
5599
+ nonempty(...args) {
5600
+ return this.check(_minLength(1, ...args))
5601
+ },
5602
+ lowercase(params) {
5603
+ return this.check(_lowercase(params))
5604
+ },
5605
+ uppercase(params) {
5606
+ return this.check(_uppercase(params))
5607
+ },
5608
+ trim() {
5609
+ return this.check(_trim())
5610
+ },
5611
+ normalize(...args) {
5612
+ return this.check(_normalize(...args))
5613
+ },
5614
+ toLowerCase() {
5615
+ return this.check(_toLowerCase())
5616
+ },
5617
+ toUpperCase() {
5618
+ return this.check(_toUpperCase())
5619
+ },
5620
+ slugify() {
5621
+ return this.check(_slugify())
5622
+ },
5366
5623
  },
5367
- },
5624
+ ),
5368
5625
  )
5369
5626
  var ZodString = /* @__PURE__ */ $constructor(
5370
5627
  'ZodString',
@@ -5568,70 +5825,78 @@ var ZodNumber = /* @__PURE__ */ $constructor(
5568
5825
  ZodType.init(inst, def)
5569
5826
  inst._zod.processJSONSchema = (ctx, json, params) =>
5570
5827
  numberProcessor(inst, ctx, json, params)
5571
- const bag = inst._zod.bag
5572
- inst.minValue =
5573
- Math.max(
5574
- bag.minimum ?? Number.NEGATIVE_INFINITY,
5575
- bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY,
5576
- ) ?? null
5577
- inst.maxValue =
5578
- Math.min(
5579
- bag.maximum ?? Number.POSITIVE_INFINITY,
5580
- bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY,
5581
- ) ?? null
5582
- inst.isInt =
5583
- (bag.format ?? '').includes('int') ||
5584
- Number.isSafeInteger(bag.multipleOf ?? 0.5)
5585
5828
  inst.isFinite = true
5586
- inst.format = bag.format ?? null
5587
5829
  },
5588
- {
5589
- gt(value, params) {
5590
- return this.check(_gt(value, params))
5591
- },
5592
- gte(value, params) {
5593
- return this.check(_gte(value, params))
5594
- },
5595
- min(value, params) {
5596
- return this.check(_gte(value, params))
5597
- },
5598
- lt(value, params) {
5599
- return this.check(_lt(value, params))
5600
- },
5601
- lte(value, params) {
5602
- return this.check(_lte(value, params))
5603
- },
5604
- max(value, params) {
5605
- return this.check(_lte(value, params))
5606
- },
5607
- int(params) {
5608
- return this.check(int(params))
5609
- },
5610
- safe(params) {
5611
- return this.check(int(params))
5612
- },
5613
- positive(params) {
5614
- return this.check(_gt(0, params))
5615
- },
5616
- nonnegative(params) {
5617
- return this.check(_gte(0, params))
5618
- },
5619
- negative(params) {
5620
- return this.check(_lt(0, params))
5621
- },
5622
- nonpositive(params) {
5623
- return this.check(_lte(0, params))
5624
- },
5625
- multipleOf(value, params) {
5626
- return this.check(_multipleOf(value, params))
5627
- },
5628
- step(value, params) {
5629
- return this.check(_multipleOf(value, params))
5830
+ /* @__PURE__ */ derived(
5831
+ {
5832
+ minValue: (inst) => {
5833
+ const { minimum, exclusiveMinimum } = aggregateChecks(inst)
5834
+ return Math.max(
5835
+ minimum ?? Number.NEGATIVE_INFINITY,
5836
+ exclusiveMinimum ?? Number.NEGATIVE_INFINITY,
5837
+ )
5838
+ },
5839
+ maxValue: (inst) => {
5840
+ const { maximum, exclusiveMaximum } = aggregateChecks(inst)
5841
+ return Math.min(
5842
+ maximum ?? Number.POSITIVE_INFINITY,
5843
+ exclusiveMaximum ?? Number.POSITIVE_INFINITY,
5844
+ )
5845
+ },
5846
+ isInt: (inst) => {
5847
+ const { isInt, multipleOf } = aggregateChecks(inst)
5848
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger)
5849
+ },
5850
+ format: (inst) => aggregateChecks(inst).format ?? null,
5630
5851
  },
5631
- finite() {
5632
- return this
5852
+ {
5853
+ gt(value, params) {
5854
+ return this.check(_gt(value, params))
5855
+ },
5856
+ gte(value, params) {
5857
+ return this.check(_gte(value, params))
5858
+ },
5859
+ min(value, params) {
5860
+ return this.check(_gte(value, params))
5861
+ },
5862
+ lt(value, params) {
5863
+ return this.check(_lt(value, params))
5864
+ },
5865
+ lte(value, params) {
5866
+ return this.check(_lte(value, params))
5867
+ },
5868
+ max(value, params) {
5869
+ return this.check(_lte(value, params))
5870
+ },
5871
+ int(params) {
5872
+ return this.check(int(params))
5873
+ },
5874
+ safe(params) {
5875
+ return this.check(int(params))
5876
+ },
5877
+ positive(params) {
5878
+ return this.check(_gt(0, params))
5879
+ },
5880
+ nonnegative(params) {
5881
+ return this.check(_gte(0, params))
5882
+ },
5883
+ negative(params) {
5884
+ return this.check(_lt(0, params))
5885
+ },
5886
+ nonpositive(params) {
5887
+ return this.check(_lte(0, params))
5888
+ },
5889
+ multipleOf(value, params) {
5890
+ return this.check(_multipleOf(value, params))
5891
+ },
5892
+ step(value, params) {
5893
+ return this.check(_multipleOf(value, params))
5894
+ },
5895
+ finite() {
5896
+ return this
5897
+ },
5633
5898
  },
5634
- },
5899
+ ),
5635
5900
  )
5636
5901
  function number2(params) {
5637
5902
  return _number(ZodNumber, params)
@@ -5719,19 +5984,19 @@ var ZodObject = /* @__PURE__ */ $constructor(
5719
5984
  return _enum(Object.keys(this._zod.def.shape))
5720
5985
  },
5721
5986
  catchall(catchall) {
5722
- return this.clone({ ...this._zod.def, catchall })
5987
+ return this.clone(mergeDefs(this._zod.def, { catchall }))
5723
5988
  },
5724
5989
  passthrough() {
5725
- return this.clone({ ...this._zod.def, catchall: unknown() })
5990
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }))
5726
5991
  },
5727
5992
  loose() {
5728
- return this.clone({ ...this._zod.def, catchall: unknown() })
5993
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }))
5729
5994
  },
5730
5995
  strict() {
5731
- return this.clone({ ...this._zod.def, catchall: never() })
5996
+ return this.clone(mergeDefs(this._zod.def, { catchall: never() }))
5732
5997
  },
5733
5998
  strip() {
5734
- return this.clone({ ...this._zod.def, catchall: undefined })
5999
+ return this.clone(mergeDefs(this._zod.def, { catchall: undefined }))
5735
6000
  },
5736
6001
  extend(incoming) {
5737
6002
  return extend(this, incoming)
@@ -5818,7 +6083,7 @@ var ZodEnum = /* @__PURE__ */ $constructor('ZodEnum', (inst, def) => {
5818
6083
  inst._zod.processJSONSchema = (ctx, json, params) =>
5819
6084
  enumProcessor(inst, ctx, json, params)
5820
6085
  inst.enum = def.entries
5821
- inst.options = Object.values(def.entries)
6086
+ inst.options = [...inst._zod.values]
5822
6087
  const keys = new Set(Object.keys(def.entries))
5823
6088
  inst.extract = (values, params) => {
5824
6089
  const newEntries = {}
@@ -6074,7 +6339,7 @@ function refine(fn, _params = {}) {
6074
6339
  function superRefine(fn, params) {
6075
6340
  return _superRefine(fn, params)
6076
6341
  }
6077
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/iso.js
6342
+ // node_modules/.bun/zod@4.6.0/node_modules/zod/v4/classic/iso.js
6078
6343
  var exports_iso = {}
6079
6344
  __export(exports_iso, {
6080
6345
  ZodISODate: () => ZodISODate,