@settlemint/sdk-eas 2.5.1-prca5edae9 → 2.5.1-pre6103334

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.
@@ -87,7 +87,9 @@ const EAS_FIELD_TYPES = {
87
87
  };
88
88
 
89
89
  //#endregion
90
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
90
+ //#region ../../node_modules/zod/v4/core/core.js
91
+ /** A special constant with type `never` */
92
+ const NEVER = Object.freeze({ status: "aborted" });
91
93
  function $constructor(name, initializer$2, params) {
92
94
  function init(inst, def) {
93
95
  var _a;
@@ -138,7 +140,7 @@ function config(newConfig) {
138
140
  }
139
141
 
140
142
  //#endregion
141
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
143
+ //#region ../../node_modules/zod/v4/core/util.js
142
144
  var util_exports = {};
143
145
  __export(util_exports, {
144
146
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -153,6 +155,7 @@ __export(util_exports, {
153
155
  assertNotEqual: () => assertNotEqual,
154
156
  assignProp: () => assignProp,
155
157
  cached: () => cached,
158
+ captureStackTrace: () => captureStackTrace,
156
159
  cleanEnum: () => cleanEnum,
157
160
  cleanRegex: () => cleanRegex,
158
161
  clone: () => clone,
@@ -291,10 +294,14 @@ function randomString(length = 10) {
291
294
  function esc(str) {
292
295
  return JSON.stringify(str);
293
296
  }
297
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
294
298
  function isObject(data) {
295
299
  return typeof data === "object" && data !== null && !Array.isArray(data);
296
300
  }
297
301
  const allowsEval = cached(() => {
302
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
303
+ return false;
304
+ }
298
305
  try {
299
306
  const F = Function;
300
307
  new F("");
@@ -303,9 +310,6 @@ const allowsEval = cached(() => {
303
310
  return false;
304
311
  }
305
312
  });
306
- function _isObject(o) {
307
- return Object.prototype.toString.call(o) === "[object Object]";
308
- }
309
313
  function isPlainObject(o) {
310
314
  if (isObject(o) === false) return false;
311
315
  const ctor = o.constructor;
@@ -485,6 +489,9 @@ function omit(schema, mask) {
485
489
  });
486
490
  }
487
491
  function extend(schema, shape) {
492
+ if (!isPlainObject(shape)) {
493
+ throw new Error("Invalid input to extend: expected a plain object");
494
+ }
488
495
  const def = {
489
496
  ...schema._zod.def,
490
497
  get shape() {
@@ -572,7 +579,7 @@ function required(Class$1, schema, mask) {
572
579
  }
573
580
  function aborted(x, startIndex = 0) {
574
581
  for (let i = startIndex; i < x.issues.length; i++) {
575
- if (x.issues[i].continue !== true) return true;
582
+ if (x.issues[i]?.continue !== true) return true;
576
583
  }
577
584
  return false;
578
585
  }
@@ -636,7 +643,7 @@ var Class = class {
636
643
  };
637
644
 
638
645
  //#endregion
639
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
646
+ //#region ../../node_modules/zod/v4/core/errors.js
640
647
  const initializer$1 = (inst, def) => {
641
648
  inst.name = "$ZodError";
642
649
  Object.defineProperty(inst, "_zod", {
@@ -653,13 +660,17 @@ const initializer$1 = (inst, def) => {
653
660
  },
654
661
  enumerable: true
655
662
  });
663
+ Object.defineProperty(inst, "toString", {
664
+ value: () => inst.message,
665
+ enumerable: false
666
+ });
656
667
  };
657
668
  const $ZodError = $constructor("$ZodError", initializer$1);
658
669
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
659
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
670
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
660
671
  const fieldErrors = {};
661
672
  const formErrors = [];
662
- for (const sub of error$37.issues) {
673
+ for (const sub of error$39.issues) {
663
674
  if (sub.path.length > 0) {
664
675
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
665
676
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -672,13 +683,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
672
683
  fieldErrors
673
684
  };
674
685
  }
675
- function formatError(error$37, _mapper) {
686
+ function formatError(error$39, _mapper) {
676
687
  const mapper = _mapper || function(issue$1) {
677
688
  return issue$1.message;
678
689
  };
679
690
  const fieldErrors = { _errors: [] };
680
- const processError = (error$38) => {
681
- for (const issue$1 of error$38.issues) {
691
+ const processError = (error$40) => {
692
+ for (const issue$1 of error$40.issues) {
682
693
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
683
694
  issue$1.errors.map((issues) => processError({ issues }));
684
695
  } else if (issue$1.code === "invalid_key") {
@@ -705,17 +716,17 @@ function formatError(error$37, _mapper) {
705
716
  }
706
717
  }
707
718
  };
708
- processError(error$37);
719
+ processError(error$39);
709
720
  return fieldErrors;
710
721
  }
711
- function treeifyError(error$37, _mapper) {
722
+ function treeifyError(error$39, _mapper) {
712
723
  const mapper = _mapper || function(issue$1) {
713
724
  return issue$1.message;
714
725
  };
715
726
  const result = { errors: [] };
716
- const processError = (error$38, path = []) => {
727
+ const processError = (error$40, path = []) => {
717
728
  var _a, _b;
718
- for (const issue$1 of error$38.issues) {
729
+ for (const issue$1 of error$40.issues) {
719
730
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
720
731
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
721
732
  } else if (issue$1.code === "invalid_key") {
@@ -750,7 +761,7 @@ function treeifyError(error$37, _mapper) {
750
761
  }
751
762
  }
752
763
  };
753
- processError(error$37);
764
+ processError(error$39);
754
765
  return result;
755
766
  }
756
767
  /** Format a ZodError as a human-readable string in the following form.
@@ -798,9 +809,9 @@ function toDotPath(path) {
798
809
  }
799
810
  return segs.join("");
800
811
  }
801
- function prettifyError(error$37) {
812
+ function prettifyError(error$39) {
802
813
  const lines = [];
803
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
814
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
804
815
  for (const issue$1 of issues) {
805
816
  lines.push(`✖ ${issue$1.message}`);
806
817
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -809,7 +820,7 @@ function prettifyError(error$37) {
809
820
  }
810
821
 
811
822
  //#endregion
812
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
823
+ //#region ../../node_modules/zod/v4/core/parse.js
813
824
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
814
825
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
815
826
  const result = schema._zod.run({
@@ -821,7 +832,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
821
832
  }
822
833
  if (result.issues.length) {
823
834
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
824
- Error.captureStackTrace(e, _params?.callee);
835
+ captureStackTrace(e, _params?.callee);
825
836
  throw e;
826
837
  }
827
838
  return result.value;
@@ -836,7 +847,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
836
847
  if (result instanceof Promise) result = await result;
837
848
  if (result.issues.length) {
838
849
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
839
- Error.captureStackTrace(e, params?.callee);
850
+ captureStackTrace(e, params?.callee);
840
851
  throw e;
841
852
  }
842
853
  return result.value;
@@ -881,10 +892,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
881
892
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
882
893
 
883
894
  //#endregion
884
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
895
+ //#region ../../node_modules/zod/v4/core/regexes.js
885
896
  var regexes_exports = {};
886
897
  __export(regexes_exports, {
887
- _emoji: () => _emoji$1,
888
898
  base64: () => base64$1,
889
899
  base64url: () => base64url$1,
890
900
  bigint: () => bigint$2,
@@ -970,27 +980,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
970
980
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
971
981
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
972
982
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
973
- const 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])))`;
983
+ const 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])))`;
974
984
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
975
985
  function timeSource(args) {
976
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
977
- if (args.precision) {
978
- regex = `${regex}\\.\\d{${args.precision}}`;
979
- } else if (args.precision == null) {
980
- regex = `${regex}(\\.\\d+)?`;
981
- }
986
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
987
+ const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
982
988
  return regex;
983
989
  }
984
990
  function time$1(args) {
985
991
  return new RegExp(`^${timeSource(args)}$`);
986
992
  }
987
993
  function datetime$1(args) {
988
- let regex = `${dateSource}T${timeSource(args)}`;
989
- const opts = [];
990
- opts.push(args.local ? `Z?` : `Z`);
991
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
992
- regex = `${regex}(${opts.join("|")})`;
993
- return new RegExp(`^${regex}$`);
994
+ const time$2 = timeSource({ precision: args.precision });
995
+ const opts = ["Z"];
996
+ if (args.local) opts.push("");
997
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
998
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
999
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
994
1000
  }
995
1001
  const string$2 = (params) => {
996
1002
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -1006,7 +1012,7 @@ const lowercase = /^[^A-Z]*$/;
1006
1012
  const uppercase = /^[^a-z]*$/;
1007
1013
 
1008
1014
  //#endregion
1009
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
1015
+ //#region ../../node_modules/zod/v4/core/checks.js
1010
1016
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1011
1017
  var _a;
1012
1018
  inst._zod ?? (inst._zod = {});
@@ -1197,11 +1203,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1197
1203
  };
1198
1204
  });
1199
1205
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1206
+ var _a;
1200
1207
  $ZodCheck.init(inst, def);
1201
- inst._zod.when = (payload) => {
1208
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1202
1209
  const val = payload.value;
1203
1210
  return !nullish$1(val) && val.size !== undefined;
1204
- };
1211
+ });
1205
1212
  inst._zod.onattach.push((inst$1) => {
1206
1213
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1207
1214
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1221,11 +1228,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1221
1228
  };
1222
1229
  });
1223
1230
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1231
+ var _a;
1224
1232
  $ZodCheck.init(inst, def);
1225
- inst._zod.when = (payload) => {
1233
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1226
1234
  const val = payload.value;
1227
1235
  return !nullish$1(val) && val.size !== undefined;
1228
- };
1236
+ });
1229
1237
  inst._zod.onattach.push((inst$1) => {
1230
1238
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1231
1239
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1245,11 +1253,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1245
1253
  };
1246
1254
  });
1247
1255
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1256
+ var _a;
1248
1257
  $ZodCheck.init(inst, def);
1249
- inst._zod.when = (payload) => {
1258
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1250
1259
  const val = payload.value;
1251
1260
  return !nullish$1(val) && val.size !== undefined;
1252
- };
1261
+ });
1253
1262
  inst._zod.onattach.push((inst$1) => {
1254
1263
  const bag = inst$1._zod.bag;
1255
1264
  bag.minimum = def.size;
@@ -1270,6 +1279,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1270
1279
  code: "too_small",
1271
1280
  minimum: def.size
1272
1281
  },
1282
+ inclusive: true,
1283
+ exact: true,
1273
1284
  input: payload.value,
1274
1285
  inst,
1275
1286
  continue: !def.abort
@@ -1277,11 +1288,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1277
1288
  };
1278
1289
  });
1279
1290
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1291
+ var _a;
1280
1292
  $ZodCheck.init(inst, def);
1281
- inst._zod.when = (payload) => {
1293
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1282
1294
  const val = payload.value;
1283
1295
  return !nullish$1(val) && val.length !== undefined;
1284
- };
1296
+ });
1285
1297
  inst._zod.onattach.push((inst$1) => {
1286
1298
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1287
1299
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1303,11 +1315,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1303
1315
  };
1304
1316
  });
1305
1317
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1318
+ var _a;
1306
1319
  $ZodCheck.init(inst, def);
1307
- inst._zod.when = (payload) => {
1320
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1308
1321
  const val = payload.value;
1309
1322
  return !nullish$1(val) && val.length !== undefined;
1310
- };
1323
+ });
1311
1324
  inst._zod.onattach.push((inst$1) => {
1312
1325
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1313
1326
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1329,11 +1342,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1329
1342
  };
1330
1343
  });
1331
1344
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1345
+ var _a;
1332
1346
  $ZodCheck.init(inst, def);
1333
- inst._zod.when = (payload) => {
1347
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1334
1348
  const val = payload.value;
1335
1349
  return !nullish$1(val) && val.length !== undefined;
1336
- };
1350
+ });
1337
1351
  inst._zod.onattach.push((inst$1) => {
1338
1352
  const bag = inst$1._zod.bag;
1339
1353
  bag.minimum = def.length;
@@ -1355,6 +1369,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1355
1369
  code: "too_small",
1356
1370
  minimum: def.length
1357
1371
  },
1372
+ inclusive: true,
1373
+ exact: true,
1358
1374
  input: payload.value,
1359
1375
  inst,
1360
1376
  continue: !def.abort
@@ -1362,7 +1378,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1362
1378
  };
1363
1379
  });
1364
1380
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1365
- var _a;
1381
+ var _a, _b;
1366
1382
  $ZodCheck.init(inst, def);
1367
1383
  inst._zod.onattach.push((inst$1) => {
1368
1384
  const bag = inst$1._zod.bag;
@@ -1372,8 +1388,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1372
1388
  bag.patterns.add(def.pattern);
1373
1389
  }
1374
1390
  });
1375
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1376
- if (!def.pattern) throw new Error("Not implemented.");
1391
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1377
1392
  def.pattern.lastIndex = 0;
1378
1393
  if (def.pattern.test(payload.value)) return;
1379
1394
  payload.issues.push({
@@ -1386,6 +1401,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1386
1401
  continue: !def.abort
1387
1402
  });
1388
1403
  });
1404
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1389
1405
  });
1390
1406
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1391
1407
  $ZodCheckStringFormat.init(inst, def);
@@ -1509,7 +1525,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1509
1525
  code: "invalid_value",
1510
1526
  values: def.mime,
1511
1527
  input: payload.value.type,
1512
- path: ["type"],
1513
1528
  inst
1514
1529
  });
1515
1530
  };
@@ -1522,7 +1537,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1522
1537
  });
1523
1538
 
1524
1539
  //#endregion
1525
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1540
+ //#region ../../node_modules/zod/v4/core/doc.js
1526
1541
  var Doc = class {
1527
1542
  constructor(args = []) {
1528
1543
  this.content = [];
@@ -1558,19 +1573,18 @@ var Doc = class {
1558
1573
  };
1559
1574
 
1560
1575
  //#endregion
1561
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1576
+ //#region ../../node_modules/zod/v4/core/versions.js
1562
1577
  const version = {
1563
1578
  major: 4,
1564
1579
  minor: 0,
1565
- patch: 0
1580
+ patch: 5
1566
1581
  };
1567
1582
 
1568
1583
  //#endregion
1569
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1584
+ //#region ../../node_modules/zod/v4/core/schemas.js
1570
1585
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1571
1586
  var _a;
1572
1587
  inst ?? (inst = {});
1573
- inst._zod.id = def.type + "_" + randomString(10);
1574
1588
  inst._zod.def = def;
1575
1589
  inst._zod.bag = inst._zod.bag || {};
1576
1590
  inst._zod.version = version;
@@ -1593,13 +1607,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1593
1607
  let isAborted = aborted(payload);
1594
1608
  let asyncResult;
1595
1609
  for (const ch of checks$1) {
1596
- if (ch._zod.when) {
1597
- const shouldRun = ch._zod.when(payload);
1610
+ if (ch._zod.def.when) {
1611
+ const shouldRun = ch._zod.def.when(payload);
1598
1612
  if (!shouldRun) continue;
1599
- } else {
1600
- if (isAborted) {
1601
- continue;
1602
- }
1613
+ } else if (isAborted) {
1614
+ continue;
1603
1615
  }
1604
1616
  const currLen = payload.issues.length;
1605
1617
  const _ = ch._zod.check(payload);
@@ -1699,7 +1711,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1699
1711
  $ZodStringFormat.init(inst, def);
1700
1712
  inst._zod.check = (payload) => {
1701
1713
  try {
1702
- const url$1 = new URL(payload.value);
1714
+ const orig = payload.value;
1715
+ const url$1 = new URL(orig);
1716
+ const href = url$1.href;
1703
1717
  if (def.hostname) {
1704
1718
  def.hostname.lastIndex = 0;
1705
1719
  if (!def.hostname.test(url$1.hostname)) {
@@ -1728,6 +1742,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1728
1742
  });
1729
1743
  }
1730
1744
  }
1745
+ if (!orig.endsWith("/") && href.endsWith("/")) {
1746
+ payload.value = href.slice(0, -1);
1747
+ } else {
1748
+ payload.value = href;
1749
+ }
1731
1750
  return;
1732
1751
  } catch (_) {
1733
1752
  payload.issues.push({
@@ -1898,6 +1917,7 @@ function isValidJWT(token, algorithm = null) {
1898
1917
  const tokensParts = token.split(".");
1899
1918
  if (tokensParts.length !== 3) return false;
1900
1919
  const [header] = tokensParts;
1920
+ if (!header) return false;
1901
1921
  const parsedHeader = JSON.parse(atob(header));
1902
1922
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1903
1923
  if (!parsedHeader.alg) return false;
@@ -1920,6 +1940,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1920
1940
  });
1921
1941
  };
1922
1942
  });
1943
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1944
+ $ZodStringFormat.init(inst, def);
1945
+ inst._zod.check = (payload) => {
1946
+ if (def.fn(payload.value)) return;
1947
+ payload.issues.push({
1948
+ code: "invalid_format",
1949
+ format: def.format,
1950
+ input: payload.value,
1951
+ inst,
1952
+ continue: !def.abort
1953
+ });
1954
+ };
1955
+ });
1923
1956
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1924
1957
  $ZodType.init(inst, def);
1925
1958
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1971,12 +2004,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1971
2004
  if (def.coerce) try {
1972
2005
  payload.value = BigInt(payload.value);
1973
2006
  } catch (_) {}
1974
- const { value: input } = payload;
1975
- if (typeof input === "bigint") return payload;
2007
+ if (typeof payload.value === "bigint") return payload;
1976
2008
  payload.issues.push({
1977
2009
  expected: "bigint",
1978
2010
  code: "invalid_type",
1979
- input,
2011
+ input: payload.value,
1980
2012
  inst
1981
2013
  });
1982
2014
  return payload;
@@ -1989,7 +2021,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1989
2021
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1990
2022
  $ZodType.init(inst, def);
1991
2023
  inst._zod.parse = (payload, _ctx) => {
1992
- const { value: input } = payload;
2024
+ const input = payload.value;
1993
2025
  if (typeof input === "symbol") return payload;
1994
2026
  payload.issues.push({
1995
2027
  expected: "symbol",
@@ -2004,8 +2036,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
2004
2036
  $ZodType.init(inst, def);
2005
2037
  inst._zod.pattern = _undefined$2;
2006
2038
  inst._zod.values = new Set([undefined]);
2039
+ inst._zod.optin = "optional";
2040
+ inst._zod.optout = "optional";
2007
2041
  inst._zod.parse = (payload, _ctx) => {
2008
- const { value: input } = payload;
2042
+ const input = payload.value;
2009
2043
  if (typeof input === "undefined") return payload;
2010
2044
  payload.issues.push({
2011
2045
  expected: "undefined",
@@ -2021,7 +2055,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2021
2055
  inst._zod.pattern = _null$2;
2022
2056
  inst._zod.values = new Set([null]);
2023
2057
  inst._zod.parse = (payload, _ctx) => {
2024
- const { value: input } = payload;
2058
+ const input = payload.value;
2025
2059
  if (input === null) return payload;
2026
2060
  payload.issues.push({
2027
2061
  expected: "null",
@@ -2055,7 +2089,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2055
2089
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2056
2090
  $ZodType.init(inst, def);
2057
2091
  inst._zod.parse = (payload, _ctx) => {
2058
- const { value: input } = payload;
2092
+ const input = payload.value;
2059
2093
  if (typeof input === "undefined") return payload;
2060
2094
  payload.issues.push({
2061
2095
  expected: "void",
@@ -2186,19 +2220,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2186
2220
  "payload",
2187
2221
  "ctx"
2188
2222
  ]);
2189
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2223
+ const normalized = _normalized.value;
2190
2224
  const parseStr = (key) => {
2191
2225
  const k = esc(key);
2192
2226
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2193
2227
  };
2194
2228
  doc.write(`const input = payload.value;`);
2195
2229
  const ids = Object.create(null);
2196
- for (const key of keys) {
2197
- ids[key] = randomString(15);
2230
+ let counter = 0;
2231
+ for (const key of normalized.keys) {
2232
+ ids[key] = `key_${counter++}`;
2198
2233
  }
2199
2234
  doc.write(`const newResult = {}`);
2200
- for (const key of keys) {
2201
- if (optionalKeys$1.has(key)) {
2235
+ for (const key of normalized.keys) {
2236
+ if (normalized.optionalKeys.has(key)) {
2202
2237
  const id = ids[key];
2203
2238
  doc.write(`const ${id} = ${parseStr(key)};`);
2204
2239
  const k = esc(key);
@@ -2243,7 +2278,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2243
2278
  const jit = !globalConfig.jitless;
2244
2279
  const allowsEval$1 = allowsEval;
2245
2280
  const fastEnabled = jit && allowsEval$1.value;
2246
- const { catchall } = def;
2281
+ const catchall = def.catchall;
2247
2282
  let value;
2248
2283
  inst._zod.parse = (payload, ctx) => {
2249
2284
  value ?? (value = _normalized.value);
@@ -2273,12 +2308,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2273
2308
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2274
2309
  if (r instanceof Promise) {
2275
2310
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2311
+ } else if (isOptional) {
2312
+ handleOptionalObjectResult(r, payload, key, input);
2276
2313
  } else {
2277
- if (isOptional) {
2278
- handleOptionalObjectResult(r, payload, key, input);
2279
- } else {
2280
- handleObjectResult(r, payload, key);
2281
- }
2314
+ handleObjectResult(r, payload, key);
2282
2315
  }
2283
2316
  }
2284
2317
  }
@@ -2336,6 +2369,8 @@ function handleUnionResults(results, final, inst, ctx) {
2336
2369
  }
2337
2370
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2338
2371
  $ZodType.init(inst, def);
2372
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2373
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2339
2374
  defineLazy(inst._zod, "values", () => {
2340
2375
  if (def.options.every((o) => o._zod.values)) {
2341
2376
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2392,7 +2427,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2392
2427
  const opts = def.options;
2393
2428
  const map$1 = new Map();
2394
2429
  for (const o of opts) {
2395
- const values = o._zod.propValues[def.discriminator];
2430
+ const values = o._zod.propValues?.[def.discriminator];
2396
2431
  if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
2397
2432
  for (const v of values) {
2398
2433
  if (map$1.has(v)) {
@@ -2435,7 +2470,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2435
2470
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2436
2471
  $ZodType.init(inst, def);
2437
2472
  inst._zod.parse = (payload, ctx) => {
2438
- const { value: input } = payload;
2473
+ const input = payload.value;
2439
2474
  const left = def.left._zod.run({
2440
2475
  value: input,
2441
2476
  issues: []
@@ -2892,6 +2927,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2892
2927
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2893
2928
  });
2894
2929
  inst._zod.parse = (payload, ctx) => {
2930
+ if (def.innerType._zod.optin === "optional") {
2931
+ return def.innerType._zod.run(payload, ctx);
2932
+ }
2895
2933
  if (payload.value === undefined) {
2896
2934
  return payload;
2897
2935
  }
@@ -2991,7 +3029,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2991
3029
  });
2992
3030
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2993
3031
  $ZodType.init(inst, def);
2994
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3032
+ inst._zod.optin = "optional";
2995
3033
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2996
3034
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2997
3035
  inst._zod.parse = (payload, ctx) => {
@@ -3042,6 +3080,7 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
3042
3080
  defineLazy(inst._zod, "values", () => def.in._zod.values);
3043
3081
  defineLazy(inst._zod, "optin", () => def.in._zod.optin);
3044
3082
  defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3083
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
3045
3084
  inst._zod.parse = (payload, ctx) => {
3046
3085
  const left = def.in._zod.run(payload, ctx);
3047
3086
  if (left instanceof Promise) {
@@ -3062,6 +3101,7 @@ function handlePipeResult(left, def, ctx) {
3062
3101
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3063
3102
  $ZodType.init(inst, def);
3064
3103
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3104
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3065
3105
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3066
3106
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3067
3107
  inst._zod.parse = (payload, ctx) => {
@@ -3112,7 +3152,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3112
3152
  input: payload.value,
3113
3153
  inst,
3114
3154
  code: "invalid_format",
3115
- format: "template_literal",
3155
+ format: def.format ?? "template_literal",
3116
3156
  pattern: inst._zod.pattern.source
3117
3157
  });
3118
3158
  return payload;
@@ -3172,8 +3212,8 @@ function handleRefineResult(result, payload, input, inst) {
3172
3212
  }
3173
3213
 
3174
3214
  //#endregion
3175
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3176
- const error$36 = () => {
3215
+ //#region ../../node_modules/zod/v4/locales/ar.js
3216
+ const error$38 = () => {
3177
3217
  const Sizable = {
3178
3218
  string: {
3179
3219
  unit: "حرف",
@@ -3195,7 +3235,7 @@ const error$36 = () => {
3195
3235
  function getSizing(origin) {
3196
3236
  return Sizable[origin] ?? null;
3197
3237
  }
3198
- const parsedType$2 = (data) => {
3238
+ const parsedType$3 = (data) => {
3199
3239
  const t = typeof data;
3200
3240
  switch (t) {
3201
3241
  case "number": {
@@ -3247,7 +3287,7 @@ const error$36 = () => {
3247
3287
  };
3248
3288
  return (issue$1) => {
3249
3289
  switch (issue$1.code) {
3250
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3290
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3251
3291
  case "invalid_value":
3252
3292
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3253
3293
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3283,12 +3323,12 @@ const error$36 = () => {
3283
3323
  };
3284
3324
  };
3285
3325
  function ar_default() {
3286
- return { localeError: error$36() };
3326
+ return { localeError: error$38() };
3287
3327
  }
3288
3328
 
3289
3329
  //#endregion
3290
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3291
- const error$35 = () => {
3330
+ //#region ../../node_modules/zod/v4/locales/az.js
3331
+ const error$37 = () => {
3292
3332
  const Sizable = {
3293
3333
  string: {
3294
3334
  unit: "simvol",
@@ -3310,7 +3350,7 @@ const error$35 = () => {
3310
3350
  function getSizing(origin) {
3311
3351
  return Sizable[origin] ?? null;
3312
3352
  }
3313
- const parsedType$2 = (data) => {
3353
+ const parsedType$3 = (data) => {
3314
3354
  const t = typeof data;
3315
3355
  switch (t) {
3316
3356
  case "number": {
@@ -3362,7 +3402,7 @@ const error$35 = () => {
3362
3402
  };
3363
3403
  return (issue$1) => {
3364
3404
  switch (issue$1.code) {
3365
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3405
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3366
3406
  case "invalid_value":
3367
3407
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3368
3408
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3396,11 +3436,11 @@ const error$35 = () => {
3396
3436
  };
3397
3437
  };
3398
3438
  function az_default() {
3399
- return { localeError: error$35() };
3439
+ return { localeError: error$37() };
3400
3440
  }
3401
3441
 
3402
3442
  //#endregion
3403
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3443
+ //#region ../../node_modules/zod/v4/locales/be.js
3404
3444
  function getBelarusianPlural(count, one, few, many) {
3405
3445
  const absCount = Math.abs(count);
3406
3446
  const lastDigit = absCount % 10;
@@ -3416,7 +3456,7 @@ function getBelarusianPlural(count, one, few, many) {
3416
3456
  }
3417
3457
  return many;
3418
3458
  }
3419
- const error$34 = () => {
3459
+ const error$36 = () => {
3420
3460
  const Sizable = {
3421
3461
  string: {
3422
3462
  unit: {
@@ -3454,7 +3494,7 @@ const error$34 = () => {
3454
3494
  function getSizing(origin) {
3455
3495
  return Sizable[origin] ?? null;
3456
3496
  }
3457
- const parsedType$2 = (data) => {
3497
+ const parsedType$3 = (data) => {
3458
3498
  const t = typeof data;
3459
3499
  switch (t) {
3460
3500
  case "number": {
@@ -3506,7 +3546,7 @@ const error$34 = () => {
3506
3546
  };
3507
3547
  return (issue$1) => {
3508
3548
  switch (issue$1.code) {
3509
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3549
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3510
3550
  case "invalid_value":
3511
3551
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3512
3552
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3548,12 +3588,12 @@ const error$34 = () => {
3548
3588
  };
3549
3589
  };
3550
3590
  function be_default() {
3551
- return { localeError: error$34() };
3591
+ return { localeError: error$36() };
3552
3592
  }
3553
3593
 
3554
3594
  //#endregion
3555
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3556
- const error$33 = () => {
3595
+ //#region ../../node_modules/zod/v4/locales/ca.js
3596
+ const error$35 = () => {
3557
3597
  const Sizable = {
3558
3598
  string: {
3559
3599
  unit: "caràcters",
@@ -3575,7 +3615,7 @@ const error$33 = () => {
3575
3615
  function getSizing(origin) {
3576
3616
  return Sizable[origin] ?? null;
3577
3617
  }
3578
- const parsedType$2 = (data) => {
3618
+ const parsedType$3 = (data) => {
3579
3619
  const t = typeof data;
3580
3620
  switch (t) {
3581
3621
  case "number": {
@@ -3627,7 +3667,7 @@ const error$33 = () => {
3627
3667
  };
3628
3668
  return (issue$1) => {
3629
3669
  switch (issue$1.code) {
3630
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3670
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3631
3671
  case "invalid_value":
3632
3672
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3633
3673
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3665,12 +3705,12 @@ const error$33 = () => {
3665
3705
  };
3666
3706
  };
3667
3707
  function ca_default() {
3668
- return { localeError: error$33() };
3708
+ return { localeError: error$35() };
3669
3709
  }
3670
3710
 
3671
3711
  //#endregion
3672
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3673
- const error$32 = () => {
3712
+ //#region ../../node_modules/zod/v4/locales/cs.js
3713
+ const error$34 = () => {
3674
3714
  const Sizable = {
3675
3715
  string: {
3676
3716
  unit: "znaků",
@@ -3692,7 +3732,7 @@ const error$32 = () => {
3692
3732
  function getSizing(origin) {
3693
3733
  return Sizable[origin] ?? null;
3694
3734
  }
3695
- const parsedType$2 = (data) => {
3735
+ const parsedType$3 = (data) => {
3696
3736
  const t = typeof data;
3697
3737
  switch (t) {
3698
3738
  case "number": {
@@ -3762,7 +3802,7 @@ const error$32 = () => {
3762
3802
  };
3763
3803
  return (issue$1) => {
3764
3804
  switch (issue$1.code) {
3765
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3805
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3766
3806
  case "invalid_value":
3767
3807
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3768
3808
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3800,12 +3840,12 @@ const error$32 = () => {
3800
3840
  };
3801
3841
  };
3802
3842
  function cs_default() {
3803
- return { localeError: error$32() };
3843
+ return { localeError: error$34() };
3804
3844
  }
3805
3845
 
3806
3846
  //#endregion
3807
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3808
- const error$31 = () => {
3847
+ //#region ../../node_modules/zod/v4/locales/de.js
3848
+ const error$33 = () => {
3809
3849
  const Sizable = {
3810
3850
  string: {
3811
3851
  unit: "Zeichen",
@@ -3827,7 +3867,7 @@ const error$31 = () => {
3827
3867
  function getSizing(origin) {
3828
3868
  return Sizable[origin] ?? null;
3829
3869
  }
3830
- const parsedType$2 = (data) => {
3870
+ const parsedType$3 = (data) => {
3831
3871
  const t = typeof data;
3832
3872
  switch (t) {
3833
3873
  case "number": {
@@ -3879,7 +3919,7 @@ const error$31 = () => {
3879
3919
  };
3880
3920
  return (issue$1) => {
3881
3921
  switch (issue$1.code) {
3882
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3922
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3883
3923
  case "invalid_value":
3884
3924
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3885
3925
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3915,12 +3955,12 @@ const error$31 = () => {
3915
3955
  };
3916
3956
  };
3917
3957
  function de_default() {
3918
- return { localeError: error$31() };
3958
+ return { localeError: error$33() };
3919
3959
  }
3920
3960
 
3921
3961
  //#endregion
3922
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3923
- const parsedType$1 = (data) => {
3962
+ //#region ../../node_modules/zod/v4/locales/en.js
3963
+ const parsedType$2 = (data) => {
3924
3964
  const t = typeof data;
3925
3965
  switch (t) {
3926
3966
  case "number": {
@@ -3940,7 +3980,7 @@ const parsedType$1 = (data) => {
3940
3980
  }
3941
3981
  return t;
3942
3982
  };
3943
- const error$30 = () => {
3983
+ const error$32 = () => {
3944
3984
  const Sizable = {
3945
3985
  string: {
3946
3986
  unit: "characters",
@@ -3994,7 +4034,7 @@ const error$30 = () => {
3994
4034
  };
3995
4035
  return (issue$1) => {
3996
4036
  switch (issue$1.code) {
3997
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
4037
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3998
4038
  case "invalid_value":
3999
4039
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
4000
4040
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -4032,12 +4072,127 @@ const error$30 = () => {
4032
4072
  };
4033
4073
  };
4034
4074
  function en_default() {
4035
- return { localeError: error$30() };
4075
+ return { localeError: error$32() };
4036
4076
  }
4037
4077
 
4038
4078
  //#endregion
4039
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
4040
- const error$29 = () => {
4079
+ //#region ../../node_modules/zod/v4/locales/eo.js
4080
+ const parsedType$1 = (data) => {
4081
+ const t = typeof data;
4082
+ switch (t) {
4083
+ case "number": {
4084
+ return Number.isNaN(data) ? "NaN" : "nombro";
4085
+ }
4086
+ case "object": {
4087
+ if (Array.isArray(data)) {
4088
+ return "tabelo";
4089
+ }
4090
+ if (data === null) {
4091
+ return "senvalora";
4092
+ }
4093
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4094
+ return data.constructor.name;
4095
+ }
4096
+ }
4097
+ }
4098
+ return t;
4099
+ };
4100
+ const error$31 = () => {
4101
+ const Sizable = {
4102
+ string: {
4103
+ unit: "karaktrojn",
4104
+ verb: "havi"
4105
+ },
4106
+ file: {
4107
+ unit: "bajtojn",
4108
+ verb: "havi"
4109
+ },
4110
+ array: {
4111
+ unit: "elementojn",
4112
+ verb: "havi"
4113
+ },
4114
+ set: {
4115
+ unit: "elementojn",
4116
+ verb: "havi"
4117
+ }
4118
+ };
4119
+ function getSizing(origin) {
4120
+ return Sizable[origin] ?? null;
4121
+ }
4122
+ const Nouns = {
4123
+ regex: "enigo",
4124
+ email: "retadreso",
4125
+ url: "URL",
4126
+ emoji: "emoĝio",
4127
+ uuid: "UUID",
4128
+ uuidv4: "UUIDv4",
4129
+ uuidv6: "UUIDv6",
4130
+ nanoid: "nanoid",
4131
+ guid: "GUID",
4132
+ cuid: "cuid",
4133
+ cuid2: "cuid2",
4134
+ ulid: "ULID",
4135
+ xid: "XID",
4136
+ ksuid: "KSUID",
4137
+ datetime: "ISO-datotempo",
4138
+ date: "ISO-dato",
4139
+ time: "ISO-tempo",
4140
+ duration: "ISO-daŭro",
4141
+ ipv4: "IPv4-adreso",
4142
+ ipv6: "IPv6-adreso",
4143
+ cidrv4: "IPv4-rango",
4144
+ cidrv6: "IPv6-rango",
4145
+ base64: "64-ume kodita karaktraro",
4146
+ base64url: "URL-64-ume kodita karaktraro",
4147
+ json_string: "JSON-karaktraro",
4148
+ e164: "E.164-nombro",
4149
+ jwt: "JWT",
4150
+ template_literal: "enigo"
4151
+ };
4152
+ return (issue$1) => {
4153
+ switch (issue$1.code) {
4154
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4155
+ case "invalid_value":
4156
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4157
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4158
+ case "too_big": {
4159
+ const adj = issue$1.inclusive ? "<=" : "<";
4160
+ const sizing = getSizing(issue$1.origin);
4161
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4162
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4163
+ }
4164
+ case "too_small": {
4165
+ const adj = issue$1.inclusive ? ">=" : ">";
4166
+ const sizing = getSizing(issue$1.origin);
4167
+ if (sizing) {
4168
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4169
+ }
4170
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4171
+ }
4172
+ case "invalid_format": {
4173
+ const _issue = issue$1;
4174
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4175
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4176
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4177
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4178
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4179
+ }
4180
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4181
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4182
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4183
+ case "invalid_union": return "Nevalida enigo";
4184
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4185
+ default: return `Nevalida enigo`;
4186
+ }
4187
+ };
4188
+ };
4189
+ function eo_default() {
4190
+ return { localeError: error$31() };
4191
+ }
4192
+
4193
+ //#endregion
4194
+ //#region ../../node_modules/zod/v4/locales/es.js
4195
+ const error$30 = () => {
4041
4196
  const Sizable = {
4042
4197
  string: {
4043
4198
  unit: "caracteres",
@@ -4059,7 +4214,7 @@ const error$29 = () => {
4059
4214
  function getSizing(origin) {
4060
4215
  return Sizable[origin] ?? null;
4061
4216
  }
4062
- const parsedType$2 = (data) => {
4217
+ const parsedType$3 = (data) => {
4063
4218
  const t = typeof data;
4064
4219
  switch (t) {
4065
4220
  case "number": {
@@ -4111,7 +4266,7 @@ const error$29 = () => {
4111
4266
  };
4112
4267
  return (issue$1) => {
4113
4268
  switch (issue$1.code) {
4114
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4269
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4115
4270
  case "invalid_value":
4116
4271
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4117
4272
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4147,12 +4302,12 @@ const error$29 = () => {
4147
4302
  };
4148
4303
  };
4149
4304
  function es_default() {
4150
- return { localeError: error$29() };
4305
+ return { localeError: error$30() };
4151
4306
  }
4152
4307
 
4153
4308
  //#endregion
4154
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4155
- const error$28 = () => {
4309
+ //#region ../../node_modules/zod/v4/locales/fa.js
4310
+ const error$29 = () => {
4156
4311
  const Sizable = {
4157
4312
  string: {
4158
4313
  unit: "کاراکتر",
@@ -4174,7 +4329,7 @@ const error$28 = () => {
4174
4329
  function getSizing(origin) {
4175
4330
  return Sizable[origin] ?? null;
4176
4331
  }
4177
- const parsedType$2 = (data) => {
4332
+ const parsedType$3 = (data) => {
4178
4333
  const t = typeof data;
4179
4334
  switch (t) {
4180
4335
  case "number": {
@@ -4226,7 +4381,7 @@ const error$28 = () => {
4226
4381
  };
4227
4382
  return (issue$1) => {
4228
4383
  switch (issue$1.code) {
4229
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4384
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4230
4385
  case "invalid_value":
4231
4386
  if (issue$1.values.length === 1) {
4232
4387
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4274,12 +4429,12 @@ const error$28 = () => {
4274
4429
  };
4275
4430
  };
4276
4431
  function fa_default() {
4277
- return { localeError: error$28() };
4432
+ return { localeError: error$29() };
4278
4433
  }
4279
4434
 
4280
4435
  //#endregion
4281
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4282
- const error$27 = () => {
4436
+ //#region ../../node_modules/zod/v4/locales/fi.js
4437
+ const error$28 = () => {
4283
4438
  const Sizable = {
4284
4439
  string: {
4285
4440
  unit: "merkkiä",
@@ -4317,7 +4472,7 @@ const error$27 = () => {
4317
4472
  function getSizing(origin) {
4318
4473
  return Sizable[origin] ?? null;
4319
4474
  }
4320
- const parsedType$2 = (data) => {
4475
+ const parsedType$3 = (data) => {
4321
4476
  const t = typeof data;
4322
4477
  switch (t) {
4323
4478
  case "number": {
@@ -4369,7 +4524,7 @@ const error$27 = () => {
4369
4524
  };
4370
4525
  return (issue$1) => {
4371
4526
  switch (issue$1.code) {
4372
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4527
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4373
4528
  case "invalid_value":
4374
4529
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4375
4530
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4409,12 +4564,12 @@ const error$27 = () => {
4409
4564
  };
4410
4565
  };
4411
4566
  function fi_default() {
4412
- return { localeError: error$27() };
4567
+ return { localeError: error$28() };
4413
4568
  }
4414
4569
 
4415
4570
  //#endregion
4416
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4417
- const error$26 = () => {
4571
+ //#region ../../node_modules/zod/v4/locales/fr.js
4572
+ const error$27 = () => {
4418
4573
  const Sizable = {
4419
4574
  string: {
4420
4575
  unit: "caractères",
@@ -4436,7 +4591,7 @@ const error$26 = () => {
4436
4591
  function getSizing(origin) {
4437
4592
  return Sizable[origin] ?? null;
4438
4593
  }
4439
- const parsedType$2 = (data) => {
4594
+ const parsedType$3 = (data) => {
4440
4595
  const t = typeof data;
4441
4596
  switch (t) {
4442
4597
  case "number": {
@@ -4488,7 +4643,7 @@ const error$26 = () => {
4488
4643
  };
4489
4644
  return (issue$1) => {
4490
4645
  switch (issue$1.code) {
4491
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4646
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4492
4647
  case "invalid_value":
4493
4648
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4494
4649
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4524,12 +4679,12 @@ const error$26 = () => {
4524
4679
  };
4525
4680
  };
4526
4681
  function fr_default() {
4527
- return { localeError: error$26() };
4682
+ return { localeError: error$27() };
4528
4683
  }
4529
4684
 
4530
4685
  //#endregion
4531
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4532
- const error$25 = () => {
4686
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
4687
+ const error$26 = () => {
4533
4688
  const Sizable = {
4534
4689
  string: {
4535
4690
  unit: "caractères",
@@ -4551,7 +4706,7 @@ const error$25 = () => {
4551
4706
  function getSizing(origin) {
4552
4707
  return Sizable[origin] ?? null;
4553
4708
  }
4554
- const parsedType$2 = (data) => {
4709
+ const parsedType$3 = (data) => {
4555
4710
  const t = typeof data;
4556
4711
  switch (t) {
4557
4712
  case "number": {
@@ -4603,7 +4758,7 @@ const error$25 = () => {
4603
4758
  };
4604
4759
  return (issue$1) => {
4605
4760
  switch (issue$1.code) {
4606
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4761
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4607
4762
  case "invalid_value":
4608
4763
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4609
4764
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4641,12 +4796,12 @@ const error$25 = () => {
4641
4796
  };
4642
4797
  };
4643
4798
  function fr_CA_default() {
4644
- return { localeError: error$25() };
4799
+ return { localeError: error$26() };
4645
4800
  }
4646
4801
 
4647
4802
  //#endregion
4648
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4649
- const error$24 = () => {
4803
+ //#region ../../node_modules/zod/v4/locales/he.js
4804
+ const error$25 = () => {
4650
4805
  const Sizable = {
4651
4806
  string: {
4652
4807
  unit: "אותיות",
@@ -4668,7 +4823,7 @@ const error$24 = () => {
4668
4823
  function getSizing(origin) {
4669
4824
  return Sizable[origin] ?? null;
4670
4825
  }
4671
- const parsedType$2 = (data) => {
4826
+ const parsedType$3 = (data) => {
4672
4827
  const t = typeof data;
4673
4828
  switch (t) {
4674
4829
  case "number": {
@@ -4720,7 +4875,7 @@ const error$24 = () => {
4720
4875
  };
4721
4876
  return (issue$1) => {
4722
4877
  switch (issue$1.code) {
4723
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4878
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4724
4879
  case "invalid_value":
4725
4880
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4726
4881
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4756,12 +4911,12 @@ const error$24 = () => {
4756
4911
  };
4757
4912
  };
4758
4913
  function he_default() {
4759
- return { localeError: error$24() };
4914
+ return { localeError: error$25() };
4760
4915
  }
4761
4916
 
4762
4917
  //#endregion
4763
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4764
- const error$23 = () => {
4918
+ //#region ../../node_modules/zod/v4/locales/hu.js
4919
+ const error$24 = () => {
4765
4920
  const Sizable = {
4766
4921
  string: {
4767
4922
  unit: "karakter",
@@ -4783,7 +4938,7 @@ const error$23 = () => {
4783
4938
  function getSizing(origin) {
4784
4939
  return Sizable[origin] ?? null;
4785
4940
  }
4786
- const parsedType$2 = (data) => {
4941
+ const parsedType$3 = (data) => {
4787
4942
  const t = typeof data;
4788
4943
  switch (t) {
4789
4944
  case "number": {
@@ -4835,7 +4990,7 @@ const error$23 = () => {
4835
4990
  };
4836
4991
  return (issue$1) => {
4837
4992
  switch (issue$1.code) {
4838
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4993
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4839
4994
  case "invalid_value":
4840
4995
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4841
4996
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4871,12 +5026,12 @@ const error$23 = () => {
4871
5026
  };
4872
5027
  };
4873
5028
  function hu_default() {
4874
- return { localeError: error$23() };
5029
+ return { localeError: error$24() };
4875
5030
  }
4876
5031
 
4877
5032
  //#endregion
4878
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4879
- const error$22 = () => {
5033
+ //#region ../../node_modules/zod/v4/locales/id.js
5034
+ const error$23 = () => {
4880
5035
  const Sizable = {
4881
5036
  string: {
4882
5037
  unit: "karakter",
@@ -4898,7 +5053,7 @@ const error$22 = () => {
4898
5053
  function getSizing(origin) {
4899
5054
  return Sizable[origin] ?? null;
4900
5055
  }
4901
- const parsedType$2 = (data) => {
5056
+ const parsedType$3 = (data) => {
4902
5057
  const t = typeof data;
4903
5058
  switch (t) {
4904
5059
  case "number": {
@@ -4950,7 +5105,7 @@ const error$22 = () => {
4950
5105
  };
4951
5106
  return (issue$1) => {
4952
5107
  switch (issue$1.code) {
4953
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5108
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4954
5109
  case "invalid_value":
4955
5110
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
4956
5111
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -4986,12 +5141,12 @@ const error$22 = () => {
4986
5141
  };
4987
5142
  };
4988
5143
  function id_default() {
4989
- return { localeError: error$22() };
5144
+ return { localeError: error$23() };
4990
5145
  }
4991
5146
 
4992
5147
  //#endregion
4993
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4994
- const error$21 = () => {
5148
+ //#region ../../node_modules/zod/v4/locales/it.js
5149
+ const error$22 = () => {
4995
5150
  const Sizable = {
4996
5151
  string: {
4997
5152
  unit: "caratteri",
@@ -5013,7 +5168,7 @@ const error$21 = () => {
5013
5168
  function getSizing(origin) {
5014
5169
  return Sizable[origin] ?? null;
5015
5170
  }
5016
- const parsedType$2 = (data) => {
5171
+ const parsedType$3 = (data) => {
5017
5172
  const t = typeof data;
5018
5173
  switch (t) {
5019
5174
  case "number": {
@@ -5065,7 +5220,7 @@ const error$21 = () => {
5065
5220
  };
5066
5221
  return (issue$1) => {
5067
5222
  switch (issue$1.code) {
5068
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5223
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
5069
5224
  case "invalid_value":
5070
5225
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5071
5226
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5101,12 +5256,12 @@ const error$21 = () => {
5101
5256
  };
5102
5257
  };
5103
5258
  function it_default() {
5104
- return { localeError: error$21() };
5259
+ return { localeError: error$22() };
5105
5260
  }
5106
5261
 
5107
5262
  //#endregion
5108
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5109
- const error$20 = () => {
5263
+ //#region ../../node_modules/zod/v4/locales/ja.js
5264
+ const error$21 = () => {
5110
5265
  const Sizable = {
5111
5266
  string: {
5112
5267
  unit: "文字",
@@ -5128,7 +5283,7 @@ const error$20 = () => {
5128
5283
  function getSizing(origin) {
5129
5284
  return Sizable[origin] ?? null;
5130
5285
  }
5131
- const parsedType$2 = (data) => {
5286
+ const parsedType$3 = (data) => {
5132
5287
  const t = typeof data;
5133
5288
  switch (t) {
5134
5289
  case "number": {
@@ -5180,21 +5335,21 @@ const error$20 = () => {
5180
5335
  };
5181
5336
  return (issue$1) => {
5182
5337
  switch (issue$1.code) {
5183
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5338
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5184
5339
  case "invalid_value":
5185
5340
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5186
5341
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5187
5342
  case "too_big": {
5188
- const adj = issue$1.inclusive ? "<=" : "<";
5343
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5189
5344
  const sizing = getSizing(issue$1.origin);
5190
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5191
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5345
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5346
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5192
5347
  }
5193
5348
  case "too_small": {
5194
- const adj = issue$1.inclusive ? ">=" : ">";
5349
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5195
5350
  const sizing = getSizing(issue$1.origin);
5196
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5197
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5351
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5352
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5198
5353
  }
5199
5354
  case "invalid_format": {
5200
5355
  const _issue = issue$1;
@@ -5214,12 +5369,12 @@ const error$20 = () => {
5214
5369
  };
5215
5370
  };
5216
5371
  function ja_default() {
5217
- return { localeError: error$20() };
5372
+ return { localeError: error$21() };
5218
5373
  }
5219
5374
 
5220
5375
  //#endregion
5221
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5222
- const error$19 = () => {
5376
+ //#region ../../node_modules/zod/v4/locales/kh.js
5377
+ const error$20 = () => {
5223
5378
  const Sizable = {
5224
5379
  string: {
5225
5380
  unit: "តួអក្សរ",
@@ -5241,7 +5396,7 @@ const error$19 = () => {
5241
5396
  function getSizing(origin) {
5242
5397
  return Sizable[origin] ?? null;
5243
5398
  }
5244
- const parsedType$2 = (data) => {
5399
+ const parsedType$3 = (data) => {
5245
5400
  const t = typeof data;
5246
5401
  switch (t) {
5247
5402
  case "number": {
@@ -5293,7 +5448,7 @@ const error$19 = () => {
5293
5448
  };
5294
5449
  return (issue$1) => {
5295
5450
  switch (issue$1.code) {
5296
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5451
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5297
5452
  case "invalid_value":
5298
5453
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5299
5454
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5331,12 +5486,12 @@ const error$19 = () => {
5331
5486
  };
5332
5487
  };
5333
5488
  function kh_default() {
5334
- return { localeError: error$19() };
5489
+ return { localeError: error$20() };
5335
5490
  }
5336
5491
 
5337
5492
  //#endregion
5338
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5339
- const error$18 = () => {
5493
+ //#region ../../node_modules/zod/v4/locales/ko.js
5494
+ const error$19 = () => {
5340
5495
  const Sizable = {
5341
5496
  string: {
5342
5497
  unit: "문자",
@@ -5358,7 +5513,7 @@ const error$18 = () => {
5358
5513
  function getSizing(origin) {
5359
5514
  return Sizable[origin] ?? null;
5360
5515
  }
5361
- const parsedType$2 = (data) => {
5516
+ const parsedType$3 = (data) => {
5362
5517
  const t = typeof data;
5363
5518
  switch (t) {
5364
5519
  case "number": {
@@ -5410,7 +5565,7 @@ const error$18 = () => {
5410
5565
  };
5411
5566
  return (issue$1) => {
5412
5567
  switch (issue$1.code) {
5413
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5568
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5414
5569
  case "invalid_value":
5415
5570
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5416
5571
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5452,12 +5607,12 @@ const error$18 = () => {
5452
5607
  };
5453
5608
  };
5454
5609
  function ko_default() {
5455
- return { localeError: error$18() };
5610
+ return { localeError: error$19() };
5456
5611
  }
5457
5612
 
5458
5613
  //#endregion
5459
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5460
- const error$17 = () => {
5614
+ //#region ../../node_modules/zod/v4/locales/mk.js
5615
+ const error$18 = () => {
5461
5616
  const Sizable = {
5462
5617
  string: {
5463
5618
  unit: "знаци",
@@ -5479,7 +5634,7 @@ const error$17 = () => {
5479
5634
  function getSizing(origin) {
5480
5635
  return Sizable[origin] ?? null;
5481
5636
  }
5482
- const parsedType$2 = (data) => {
5637
+ const parsedType$3 = (data) => {
5483
5638
  const t = typeof data;
5484
5639
  switch (t) {
5485
5640
  case "number": {
@@ -5531,7 +5686,7 @@ const error$17 = () => {
5531
5686
  };
5532
5687
  return (issue$1) => {
5533
5688
  switch (issue$1.code) {
5534
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5689
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5535
5690
  case "invalid_value":
5536
5691
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5537
5692
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5569,12 +5724,12 @@ const error$17 = () => {
5569
5724
  };
5570
5725
  };
5571
5726
  function mk_default() {
5572
- return { localeError: error$17() };
5727
+ return { localeError: error$18() };
5573
5728
  }
5574
5729
 
5575
5730
  //#endregion
5576
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5577
- const error$16 = () => {
5731
+ //#region ../../node_modules/zod/v4/locales/ms.js
5732
+ const error$17 = () => {
5578
5733
  const Sizable = {
5579
5734
  string: {
5580
5735
  unit: "aksara",
@@ -5596,7 +5751,7 @@ const error$16 = () => {
5596
5751
  function getSizing(origin) {
5597
5752
  return Sizable[origin] ?? null;
5598
5753
  }
5599
- const parsedType$2 = (data) => {
5754
+ const parsedType$3 = (data) => {
5600
5755
  const t = typeof data;
5601
5756
  switch (t) {
5602
5757
  case "number": {
@@ -5648,7 +5803,7 @@ const error$16 = () => {
5648
5803
  };
5649
5804
  return (issue$1) => {
5650
5805
  switch (issue$1.code) {
5651
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5806
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5652
5807
  case "invalid_value":
5653
5808
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5654
5809
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5684,12 +5839,12 @@ const error$16 = () => {
5684
5839
  };
5685
5840
  };
5686
5841
  function ms_default() {
5687
- return { localeError: error$16() };
5842
+ return { localeError: error$17() };
5688
5843
  }
5689
5844
 
5690
5845
  //#endregion
5691
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5692
- const error$15 = () => {
5846
+ //#region ../../node_modules/zod/v4/locales/nl.js
5847
+ const error$16 = () => {
5693
5848
  const Sizable = {
5694
5849
  string: { unit: "tekens" },
5695
5850
  file: { unit: "bytes" },
@@ -5699,7 +5854,7 @@ const error$15 = () => {
5699
5854
  function getSizing(origin) {
5700
5855
  return Sizable[origin] ?? null;
5701
5856
  }
5702
- const parsedType$2 = (data) => {
5857
+ const parsedType$3 = (data) => {
5703
5858
  const t = typeof data;
5704
5859
  switch (t) {
5705
5860
  case "number": {
@@ -5751,7 +5906,7 @@ const error$15 = () => {
5751
5906
  };
5752
5907
  return (issue$1) => {
5753
5908
  switch (issue$1.code) {
5754
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5909
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5755
5910
  case "invalid_value":
5756
5911
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5757
5912
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5789,12 +5944,12 @@ const error$15 = () => {
5789
5944
  };
5790
5945
  };
5791
5946
  function nl_default() {
5792
- return { localeError: error$15() };
5947
+ return { localeError: error$16() };
5793
5948
  }
5794
5949
 
5795
5950
  //#endregion
5796
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5797
- const error$14 = () => {
5951
+ //#region ../../node_modules/zod/v4/locales/no.js
5952
+ const error$15 = () => {
5798
5953
  const Sizable = {
5799
5954
  string: {
5800
5955
  unit: "tegn",
@@ -5816,7 +5971,7 @@ const error$14 = () => {
5816
5971
  function getSizing(origin) {
5817
5972
  return Sizable[origin] ?? null;
5818
5973
  }
5819
- const parsedType$2 = (data) => {
5974
+ const parsedType$3 = (data) => {
5820
5975
  const t = typeof data;
5821
5976
  switch (t) {
5822
5977
  case "number": {
@@ -5868,7 +6023,7 @@ const error$14 = () => {
5868
6023
  };
5869
6024
  return (issue$1) => {
5870
6025
  switch (issue$1.code) {
5871
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
6026
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5872
6027
  case "invalid_value":
5873
6028
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5874
6029
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5904,12 +6059,12 @@ const error$14 = () => {
5904
6059
  };
5905
6060
  };
5906
6061
  function no_default() {
5907
- return { localeError: error$14() };
6062
+ return { localeError: error$15() };
5908
6063
  }
5909
6064
 
5910
6065
  //#endregion
5911
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5912
- const error$13 = () => {
6066
+ //#region ../../node_modules/zod/v4/locales/ota.js
6067
+ const error$14 = () => {
5913
6068
  const Sizable = {
5914
6069
  string: {
5915
6070
  unit: "harf",
@@ -5931,7 +6086,7 @@ const error$13 = () => {
5931
6086
  function getSizing(origin) {
5932
6087
  return Sizable[origin] ?? null;
5933
6088
  }
5934
- const parsedType$2 = (data) => {
6089
+ const parsedType$3 = (data) => {
5935
6090
  const t = typeof data;
5936
6091
  switch (t) {
5937
6092
  case "number": {
@@ -5983,7 +6138,7 @@ const error$13 = () => {
5983
6138
  };
5984
6139
  return (issue$1) => {
5985
6140
  switch (issue$1.code) {
5986
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6141
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5987
6142
  case "invalid_value":
5988
6143
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
5989
6144
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6019,11 +6174,138 @@ const error$13 = () => {
6019
6174
  };
6020
6175
  };
6021
6176
  function ota_default() {
6177
+ return { localeError: error$14() };
6178
+ }
6179
+
6180
+ //#endregion
6181
+ //#region ../../node_modules/zod/v4/locales/ps.js
6182
+ const error$13 = () => {
6183
+ const Sizable = {
6184
+ string: {
6185
+ unit: "توکي",
6186
+ verb: "ولري"
6187
+ },
6188
+ file: {
6189
+ unit: "بایټس",
6190
+ verb: "ولري"
6191
+ },
6192
+ array: {
6193
+ unit: "توکي",
6194
+ verb: "ولري"
6195
+ },
6196
+ set: {
6197
+ unit: "توکي",
6198
+ verb: "ولري"
6199
+ }
6200
+ };
6201
+ function getSizing(origin) {
6202
+ return Sizable[origin] ?? null;
6203
+ }
6204
+ const parsedType$3 = (data) => {
6205
+ const t = typeof data;
6206
+ switch (t) {
6207
+ case "number": {
6208
+ return Number.isNaN(data) ? "NaN" : "عدد";
6209
+ }
6210
+ case "object": {
6211
+ if (Array.isArray(data)) {
6212
+ return "ارې";
6213
+ }
6214
+ if (data === null) {
6215
+ return "null";
6216
+ }
6217
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6218
+ return data.constructor.name;
6219
+ }
6220
+ }
6221
+ }
6222
+ return t;
6223
+ };
6224
+ const Nouns = {
6225
+ regex: "ورودي",
6226
+ email: "بریښنالیک",
6227
+ url: "یو آر ال",
6228
+ emoji: "ایموجي",
6229
+ uuid: "UUID",
6230
+ uuidv4: "UUIDv4",
6231
+ uuidv6: "UUIDv6",
6232
+ nanoid: "nanoid",
6233
+ guid: "GUID",
6234
+ cuid: "cuid",
6235
+ cuid2: "cuid2",
6236
+ ulid: "ULID",
6237
+ xid: "XID",
6238
+ ksuid: "KSUID",
6239
+ datetime: "نیټه او وخت",
6240
+ date: "نېټه",
6241
+ time: "وخت",
6242
+ duration: "موده",
6243
+ ipv4: "د IPv4 پته",
6244
+ ipv6: "د IPv6 پته",
6245
+ cidrv4: "د IPv4 ساحه",
6246
+ cidrv6: "د IPv6 ساحه",
6247
+ base64: "base64-encoded متن",
6248
+ base64url: "base64url-encoded متن",
6249
+ json_string: "JSON متن",
6250
+ e164: "د E.164 شمېره",
6251
+ jwt: "JWT",
6252
+ template_literal: "ورودي"
6253
+ };
6254
+ return (issue$1) => {
6255
+ switch (issue$1.code) {
6256
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6257
+ case "invalid_value":
6258
+ if (issue$1.values.length === 1) {
6259
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6260
+ }
6261
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6262
+ case "too_big": {
6263
+ const adj = issue$1.inclusive ? "<=" : "<";
6264
+ const sizing = getSizing(issue$1.origin);
6265
+ if (sizing) {
6266
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6267
+ }
6268
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6269
+ }
6270
+ case "too_small": {
6271
+ const adj = issue$1.inclusive ? ">=" : ">";
6272
+ const sizing = getSizing(issue$1.origin);
6273
+ if (sizing) {
6274
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6275
+ }
6276
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6277
+ }
6278
+ case "invalid_format": {
6279
+ const _issue = issue$1;
6280
+ if (_issue.format === "starts_with") {
6281
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6282
+ }
6283
+ if (_issue.format === "ends_with") {
6284
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6285
+ }
6286
+ if (_issue.format === "includes") {
6287
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6288
+ }
6289
+ if (_issue.format === "regex") {
6290
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6291
+ }
6292
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6293
+ }
6294
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6295
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6296
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6297
+ case "invalid_union": return `ناسمه ورودي`;
6298
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6299
+ default: return `ناسمه ورودي`;
6300
+ }
6301
+ };
6302
+ };
6303
+ function ps_default() {
6022
6304
  return { localeError: error$13() };
6023
6305
  }
6024
6306
 
6025
6307
  //#endregion
6026
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6308
+ //#region ../../node_modules/zod/v4/locales/pl.js
6027
6309
  const error$12 = () => {
6028
6310
  const Sizable = {
6029
6311
  string: {
@@ -6046,7 +6328,7 @@ const error$12 = () => {
6046
6328
  function getSizing(origin) {
6047
6329
  return Sizable[origin] ?? null;
6048
6330
  }
6049
- const parsedType$2 = (data) => {
6331
+ const parsedType$3 = (data) => {
6050
6332
  const t = typeof data;
6051
6333
  switch (t) {
6052
6334
  case "number": {
@@ -6098,7 +6380,7 @@ const error$12 = () => {
6098
6380
  };
6099
6381
  return (issue$1) => {
6100
6382
  switch (issue$1.code) {
6101
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6383
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6102
6384
  case "invalid_value":
6103
6385
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6104
6386
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6140,7 +6422,7 @@ function pl_default() {
6140
6422
  }
6141
6423
 
6142
6424
  //#endregion
6143
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6425
+ //#region ../../node_modules/zod/v4/locales/pt.js
6144
6426
  const error$11 = () => {
6145
6427
  const Sizable = {
6146
6428
  string: {
@@ -6163,7 +6445,7 @@ const error$11 = () => {
6163
6445
  function getSizing(origin) {
6164
6446
  return Sizable[origin] ?? null;
6165
6447
  }
6166
- const parsedType$2 = (data) => {
6448
+ const parsedType$3 = (data) => {
6167
6449
  const t = typeof data;
6168
6450
  switch (t) {
6169
6451
  case "number": {
@@ -6215,7 +6497,7 @@ const error$11 = () => {
6215
6497
  };
6216
6498
  return (issue$1) => {
6217
6499
  switch (issue$1.code) {
6218
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6500
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6219
6501
  case "invalid_value":
6220
6502
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6221
6503
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6255,7 +6537,7 @@ function pt_default() {
6255
6537
  }
6256
6538
 
6257
6539
  //#endregion
6258
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6540
+ //#region ../../node_modules/zod/v4/locales/ru.js
6259
6541
  function getRussianPlural(count, one, few, many) {
6260
6542
  const absCount = Math.abs(count);
6261
6543
  const lastDigit = absCount % 10;
@@ -6309,7 +6591,7 @@ const error$10 = () => {
6309
6591
  function getSizing(origin) {
6310
6592
  return Sizable[origin] ?? null;
6311
6593
  }
6312
- const parsedType$2 = (data) => {
6594
+ const parsedType$3 = (data) => {
6313
6595
  const t = typeof data;
6314
6596
  switch (t) {
6315
6597
  case "number": {
@@ -6361,7 +6643,7 @@ const error$10 = () => {
6361
6643
  };
6362
6644
  return (issue$1) => {
6363
6645
  switch (issue$1.code) {
6364
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6646
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6365
6647
  case "invalid_value":
6366
6648
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6367
6649
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6407,7 +6689,7 @@ function ru_default() {
6407
6689
  }
6408
6690
 
6409
6691
  //#endregion
6410
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6692
+ //#region ../../node_modules/zod/v4/locales/sl.js
6411
6693
  const error$9 = () => {
6412
6694
  const Sizable = {
6413
6695
  string: {
@@ -6430,7 +6712,7 @@ const error$9 = () => {
6430
6712
  function getSizing(origin) {
6431
6713
  return Sizable[origin] ?? null;
6432
6714
  }
6433
- const parsedType$2 = (data) => {
6715
+ const parsedType$3 = (data) => {
6434
6716
  const t = typeof data;
6435
6717
  switch (t) {
6436
6718
  case "number": {
@@ -6482,7 +6764,7 @@ const error$9 = () => {
6482
6764
  };
6483
6765
  return (issue$1) => {
6484
6766
  switch (issue$1.code) {
6485
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6767
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6486
6768
  case "invalid_value":
6487
6769
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6488
6770
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6524,7 +6806,7 @@ function sl_default() {
6524
6806
  }
6525
6807
 
6526
6808
  //#endregion
6527
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6809
+ //#region ../../node_modules/zod/v4/locales/sv.js
6528
6810
  const error$8 = () => {
6529
6811
  const Sizable = {
6530
6812
  string: {
@@ -6547,7 +6829,7 @@ const error$8 = () => {
6547
6829
  function getSizing(origin) {
6548
6830
  return Sizable[origin] ?? null;
6549
6831
  }
6550
- const parsedType$2 = (data) => {
6832
+ const parsedType$3 = (data) => {
6551
6833
  const t = typeof data;
6552
6834
  switch (t) {
6553
6835
  case "number": {
@@ -6599,7 +6881,7 @@ const error$8 = () => {
6599
6881
  };
6600
6882
  return (issue$1) => {
6601
6883
  switch (issue$1.code) {
6602
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6884
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6603
6885
  case "invalid_value":
6604
6886
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6605
6887
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6643,7 +6925,7 @@ function sv_default() {
6643
6925
  }
6644
6926
 
6645
6927
  //#endregion
6646
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6928
+ //#region ../../node_modules/zod/v4/locales/ta.js
6647
6929
  const error$7 = () => {
6648
6930
  const Sizable = {
6649
6931
  string: {
@@ -6666,7 +6948,7 @@ const error$7 = () => {
6666
6948
  function getSizing(origin) {
6667
6949
  return Sizable[origin] ?? null;
6668
6950
  }
6669
- const parsedType$2 = (data) => {
6951
+ const parsedType$3 = (data) => {
6670
6952
  const t = typeof data;
6671
6953
  switch (t) {
6672
6954
  case "number": {
@@ -6718,7 +7000,7 @@ const error$7 = () => {
6718
7000
  };
6719
7001
  return (issue$1) => {
6720
7002
  switch (issue$1.code) {
6721
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
7003
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6722
7004
  case "invalid_value":
6723
7005
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6724
7006
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6760,7 +7042,7 @@ function ta_default() {
6760
7042
  }
6761
7043
 
6762
7044
  //#endregion
6763
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
7045
+ //#region ../../node_modules/zod/v4/locales/th.js
6764
7046
  const error$6 = () => {
6765
7047
  const Sizable = {
6766
7048
  string: {
@@ -6783,7 +7065,7 @@ const error$6 = () => {
6783
7065
  function getSizing(origin) {
6784
7066
  return Sizable[origin] ?? null;
6785
7067
  }
6786
- const parsedType$2 = (data) => {
7068
+ const parsedType$3 = (data) => {
6787
7069
  const t = typeof data;
6788
7070
  switch (t) {
6789
7071
  case "number": {
@@ -6835,7 +7117,7 @@ const error$6 = () => {
6835
7117
  };
6836
7118
  return (issue$1) => {
6837
7119
  switch (issue$1.code) {
6838
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7120
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6839
7121
  case "invalid_value":
6840
7122
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
6841
7123
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -6877,7 +7159,7 @@ function th_default() {
6877
7159
  }
6878
7160
 
6879
7161
  //#endregion
6880
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7162
+ //#region ../../node_modules/zod/v4/locales/tr.js
6881
7163
  const parsedType = (data) => {
6882
7164
  const t = typeof data;
6883
7165
  switch (t) {
@@ -6990,7 +7272,7 @@ function tr_default() {
6990
7272
  }
6991
7273
 
6992
7274
  //#endregion
6993
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7275
+ //#region ../../node_modules/zod/v4/locales/ua.js
6994
7276
  const error$4 = () => {
6995
7277
  const Sizable = {
6996
7278
  string: {
@@ -7013,7 +7295,7 @@ const error$4 = () => {
7013
7295
  function getSizing(origin) {
7014
7296
  return Sizable[origin] ?? null;
7015
7297
  }
7016
- const parsedType$2 = (data) => {
7298
+ const parsedType$3 = (data) => {
7017
7299
  const t = typeof data;
7018
7300
  switch (t) {
7019
7301
  case "number": {
@@ -7065,7 +7347,7 @@ const error$4 = () => {
7065
7347
  };
7066
7348
  return (issue$1) => {
7067
7349
  switch (issue$1.code) {
7068
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7350
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
7069
7351
  case "invalid_value":
7070
7352
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7071
7353
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7105,7 +7387,7 @@ function ua_default() {
7105
7387
  }
7106
7388
 
7107
7389
  //#endregion
7108
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7390
+ //#region ../../node_modules/zod/v4/locales/ur.js
7109
7391
  const error$3 = () => {
7110
7392
  const Sizable = {
7111
7393
  string: {
@@ -7128,7 +7410,7 @@ const error$3 = () => {
7128
7410
  function getSizing(origin) {
7129
7411
  return Sizable[origin] ?? null;
7130
7412
  }
7131
- const parsedType$2 = (data) => {
7413
+ const parsedType$3 = (data) => {
7132
7414
  const t = typeof data;
7133
7415
  switch (t) {
7134
7416
  case "number": {
@@ -7180,7 +7462,7 @@ const error$3 = () => {
7180
7462
  };
7181
7463
  return (issue$1) => {
7182
7464
  switch (issue$1.code) {
7183
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7465
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7184
7466
  case "invalid_value":
7185
7467
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7186
7468
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7222,7 +7504,7 @@ function ur_default() {
7222
7504
  }
7223
7505
 
7224
7506
  //#endregion
7225
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7507
+ //#region ../../node_modules/zod/v4/locales/vi.js
7226
7508
  const error$2 = () => {
7227
7509
  const Sizable = {
7228
7510
  string: {
@@ -7245,7 +7527,7 @@ const error$2 = () => {
7245
7527
  function getSizing(origin) {
7246
7528
  return Sizable[origin] ?? null;
7247
7529
  }
7248
- const parsedType$2 = (data) => {
7530
+ const parsedType$3 = (data) => {
7249
7531
  const t = typeof data;
7250
7532
  switch (t) {
7251
7533
  case "number": {
@@ -7297,7 +7579,7 @@ const error$2 = () => {
7297
7579
  };
7298
7580
  return (issue$1) => {
7299
7581
  switch (issue$1.code) {
7300
- case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$2(issue$1.input)}`;
7582
+ case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$3(issue$1.input)}`;
7301
7583
  case "invalid_value":
7302
7584
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7303
7585
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7337,7 +7619,7 @@ function vi_default() {
7337
7619
  }
7338
7620
 
7339
7621
  //#endregion
7340
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7622
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7341
7623
  const error$1 = () => {
7342
7624
  const Sizable = {
7343
7625
  string: {
@@ -7360,7 +7642,7 @@ const error$1 = () => {
7360
7642
  function getSizing(origin) {
7361
7643
  return Sizable[origin] ?? null;
7362
7644
  }
7363
- const parsedType$2 = (data) => {
7645
+ const parsedType$3 = (data) => {
7364
7646
  const t = typeof data;
7365
7647
  switch (t) {
7366
7648
  case "number": {
@@ -7412,7 +7694,7 @@ const error$1 = () => {
7412
7694
  };
7413
7695
  return (issue$1) => {
7414
7696
  switch (issue$1.code) {
7415
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7697
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7416
7698
  case "invalid_value":
7417
7699
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7418
7700
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7452,7 +7734,7 @@ function zh_CN_default() {
7452
7734
  }
7453
7735
 
7454
7736
  //#endregion
7455
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7737
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7456
7738
  const error = () => {
7457
7739
  const Sizable = {
7458
7740
  string: {
@@ -7475,7 +7757,7 @@ const error = () => {
7475
7757
  function getSizing(origin) {
7476
7758
  return Sizable[origin] ?? null;
7477
7759
  }
7478
- const parsedType$2 = (data) => {
7760
+ const parsedType$3 = (data) => {
7479
7761
  const t = typeof data;
7480
7762
  switch (t) {
7481
7763
  case "number": {
@@ -7527,7 +7809,7 @@ const error = () => {
7527
7809
  };
7528
7810
  return (issue$1) => {
7529
7811
  switch (issue$1.code) {
7530
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7812
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7531
7813
  case "invalid_value":
7532
7814
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7533
7815
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7569,7 +7851,7 @@ function zh_TW_default() {
7569
7851
  }
7570
7852
 
7571
7853
  //#endregion
7572
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7854
+ //#region ../../node_modules/zod/v4/locales/index.js
7573
7855
  var locales_exports = {};
7574
7856
  __export(locales_exports, {
7575
7857
  ar: () => ar_default,
@@ -7579,6 +7861,7 @@ __export(locales_exports, {
7579
7861
  cs: () => cs_default,
7580
7862
  de: () => de_default,
7581
7863
  en: () => en_default,
7864
+ eo: () => eo_default,
7582
7865
  es: () => es_default,
7583
7866
  fa: () => fa_default,
7584
7867
  fi: () => fi_default,
@@ -7597,6 +7880,7 @@ __export(locales_exports, {
7597
7880
  no: () => no_default,
7598
7881
  ota: () => ota_default,
7599
7882
  pl: () => pl_default,
7883
+ ps: () => ps_default,
7600
7884
  pt: () => pt_default,
7601
7885
  ru: () => ru_default,
7602
7886
  sl: () => sl_default,
@@ -7612,12 +7896,12 @@ __export(locales_exports, {
7612
7896
  });
7613
7897
 
7614
7898
  //#endregion
7615
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7899
+ //#region ../../node_modules/zod/v4/core/registries.js
7616
7900
  const $output = Symbol("ZodOutput");
7617
7901
  const $input = Symbol("ZodInput");
7618
7902
  var $ZodRegistry = class {
7619
7903
  constructor() {
7620
- this._map = new WeakMap();
7904
+ this._map = new Map();
7621
7905
  this._idmap = new Map();
7622
7906
  }
7623
7907
  add(schema, ..._meta) {
@@ -7631,7 +7915,16 @@ var $ZodRegistry = class {
7631
7915
  }
7632
7916
  return this;
7633
7917
  }
7918
+ clear() {
7919
+ this._map = new Map();
7920
+ this._idmap = new Map();
7921
+ return this;
7922
+ }
7634
7923
  remove(schema) {
7924
+ const meta = this._map.get(schema);
7925
+ if (meta && typeof meta === "object" && "id" in meta) {
7926
+ this._idmap.delete(meta.id);
7927
+ }
7635
7928
  this._map.delete(schema);
7636
7929
  return this;
7637
7930
  }
@@ -7657,7 +7950,7 @@ function registry() {
7657
7950
  const globalRegistry = /* @__PURE__ */ registry();
7658
7951
 
7659
7952
  //#endregion
7660
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7953
+ //#region ../../node_modules/zod/v4/core/api.js
7661
7954
  function _string(Class$1, params) {
7662
7955
  return new Class$1({
7663
7956
  type: "string",
@@ -7872,6 +8165,13 @@ function _jwt(Class$1, params) {
7872
8165
  ...normalizeParams(params)
7873
8166
  });
7874
8167
  }
8168
+ const TimePrecision = {
8169
+ Any: null,
8170
+ Minute: -1,
8171
+ Second: 0,
8172
+ Millisecond: 3,
8173
+ Microsecond: 6
8174
+ };
7875
8175
  function _isoDateTime(Class$1, params) {
7876
8176
  return new Class$1({
7877
8177
  type: "string",
@@ -8438,8 +8738,8 @@ function _refine(Class$1, fn, _params) {
8438
8738
  return schema;
8439
8739
  }
8440
8740
  function _stringbool(Classes, _params) {
8441
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8442
- let truthyArray = truthy ?? [
8741
+ const params = normalizeParams(_params);
8742
+ let truthyArray = params.truthy ?? [
8443
8743
  "true",
8444
8744
  "1",
8445
8745
  "yes",
@@ -8447,7 +8747,7 @@ function _stringbool(Classes, _params) {
8447
8747
  "y",
8448
8748
  "enabled"
8449
8749
  ];
8450
- let falsyArray = falsy ?? [
8750
+ let falsyArray = params.falsy ?? [
8451
8751
  "false",
8452
8752
  "0",
8453
8753
  "no",
@@ -8455,7 +8755,7 @@ function _stringbool(Classes, _params) {
8455
8755
  "n",
8456
8756
  "disabled"
8457
8757
  ];
8458
- if (_case !== "sensitive") {
8758
+ if (params.case !== "sensitive") {
8459
8759
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8460
8760
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8461
8761
  }
@@ -8469,7 +8769,7 @@ function _stringbool(Classes, _params) {
8469
8769
  type: "transform",
8470
8770
  transform: (input, payload) => {
8471
8771
  let data = input;
8472
- if (_case !== "sensitive") data = data.toLowerCase();
8772
+ if (params.case !== "sensitive") data = data.toLowerCase();
8473
8773
  if (truthySet.has(data)) {
8474
8774
  return true;
8475
8775
  } else if (falsySet.has(data)) {
@@ -8485,31 +8785,47 @@ function _stringbool(Classes, _params) {
8485
8785
  return {};
8486
8786
  }
8487
8787
  },
8488
- error: error$37
8788
+ error: params.error
8489
8789
  });
8490
8790
  const innerPipe = new _Pipe({
8491
8791
  type: "pipe",
8492
8792
  in: new _String({
8493
8793
  type: "string",
8494
- error: error$37
8794
+ error: params.error
8495
8795
  }),
8496
8796
  out: tx,
8497
- error: error$37
8797
+ error: params.error
8498
8798
  });
8499
8799
  const outerPipe = new _Pipe({
8500
8800
  type: "pipe",
8501
8801
  in: innerPipe,
8502
8802
  out: new _Boolean({
8503
8803
  type: "boolean",
8504
- error: error$37
8804
+ error: params.error
8505
8805
  }),
8506
- error: error$37
8806
+ error: params.error
8507
8807
  });
8508
8808
  return outerPipe;
8509
8809
  }
8810
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8811
+ const params = normalizeParams(_params);
8812
+ const def = {
8813
+ ...normalizeParams(_params),
8814
+ check: "string_format",
8815
+ type: "string",
8816
+ format,
8817
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8818
+ ...params
8819
+ };
8820
+ if (fnOrRegex instanceof RegExp) {
8821
+ def.pattern = fnOrRegex;
8822
+ }
8823
+ const inst = new Class$1(def);
8824
+ return inst;
8825
+ }
8510
8826
 
8511
8827
  //#endregion
8512
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8828
+ //#region ../../node_modules/zod/v4/core/function.js
8513
8829
  var $ZodFunction = class {
8514
8830
  constructor(def) {
8515
8831
  this._def = def;
@@ -8580,7 +8896,7 @@ function _function(params) {
8580
8896
  }
8581
8897
 
8582
8898
  //#endregion
8583
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8899
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8584
8900
  var JSONSchemaGenerator = class {
8585
8901
  constructor(params) {
8586
8902
  this.counter = 0;
@@ -8616,431 +8932,435 @@ var JSONSchemaGenerator = class {
8616
8932
  const result = {
8617
8933
  schema: {},
8618
8934
  count: 1,
8619
- cycle: undefined
8620
- };
8621
- this.seen.set(schema, result);
8622
- if (schema._zod.toJSONSchema) {
8623
- result.schema = schema._zod.toJSONSchema();
8624
- }
8625
- const params = {
8626
- ..._params,
8627
- schemaPath: [..._params.schemaPath, schema],
8935
+ cycle: undefined,
8628
8936
  path: _params.path
8629
8937
  };
8630
- const parent = schema._zod.parent;
8631
- if (parent) {
8632
- result.ref = parent;
8633
- this.process(parent, params);
8634
- this.seen.get(parent).isParent = true;
8938
+ this.seen.set(schema, result);
8939
+ const overrideSchema = schema._zod.toJSONSchema?.();
8940
+ if (overrideSchema) {
8941
+ result.schema = overrideSchema;
8635
8942
  } else {
8636
- const _json = result.schema;
8637
- switch (def.type) {
8638
- case "string": {
8639
- const json$1 = _json;
8640
- json$1.type = "string";
8641
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8642
- if (typeof minimum === "number") json$1.minLength = minimum;
8643
- if (typeof maximum === "number") json$1.maxLength = maximum;
8644
- if (format) {
8645
- json$1.format = formatMap[format] ?? format;
8646
- if (json$1.format === "") delete json$1.format;
8943
+ const params = {
8944
+ ..._params,
8945
+ schemaPath: [..._params.schemaPath, schema],
8946
+ path: _params.path
8947
+ };
8948
+ const parent = schema._zod.parent;
8949
+ if (parent) {
8950
+ result.ref = parent;
8951
+ this.process(parent, params);
8952
+ this.seen.get(parent).isParent = true;
8953
+ } else {
8954
+ const _json = result.schema;
8955
+ switch (def.type) {
8956
+ case "string": {
8957
+ const json$1 = _json;
8958
+ json$1.type = "string";
8959
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8960
+ if (typeof minimum === "number") json$1.minLength = minimum;
8961
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8962
+ if (format) {
8963
+ json$1.format = formatMap[format] ?? format;
8964
+ if (json$1.format === "") delete json$1.format;
8965
+ }
8966
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8967
+ if (patterns && patterns.size > 0) {
8968
+ const regexes = [...patterns];
8969
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8970
+ else if (regexes.length > 1) {
8971
+ result.schema.allOf = [...regexes.map((regex) => ({
8972
+ ...this.target === "draft-7" ? { type: "string" } : {},
8973
+ pattern: regex.source
8974
+ }))];
8975
+ }
8976
+ }
8977
+ break;
8647
8978
  }
8648
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8649
- if (patterns && patterns.size > 0) {
8650
- const regexes = [...patterns];
8651
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8652
- else if (regexes.length > 1) {
8653
- result.schema.allOf = [...regexes.map((regex) => ({
8654
- ...this.target === "draft-7" ? { type: "string" } : {},
8655
- pattern: regex.source
8656
- }))];
8979
+ case "number": {
8980
+ const json$1 = _json;
8981
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8982
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8983
+ else json$1.type = "number";
8984
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8985
+ if (typeof minimum === "number") {
8986
+ json$1.minimum = minimum;
8987
+ if (typeof exclusiveMinimum === "number") {
8988
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8989
+ else delete json$1.exclusiveMinimum;
8990
+ }
8657
8991
  }
8992
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8993
+ if (typeof maximum === "number") {
8994
+ json$1.maximum = maximum;
8995
+ if (typeof exclusiveMaximum === "number") {
8996
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8997
+ else delete json$1.exclusiveMaximum;
8998
+ }
8999
+ }
9000
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9001
+ break;
8658
9002
  }
8659
- break;
8660
- }
8661
- case "number": {
8662
- const json$1 = _json;
8663
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8664
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8665
- else json$1.type = "number";
8666
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8667
- if (typeof minimum === "number") {
8668
- json$1.minimum = minimum;
8669
- if (typeof exclusiveMinimum === "number") {
8670
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8671
- else delete json$1.exclusiveMinimum;
9003
+ case "boolean": {
9004
+ const json$1 = _json;
9005
+ json$1.type = "boolean";
9006
+ break;
9007
+ }
9008
+ case "bigint": {
9009
+ if (this.unrepresentable === "throw") {
9010
+ throw new Error("BigInt cannot be represented in JSON Schema");
8672
9011
  }
9012
+ break;
8673
9013
  }
8674
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8675
- if (typeof maximum === "number") {
8676
- json$1.maximum = maximum;
8677
- if (typeof exclusiveMaximum === "number") {
8678
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8679
- else delete json$1.exclusiveMaximum;
9014
+ case "symbol": {
9015
+ if (this.unrepresentable === "throw") {
9016
+ throw new Error("Symbols cannot be represented in JSON Schema");
8680
9017
  }
9018
+ break;
8681
9019
  }
8682
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8683
- break;
8684
- }
8685
- case "boolean": {
8686
- const json$1 = _json;
8687
- json$1.type = "boolean";
8688
- break;
8689
- }
8690
- case "bigint": {
8691
- if (this.unrepresentable === "throw") {
8692
- throw new Error("BigInt cannot be represented in JSON Schema");
9020
+ case "null": {
9021
+ _json.type = "null";
9022
+ break;
8693
9023
  }
8694
- break;
8695
- }
8696
- case "symbol": {
8697
- if (this.unrepresentable === "throw") {
8698
- throw new Error("Symbols cannot be represented in JSON Schema");
9024
+ case "any": {
9025
+ break;
8699
9026
  }
8700
- break;
8701
- }
8702
- case "undefined": {
8703
- const json$1 = _json;
8704
- json$1.type = "null";
8705
- break;
8706
- }
8707
- case "null": {
8708
- _json.type = "null";
8709
- break;
8710
- }
8711
- case "any": {
8712
- break;
8713
- }
8714
- case "unknown": {
8715
- break;
8716
- }
8717
- case "never": {
8718
- _json.not = {};
8719
- break;
8720
- }
8721
- case "void": {
8722
- if (this.unrepresentable === "throw") {
8723
- throw new Error("Void cannot be represented in JSON Schema");
9027
+ case "unknown": {
9028
+ break;
8724
9029
  }
8725
- break;
8726
- }
8727
- case "date": {
8728
- if (this.unrepresentable === "throw") {
8729
- throw new Error("Date cannot be represented in JSON Schema");
9030
+ case "undefined": {
9031
+ if (this.unrepresentable === "throw") {
9032
+ throw new Error("Undefined cannot be represented in JSON Schema");
9033
+ }
9034
+ break;
8730
9035
  }
8731
- break;
8732
- }
8733
- case "array": {
8734
- const json$1 = _json;
8735
- const { minimum, maximum } = schema._zod.bag;
8736
- if (typeof minimum === "number") json$1.minItems = minimum;
8737
- if (typeof maximum === "number") json$1.maxItems = maximum;
8738
- json$1.type = "array";
8739
- json$1.items = this.process(def.element, {
8740
- ...params,
8741
- path: [...params.path, "items"]
8742
- });
8743
- break;
8744
- }
8745
- case "object": {
8746
- const json$1 = _json;
8747
- json$1.type = "object";
8748
- json$1.properties = {};
8749
- const shape = def.shape;
8750
- for (const key in shape) {
8751
- json$1.properties[key] = this.process(shape[key], {
8752
- ...params,
8753
- path: [
8754
- ...params.path,
8755
- "properties",
8756
- key
8757
- ]
8758
- });
9036
+ case "void": {
9037
+ if (this.unrepresentable === "throw") {
9038
+ throw new Error("Void cannot be represented in JSON Schema");
9039
+ }
9040
+ break;
8759
9041
  }
8760
- const allKeys = new Set(Object.keys(shape));
8761
- const requiredKeys = new Set([...allKeys].filter((key) => {
8762
- const v = def.shape[key]._zod;
8763
- if (this.io === "input") {
8764
- return v.optin === undefined;
8765
- } else {
8766
- return v.optout === undefined;
9042
+ case "never": {
9043
+ _json.not = {};
9044
+ break;
9045
+ }
9046
+ case "date": {
9047
+ if (this.unrepresentable === "throw") {
9048
+ throw new Error("Date cannot be represented in JSON Schema");
8767
9049
  }
8768
- }));
8769
- if (requiredKeys.size > 0) {
8770
- json$1.required = Array.from(requiredKeys);
9050
+ break;
8771
9051
  }
8772
- if (def.catchall?._zod.def.type === "never") {
8773
- json$1.additionalProperties = false;
8774
- } else if (!def.catchall) {
8775
- if (this.io === "output") json$1.additionalProperties = false;
8776
- } else if (def.catchall) {
8777
- json$1.additionalProperties = this.process(def.catchall, {
9052
+ case "array": {
9053
+ const json$1 = _json;
9054
+ const { minimum, maximum } = schema._zod.bag;
9055
+ if (typeof minimum === "number") json$1.minItems = minimum;
9056
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9057
+ json$1.type = "array";
9058
+ json$1.items = this.process(def.element, {
8778
9059
  ...params,
8779
- path: [...params.path, "additionalProperties"]
9060
+ path: [...params.path, "items"]
8780
9061
  });
9062
+ break;
8781
9063
  }
8782
- break;
8783
- }
8784
- case "union": {
8785
- const json$1 = _json;
8786
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
8787
- ...params,
8788
- path: [
8789
- ...params.path,
8790
- "anyOf",
8791
- i
8792
- ]
8793
- }));
8794
- break;
8795
- }
8796
- case "intersection": {
8797
- const json$1 = _json;
8798
- const a = this.process(def.left, {
8799
- ...params,
8800
- path: [
8801
- ...params.path,
8802
- "allOf",
8803
- 0
8804
- ]
8805
- });
8806
- const b = this.process(def.right, {
8807
- ...params,
8808
- path: [
8809
- ...params.path,
8810
- "allOf",
8811
- 1
8812
- ]
8813
- });
8814
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8815
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8816
- json$1.allOf = allOf;
8817
- break;
8818
- }
8819
- case "tuple": {
8820
- const json$1 = _json;
8821
- json$1.type = "array";
8822
- const prefixItems = def.items.map((x, i) => this.process(x, {
8823
- ...params,
8824
- path: [
8825
- ...params.path,
8826
- "prefixItems",
8827
- i
8828
- ]
8829
- }));
8830
- if (this.target === "draft-2020-12") {
8831
- json$1.prefixItems = prefixItems;
8832
- } else {
8833
- json$1.items = prefixItems;
9064
+ case "object": {
9065
+ const json$1 = _json;
9066
+ json$1.type = "object";
9067
+ json$1.properties = {};
9068
+ const shape = def.shape;
9069
+ for (const key in shape) {
9070
+ json$1.properties[key] = this.process(shape[key], {
9071
+ ...params,
9072
+ path: [
9073
+ ...params.path,
9074
+ "properties",
9075
+ key
9076
+ ]
9077
+ });
9078
+ }
9079
+ const allKeys = new Set(Object.keys(shape));
9080
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9081
+ const v = def.shape[key]._zod;
9082
+ if (this.io === "input") {
9083
+ return v.optin === undefined;
9084
+ } else {
9085
+ return v.optout === undefined;
9086
+ }
9087
+ }));
9088
+ if (requiredKeys.size > 0) {
9089
+ json$1.required = Array.from(requiredKeys);
9090
+ }
9091
+ if (def.catchall?._zod.def.type === "never") {
9092
+ json$1.additionalProperties = false;
9093
+ } else if (!def.catchall) {
9094
+ if (this.io === "output") json$1.additionalProperties = false;
9095
+ } else if (def.catchall) {
9096
+ json$1.additionalProperties = this.process(def.catchall, {
9097
+ ...params,
9098
+ path: [...params.path, "additionalProperties"]
9099
+ });
9100
+ }
9101
+ break;
8834
9102
  }
8835
- if (def.rest) {
8836
- const rest = this.process(def.rest, {
9103
+ case "union": {
9104
+ const json$1 = _json;
9105
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8837
9106
  ...params,
8838
- path: [...params.path, "items"]
9107
+ path: [
9108
+ ...params.path,
9109
+ "anyOf",
9110
+ i
9111
+ ]
9112
+ }));
9113
+ break;
9114
+ }
9115
+ case "intersection": {
9116
+ const json$1 = _json;
9117
+ const a = this.process(def.left, {
9118
+ ...params,
9119
+ path: [
9120
+ ...params.path,
9121
+ "allOf",
9122
+ 0
9123
+ ]
9124
+ });
9125
+ const b = this.process(def.right, {
9126
+ ...params,
9127
+ path: [
9128
+ ...params.path,
9129
+ "allOf",
9130
+ 1
9131
+ ]
8839
9132
  });
9133
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9134
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9135
+ json$1.allOf = allOf;
9136
+ break;
9137
+ }
9138
+ case "tuple": {
9139
+ const json$1 = _json;
9140
+ json$1.type = "array";
9141
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9142
+ ...params,
9143
+ path: [
9144
+ ...params.path,
9145
+ "prefixItems",
9146
+ i
9147
+ ]
9148
+ }));
8840
9149
  if (this.target === "draft-2020-12") {
8841
- json$1.items = rest;
9150
+ json$1.prefixItems = prefixItems;
8842
9151
  } else {
8843
- json$1.additionalItems = rest;
9152
+ json$1.items = prefixItems;
9153
+ }
9154
+ if (def.rest) {
9155
+ const rest = this.process(def.rest, {
9156
+ ...params,
9157
+ path: [...params.path, "items"]
9158
+ });
9159
+ if (this.target === "draft-2020-12") {
9160
+ json$1.items = rest;
9161
+ } else {
9162
+ json$1.additionalItems = rest;
9163
+ }
8844
9164
  }
9165
+ if (def.rest) {
9166
+ json$1.items = this.process(def.rest, {
9167
+ ...params,
9168
+ path: [...params.path, "items"]
9169
+ });
9170
+ }
9171
+ const { minimum, maximum } = schema._zod.bag;
9172
+ if (typeof minimum === "number") json$1.minItems = minimum;
9173
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9174
+ break;
8845
9175
  }
8846
- if (def.rest) {
8847
- json$1.items = this.process(def.rest, {
9176
+ case "record": {
9177
+ const json$1 = _json;
9178
+ json$1.type = "object";
9179
+ json$1.propertyNames = this.process(def.keyType, {
8848
9180
  ...params,
8849
- path: [...params.path, "items"]
9181
+ path: [...params.path, "propertyNames"]
8850
9182
  });
9183
+ json$1.additionalProperties = this.process(def.valueType, {
9184
+ ...params,
9185
+ path: [...params.path, "additionalProperties"]
9186
+ });
9187
+ break;
8851
9188
  }
8852
- const { minimum, maximum } = schema._zod.bag;
8853
- if (typeof minimum === "number") json$1.minItems = minimum;
8854
- if (typeof maximum === "number") json$1.maxItems = maximum;
8855
- break;
8856
- }
8857
- case "record": {
8858
- const json$1 = _json;
8859
- json$1.type = "object";
8860
- json$1.propertyNames = this.process(def.keyType, {
8861
- ...params,
8862
- path: [...params.path, "propertyNames"]
8863
- });
8864
- json$1.additionalProperties = this.process(def.valueType, {
8865
- ...params,
8866
- path: [...params.path, "additionalProperties"]
8867
- });
8868
- break;
8869
- }
8870
- case "map": {
8871
- if (this.unrepresentable === "throw") {
8872
- throw new Error("Map cannot be represented in JSON Schema");
9189
+ case "map": {
9190
+ if (this.unrepresentable === "throw") {
9191
+ throw new Error("Map cannot be represented in JSON Schema");
9192
+ }
9193
+ break;
8873
9194
  }
8874
- break;
8875
- }
8876
- case "set": {
8877
- if (this.unrepresentable === "throw") {
8878
- throw new Error("Set cannot be represented in JSON Schema");
9195
+ case "set": {
9196
+ if (this.unrepresentable === "throw") {
9197
+ throw new Error("Set cannot be represented in JSON Schema");
9198
+ }
9199
+ break;
9200
+ }
9201
+ case "enum": {
9202
+ const json$1 = _json;
9203
+ const values = getEnumValues(def.entries);
9204
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9205
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9206
+ json$1.enum = values;
9207
+ break;
8879
9208
  }
8880
- break;
8881
- }
8882
- case "enum": {
8883
- const json$1 = _json;
8884
- const values = getEnumValues(def.entries);
8885
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
8886
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
8887
- json$1.enum = values;
8888
- break;
8889
- }
8890
- case "literal": {
8891
- const json$1 = _json;
8892
- const vals = [];
8893
- for (const val of def.values) {
8894
- if (val === undefined) {
8895
- if (this.unrepresentable === "throw") {
8896
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8897
- } else {}
8898
- } else if (typeof val === "bigint") {
8899
- if (this.unrepresentable === "throw") {
8900
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9209
+ case "literal": {
9210
+ const json$1 = _json;
9211
+ const vals = [];
9212
+ for (const val of def.values) {
9213
+ if (val === undefined) {
9214
+ if (this.unrepresentable === "throw") {
9215
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9216
+ } else {}
9217
+ } else if (typeof val === "bigint") {
9218
+ if (this.unrepresentable === "throw") {
9219
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9220
+ } else {
9221
+ vals.push(Number(val));
9222
+ }
8901
9223
  } else {
8902
- vals.push(Number(val));
9224
+ vals.push(val);
8903
9225
  }
9226
+ }
9227
+ if (vals.length === 0) {} else if (vals.length === 1) {
9228
+ const val = vals[0];
9229
+ json$1.type = val === null ? "null" : typeof val;
9230
+ json$1.const = val;
8904
9231
  } else {
8905
- vals.push(val);
9232
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9233
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9234
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9235
+ if (vals.every((v) => v === null)) json$1.type = "null";
9236
+ json$1.enum = vals;
8906
9237
  }
9238
+ break;
8907
9239
  }
8908
- if (vals.length === 0) {} else if (vals.length === 1) {
8909
- const val = vals[0];
8910
- json$1.type = val === null ? "null" : typeof val;
8911
- json$1.const = val;
8912
- } else {
8913
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8914
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8915
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8916
- if (vals.every((v) => v === null)) json$1.type = "null";
8917
- json$1.enum = vals;
8918
- }
8919
- break;
8920
- }
8921
- case "file": {
8922
- const json$1 = _json;
8923
- const file$1 = {
8924
- type: "string",
8925
- format: "binary",
8926
- contentEncoding: "binary"
8927
- };
8928
- const { minimum, maximum, mime } = schema._zod.bag;
8929
- if (minimum !== undefined) file$1.minLength = minimum;
8930
- if (maximum !== undefined) file$1.maxLength = maximum;
8931
- if (mime) {
8932
- if (mime.length === 1) {
8933
- file$1.contentMediaType = mime[0];
8934
- Object.assign(json$1, file$1);
9240
+ case "file": {
9241
+ const json$1 = _json;
9242
+ const file$1 = {
9243
+ type: "string",
9244
+ format: "binary",
9245
+ contentEncoding: "binary"
9246
+ };
9247
+ const { minimum, maximum, mime } = schema._zod.bag;
9248
+ if (minimum !== undefined) file$1.minLength = minimum;
9249
+ if (maximum !== undefined) file$1.maxLength = maximum;
9250
+ if (mime) {
9251
+ if (mime.length === 1) {
9252
+ file$1.contentMediaType = mime[0];
9253
+ Object.assign(json$1, file$1);
9254
+ } else {
9255
+ json$1.anyOf = mime.map((m) => {
9256
+ const mFile = {
9257
+ ...file$1,
9258
+ contentMediaType: m
9259
+ };
9260
+ return mFile;
9261
+ });
9262
+ }
8935
9263
  } else {
8936
- json$1.anyOf = mime.map((m) => {
8937
- const mFile = {
8938
- ...file$1,
8939
- contentMediaType: m
8940
- };
8941
- return mFile;
8942
- });
9264
+ Object.assign(json$1, file$1);
8943
9265
  }
8944
- } else {
8945
- Object.assign(json$1, file$1);
9266
+ break;
8946
9267
  }
8947
- break;
8948
- }
8949
- case "transform": {
8950
- if (this.unrepresentable === "throw") {
8951
- throw new Error("Transforms cannot be represented in JSON Schema");
9268
+ case "transform": {
9269
+ if (this.unrepresentable === "throw") {
9270
+ throw new Error("Transforms cannot be represented in JSON Schema");
9271
+ }
9272
+ break;
8952
9273
  }
8953
- break;
8954
- }
8955
- case "nullable": {
8956
- const inner = this.process(def.innerType, params);
8957
- _json.anyOf = [inner, { type: "null" }];
8958
- break;
8959
- }
8960
- case "nonoptional": {
8961
- this.process(def.innerType, params);
8962
- result.ref = def.innerType;
8963
- break;
8964
- }
8965
- case "success": {
8966
- const json$1 = _json;
8967
- json$1.type = "boolean";
8968
- break;
8969
- }
8970
- case "default": {
8971
- this.process(def.innerType, params);
8972
- result.ref = def.innerType;
8973
- _json.default = def.defaultValue;
8974
- break;
8975
- }
8976
- case "prefault": {
8977
- this.process(def.innerType, params);
8978
- result.ref = def.innerType;
8979
- if (this.io === "input") _json._prefault = def.defaultValue;
8980
- break;
8981
- }
8982
- case "catch": {
8983
- this.process(def.innerType, params);
8984
- result.ref = def.innerType;
8985
- let catchValue;
8986
- try {
8987
- catchValue = def.catchValue(undefined);
8988
- } catch {
8989
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9274
+ case "nullable": {
9275
+ const inner = this.process(def.innerType, params);
9276
+ _json.anyOf = [inner, { type: "null" }];
9277
+ break;
8990
9278
  }
8991
- _json.default = catchValue;
8992
- break;
8993
- }
8994
- case "nan": {
8995
- if (this.unrepresentable === "throw") {
8996
- throw new Error("NaN cannot be represented in JSON Schema");
9279
+ case "nonoptional": {
9280
+ this.process(def.innerType, params);
9281
+ result.ref = def.innerType;
9282
+ break;
8997
9283
  }
8998
- break;
8999
- }
9000
- case "template_literal": {
9001
- const json$1 = _json;
9002
- const pattern = schema._zod.pattern;
9003
- if (!pattern) throw new Error("Pattern not found in template literal");
9004
- json$1.type = "string";
9005
- json$1.pattern = pattern.source;
9006
- break;
9007
- }
9008
- case "pipe": {
9009
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9010
- this.process(innerType, params);
9011
- result.ref = innerType;
9012
- break;
9013
- }
9014
- case "readonly": {
9015
- this.process(def.innerType, params);
9016
- result.ref = def.innerType;
9017
- _json.readOnly = true;
9018
- break;
9019
- }
9020
- case "promise": {
9021
- this.process(def.innerType, params);
9022
- result.ref = def.innerType;
9023
- break;
9024
- }
9025
- case "optional": {
9026
- this.process(def.innerType, params);
9027
- result.ref = def.innerType;
9028
- break;
9029
- }
9030
- case "lazy": {
9031
- const innerType = schema._zod.innerType;
9032
- this.process(innerType, params);
9033
- result.ref = innerType;
9034
- break;
9035
- }
9036
- case "custom": {
9037
- if (this.unrepresentable === "throw") {
9038
- throw new Error("Custom types cannot be represented in JSON Schema");
9284
+ case "success": {
9285
+ const json$1 = _json;
9286
+ json$1.type = "boolean";
9287
+ break;
9288
+ }
9289
+ case "default": {
9290
+ this.process(def.innerType, params);
9291
+ result.ref = def.innerType;
9292
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9293
+ break;
9294
+ }
9295
+ case "prefault": {
9296
+ this.process(def.innerType, params);
9297
+ result.ref = def.innerType;
9298
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9299
+ break;
9300
+ }
9301
+ case "catch": {
9302
+ this.process(def.innerType, params);
9303
+ result.ref = def.innerType;
9304
+ let catchValue;
9305
+ try {
9306
+ catchValue = def.catchValue(undefined);
9307
+ } catch {
9308
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9309
+ }
9310
+ _json.default = catchValue;
9311
+ break;
9312
+ }
9313
+ case "nan": {
9314
+ if (this.unrepresentable === "throw") {
9315
+ throw new Error("NaN cannot be represented in JSON Schema");
9316
+ }
9317
+ break;
9318
+ }
9319
+ case "template_literal": {
9320
+ const json$1 = _json;
9321
+ const pattern = schema._zod.pattern;
9322
+ if (!pattern) throw new Error("Pattern not found in template literal");
9323
+ json$1.type = "string";
9324
+ json$1.pattern = pattern.source;
9325
+ break;
9326
+ }
9327
+ case "pipe": {
9328
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9329
+ this.process(innerType, params);
9330
+ result.ref = innerType;
9331
+ break;
9332
+ }
9333
+ case "readonly": {
9334
+ this.process(def.innerType, params);
9335
+ result.ref = def.innerType;
9336
+ _json.readOnly = true;
9337
+ break;
9338
+ }
9339
+ case "promise": {
9340
+ this.process(def.innerType, params);
9341
+ result.ref = def.innerType;
9342
+ break;
9343
+ }
9344
+ case "optional": {
9345
+ this.process(def.innerType, params);
9346
+ result.ref = def.innerType;
9347
+ break;
9348
+ }
9349
+ case "lazy": {
9350
+ const innerType = schema._zod.innerType;
9351
+ this.process(innerType, params);
9352
+ result.ref = innerType;
9353
+ break;
9354
+ }
9355
+ case "custom": {
9356
+ if (this.unrepresentable === "throw") {
9357
+ throw new Error("Custom types cannot be represented in JSON Schema");
9358
+ }
9359
+ break;
9360
+ }
9361
+ default: {
9362
+ def;
9039
9363
  }
9040
- break;
9041
- }
9042
- default: {
9043
- def;
9044
9364
  }
9045
9365
  }
9046
9366
  }
@@ -9067,12 +9387,15 @@ var JSONSchemaGenerator = class {
9067
9387
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9068
9388
  if (params.external) {
9069
9389
  const externalId = params.external.registry.get(entry[0])?.id;
9070
- if (externalId) return { ref: params.external.uri(externalId) };
9390
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9391
+ if (externalId) {
9392
+ return { ref: uriGenerator(externalId) };
9393
+ }
9071
9394
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9072
9395
  entry[1].defId = id;
9073
9396
  return {
9074
9397
  defId: id,
9075
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9398
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9076
9399
  };
9077
9400
  }
9078
9401
  if (entry[1] === root) {
@@ -9100,6 +9423,14 @@ var JSONSchemaGenerator = class {
9100
9423
  }
9101
9424
  schema$1.$ref = ref;
9102
9425
  };
9426
+ if (params.cycles === "throw") {
9427
+ for (const entry of this.seen.entries()) {
9428
+ const seen = entry[1];
9429
+ if (seen.cycle) {
9430
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9431
+ }
9432
+ }
9433
+ }
9103
9434
  for (const entry of this.seen.entries()) {
9104
9435
  const seen = entry[1];
9105
9436
  if (schema === entry[0]) {
@@ -9119,11 +9450,7 @@ var JSONSchemaGenerator = class {
9119
9450
  continue;
9120
9451
  }
9121
9452
  if (seen.cycle) {
9122
- if (params.cycles === "throw") {
9123
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9124
- } else if (params.cycles === "ref") {
9125
- extractToDef(entry);
9126
- }
9453
+ extractToDef(entry);
9127
9454
  continue;
9128
9455
  }
9129
9456
  if (seen.count > 1) {
@@ -9155,7 +9482,8 @@ var JSONSchemaGenerator = class {
9155
9482
  }
9156
9483
  if (!seen.isParent) this.override({
9157
9484
  zodSchema,
9158
- jsonSchema: schema$1
9485
+ jsonSchema: schema$1,
9486
+ path: seen.path ?? []
9159
9487
  });
9160
9488
  };
9161
9489
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9169,6 +9497,11 @@ var JSONSchemaGenerator = class {
9169
9497
  } else {
9170
9498
  console.warn(`Invalid target: ${this.target}`);
9171
9499
  }
9500
+ if (params.external?.uri) {
9501
+ const id = params.external.registry.get(schema)?.id;
9502
+ if (!id) throw new Error("Schema is missing an `id` property");
9503
+ result.$id = params.external.uri(id);
9504
+ }
9172
9505
  Object.assign(result, root.def);
9173
9506
  const defs = params.external?.defs ?? {};
9174
9507
  for (const entry of this.seen.entries()) {
@@ -9177,11 +9510,13 @@ var JSONSchemaGenerator = class {
9177
9510
  defs[seen.defId] = seen.def;
9178
9511
  }
9179
9512
  }
9180
- if (!params.external && Object.keys(defs).length > 0) {
9181
- if (this.target === "draft-2020-12") {
9182
- result.$defs = defs;
9183
- } else {
9184
- result.definitions = defs;
9513
+ if (params.external) {} else {
9514
+ if (Object.keys(defs).length > 0) {
9515
+ if (this.target === "draft-2020-12") {
9516
+ result.$defs = defs;
9517
+ } else {
9518
+ result.definitions = defs;
9519
+ }
9185
9520
  }
9186
9521
  }
9187
9522
  try {
@@ -9202,7 +9537,7 @@ function toJSONSchema(input, _params) {
9202
9537
  const schemas = {};
9203
9538
  const external = {
9204
9539
  registry: input,
9205
- uri: _params?.uri || ((id) => id),
9540
+ uri: _params?.uri,
9206
9541
  defs
9207
9542
  };
9208
9543
  for (const entry of input._idmap.entries()) {
@@ -9313,11 +9648,11 @@ function isTransforming(_schema, _ctx) {
9313
9648
  }
9314
9649
 
9315
9650
  //#endregion
9316
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9651
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9317
9652
  var json_schema_exports = {};
9318
9653
 
9319
9654
  //#endregion
9320
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9655
+ //#region ../../node_modules/zod/v4/core/index.js
9321
9656
  var core_exports = {};
9322
9657
  __export(core_exports, {
9323
9658
  $ZodAny: () => $ZodAny,
@@ -9356,6 +9691,7 @@ __export(core_exports, {
9356
9691
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9357
9692
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9358
9693
  $ZodCustom: () => $ZodCustom,
9694
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9359
9695
  $ZodDate: () => $ZodDate,
9360
9696
  $ZodDefault: () => $ZodDefault,
9361
9697
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9420,6 +9756,8 @@ __export(core_exports, {
9420
9756
  Doc: () => Doc,
9421
9757
  JSONSchema: () => json_schema_exports,
9422
9758
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9759
+ NEVER: () => NEVER,
9760
+ TimePrecision: () => TimePrecision,
9423
9761
  _any: () => _any,
9424
9762
  _array: () => _array,
9425
9763
  _base64: () => _base64,
@@ -9509,6 +9847,7 @@ __export(core_exports, {
9509
9847
  _size: () => _size,
9510
9848
  _startsWith: () => _startsWith,
9511
9849
  _string: () => _string,
9850
+ _stringFormat: () => _stringFormat,
9512
9851
  _stringbool: () => _stringbool,
9513
9852
  _success: () => _success,
9514
9853
  _symbol: () => _symbol,
@@ -9558,7 +9897,7 @@ __export(core_exports, {
9558
9897
  });
9559
9898
 
9560
9899
  //#endregion
9561
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9900
+ //#region ../../node_modules/zod/v4/classic/iso.js
9562
9901
  var iso_exports = {};
9563
9902
  __export(iso_exports, {
9564
9903
  ZodISODate: () => ZodISODate,
@@ -9600,7 +9939,7 @@ function duration(params) {
9600
9939
  }
9601
9940
 
9602
9941
  //#endregion
9603
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9942
+ //#region ../../node_modules/zod/v4/classic/errors.js
9604
9943
  const initializer = (inst, issues) => {
9605
9944
  $ZodError.init(inst, issues);
9606
9945
  inst.name = "ZodError";
@@ -9618,14 +9957,14 @@ const ZodError = $constructor("ZodError", initializer);
9618
9957
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9619
9958
 
9620
9959
  //#endregion
9621
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9960
+ //#region ../../node_modules/zod/v4/classic/parse.js
9622
9961
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9623
9962
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9624
9963
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9625
9964
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9626
9965
 
9627
9966
  //#endregion
9628
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9967
+ //#region ../../node_modules/zod/v4/classic/schemas.js
9629
9968
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9630
9969
  $ZodType.init(inst, def);
9631
9970
  inst.def = def;
@@ -9893,6 +10232,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
9893
10232
  function jwt(params) {
9894
10233
  return _jwt(ZodJWT, params);
9895
10234
  }
10235
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10236
+ $ZodCustomStringFormat.init(inst, def);
10237
+ ZodStringFormat.init(inst, def);
10238
+ });
10239
+ function stringFormat(format, fnOrRegex, _params = {}) {
10240
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10241
+ }
9896
10242
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
9897
10243
  $ZodNumber.init(inst, def);
9898
10244
  ZodType.init(inst, def);
@@ -10062,9 +10408,7 @@ function keyof(schema) {
10062
10408
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10063
10409
  $ZodObject.init(inst, def);
10064
10410
  ZodType.init(inst, def);
10065
- defineLazy(inst, "shape", () => {
10066
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
10067
- });
10411
+ defineLazy(inst, "shape", () => def.shape);
10068
10412
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10069
10413
  inst.catchall = (catchall) => inst.clone({
10070
10414
  ...inst._zod.def,
@@ -10509,11 +10853,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10509
10853
  $ZodCustom.init(inst, def);
10510
10854
  ZodType.init(inst, def);
10511
10855
  });
10512
- function check(fn, params) {
10513
- const ch = new $ZodCheck({
10514
- check: "custom",
10515
- ...normalizeParams(params)
10516
- });
10856
+ function check(fn) {
10857
+ const ch = new $ZodCheck({ check: "custom" });
10517
10858
  ch._zod.check = fn;
10518
10859
  return ch;
10519
10860
  }
@@ -10523,7 +10864,7 @@ function custom(fn, _params) {
10523
10864
  function refine(fn, _params = {}) {
10524
10865
  return _refine(ZodCustom, fn, _params);
10525
10866
  }
10526
- function superRefine(fn, params) {
10867
+ function superRefine(fn) {
10527
10868
  const ch = check((payload) => {
10528
10869
  payload.addIssue = (issue$1) => {
10529
10870
  if (typeof issue$1 === "string") {
@@ -10539,7 +10880,7 @@ function superRefine(fn, params) {
10539
10880
  }
10540
10881
  };
10541
10882
  return fn(payload.value, payload);
10542
- }, params);
10883
+ });
10543
10884
  return ch;
10544
10885
  }
10545
10886
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10577,7 +10918,7 @@ function preprocess(fn, schema) {
10577
10918
  }
10578
10919
 
10579
10920
  //#endregion
10580
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10921
+ //#region ../../node_modules/zod/v4/classic/compat.js
10581
10922
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10582
10923
  const ZodIssueCode = {
10583
10924
  invalid_type: "invalid_type",
@@ -10592,10 +10933,6 @@ const ZodIssueCode = {
10592
10933
  invalid_value: "invalid_value",
10593
10934
  custom: "custom"
10594
10935
  };
10595
- /** @deprecated Not necessary in Zod 4. */
10596
- const INVALID = Object.freeze({ status: "aborted" });
10597
- /** A special constant with type `never` */
10598
- const NEVER = INVALID;
10599
10936
  /** @deprecated Use `z.config(params)` instead. */
10600
10937
  function setErrorMap(map$1) {
10601
10938
  config({ customError: map$1 });
@@ -10604,9 +10941,12 @@ function setErrorMap(map$1) {
10604
10941
  function getErrorMap() {
10605
10942
  return config().customError;
10606
10943
  }
10944
+ /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
10945
+ var ZodFirstPartyTypeKind;
10946
+ (function(ZodFirstPartyTypeKind$1) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
10607
10947
 
10608
10948
  //#endregion
10609
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10949
+ //#region ../../node_modules/zod/v4/classic/coerce.js
10610
10950
  var coerce_exports = {};
10611
10951
  __export(coerce_exports, {
10612
10952
  bigint: () => bigint,
@@ -10632,13 +10972,14 @@ function date(params) {
10632
10972
  }
10633
10973
 
10634
10974
  //#endregion
10635
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10975
+ //#region ../../node_modules/zod/v4/classic/external.js
10636
10976
  var external_exports = {};
10637
10977
  __export(external_exports, {
10638
10978
  $brand: () => $brand,
10639
10979
  $input: () => $input,
10640
10980
  $output: () => $output,
10641
10981
  NEVER: () => NEVER,
10982
+ TimePrecision: () => TimePrecision,
10642
10983
  ZodAny: () => ZodAny,
10643
10984
  ZodArray: () => ZodArray,
10644
10985
  ZodBase64: () => ZodBase64,
@@ -10652,6 +10993,7 @@ __export(external_exports, {
10652
10993
  ZodCUID2: () => ZodCUID2,
10653
10994
  ZodCatch: () => ZodCatch,
10654
10995
  ZodCustom: () => ZodCustom,
10996
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
10655
10997
  ZodDate: () => ZodDate,
10656
10998
  ZodDefault: () => ZodDefault,
10657
10999
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -10661,6 +11003,7 @@ __export(external_exports, {
10661
11003
  ZodEnum: () => ZodEnum,
10662
11004
  ZodError: () => ZodError,
10663
11005
  ZodFile: () => ZodFile,
11006
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
10664
11007
  ZodGUID: () => ZodGUID,
10665
11008
  ZodIPv4: () => ZodIPv4,
10666
11009
  ZodIPv6: () => ZodIPv6,
@@ -10813,6 +11156,7 @@ __export(external_exports, {
10813
11156
  startsWith: () => _startsWith,
10814
11157
  strictObject: () => strictObject,
10815
11158
  string: () => string$1,
11159
+ stringFormat: () => stringFormat,
10816
11160
  stringbool: () => stringbool,
10817
11161
  success: () => success,
10818
11162
  superRefine: () => superRefine,
@@ -10843,11 +11187,11 @@ __export(external_exports, {
10843
11187
  config(en_default());
10844
11188
 
10845
11189
  //#endregion
10846
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11190
+ //#region ../../node_modules/zod/v4/classic/index.js
10847
11191
  var classic_default = external_exports;
10848
11192
 
10849
11193
  //#endregion
10850
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11194
+ //#region ../../node_modules/zod/v4/index.js
10851
11195
  var v4_default = classic_default;
10852
11196
 
10853
11197
  //#endregion
@@ -10982,8 +11326,8 @@ var EASClient = class {
10982
11326
  };
10983
11327
  return this.deployedAddresses;
10984
11328
  } catch (err) {
10985
- const error$37 = err;
10986
- throw new Error(`Failed to deploy EAS contracts: ${error$37.message}`);
11329
+ const error$39 = err;
11330
+ throw new Error(`Failed to deploy EAS contracts: ${error$39.message}`);
10987
11331
  }
10988
11332
  }
10989
11333
  /**
@@ -11044,8 +11388,8 @@ var EASClient = class {
11044
11388
  success: true
11045
11389
  };
11046
11390
  } catch (err) {
11047
- const error$37 = err;
11048
- throw new Error(`Failed to register schema: ${error$37.message}`);
11391
+ const error$39 = err;
11392
+ throw new Error(`Failed to register schema: ${error$39.message}`);
11049
11393
  }
11050
11394
  }
11051
11395
  /**
@@ -11111,8 +11455,8 @@ var EASClient = class {
11111
11455
  success: true
11112
11456
  };
11113
11457
  } catch (err) {
11114
- const error$37 = err;
11115
- throw new Error(`Failed to create attestation: ${error$37.message}`);
11458
+ const error$39 = err;
11459
+ throw new Error(`Failed to create attestation: ${error$39.message}`);
11116
11460
  }
11117
11461
  }
11118
11462
  /**
@@ -11194,8 +11538,8 @@ var EASClient = class {
11194
11538
  success: true
11195
11539
  };
11196
11540
  } catch (err) {
11197
- const error$37 = err;
11198
- throw new Error(`Failed to create multiple attestations: ${error$37.message}`);
11541
+ const error$39 = err;
11542
+ throw new Error(`Failed to create multiple attestations: ${error$39.message}`);
11199
11543
  }
11200
11544
  }
11201
11545
  /**
@@ -11250,8 +11594,8 @@ var EASClient = class {
11250
11594
  success: true
11251
11595
  };
11252
11596
  } catch (err) {
11253
- const error$37 = err;
11254
- throw new Error(`Failed to revoke attestation: ${error$37.message}`);
11597
+ const error$39 = err;
11598
+ throw new Error(`Failed to revoke attestation: ${error$39.message}`);
11255
11599
  }
11256
11600
  }
11257
11601
  /**