@fro.bot/systematic 3.18.0 → 3.18.2

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.1/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.1/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.1/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.1/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.1/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.1/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.1/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.1/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: 1,
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.1/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
  }
@@ -2708,6 +2744,26 @@ var $ZodUnion = /* @__PURE__ */ $constructor('$ZodUnion', (inst, def) => {
2708
2744
  })
2709
2745
  }
2710
2746
  })
2747
+ function discriminatorMap(def) {
2748
+ const map = new Map()
2749
+ for (const option of def.options) {
2750
+ const values = option._zod.propValues?.[def.discriminator]
2751
+ if (!values || values.size === 0)
2752
+ throw new Error(
2753
+ `Invalid discriminated union option at index "${def.options.indexOf(option)}"`,
2754
+ )
2755
+ for (const value of values) {
2756
+ if (map.has(value)) {
2757
+ if (value !== undefined)
2758
+ throw new Error(`Duplicate discriminator value "${String(value)}"`)
2759
+ map.set(value, null)
2760
+ } else {
2761
+ map.set(value, option)
2762
+ }
2763
+ }
2764
+ }
2765
+ return map
2766
+ }
2711
2767
  var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2712
2768
  '$ZodDiscriminatedUnion',
2713
2769
  (inst, def) => {
@@ -2716,12 +2772,14 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2716
2772
  const _super = inst._zod.parse
2717
2773
  defineLazyInternal(inst, 'propValues', (zod) => {
2718
2774
  const propValues = {}
2775
+ let undefinedCount = 0
2719
2776
  for (const option of zod.def.options) {
2720
2777
  const pv = option._zod.propValues
2721
2778
  if (!pv || Object.keys(pv).length === 0)
2722
2779
  throw new Error(
2723
2780
  `Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`,
2724
2781
  )
2782
+ if (pv[zod.def.discriminator]?.has(undefined)) undefinedCount++
2725
2783
  for (const [k, v] of Object.entries(pv)) {
2726
2784
  if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
2727
2785
  assignProp(propValues, k, new Set())
@@ -2731,10 +2789,12 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2731
2789
  }
2732
2790
  }
2733
2791
  }
2792
+ if (!zod.def.unionFallback && undefinedCount > 1)
2793
+ propValues[zod.def.discriminator]?.delete(undefined)
2734
2794
  return propValues
2735
2795
  })
2736
2796
  def.options.forEach((option, i) => {
2737
- const propShape = propShapes.get(option._zod.def)
2797
+ const propShape = rawShape(option._zod.def)
2738
2798
  if (
2739
2799
  propShape &&
2740
2800
  !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)
@@ -2742,24 +2802,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2742
2802
  throw new Error(`Invalid discriminated union option at index "${i}"`)
2743
2803
  }
2744
2804
  })
2745
- const disc = cached(() => {
2746
- const opts = def.options
2747
- const map = new Map()
2748
- for (const o of opts) {
2749
- const values = o._zod.propValues?.[def.discriminator]
2750
- if (!values || values.size === 0)
2751
- throw new Error(
2752
- `Invalid discriminated union option at index "${def.options.indexOf(o)}"`,
2753
- )
2754
- for (const v of values) {
2755
- if (map.has(v)) {
2756
- throw new Error(`Duplicate discriminator value "${String(v)}"`)
2757
- }
2758
- map.set(v, o)
2759
- }
2760
- }
2761
- return map
2762
- })
2805
+ const disc = cached(() => discriminatorMap(def))
2763
2806
  inst._zod.parse = (payload, ctx) => {
2764
2807
  const input = payload.value
2765
2808
  if (!isObject(input)) {
@@ -2771,8 +2814,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2771
2814
  })
2772
2815
  return payload
2773
2816
  }
2774
- const opt = disc.value.get(input?.[def.discriminator])
2775
- if (opt) {
2817
+ const value = input?.[def.discriminator]
2818
+ const opt = disc.value.get(value)
2819
+ if (opt && (value !== undefined || ctx.direction !== 'backward')) {
2776
2820
  return opt._zod.run(payload, ctx)
2777
2821
  }
2778
2822
  if (def.unionFallback || ctx.direction === 'backward') {
@@ -2783,7 +2827,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor(
2783
2827
  errors: [],
2784
2828
  note: 'No matching discriminator',
2785
2829
  discriminator: def.discriminator,
2786
- options: Array.from(disc.value.keys()),
2830
+ options: Array.from(disc.value.keys()).filter(
2831
+ (value) => disc.value.get(value) !== null,
2832
+ ),
2787
2833
  input,
2788
2834
  path: [def.discriminator],
2789
2835
  inst,
@@ -2917,12 +2963,16 @@ var $ZodEnum = /* @__PURE__ */ $constructor('$ZodEnum', (inst, def) => {
2917
2963
  const values = getEnumValues(def.entries)
2918
2964
  const valuesSet = new Set(values)
2919
2965
  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
- )
2966
+ defineLazyInternal(inst, 'pattern', (zod) => {
2967
+ const patternValues = getEnumValues(zod.def.entries).filter((k) =>
2968
+ propertyKeyTypes.has(typeof k),
2969
+ )
2970
+ return new RegExp(
2971
+ patternValues.length
2972
+ ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join('|')})$`
2973
+ : '^[^\\s\\S]$',
2974
+ )
2975
+ })
2926
2976
  inst._zod.parse = (payload, _ctx) => {
2927
2977
  const input = payload.value
2928
2978
  if (valuesSet.has(input)) {
@@ -2941,11 +2991,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor('$ZodLiteral', (inst, def) => {
2941
2991
  $ZodType.init(inst, def)
2942
2992
  const values = new Set(def.values)
2943
2993
  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
- )
2994
+ defineLazyInternal(inst, 'pattern', (zod) => {
2995
+ const vals = zod.def.values
2996
+ return new RegExp(
2997
+ vals.length
2998
+ ? `^(${vals.map((o) => (typeof o === 'string' ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o))).join('|')})$`
2999
+ : '^[^\\s\\S]$',
3000
+ )
3001
+ })
2949
3002
  inst._zod.parse = (payload, _ctx) => {
2950
3003
  const input = payload.value
2951
3004
  if (values.has(input)) {
@@ -3239,7 +3292,85 @@ function handleRefineResult(result, payload, input, inst) {
3239
3292
  payload.issues.push(issue(_iss))
3240
3293
  }
3241
3294
  }
3242
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
3295
+ function handlePropertiesResult(result, payload, key) {
3296
+ if (result.issues.length) {
3297
+ payload.issues.push(...prefixIssues(key, result.issues))
3298
+ }
3299
+ }
3300
+ var $ZodProperties = /* @__PURE__ */ $constructor(
3301
+ '$ZodProperties',
3302
+ (inst, def) => {
3303
+ $ZodType.init(inst, def)
3304
+ $ZodCheck.init(inst, def)
3305
+ const memo = globalConfig.memoizer
3306
+ memo?.attach(inst)
3307
+ let entries
3308
+ const runShape = (payload, ctx) => {
3309
+ entries ??
3310
+ (entries = Reflect.ownKeys(def.shape).map((key) => [
3311
+ key,
3312
+ def.shape[key],
3313
+ ]))
3314
+ const input = payload.value
3315
+ let proms
3316
+ for (const [key, schema] of entries) {
3317
+ const result = schema._zod.run({ value: input[key], issues: [] }, ctx)
3318
+ if (result instanceof Promise) {
3319
+ proms ?? (proms = [])
3320
+ proms.push(
3321
+ result.then((result) =>
3322
+ handlePropertiesResult(result, payload, key),
3323
+ ),
3324
+ )
3325
+ } else {
3326
+ handlePropertiesResult(result, payload, key)
3327
+ }
3328
+ }
3329
+ if (proms)
3330
+ return Promise.all(proms).then(() => {
3331
+ return
3332
+ })
3333
+ return
3334
+ }
3335
+ inst._zod.parse = (payload, ctx) => {
3336
+ const input = payload.value
3337
+ if (
3338
+ input === null ||
3339
+ (typeof input !== 'object' && typeof input !== 'function')
3340
+ ) {
3341
+ payload.issues.push({
3342
+ expected: 'object',
3343
+ code: 'invalid_type',
3344
+ input,
3345
+ inst,
3346
+ })
3347
+ return payload
3348
+ }
3349
+ if (ctx.direction === 'backward') ctx = { ...ctx, direction: 'forward' }
3350
+ if (memo) memo.alloc(inst, payload, input, ctx)
3351
+ const result = runShape(payload, ctx)
3352
+ return result instanceof Promise ? result.then(() => payload) : payload
3353
+ }
3354
+ inst._zod.check = (payload) => {
3355
+ if (payload.value == null) {
3356
+ payload.issues.push({
3357
+ expected: 'object',
3358
+ code: 'invalid_type',
3359
+ input: payload.value,
3360
+ inst,
3361
+ })
3362
+ return
3363
+ }
3364
+ return runShape(payload, {})
3365
+ }
3366
+ },
3367
+ {
3368
+ *[Symbol.iterator]() {
3369
+ yield this
3370
+ },
3371
+ },
3372
+ )
3373
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/core/memoizer.js
3243
3374
  class $ZodCyclicError extends Error {
3244
3375
  constructor() {
3245
3376
  super(`Cannot parse a reference cycle that closes through a transform`)
@@ -3248,29 +3379,61 @@ class $ZodCyclicError extends Error {
3248
3379
  }
3249
3380
  var STATE = '~memo'
3250
3381
  var NO_ISSUES = []
3382
+ function isRef(value) {
3383
+ return (
3384
+ value !== null && (typeof value === 'object' || typeof value === 'function')
3385
+ )
3386
+ }
3251
3387
  function cloneIssues(issues) {
3252
3388
  return issues.map((iss) =>
3253
3389
  iss.path ? { ...iss, path: iss.path.slice() } : { ...iss },
3254
3390
  )
3255
3391
  }
3256
3392
  var recursive = /* @__PURE__ */ new WeakMap()
3257
- function isRecursive(inst, stack) {
3393
+ var NONE = 0
3394
+ var ASSUMED = 1
3395
+ var PROVEN = 2
3396
+ function isRecursive(inst, stack, resolve) {
3258
3397
  const cached = recursive.get(inst)
3259
- if (cached !== undefined) return cached
3260
- if (stack.has(inst)) return true
3398
+ if (cached !== undefined) return cached ? PROVEN : NONE
3399
+ if (stack.has(inst)) return PROVEN
3261
3400
  stack.add(inst)
3262
- let result = false
3401
+ let result = NONE
3263
3402
  const check = (child) => {
3264
- if (!result && child?._zod && isRecursive(child, stack)) result = true
3403
+ if (result !== PROVEN && child?._zod) {
3404
+ const answer = isRecursive(child, stack, resolve)
3405
+ if (answer > result) result = answer
3406
+ }
3407
+ }
3408
+ const shape = (sh, spread) => {
3409
+ let answer = NONE
3410
+ for (const key of Reflect.ownKeys(sh)) {
3411
+ const desc = Object.getOwnPropertyDescriptor(sh, key)
3412
+ if (spread && !desc.enumerable) continue
3413
+ const child = desc.get
3414
+ ? ASSUMED
3415
+ : desc.value?._zod
3416
+ ? isRecursive(desc.value, stack, resolve)
3417
+ : NONE
3418
+ if (child > answer) answer = child
3419
+ }
3420
+ return answer
3421
+ }
3422
+ const merge = (answer) => {
3423
+ if (answer > result) result = answer
3265
3424
  }
3266
3425
  const def = inst._zod.def
3267
3426
  const kind = def.type
3268
3427
  switch (kind) {
3269
3428
  case 'object': {
3270
- for (const key of Reflect.ownKeys(def.shape)) check(def.shape[key])
3429
+ const raw = rawShape(def)
3430
+ merge(raw ? shape(raw, true) : ASSUMED)
3271
3431
  check(def.catchall)
3272
3432
  break
3273
3433
  }
3434
+ case 'properties':
3435
+ merge(shape(def.shape, false))
3436
+ break
3274
3437
  case 'array':
3275
3438
  check(def.element)
3276
3439
  break
@@ -3312,9 +3475,12 @@ function isRecursive(inst, stack) {
3312
3475
  check(def.input)
3313
3476
  check(def.output)
3314
3477
  break
3315
- case 'lazy':
3316
- check(inst._zod.innerType)
3478
+ case 'lazy': {
3479
+ const inner =
3480
+ def._cachedInner ?? (resolve ? inst._zod.innerType : undefined)
3481
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED)
3317
3482
  break
3483
+ }
3318
3484
  case 'template_literal':
3319
3485
  case 'string':
3320
3486
  case 'number':
@@ -3348,13 +3514,16 @@ function isRecursive(inst, stack) {
3348
3514
  }
3349
3515
  }
3350
3516
  stack.delete(inst)
3351
- recursive.set(inst, result)
3352
- return result
3517
+ return settle(inst, result)
3518
+ }
3519
+ function settle(inst, answer) {
3520
+ if (answer !== ASSUMED) recursive.set(inst, answer === PROVEN)
3521
+ return answer
3353
3522
  }
3354
3523
  function bucketFor(state, inst) {
3355
3524
  let bucket = state.buckets.get(inst)
3356
3525
  if (!bucket) {
3357
- bucket = new Map()
3526
+ bucket = new WeakMap()
3358
3527
  state.buckets.set(inst, bucket)
3359
3528
  }
3360
3529
  return bucket
@@ -3388,6 +3557,7 @@ var memo = {
3388
3557
  attach(inst) {
3389
3558
  var _a
3390
3559
  let isRecursiveInst
3560
+ let rechecked = false
3391
3561
  let lastCtx
3392
3562
  let lastBucket
3393
3563
  ;(_a = inst._zod).deferred ?? (_a.deferred = [])
@@ -3395,19 +3565,20 @@ var memo = {
3395
3565
  const base = inst._zod.parse
3396
3566
  const wrapped = (payload, ctx) => {
3397
3567
  if (isRecursiveInst === undefined) {
3398
- isRecursiveInst = isRecursive(inst, new Set())
3399
- if (!isRecursiveInst) {
3568
+ const walked = isRecursive(inst, new Set(), false)
3569
+ if (walked === NONE) {
3400
3570
  inst._zod.parse = base
3401
3571
  if (inst._zod.run === wrapped) inst._zod.run = base
3402
3572
  return base(payload, ctx)
3403
3573
  }
3574
+ if (walked === PROVEN || rechecked) isRecursiveInst = true
3575
+ else rechecked = true
3404
3576
  }
3405
3577
  const input = payload.value
3406
- if (input === null || typeof input !== 'object')
3407
- return base(payload, ctx)
3578
+ if (!isRef(input)) return base(payload, ctx)
3408
3579
  let state = ctx[STATE]
3409
3580
  if (!state) {
3410
- state = { buckets: new Map(), backEdges: undefined }
3581
+ state = { buckets: new WeakMap(), backEdges: undefined }
3411
3582
  ctx[STATE] = state
3412
3583
  }
3413
3584
  let bucket
@@ -3426,7 +3597,7 @@ var memo = {
3426
3597
  payload.issues.push(...cloneIssues(hit.issues))
3427
3598
  } else {
3428
3599
  payload.memo = true
3429
- state.backEdges ?? (state.backEdges = new Set())
3600
+ state.backEdges ?? (state.backEdges = new WeakSet())
3430
3601
  state.backEdges.add(hit.value)
3431
3602
  }
3432
3603
  return payload
@@ -3459,14 +3630,9 @@ function memoizer() {
3459
3630
  }
3460
3631
  function isBackEdge(ctx, value) {
3461
3632
  const backEdges = ctx[STATE]?.backEdges
3462
- return (
3463
- backEdges !== undefined &&
3464
- value !== null &&
3465
- typeof value === 'object' &&
3466
- backEdges.has(value)
3467
- )
3633
+ return backEdges !== undefined && isRef(value) && backEdges.has(value)
3468
3634
  }
3469
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
3635
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/locales/en.js
3470
3636
  var error = () => {
3471
3637
  const Sizable = {
3472
3638
  string: { unit: 'characters', verb: 'to have' },
@@ -3507,6 +3673,7 @@ var error = () => {
3507
3673
  json_string: 'JSON string',
3508
3674
  e164: 'E.164 number',
3509
3675
  credit_card: 'credit card number',
3676
+ iban: 'IBAN',
3510
3677
  jwt: 'JWT',
3511
3678
  template_literal: 'input',
3512
3679
  }
@@ -3594,7 +3761,7 @@ function en_default() {
3594
3761
  localeError: error(),
3595
3762
  }
3596
3763
  }
3597
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
3764
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/core/registries.js
3598
3765
  var _a2
3599
3766
  class $ZodRegistry {
3600
3767
  constructor() {
@@ -3642,7 +3809,7 @@ function registry() {
3642
3809
  ;(_a2 = globalThis).__zod_globalRegistry ??
3643
3810
  (_a2.__zod_globalRegistry = registry())
3644
3811
  var globalRegistry = globalThis.__zod_globalRegistry
3645
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
3812
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/core/api.js
3646
3813
  function _string(Class, params) {
3647
3814
  return new Class({
3648
3815
  type: 'string',
@@ -4090,7 +4257,7 @@ function _check(fn, params) {
4090
4257
  ch._zod.check = fn
4091
4258
  return ch
4092
4259
  }
4093
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
4260
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/core/to-json-schema.js
4094
4261
  function assignProps(target, ...sources) {
4095
4262
  for (const source of sources) {
4096
4263
  for (const key of Reflect.ownKeys(source)) {
@@ -4133,7 +4300,7 @@ function handleUnrepresentable(schema, ctx, json, params, message) {
4133
4300
  Object.assign(json, result)
4134
4301
  return true
4135
4302
  }
4136
- function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
4303
+ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
4137
4304
  var _a
4138
4305
  const def = schema._zod.def
4139
4306
  const seen = ctx.seen.get(schema)
@@ -4173,7 +4340,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
4173
4340
  const parent = schema._zod.parent
4174
4341
  if (parent) {
4175
4342
  if (!result.ref) result.ref = parent
4176
- process2(parent, ctx, params)
4343
+ processSchema(parent, ctx, params)
4177
4344
  ctx.seen.get(parent).isParent = true
4178
4345
  }
4179
4346
  }
@@ -4284,7 +4451,6 @@ function extractDefs(ctx, schema) {
4284
4451
  if (seen.count > 1) {
4285
4452
  if (ctx.reused === 'ref') {
4286
4453
  extractToDef(entry)
4287
- continue
4288
4454
  }
4289
4455
  }
4290
4456
  }
@@ -4628,7 +4794,7 @@ var createToJSONSchemaMethod =
4628
4794
  (schema, processors = {}) =>
4629
4795
  (params) => {
4630
4796
  const ctx = initializeContext({ ...params, processors })
4631
- process2(schema, ctx)
4797
+ processSchema(schema, ctx)
4632
4798
  extractDefs(ctx, schema)
4633
4799
  return finalize(ctx, schema)
4634
4800
  }
@@ -4642,11 +4808,90 @@ var createStandardJSONSchemaMethod =
4642
4808
  io,
4643
4809
  processors,
4644
4810
  })
4645
- process2(schema, ctx)
4811
+ processSchema(schema, ctx)
4646
4812
  extractDefs(ctx, schema)
4647
4813
  return finalize(ctx, schema)
4648
4814
  }
4649
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js
4815
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/core/json-schema-processors.js
4816
+ var narrowMin = (agg, key, value) => {
4817
+ if (agg[key] === undefined || value > agg[key]) agg[key] = value
4818
+ }
4819
+ var narrowMax = (agg, key, value) => {
4820
+ if (agg[key] === undefined || value < agg[key]) agg[key] = value
4821
+ }
4822
+ var narrowBoth = (agg, value) => {
4823
+ narrowMin(agg, 'minimum', value)
4824
+ narrowMax(agg, 'maximum', value)
4825
+ }
4826
+ var addDivisor = (agg, value) => {
4827
+ agg.multipleOf ?? (agg.multipleOf = [])
4828
+ if (!agg.multipleOf.includes(value)) agg.multipleOf.push(value)
4829
+ }
4830
+ var addPattern = (agg, pattern) => {
4831
+ agg.patterns ?? (agg.patterns = new Set())
4832
+ agg.patterns.add(pattern)
4833
+ }
4834
+ var intersectMime = (agg, mime) => {
4835
+ agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime]
4836
+ }
4837
+ var setFormat = (agg, format) => {
4838
+ agg.format = format
4839
+ if (format.includes('int')) agg.isInt = true
4840
+ }
4841
+ var minContributor = (agg, def) => narrowMin(agg, 'minimum', def.minimum)
4842
+ var maxContributor = (agg, def) => narrowMax(agg, 'maximum', def.maximum)
4843
+ var formatContributor = (ranges) => (agg, def) => {
4844
+ setFormat(agg, def.format)
4845
+ const [minimum, maximum] = ranges[def.format]
4846
+ narrowMin(agg, 'minimum', minimum)
4847
+ narrowMax(agg, 'maximum', maximum)
4848
+ }
4849
+ var contributors = {
4850
+ greater_than: (agg, def) =>
4851
+ narrowMin(agg, def.inclusive ? 'minimum' : 'exclusiveMinimum', def.value),
4852
+ less_than: (agg, def) =>
4853
+ narrowMax(agg, def.inclusive ? 'maximum' : 'exclusiveMaximum', def.value),
4854
+ multiple_of: (agg, def) => addDivisor(agg, def.value),
4855
+ number_format: formatContributor(NUMBER_FORMAT_RANGES),
4856
+ bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
4857
+ min_length: minContributor,
4858
+ max_length: maxContributor,
4859
+ length_equals: (agg, def) => narrowBoth(agg, def.length),
4860
+ min_size: minContributor,
4861
+ max_size: maxContributor,
4862
+ size_equals: (agg, def) => narrowBoth(agg, def.size),
4863
+ string_format: (agg, def) => {
4864
+ setFormat(agg, def.format)
4865
+ if (def.pattern) addPattern(agg, def.pattern)
4866
+ if (def.format === 'base64' || def.format === 'base64url')
4867
+ agg.contentEncoding = def.format
4868
+ if (def.local || def.precision === -1) agg.laxFormat = true
4869
+ },
4870
+ mime_type: (agg, def) => intersectMime(agg, def.mime),
4871
+ }
4872
+ function aggregateChecks(schema) {
4873
+ const agg = {}
4874
+ const def = schema._zod.def
4875
+ const list = schema._zod.traits.has('$ZodCheck')
4876
+ ? [schema, ...(def.checks ?? [])]
4877
+ : (def.checks ?? [])
4878
+ for (const ch of list) contributors[ch._zod.def.check]?.(agg, ch._zod.def)
4879
+ const bag = schema._zod.bag
4880
+ if (bag.minimum !== undefined) narrowMin(agg, 'minimum', bag.minimum)
4881
+ if (bag.exclusiveMinimum !== undefined)
4882
+ narrowMin(agg, 'exclusiveMinimum', bag.exclusiveMinimum)
4883
+ if (bag.maximum !== undefined) narrowMax(agg, 'maximum', bag.maximum)
4884
+ if (bag.exclusiveMaximum !== undefined)
4885
+ narrowMax(agg, 'exclusiveMaximum', bag.exclusiveMaximum)
4886
+ if (bag.multipleOf !== undefined) addDivisor(agg, bag.multipleOf)
4887
+ if (bag.format !== undefined) {
4888
+ agg.format ?? (agg.format = bag.format)
4889
+ if (bag.format.includes('int')) agg.isInt = true
4890
+ }
4891
+ if (bag.mime) intersectMime(agg, bag.mime)
4892
+ for (const pattern of bag.patterns ?? []) addPattern(agg, pattern)
4893
+ return agg
4894
+ }
4650
4895
  var formatMap = {
4651
4896
  guid: 'uuid',
4652
4897
  url: 'uri',
@@ -4654,11 +4899,16 @@ var formatMap = {
4654
4899
  json_string: 'json-string',
4655
4900
  regex: '',
4656
4901
  }
4902
+ var exactPatterns = new Map([
4903
+ [base64Charset, base64],
4904
+ [base64urlCharset, base64url],
4905
+ ])
4906
+ var exactPattern = (p) => exactPatterns.get(p) ?? p
4657
4907
  var stringProcessor = (schema, ctx, _json, _params) => {
4658
4908
  const json = _json
4659
4909
  json.type = 'string'
4660
4910
  const { minimum, maximum, format, patterns, contentEncoding, laxFormat } =
4661
- schema._zod.bag
4911
+ aggregateChecks(schema)
4662
4912
  if (typeof minimum === 'number') json.minLength = minimum
4663
4913
  if (typeof maximum === 'number') json.maxLength = maximum
4664
4914
  if (format) {
@@ -4670,7 +4920,7 @@ var stringProcessor = (schema, ctx, _json, _params) => {
4670
4920
  }
4671
4921
  if (contentEncoding) json.contentEncoding = contentEncoding
4672
4922
  if (patterns && patterns.size > 0) {
4673
- const patternList = [...patterns]
4923
+ const patternList = [...patterns].map(exactPattern)
4674
4924
  if (patternList.length === 1) json.pattern = patternList[0].source
4675
4925
  else if (patternList.length > 1) {
4676
4926
  json.allOf = [
@@ -4691,14 +4941,12 @@ var numberProcessor = (schema, ctx, _json, params) => {
4691
4941
  const {
4692
4942
  minimum,
4693
4943
  maximum,
4694
- format,
4695
4944
  multipleOf,
4696
4945
  exclusiveMaximum,
4697
4946
  exclusiveMinimum,
4698
- } = schema._zod.bag
4699
- if (typeof format === 'string' && format.includes('int'))
4700
- json.type = 'integer'
4701
- else json.type = 'number'
4947
+ isInt,
4948
+ } = aggregateChecks(schema)
4949
+ json.type = isInt ? 'integer' : 'number'
4702
4950
  const exMin =
4703
4951
  typeof exclusiveMinimum === 'number' &&
4704
4952
  exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY)
@@ -4726,17 +4974,27 @@ var numberProcessor = (schema, ctx, _json, params) => {
4726
4974
  } else if (typeof maximum === 'number') {
4727
4975
  json.maximum = maximum
4728
4976
  }
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
- )
4977
+ if (multipleOf) {
4978
+ const divisors = new Set()
4979
+ for (const divisor of multipleOf) {
4980
+ if (Number.isFinite(divisor) && divisor !== 0)
4981
+ divisors.add(Math.abs(divisor))
4982
+ else
4983
+ handleUnrepresentable(
4984
+ schema,
4985
+ ctx,
4986
+ json,
4987
+ params,
4988
+ `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`,
4989
+ )
4990
+ }
4991
+ const [first, ...rest] = divisors
4992
+ if (first !== undefined) json.multipleOf = first
4993
+ if (rest.length)
4994
+ json.allOf = [
4995
+ ...(json.allOf ?? []),
4996
+ ...rest.map((m) => ({ multipleOf: m })),
4997
+ ]
4740
4998
  }
4741
4999
  }
4742
5000
  var booleanProcessor = (_schema, _ctx, json, _params) => {
@@ -4830,11 +5088,11 @@ var transformProcessor = (schema, ctx, json, params) => {
4830
5088
  var arrayProcessor = (schema, ctx, _json, params) => {
4831
5089
  const json = _json
4832
5090
  const def = schema._zod.def
4833
- const { minimum, maximum } = schema._zod.bag
5091
+ const { minimum, maximum } = aggregateChecks(schema)
4834
5092
  if (typeof minimum === 'number') json.minItems = minimum
4835
5093
  if (typeof maximum === 'number') json.maxItems = maximum
4836
5094
  json.type = 'array'
4837
- json.items = process2(def.element, ctx, {
5095
+ json.items = processSchema(def.element, ctx, {
4838
5096
  ...params,
4839
5097
  path: [...params.path, 'items'],
4840
5098
  })
@@ -4872,7 +5130,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
4872
5130
  assignProp(
4873
5131
  json.properties,
4874
5132
  key,
4875
- process2(shape[key], ctx, {
5133
+ processSchema(shape[key], ctx, {
4876
5134
  ...params,
4877
5135
  path: [...params.path, 'properties', key],
4878
5136
  }),
@@ -4897,7 +5155,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
4897
5155
  } else if (!def.catchall) {
4898
5156
  if (ctx.io === 'output') json.additionalProperties = false
4899
5157
  } else if (def.catchall) {
4900
- json.additionalProperties = process2(def.catchall, ctx, {
5158
+ json.additionalProperties = processSchema(def.catchall, ctx, {
4901
5159
  ...params,
4902
5160
  path: [...params.path, 'additionalProperties'],
4903
5161
  })
@@ -4907,7 +5165,7 @@ var unionProcessor = (schema, ctx, json, params) => {
4907
5165
  const def = schema._zod.def
4908
5166
  const isExclusive = def.inclusive === false
4909
5167
  const options = def.options.map((x, i) =>
4910
- process2(x, ctx, {
5168
+ processSchema(x, ctx, {
4911
5169
  ...params,
4912
5170
  path: [...params.path, isExclusive ? 'oneOf' : 'anyOf', i],
4913
5171
  }),
@@ -4920,11 +5178,11 @@ var unionProcessor = (schema, ctx, json, params) => {
4920
5178
  }
4921
5179
  var intersectionProcessor = (schema, ctx, json, params) => {
4922
5180
  const def = schema._zod.def
4923
- const a = process2(def.left, ctx, {
5181
+ const a = processSchema(def.left, ctx, {
4924
5182
  ...params,
4925
5183
  path: [...params.path, 'allOf', 0],
4926
5184
  })
4927
- const b = process2(def.right, ctx, {
5185
+ const b = processSchema(def.right, ctx, {
4928
5186
  ...params,
4929
5187
  path: [...params.path, 'allOf', 1],
4930
5188
  })
@@ -4940,7 +5198,7 @@ var intersectionProcessor = (schema, ctx, json, params) => {
4940
5198
  var pendingRecords = new WeakMap()
4941
5199
  var nullableProcessor = (schema, ctx, json, params) => {
4942
5200
  const def = schema._zod.def
4943
- const inner = process2(def.innerType, ctx, params)
5201
+ const inner = processSchema(def.innerType, ctx, params)
4944
5202
  const seen = ctx.seen.get(schema)
4945
5203
  if (ctx.target === 'openapi-3.0') {
4946
5204
  seen.ref = def.innerType
@@ -4951,7 +5209,7 @@ var nullableProcessor = (schema, ctx, json, params) => {
4951
5209
  }
4952
5210
  var nonoptionalProcessor = (schema, ctx, _json, params) => {
4953
5211
  const def = schema._zod.def
4954
- process2(def.innerType, ctx, params)
5212
+ processSchema(def.innerType, ctx, params)
4955
5213
  const seen = ctx.seen.get(schema)
4956
5214
  seen.ref = def.innerType
4957
5215
  }
@@ -4975,7 +5233,7 @@ function serializeDefaultValue(value, schema, ctx, json, params) {
4975
5233
  }
4976
5234
  var defaultProcessor = (schema, ctx, json, params) => {
4977
5235
  const def = schema._zod.def
4978
- process2(def.innerType, ctx, params)
5236
+ processSchema(def.innerType, ctx, params)
4979
5237
  const seen = ctx.seen.get(schema)
4980
5238
  seen.ref = def.innerType
4981
5239
  const value = serializeDefaultValue(
@@ -4989,7 +5247,7 @@ var defaultProcessor = (schema, ctx, json, params) => {
4989
5247
  }
4990
5248
  var prefaultProcessor = (schema, ctx, json, params) => {
4991
5249
  const def = schema._zod.def
4992
- process2(def.innerType, ctx, params)
5250
+ processSchema(def.innerType, ctx, params)
4993
5251
  const seen = ctx.seen.get(schema)
4994
5252
  seen.ref = def.innerType
4995
5253
  if (ctx.io !== 'input') return
@@ -5004,7 +5262,7 @@ var prefaultProcessor = (schema, ctx, json, params) => {
5004
5262
  }
5005
5263
  var catchProcessor = (schema, ctx, json, params) => {
5006
5264
  const def = schema._zod.def
5007
- process2(def.innerType, ctx, params)
5265
+ processSchema(def.innerType, ctx, params)
5008
5266
  const seen = ctx.seen.get(schema)
5009
5267
  seen.ref = def.innerType
5010
5268
  let catchValue
@@ -5027,24 +5285,24 @@ var pipeProcessor = (schema, ctx, _json, params) => {
5027
5285
  const inIsTransform = def.in._zod.traits.has('$ZodTransform')
5028
5286
  const innerType =
5029
5287
  ctx.io === 'input' ? (inIsTransform ? def.out : def.in) : def.out
5030
- process2(innerType, ctx, params)
5288
+ processSchema(innerType, ctx, params)
5031
5289
  const seen = ctx.seen.get(schema)
5032
5290
  seen.ref = innerType
5033
5291
  }
5034
5292
  var readonlyProcessor = (schema, ctx, json, params) => {
5035
5293
  const def = schema._zod.def
5036
- process2(def.innerType, ctx, params)
5294
+ processSchema(def.innerType, ctx, params)
5037
5295
  const seen = ctx.seen.get(schema)
5038
5296
  seen.ref = def.innerType
5039
5297
  json.readOnly = true
5040
5298
  }
5041
5299
  var optionalProcessor = (schema, ctx, _json, params) => {
5042
5300
  const def = schema._zod.def
5043
- process2(def.innerType, ctx, params)
5301
+ processSchema(def.innerType, ctx, params)
5044
5302
  const seen = ctx.seen.get(schema)
5045
5303
  seen.ref = def.innerType
5046
5304
  }
5047
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
5305
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/classic/errors.js
5048
5306
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([
5049
5307
  Object.prototype,
5050
5308
  Error.prototype,
@@ -5108,11 +5366,11 @@ var ZodRealError = /* @__PURE__ */ $constructor(
5108
5366
  },
5109
5367
  )
5110
5368
 
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)
5369
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/classic/parse.js
5370
+ var parse2 = /* @__PURE__ */ _parse(ZodRealError)
5371
+ var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError)
5372
+ var safeParse = /* @__PURE__ */ _safeParse(ZodRealError)
5373
+ var safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError)
5116
5374
  var encode = /* @__PURE__ */ _encode(ZodRealError)
5117
5375
  var decode = /* @__PURE__ */ _decode(ZodRealError)
5118
5376
  var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError)
@@ -5122,7 +5380,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError)
5122
5380
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError)
5123
5381
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError)
5124
5382
 
5125
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
5383
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/classic/schemas.js
5126
5384
  function _ensureDefaultLocale() {
5127
5385
  if (!globalConfig.localeError) config(en_default())
5128
5386
  }
@@ -5254,16 +5512,16 @@ var ZodType = /* @__PURE__ */ $constructor(
5254
5512
  own(this, '~standard', value)
5255
5513
  },
5256
5514
  parse: function _parse(data, params) {
5257
- return parse3(this, data, params, { callee: _parse })
5515
+ return parse2(this, data, params, { callee: _parse })
5258
5516
  },
5259
5517
  parseAsync: async function _parseAsync(data, params) {
5260
- return await parseAsync2(this, data, params, { callee: _parseAsync })
5518
+ return await parseAsync(this, data, params, { callee: _parseAsync })
5261
5519
  },
5262
5520
  safeParse(data, params) {
5263
- return safeParse2(this, data, params)
5521
+ return safeParse(this, data, params)
5264
5522
  },
5265
5523
  async safeParseAsync(data, params) {
5266
- return safeParseAsync2(this, data, params)
5524
+ return safeParseAsync(this, data, params)
5267
5525
  },
5268
5526
  get spa() {
5269
5527
  return this?.safeParseAsync
@@ -5271,6 +5529,12 @@ var ZodType = /* @__PURE__ */ $constructor(
5271
5529
  set spa(value) {
5272
5530
  own(this, 'spa', value)
5273
5531
  },
5532
+ validate(data, params) {
5533
+ return validate(this, data, params)
5534
+ },
5535
+ validateAsync(data, params) {
5536
+ return validateAsync(this, data, params)
5537
+ },
5274
5538
  encode: function _encode(data, params) {
5275
5539
  return encode(this, data, params, { callee: _encode })
5276
5540
  },
@@ -5313,58 +5577,61 @@ var _ZodString = /* @__PURE__ */ $constructor(
5313
5577
  ZodType.init(inst, def)
5314
5578
  inst._zod.processJSONSchema = (ctx, json, params) =>
5315
5579
  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
5580
  },
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())
5581
+ /* @__PURE__ */ derived(
5582
+ {
5583
+ format: (inst) => aggregateChecks(inst).format ?? null,
5584
+ minLength: (inst) => aggregateChecks(inst).minimum ?? null,
5585
+ maxLength: (inst) => aggregateChecks(inst).maximum ?? null,
5586
+ },
5587
+ {
5588
+ regex(...args) {
5589
+ return this.check(_regex(...args))
5590
+ },
5591
+ includes(...args) {
5592
+ return this.check(_includes(...args))
5593
+ },
5594
+ startsWith(...args) {
5595
+ return this.check(_startsWith(...args))
5596
+ },
5597
+ endsWith(...args) {
5598
+ return this.check(_endsWith(...args))
5599
+ },
5600
+ min(...args) {
5601
+ return this.check(_minLength(...args))
5602
+ },
5603
+ max(...args) {
5604
+ return this.check(_maxLength(...args))
5605
+ },
5606
+ length(...args) {
5607
+ return this.check(_length(...args))
5608
+ },
5609
+ nonempty(...args) {
5610
+ return this.check(_minLength(1, ...args))
5611
+ },
5612
+ lowercase(params) {
5613
+ return this.check(_lowercase(params))
5614
+ },
5615
+ uppercase(params) {
5616
+ return this.check(_uppercase(params))
5617
+ },
5618
+ trim() {
5619
+ return this.check(_trim())
5620
+ },
5621
+ normalize(...args) {
5622
+ return this.check(_normalize(...args))
5623
+ },
5624
+ toLowerCase() {
5625
+ return this.check(_toLowerCase())
5626
+ },
5627
+ toUpperCase() {
5628
+ return this.check(_toUpperCase())
5629
+ },
5630
+ slugify() {
5631
+ return this.check(_slugify())
5632
+ },
5366
5633
  },
5367
- },
5634
+ ),
5368
5635
  )
5369
5636
  var ZodString = /* @__PURE__ */ $constructor(
5370
5637
  'ZodString',
@@ -5568,70 +5835,78 @@ var ZodNumber = /* @__PURE__ */ $constructor(
5568
5835
  ZodType.init(inst, def)
5569
5836
  inst._zod.processJSONSchema = (ctx, json, params) =>
5570
5837
  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
5838
  inst.isFinite = true
5586
- inst.format = bag.format ?? null
5587
5839
  },
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))
5840
+ /* @__PURE__ */ derived(
5841
+ {
5842
+ minValue: (inst) => {
5843
+ const { minimum, exclusiveMinimum } = aggregateChecks(inst)
5844
+ return Math.max(
5845
+ minimum ?? Number.NEGATIVE_INFINITY,
5846
+ exclusiveMinimum ?? Number.NEGATIVE_INFINITY,
5847
+ )
5848
+ },
5849
+ maxValue: (inst) => {
5850
+ const { maximum, exclusiveMaximum } = aggregateChecks(inst)
5851
+ return Math.min(
5852
+ maximum ?? Number.POSITIVE_INFINITY,
5853
+ exclusiveMaximum ?? Number.POSITIVE_INFINITY,
5854
+ )
5855
+ },
5856
+ isInt: (inst) => {
5857
+ const { isInt, multipleOf } = aggregateChecks(inst)
5858
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger)
5859
+ },
5860
+ format: (inst) => aggregateChecks(inst).format ?? null,
5630
5861
  },
5631
- finite() {
5632
- return this
5862
+ {
5863
+ gt(value, params) {
5864
+ return this.check(_gt(value, params))
5865
+ },
5866
+ gte(value, params) {
5867
+ return this.check(_gte(value, params))
5868
+ },
5869
+ min(value, params) {
5870
+ return this.check(_gte(value, params))
5871
+ },
5872
+ lt(value, params) {
5873
+ return this.check(_lt(value, params))
5874
+ },
5875
+ lte(value, params) {
5876
+ return this.check(_lte(value, params))
5877
+ },
5878
+ max(value, params) {
5879
+ return this.check(_lte(value, params))
5880
+ },
5881
+ int(params) {
5882
+ return this.check(int(params))
5883
+ },
5884
+ safe(params) {
5885
+ return this.check(int(params))
5886
+ },
5887
+ positive(params) {
5888
+ return this.check(_gt(0, params))
5889
+ },
5890
+ nonnegative(params) {
5891
+ return this.check(_gte(0, params))
5892
+ },
5893
+ negative(params) {
5894
+ return this.check(_lt(0, params))
5895
+ },
5896
+ nonpositive(params) {
5897
+ return this.check(_lte(0, params))
5898
+ },
5899
+ multipleOf(value, params) {
5900
+ return this.check(_multipleOf(value, params))
5901
+ },
5902
+ step(value, params) {
5903
+ return this.check(_multipleOf(value, params))
5904
+ },
5905
+ finite() {
5906
+ return this
5907
+ },
5633
5908
  },
5634
- },
5909
+ ),
5635
5910
  )
5636
5911
  function number2(params) {
5637
5912
  return _number(ZodNumber, params)
@@ -5719,19 +5994,19 @@ var ZodObject = /* @__PURE__ */ $constructor(
5719
5994
  return _enum(Object.keys(this._zod.def.shape))
5720
5995
  },
5721
5996
  catchall(catchall) {
5722
- return this.clone({ ...this._zod.def, catchall })
5997
+ return this.clone(mergeDefs(this._zod.def, { catchall }))
5723
5998
  },
5724
5999
  passthrough() {
5725
- return this.clone({ ...this._zod.def, catchall: unknown() })
6000
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }))
5726
6001
  },
5727
6002
  loose() {
5728
- return this.clone({ ...this._zod.def, catchall: unknown() })
6003
+ return this.clone(mergeDefs(this._zod.def, { catchall: unknown() }))
5729
6004
  },
5730
6005
  strict() {
5731
- return this.clone({ ...this._zod.def, catchall: never() })
6006
+ return this.clone(mergeDefs(this._zod.def, { catchall: never() }))
5732
6007
  },
5733
6008
  strip() {
5734
- return this.clone({ ...this._zod.def, catchall: undefined })
6009
+ return this.clone(mergeDefs(this._zod.def, { catchall: undefined }))
5735
6010
  },
5736
6011
  extend(incoming) {
5737
6012
  return extend(this, incoming)
@@ -5818,7 +6093,7 @@ var ZodEnum = /* @__PURE__ */ $constructor('ZodEnum', (inst, def) => {
5818
6093
  inst._zod.processJSONSchema = (ctx, json, params) =>
5819
6094
  enumProcessor(inst, ctx, json, params)
5820
6095
  inst.enum = def.entries
5821
- inst.options = Object.values(def.entries)
6096
+ inst.options = [...inst._zod.values]
5822
6097
  const keys = new Set(Object.keys(def.entries))
5823
6098
  inst.extract = (values, params) => {
5824
6099
  const newEntries = {}
@@ -6074,7 +6349,7 @@ function refine(fn, _params = {}) {
6074
6349
  function superRefine(fn, params) {
6075
6350
  return _superRefine(fn, params)
6076
6351
  }
6077
- // node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/iso.js
6352
+ // node_modules/.bun/zod@4.6.1/node_modules/zod/v4/classic/iso.js
6078
6353
  var exports_iso = {}
6079
6354
  __export(exports_iso, {
6080
6355
  ZodISODate: () => ZodISODate,