@glasstrace/sdk 1.10.2 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +63 -8
  2. package/dist/async-context/index.cjs +1189 -440
  3. package/dist/async-context/index.cjs.map +1 -1
  4. package/dist/async-context/index.js +2 -2
  5. package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
  6. package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
  7. package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
  8. package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
  9. package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
  10. package/dist/chunk-BN5DVIUO.js.map +1 -0
  11. package/dist/{chunk-QS5RZ2TC.js → chunk-CZQN6G4I.js} +28 -22
  12. package/dist/chunk-CZQN6G4I.js.map +1 -0
  13. package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
  14. package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
  15. package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
  16. package/dist/{chunk-CIKPFJOM.js → chunk-KOYZJN6G.js} +310 -20
  17. package/dist/chunk-KOYZJN6G.js.map +1 -0
  18. package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
  19. package/dist/{chunk-UMGZJYC4.js → chunk-V75ZB4G4.js} +10 -5
  20. package/dist/chunk-V75ZB4G4.js.map +1 -0
  21. package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
  22. package/dist/chunk-YIEXKQYP.js.map +1 -0
  23. package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
  24. package/dist/cli/init.cjs +1672 -576
  25. package/dist/cli/init.cjs.map +1 -1
  26. package/dist/cli/init.js +33 -20
  27. package/dist/cli/init.js.map +1 -1
  28. package/dist/cli/mcp-add.cjs +1509 -521
  29. package/dist/cli/mcp-add.cjs.map +1 -1
  30. package/dist/cli/mcp-add.js +34 -16
  31. package/dist/cli/mcp-add.js.map +1 -1
  32. package/dist/cli/status.cjs +6 -1
  33. package/dist/cli/status.cjs.map +1 -1
  34. package/dist/cli/status.js +7 -2
  35. package/dist/cli/status.js.map +1 -1
  36. package/dist/cli/uninit.cjs +6 -1
  37. package/dist/cli/uninit.cjs.map +1 -1
  38. package/dist/cli/uninit.js +4 -4
  39. package/dist/cli/upgrade-instructions.cjs +383 -112
  40. package/dist/cli/upgrade-instructions.cjs.map +1 -1
  41. package/dist/cli/upgrade-instructions.js +72 -20
  42. package/dist/cli/upgrade-instructions.js.map +1 -1
  43. package/dist/cli/validate.cjs +1168 -422
  44. package/dist/cli/validate.cjs.map +1 -1
  45. package/dist/cli/validate.js +2 -2
  46. package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
  47. package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
  48. package/dist/edge-entry.cjs +1197 -448
  49. package/dist/edge-entry.cjs.map +1 -1
  50. package/dist/edge-entry.d.cts +2 -2
  51. package/dist/edge-entry.d.ts +2 -2
  52. package/dist/edge-entry.js +4 -4
  53. package/dist/index.cjs +1341 -553
  54. package/dist/index.cjs.map +1 -1
  55. package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.cts} +1 -1
  56. package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.ts} +1 -1
  57. package/dist/index.d.cts +4 -4
  58. package/dist/index.d.ts +4 -4
  59. package/dist/index.js +14 -7
  60. package/dist/index.js.map +1 -1
  61. package/dist/middleware/index.cjs +1192 -443
  62. package/dist/middleware/index.cjs.map +1 -1
  63. package/dist/middleware/index.js +2 -2
  64. package/dist/node-entry.cjs +1329 -551
  65. package/dist/node-entry.cjs.map +1 -1
  66. package/dist/node-entry.d.cts +3 -3
  67. package/dist/node-entry.d.ts +3 -3
  68. package/dist/node-entry.js +8 -8
  69. package/dist/node-subpath.cjs +1168 -422
  70. package/dist/node-subpath.cjs.map +1 -1
  71. package/dist/node-subpath.d.cts +1 -1
  72. package/dist/node-subpath.d.ts +1 -1
  73. package/dist/node-subpath.js +3 -3
  74. package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
  75. package/dist/trpc/index.cjs +1187 -438
  76. package/dist/trpc/index.cjs.map +1 -1
  77. package/dist/trpc/index.js +1 -1
  78. package/package.json +2 -2
  79. package/dist/chunk-6RKS3DNA.js.map +0 -1
  80. package/dist/chunk-CIKPFJOM.js.map +0 -1
  81. package/dist/chunk-QS5RZ2TC.js.map +0 -1
  82. package/dist/chunk-UMGZJYC4.js.map +0 -1
  83. package/dist/chunk-ZBQQXVHD.js.map +0 -1
  84. /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
  85. /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
  86. /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
  87. /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
  88. /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
  89. /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
  90. /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
  91. /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
@@ -103,6 +103,7 @@ __export(external_exports, {
103
103
  ZodOptional: () => ZodOptional,
104
104
  ZodPipe: () => ZodPipe,
105
105
  ZodPrefault: () => ZodPrefault,
106
+ ZodPreprocess: () => ZodPreprocess,
106
107
  ZodPromise: () => ZodPromise,
107
108
  ZodReadonly: () => ZodReadonly,
108
109
  ZodRealError: () => ZodRealError,
@@ -181,6 +182,7 @@ __export(external_exports, {
181
182
  int32: () => int32,
182
183
  int64: () => int64,
183
184
  intersection: () => intersection,
185
+ invertCodec: () => invertCodec,
184
186
  ipv4: () => ipv42,
185
187
  ipv6: () => ipv62,
186
188
  iso: () => iso_exports,
@@ -362,6 +364,7 @@ __export(core_exports2, {
362
364
  $ZodOptional: () => $ZodOptional,
363
365
  $ZodPipe: () => $ZodPipe,
364
366
  $ZodPrefault: () => $ZodPrefault,
367
+ $ZodPreprocess: () => $ZodPreprocess,
365
368
  $ZodPromise: () => $ZodPromise,
366
369
  $ZodReadonly: () => $ZodReadonly,
367
370
  $ZodRealError: () => $ZodRealError,
@@ -561,7 +564,8 @@ __export(core_exports2, {
561
564
  });
562
565
 
563
566
  // ../../node_modules/zod/v4/core/core.js
564
- var NEVER = Object.freeze({
567
+ var _a;
568
+ var NEVER = /* @__PURE__ */ Object.freeze({
565
569
  status: "aborted"
566
570
  });
567
571
  // @__NO_SIDE_EFFECTS__
@@ -596,10 +600,10 @@ function $constructor(name, initializer3, params) {
596
600
  }
597
601
  Object.defineProperty(Definition, "name", { value: name });
598
602
  function _(def) {
599
- var _a2;
603
+ var _a3;
600
604
  const inst = params?.Parent ? new Definition() : this;
601
605
  init(inst, def);
602
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
606
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
603
607
  for (const fn of inst._zod.deferred) {
604
608
  fn();
605
609
  }
@@ -628,7 +632,8 @@ var $ZodEncodeError = class extends Error {
628
632
  this.name = "ZodEncodeError";
629
633
  }
630
634
  };
631
- var globalConfig = {};
635
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
636
+ var globalConfig = globalThis.__zod_globalConfig;
632
637
  function config(newConfig) {
633
638
  if (newConfig)
634
639
  Object.assign(globalConfig, newConfig);
@@ -661,6 +666,7 @@ __export(util_exports, {
661
666
  defineLazy: () => defineLazy,
662
667
  esc: () => esc,
663
668
  escapeRegex: () => escapeRegex,
669
+ explicitlyAborted: () => explicitlyAborted,
664
670
  extend: () => extend,
665
671
  finalizeIssue: () => finalizeIssue,
666
672
  floatSafeRemainder: () => floatSafeRemainder,
@@ -749,19 +755,12 @@ function cleanRegex(source) {
749
755
  return source.slice(start, end);
750
756
  }
751
757
  function floatSafeRemainder(val, step) {
752
- const valDecCount = (val.toString().split(".")[1] || "").length;
753
- const stepString = step.toString();
754
- let stepDecCount = (stepString.split(".")[1] || "").length;
755
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
756
- const match = stepString.match(/\d?e-(\d?)/);
757
- if (match?.[1]) {
758
- stepDecCount = Number.parseInt(match[1]);
759
- }
760
- }
761
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
762
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
763
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
764
- return valInt % stepInt / 10 ** decCount;
758
+ const ratio = val / step;
759
+ const roundedRatio = Math.round(ratio);
760
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
761
+ if (Math.abs(ratio - roundedRatio) < tolerance)
762
+ return 0;
763
+ return ratio - roundedRatio;
765
764
  }
766
765
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
767
766
  function defineLazy(object2, key, getter) {
@@ -843,7 +842,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
843
842
  function isObject(data) {
844
843
  return typeof data === "object" && data !== null && !Array.isArray(data);
845
844
  }
846
- var allowsEval = cached(() => {
845
+ var allowsEval = /* @__PURE__ */ cached(() => {
846
+ if (globalConfig.jitless) {
847
+ return false;
848
+ }
847
849
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
848
850
  return false;
849
851
  }
@@ -876,6 +878,10 @@ function shallowClone(o) {
876
878
  return { ...o };
877
879
  if (Array.isArray(o))
878
880
  return [...o];
881
+ if (o instanceof Map)
882
+ return new Map(o);
883
+ if (o instanceof Set)
884
+ return new Set(o);
879
885
  return o;
880
886
  }
881
887
  function numKeys(data) {
@@ -932,7 +938,14 @@ var getParsedType = (data) => {
932
938
  }
933
939
  };
934
940
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
935
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
941
+ var primitiveTypes = /* @__PURE__ */ new Set([
942
+ "string",
943
+ "number",
944
+ "bigint",
945
+ "boolean",
946
+ "symbol",
947
+ "undefined"
948
+ ]);
936
949
  function escapeRegex(str) {
937
950
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
938
951
  }
@@ -1101,6 +1114,9 @@ function safeExtend(schema, shape) {
1101
1114
  return clone(schema, def);
1102
1115
  }
1103
1116
  function merge(a, b) {
1117
+ if (a._zod.def.checks?.length) {
1118
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1119
+ }
1104
1120
  const def = mergeDefs(a._zod.def, {
1105
1121
  get shape() {
1106
1122
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1110,8 +1126,7 @@ function merge(a, b) {
1110
1126
  get catchall() {
1111
1127
  return b._zod.def.catchall;
1112
1128
  },
1113
- checks: []
1114
- // delete existing checks
1129
+ checks: b._zod.def.checks ?? []
1115
1130
  });
1116
1131
  return clone(a, def);
1117
1132
  }
@@ -1194,10 +1209,20 @@ function aborted(x, startIndex = 0) {
1194
1209
  }
1195
1210
  return false;
1196
1211
  }
1212
+ function explicitlyAborted(x, startIndex = 0) {
1213
+ if (x.aborted === true)
1214
+ return true;
1215
+ for (let i = startIndex; i < x.issues.length; i++) {
1216
+ if (x.issues[i]?.continue === false) {
1217
+ return true;
1218
+ }
1219
+ }
1220
+ return false;
1221
+ }
1197
1222
  function prefixIssues(path2, issues) {
1198
1223
  return issues.map((iss) => {
1199
- var _a2;
1200
- (_a2 = iss).path ?? (_a2.path = []);
1224
+ var _a3;
1225
+ (_a3 = iss).path ?? (_a3.path = []);
1201
1226
  iss.path.unshift(path2);
1202
1227
  return iss;
1203
1228
  });
@@ -1206,17 +1231,14 @@ function unwrapMessage(message) {
1206
1231
  return typeof message === "string" ? message : message?.message;
1207
1232
  }
1208
1233
  function finalizeIssue(iss, ctx, config2) {
1209
- const full = { ...iss, path: iss.path ?? [] };
1210
- if (!iss.message) {
1211
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1212
- full.message = message;
1234
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1235
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1236
+ rest.path ?? (rest.path = []);
1237
+ rest.message = message;
1238
+ if (ctx?.reportInput) {
1239
+ rest.input = _input;
1213
1240
  }
1214
- delete full.inst;
1215
- delete full.continue;
1216
- if (!ctx?.reportInput) {
1217
- delete full.input;
1218
- }
1219
- return full;
1241
+ return rest;
1220
1242
  }
1221
1243
  function getSizableOrigin(input) {
1222
1244
  if (input instanceof Set)
@@ -1333,10 +1355,10 @@ var initializer = (inst, def) => {
1333
1355
  };
1334
1356
  var $ZodError = $constructor("$ZodError", initializer);
1335
1357
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
1336
- function flattenError(error48, mapper = (issue2) => issue2.message) {
1358
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
1337
1359
  const fieldErrors = {};
1338
1360
  const formErrors = [];
1339
- for (const sub of error48.issues) {
1361
+ for (const sub of error51.issues) {
1340
1362
  if (sub.path.length > 0) {
1341
1363
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1342
1364
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1346,50 +1368,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
1346
1368
  }
1347
1369
  return { formErrors, fieldErrors };
1348
1370
  }
1349
- function formatError(error48, mapper = (issue2) => issue2.message) {
1371
+ function formatError(error51, mapper = (issue2) => issue2.message) {
1350
1372
  const fieldErrors = { _errors: [] };
1351
- const processError = (error49) => {
1352
- for (const issue2 of error49.issues) {
1373
+ const processError = (error52, path2 = []) => {
1374
+ for (const issue2 of error52.issues) {
1353
1375
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1354
- issue2.errors.map((issues) => processError({ issues }));
1376
+ issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
1355
1377
  } else if (issue2.code === "invalid_key") {
1356
- processError({ issues: issue2.issues });
1378
+ processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
1357
1379
  } else if (issue2.code === "invalid_element") {
1358
- processError({ issues: issue2.issues });
1359
- } else if (issue2.path.length === 0) {
1360
- fieldErrors._errors.push(mapper(issue2));
1380
+ processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
1361
1381
  } else {
1362
- let curr = fieldErrors;
1363
- let i = 0;
1364
- while (i < issue2.path.length) {
1365
- const el = issue2.path[i];
1366
- const terminal = i === issue2.path.length - 1;
1367
- if (!terminal) {
1368
- curr[el] = curr[el] || { _errors: [] };
1369
- } else {
1370
- curr[el] = curr[el] || { _errors: [] };
1371
- curr[el]._errors.push(mapper(issue2));
1382
+ const fullpath = [...path2, ...issue2.path];
1383
+ if (fullpath.length === 0) {
1384
+ fieldErrors._errors.push(mapper(issue2));
1385
+ } else {
1386
+ let curr = fieldErrors;
1387
+ let i = 0;
1388
+ while (i < fullpath.length) {
1389
+ const el = fullpath[i];
1390
+ const terminal = i === fullpath.length - 1;
1391
+ if (!terminal) {
1392
+ curr[el] = curr[el] || { _errors: [] };
1393
+ } else {
1394
+ curr[el] = curr[el] || { _errors: [] };
1395
+ curr[el]._errors.push(mapper(issue2));
1396
+ }
1397
+ curr = curr[el];
1398
+ i++;
1372
1399
  }
1373
- curr = curr[el];
1374
- i++;
1375
1400
  }
1376
1401
  }
1377
1402
  }
1378
1403
  };
1379
- processError(error48);
1404
+ processError(error51);
1380
1405
  return fieldErrors;
1381
1406
  }
1382
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
1407
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1383
1408
  const result = { errors: [] };
1384
- const processError = (error49, path2 = []) => {
1385
- var _a2, _b;
1386
- for (const issue2 of error49.issues) {
1409
+ const processError = (error52, path2 = []) => {
1410
+ var _a3, _b;
1411
+ for (const issue2 of error52.issues) {
1387
1412
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1388
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
1413
+ issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
1389
1414
  } else if (issue2.code === "invalid_key") {
1390
- processError({ issues: issue2.issues }, issue2.path);
1415
+ processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
1391
1416
  } else if (issue2.code === "invalid_element") {
1392
- processError({ issues: issue2.issues }, issue2.path);
1417
+ processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
1393
1418
  } else {
1394
1419
  const fullpath = [...path2, ...issue2.path];
1395
1420
  if (fullpath.length === 0) {
@@ -1403,7 +1428,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1403
1428
  const terminal = i === fullpath.length - 1;
1404
1429
  if (typeof el === "string") {
1405
1430
  curr.properties ?? (curr.properties = {});
1406
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
1431
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
1407
1432
  curr = curr.properties[el];
1408
1433
  } else {
1409
1434
  curr.items ?? (curr.items = []);
@@ -1418,7 +1443,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
1418
1443
  }
1419
1444
  }
1420
1445
  };
1421
- processError(error48);
1446
+ processError(error51);
1422
1447
  return result;
1423
1448
  }
1424
1449
  function toDotPath(_path) {
@@ -1439,9 +1464,9 @@ function toDotPath(_path) {
1439
1464
  }
1440
1465
  return segs.join("");
1441
1466
  }
1442
- function prettifyError(error48) {
1467
+ function prettifyError(error51) {
1443
1468
  const lines = [];
1444
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1469
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1445
1470
  for (const issue2 of issues) {
1446
1471
  lines.push(`\u2716 ${issue2.message}`);
1447
1472
  if (issue2.path?.length)
@@ -1452,7 +1477,7 @@ function prettifyError(error48) {
1452
1477
 
1453
1478
  // ../../node_modules/zod/v4/core/parse.js
1454
1479
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1455
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1480
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1456
1481
  const result = schema._zod.run({ value, issues: [] }, ctx);
1457
1482
  if (result instanceof Promise) {
1458
1483
  throw new $ZodAsyncError();
@@ -1466,7 +1491,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
1466
1491
  };
1467
1492
  var parse = /* @__PURE__ */ _parse($ZodRealError);
1468
1493
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1469
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1494
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1470
1495
  let result = schema._zod.run({ value, issues: [] }, ctx);
1471
1496
  if (result instanceof Promise)
1472
1497
  result = await result;
@@ -1491,7 +1516,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
1491
1516
  };
1492
1517
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1493
1518
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1494
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1519
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1495
1520
  let result = schema._zod.run({ value, issues: [] }, ctx);
1496
1521
  if (result instanceof Promise)
1497
1522
  result = await result;
@@ -1502,7 +1527,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1502
1527
  };
1503
1528
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1504
1529
  var _encode = (_Err) => (schema, value, _ctx) => {
1505
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1530
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1506
1531
  return _parse(_Err)(schema, value, ctx);
1507
1532
  };
1508
1533
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1511,7 +1536,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
1511
1536
  };
1512
1537
  var decode = /* @__PURE__ */ _decode($ZodRealError);
1513
1538
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1514
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1539
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1515
1540
  return _parseAsync(_Err)(schema, value, ctx);
1516
1541
  };
1517
1542
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1520,7 +1545,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
1520
1545
  };
1521
1546
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1522
1547
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
1523
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1548
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1524
1549
  return _safeParse(_Err)(schema, value, ctx);
1525
1550
  };
1526
1551
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1529,7 +1554,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
1529
1554
  };
1530
1555
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1531
1556
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1532
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1557
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1533
1558
  return _safeParseAsync(_Err)(schema, value, ctx);
1534
1559
  };
1535
1560
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1562,6 +1587,7 @@ __export(regexes_exports, {
1562
1587
  hex: () => hex,
1563
1588
  hostname: () => hostname,
1564
1589
  html5Email: () => html5Email,
1590
+ httpProtocol: () => httpProtocol,
1565
1591
  idnEmail: () => idnEmail,
1566
1592
  integer: () => integer,
1567
1593
  ipv4: () => ipv4,
@@ -1600,7 +1626,7 @@ __export(regexes_exports, {
1600
1626
  uuid7: () => uuid7,
1601
1627
  xid: () => xid
1602
1628
  });
1603
- var cuid = /^[cC][^\s-]{8,}$/;
1629
+ var cuid = /^[cC][0-9a-z]{6,}$/;
1604
1630
  var cuid2 = /^[0-9a-z]+$/;
1605
1631
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
1606
1632
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -1639,6 +1665,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
1639
1665
  var base64url = /^[A-Za-z0-9_-]*$/;
1640
1666
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
1641
1667
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
1668
+ var httpProtocol = /^https?$/;
1642
1669
  var e164 = /^\+[1-9]\d{6,14}$/;
1643
1670
  var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
1644
1671
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -1697,10 +1724,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
1697
1724
 
1698
1725
  // ../../node_modules/zod/v4/core/checks.js
1699
1726
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1700
- var _a2;
1727
+ var _a3;
1701
1728
  inst._zod ?? (inst._zod = {});
1702
1729
  inst._zod.def = def;
1703
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
1730
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
1704
1731
  });
1705
1732
  var numericOriginMap = {
1706
1733
  number: "number",
@@ -1766,8 +1793,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
1766
1793
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1767
1794
  $ZodCheck.init(inst, def);
1768
1795
  inst._zod.onattach.push((inst2) => {
1769
- var _a2;
1770
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
1796
+ var _a3;
1797
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
1771
1798
  });
1772
1799
  inst._zod.check = (payload) => {
1773
1800
  if (typeof payload.value !== typeof def.value)
@@ -1900,9 +1927,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1900
1927
  };
1901
1928
  });
1902
1929
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1903
- var _a2;
1930
+ var _a3;
1904
1931
  $ZodCheck.init(inst, def);
1905
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1932
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1906
1933
  const val = payload.value;
1907
1934
  return !nullish(val) && val.size !== void 0;
1908
1935
  });
@@ -1928,9 +1955,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
1928
1955
  };
1929
1956
  });
1930
1957
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1931
- var _a2;
1958
+ var _a3;
1932
1959
  $ZodCheck.init(inst, def);
1933
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1960
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1934
1961
  const val = payload.value;
1935
1962
  return !nullish(val) && val.size !== void 0;
1936
1963
  });
@@ -1956,9 +1983,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
1956
1983
  };
1957
1984
  });
1958
1985
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1959
- var _a2;
1986
+ var _a3;
1960
1987
  $ZodCheck.init(inst, def);
1961
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1988
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1962
1989
  const val = payload.value;
1963
1990
  return !nullish(val) && val.size !== void 0;
1964
1991
  });
@@ -1986,9 +2013,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
1986
2013
  };
1987
2014
  });
1988
2015
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1989
- var _a2;
2016
+ var _a3;
1990
2017
  $ZodCheck.init(inst, def);
1991
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2018
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1992
2019
  const val = payload.value;
1993
2020
  return !nullish(val) && val.length !== void 0;
1994
2021
  });
@@ -2015,9 +2042,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2015
2042
  };
2016
2043
  });
2017
2044
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2018
- var _a2;
2045
+ var _a3;
2019
2046
  $ZodCheck.init(inst, def);
2020
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2047
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2021
2048
  const val = payload.value;
2022
2049
  return !nullish(val) && val.length !== void 0;
2023
2050
  });
@@ -2044,9 +2071,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2044
2071
  };
2045
2072
  });
2046
2073
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2047
- var _a2;
2074
+ var _a3;
2048
2075
  $ZodCheck.init(inst, def);
2049
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2076
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2050
2077
  const val = payload.value;
2051
2078
  return !nullish(val) && val.length !== void 0;
2052
2079
  });
@@ -2075,7 +2102,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2075
2102
  };
2076
2103
  });
2077
2104
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2078
- var _a2, _b;
2105
+ var _a3, _b;
2079
2106
  $ZodCheck.init(inst, def);
2080
2107
  inst._zod.onattach.push((inst2) => {
2081
2108
  const bag = inst2._zod.bag;
@@ -2086,7 +2113,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
2086
2113
  }
2087
2114
  });
2088
2115
  if (def.pattern)
2089
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2116
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2090
2117
  def.pattern.lastIndex = 0;
2091
2118
  if (def.pattern.test(payload.value))
2092
2119
  return;
@@ -2282,13 +2309,13 @@ var Doc = class {
2282
2309
  // ../../node_modules/zod/v4/core/versions.js
2283
2310
  var version = {
2284
2311
  major: 4,
2285
- minor: 3,
2286
- patch: 6
2312
+ minor: 4,
2313
+ patch: 3
2287
2314
  };
2288
2315
 
2289
2316
  // ../../node_modules/zod/v4/core/schemas.js
2290
2317
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2291
- var _a2;
2318
+ var _a3;
2292
2319
  inst ?? (inst = {});
2293
2320
  inst._zod.def = def;
2294
2321
  inst._zod.bag = inst._zod.bag || {};
@@ -2303,7 +2330,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2303
2330
  }
2304
2331
  }
2305
2332
  if (checks.length === 0) {
2306
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2333
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2307
2334
  inst._zod.deferred?.push(() => {
2308
2335
  inst._zod.run = inst._zod.parse;
2309
2336
  });
@@ -2313,6 +2340,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2313
2340
  let asyncResult;
2314
2341
  for (const ch of checks2) {
2315
2342
  if (ch._zod.def.when) {
2343
+ if (explicitlyAborted(payload))
2344
+ continue;
2316
2345
  const shouldRun = ch._zod.def.when(payload);
2317
2346
  if (!shouldRun)
2318
2347
  continue;
@@ -2453,6 +2482,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
2453
2482
  inst._zod.check = (payload) => {
2454
2483
  try {
2455
2484
  const trimmed = payload.value.trim();
2485
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2486
+ if (!/^https?:\/\//i.test(trimmed)) {
2487
+ payload.issues.push({
2488
+ code: "invalid_format",
2489
+ format: "url",
2490
+ note: "Invalid URL format",
2491
+ input: payload.value,
2492
+ inst,
2493
+ continue: !def.abort
2494
+ });
2495
+ return;
2496
+ }
2497
+ }
2456
2498
  const url2 = new URL(trimmed);
2457
2499
  if (def.hostname) {
2458
2500
  def.hostname.lastIndex = 0;
@@ -2606,6 +2648,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
2606
2648
  function isValidBase64(data) {
2607
2649
  if (data === "")
2608
2650
  return true;
2651
+ if (/\s/.test(data))
2652
+ return false;
2609
2653
  if (data.length % 4 !== 0)
2610
2654
  return false;
2611
2655
  try {
@@ -2798,8 +2842,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
2798
2842
  $ZodType.init(inst, def);
2799
2843
  inst._zod.pattern = _undefined;
2800
2844
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2801
- inst._zod.optin = "optional";
2802
- inst._zod.optout = "optional";
2803
2845
  inst._zod.parse = (payload, _ctx) => {
2804
2846
  const input = payload.value;
2805
2847
  if (typeof input === "undefined")
@@ -2928,15 +2970,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2928
2970
  return payload;
2929
2971
  };
2930
2972
  });
2931
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
2973
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
2974
+ const isPresent = key in input;
2932
2975
  if (result.issues.length) {
2933
- if (isOptionalOut && !(key in input)) {
2976
+ if (isOptionalIn && isOptionalOut && !isPresent) {
2934
2977
  return;
2935
2978
  }
2936
2979
  final.issues.push(...prefixIssues(key, result.issues));
2937
2980
  }
2981
+ if (!isPresent && !isOptionalIn) {
2982
+ if (!result.issues.length) {
2983
+ final.issues.push({
2984
+ code: "invalid_type",
2985
+ expected: "nonoptional",
2986
+ input: void 0,
2987
+ path: [key]
2988
+ });
2989
+ }
2990
+ return;
2991
+ }
2938
2992
  if (result.value === void 0) {
2939
- if (key in input) {
2993
+ if (isPresent) {
2940
2994
  final.value[key] = void 0;
2941
2995
  }
2942
2996
  } else {
@@ -2964,8 +3018,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2964
3018
  const keySet = def.keySet;
2965
3019
  const _catchall = def.catchall._zod;
2966
3020
  const t = _catchall.def.type;
3021
+ const isOptionalIn = _catchall.optin === "optional";
2967
3022
  const isOptionalOut = _catchall.optout === "optional";
2968
3023
  for (const key in input) {
3024
+ if (key === "__proto__")
3025
+ continue;
2969
3026
  if (keySet.has(key))
2970
3027
  continue;
2971
3028
  if (t === "never") {
@@ -2974,9 +3031,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2974
3031
  }
2975
3032
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
2976
3033
  if (r instanceof Promise) {
2977
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3034
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
2978
3035
  } else {
2979
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3036
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
2980
3037
  }
2981
3038
  }
2982
3039
  if (unrecognized.length) {
@@ -3042,12 +3099,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3042
3099
  const shape = value.shape;
3043
3100
  for (const key of value.keys) {
3044
3101
  const el = shape[key];
3102
+ const isOptionalIn = el._zod.optin === "optional";
3045
3103
  const isOptionalOut = el._zod.optout === "optional";
3046
3104
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3047
3105
  if (r instanceof Promise) {
3048
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3106
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3049
3107
  } else {
3050
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3108
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3051
3109
  }
3052
3110
  }
3053
3111
  if (!catchall) {
@@ -3078,9 +3136,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3078
3136
  const id = ids[key];
3079
3137
  const k = esc(key);
3080
3138
  const schema = shape[key];
3139
+ const isOptionalIn = schema?._zod?.optin === "optional";
3081
3140
  const isOptionalOut = schema?._zod?.optout === "optional";
3082
3141
  doc.write(`const ${id} = ${parseStr(key)};`);
3083
- if (isOptionalOut) {
3142
+ if (isOptionalIn && isOptionalOut) {
3084
3143
  doc.write(`
3085
3144
  if (${id}.issues.length) {
3086
3145
  if (${k} in input) {
@@ -3099,6 +3158,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3099
3158
  newResult[${k}] = ${id}.value;
3100
3159
  }
3101
3160
 
3161
+ `);
3162
+ } else if (!isOptionalIn) {
3163
+ doc.write(`
3164
+ const ${id}_present = ${k} in input;
3165
+ if (${id}.issues.length) {
3166
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3167
+ ...iss,
3168
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3169
+ })));
3170
+ }
3171
+ if (!${id}_present && !${id}.issues.length) {
3172
+ payload.issues.push({
3173
+ code: "invalid_type",
3174
+ expected: "nonoptional",
3175
+ input: undefined,
3176
+ path: [${k}]
3177
+ });
3178
+ }
3179
+
3180
+ if (${id}_present) {
3181
+ if (${id}.value === undefined) {
3182
+ newResult[${k}] = undefined;
3183
+ } else {
3184
+ newResult[${k}] = ${id}.value;
3185
+ }
3186
+ }
3187
+
3102
3188
  `);
3103
3189
  } else {
3104
3190
  doc.write(`
@@ -3192,10 +3278,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
3192
3278
  }
3193
3279
  return void 0;
3194
3280
  });
3195
- const single = def.options.length === 1;
3196
- const first = def.options[0]._zod.run;
3281
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3197
3282
  inst._zod.parse = (payload, ctx) => {
3198
- if (single) {
3283
+ if (first) {
3199
3284
  return first(payload, ctx);
3200
3285
  }
3201
3286
  let async = false;
@@ -3248,10 +3333,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
3248
3333
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3249
3334
  $ZodUnion.init(inst, def);
3250
3335
  def.inclusive = false;
3251
- const single = def.options.length === 1;
3252
- const first = def.options[0]._zod.run;
3336
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3253
3337
  inst._zod.parse = (payload, ctx) => {
3254
- if (single) {
3338
+ if (first) {
3255
3339
  return first(payload, ctx);
3256
3340
  }
3257
3341
  let async = false;
@@ -3326,7 +3410,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3326
3410
  if (opt) {
3327
3411
  return opt._zod.run(payload, ctx);
3328
3412
  }
3329
- if (def.unionFallback) {
3413
+ if (def.unionFallback || ctx.direction === "backward") {
3330
3414
  return _super(payload, ctx);
3331
3415
  }
3332
3416
  payload.issues.push({
@@ -3334,6 +3418,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3334
3418
  errors: [],
3335
3419
  note: "No matching discriminator",
3336
3420
  discriminator: def.discriminator,
3421
+ options: Array.from(disc.value.keys()),
3337
3422
  input,
3338
3423
  path: [def.discriminator],
3339
3424
  inst
@@ -3455,64 +3540,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3455
3540
  }
3456
3541
  payload.value = [];
3457
3542
  const proms = [];
3458
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3459
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3543
+ const optinStart = getTupleOptStart(items, "optin");
3544
+ const optoutStart = getTupleOptStart(items, "optout");
3460
3545
  if (!def.rest) {
3461
- const tooBig = input.length > items.length;
3462
- const tooSmall = input.length < optStart - 1;
3463
- if (tooBig || tooSmall) {
3546
+ if (input.length < optinStart) {
3464
3547
  payload.issues.push({
3465
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3548
+ code: "too_small",
3549
+ minimum: optinStart,
3550
+ inclusive: true,
3466
3551
  input,
3467
3552
  inst,
3468
3553
  origin: "array"
3469
3554
  });
3470
3555
  return payload;
3471
3556
  }
3472
- }
3473
- let i = -1;
3474
- for (const item of items) {
3475
- i++;
3476
- if (i >= input.length) {
3477
- if (i >= optStart)
3478
- continue;
3557
+ if (input.length > items.length) {
3558
+ payload.issues.push({
3559
+ code: "too_big",
3560
+ maximum: items.length,
3561
+ inclusive: true,
3562
+ input,
3563
+ inst,
3564
+ origin: "array"
3565
+ });
3479
3566
  }
3480
- const result = item._zod.run({
3481
- value: input[i],
3482
- issues: []
3483
- }, ctx);
3484
- if (result instanceof Promise) {
3485
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3567
+ }
3568
+ const itemResults = new Array(items.length);
3569
+ for (let i = 0; i < items.length; i++) {
3570
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3571
+ if (r instanceof Promise) {
3572
+ proms.push(r.then((rr) => {
3573
+ itemResults[i] = rr;
3574
+ }));
3486
3575
  } else {
3487
- handleTupleResult(result, payload, i);
3576
+ itemResults[i] = r;
3488
3577
  }
3489
3578
  }
3490
3579
  if (def.rest) {
3580
+ let i = items.length - 1;
3491
3581
  const rest = input.slice(items.length);
3492
3582
  for (const el of rest) {
3493
3583
  i++;
3494
- const result = def.rest._zod.run({
3495
- value: el,
3496
- issues: []
3497
- }, ctx);
3584
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3498
3585
  if (result instanceof Promise) {
3499
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3586
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3500
3587
  } else {
3501
3588
  handleTupleResult(result, payload, i);
3502
3589
  }
3503
3590
  }
3504
3591
  }
3505
- if (proms.length)
3506
- return Promise.all(proms).then(() => payload);
3507
- return payload;
3592
+ if (proms.length) {
3593
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3594
+ }
3595
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3508
3596
  };
3509
3597
  });
3598
+ function getTupleOptStart(items, key) {
3599
+ for (let i = items.length - 1; i >= 0; i--) {
3600
+ if (items[i]._zod[key] !== "optional")
3601
+ return i + 1;
3602
+ }
3603
+ return 0;
3604
+ }
3510
3605
  function handleTupleResult(result, final, index) {
3511
3606
  if (result.issues.length) {
3512
3607
  final.issues.push(...prefixIssues(index, result.issues));
3513
3608
  }
3514
3609
  final.value[index] = result.value;
3515
3610
  }
3611
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3612
+ for (let i = 0; i < items.length; i++) {
3613
+ const r = itemResults[i];
3614
+ const isPresent = i < input.length;
3615
+ if (r.issues.length) {
3616
+ if (!isPresent && i >= optoutStart) {
3617
+ final.value.length = i;
3618
+ break;
3619
+ }
3620
+ final.issues.push(...prefixIssues(i, r.issues));
3621
+ }
3622
+ final.value[i] = r.value;
3623
+ }
3624
+ for (let i = final.value.length - 1; i >= input.length; i--) {
3625
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
3626
+ final.value.length = i;
3627
+ } else {
3628
+ break;
3629
+ }
3630
+ }
3631
+ return final;
3632
+ }
3516
3633
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3517
3634
  $ZodType.init(inst, def);
3518
3635
  inst._zod.parse = (payload, ctx) => {
@@ -3534,19 +3651,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3534
3651
  for (const key of values) {
3535
3652
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3536
3653
  recordKeys.add(typeof key === "number" ? key.toString() : key);
3654
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3655
+ if (keyResult instanceof Promise) {
3656
+ throw new Error("Async schemas not supported in object keys currently");
3657
+ }
3658
+ if (keyResult.issues.length) {
3659
+ payload.issues.push({
3660
+ code: "invalid_key",
3661
+ origin: "record",
3662
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
3663
+ input: key,
3664
+ path: [key],
3665
+ inst
3666
+ });
3667
+ continue;
3668
+ }
3669
+ const outKey = keyResult.value;
3537
3670
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3538
3671
  if (result instanceof Promise) {
3539
3672
  proms.push(result.then((result2) => {
3540
3673
  if (result2.issues.length) {
3541
3674
  payload.issues.push(...prefixIssues(key, result2.issues));
3542
3675
  }
3543
- payload.value[key] = result2.value;
3676
+ payload.value[outKey] = result2.value;
3544
3677
  }));
3545
3678
  } else {
3546
3679
  if (result.issues.length) {
3547
3680
  payload.issues.push(...prefixIssues(key, result.issues));
3548
3681
  }
3549
- payload.value[key] = result.value;
3682
+ payload.value[outKey] = result.value;
3550
3683
  }
3551
3684
  }
3552
3685
  }
@@ -3570,6 +3703,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3570
3703
  for (const key of Reflect.ownKeys(input)) {
3571
3704
  if (key === "__proto__")
3572
3705
  continue;
3706
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
3707
+ continue;
3573
3708
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3574
3709
  if (keyResult instanceof Promise) {
3575
3710
  throw new Error("Async schemas not supported in object keys currently");
@@ -3774,6 +3909,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3774
3909
  });
3775
3910
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3776
3911
  $ZodType.init(inst, def);
3912
+ inst._zod.optin = "optional";
3777
3913
  inst._zod.parse = (payload, ctx) => {
3778
3914
  if (ctx.direction === "backward") {
3779
3915
  throw new $ZodEncodeError(inst.constructor.name);
@@ -3783,6 +3919,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3783
3919
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3784
3920
  return output.then((output2) => {
3785
3921
  payload.value = output2;
3922
+ payload.fallback = true;
3786
3923
  return payload;
3787
3924
  });
3788
3925
  }
@@ -3790,11 +3927,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3790
3927
  throw new $ZodAsyncError();
3791
3928
  }
3792
3929
  payload.value = _out;
3930
+ payload.fallback = true;
3793
3931
  return payload;
3794
3932
  };
3795
3933
  });
3796
3934
  function handleOptionalResult(result, input) {
3797
- if (result.issues.length && input === void 0) {
3935
+ if (input === void 0 && (result.issues.length || result.fallback)) {
3798
3936
  return { issues: [], value: void 0 };
3799
3937
  }
3800
3938
  return result;
@@ -3812,10 +3950,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3812
3950
  });
3813
3951
  inst._zod.parse = (payload, ctx) => {
3814
3952
  if (def.innerType._zod.optin === "optional") {
3953
+ const input = payload.value;
3815
3954
  const result = def.innerType._zod.run(payload, ctx);
3816
3955
  if (result instanceof Promise)
3817
- return result.then((r) => handleOptionalResult(r, payload.value));
3818
- return handleOptionalResult(result, payload.value);
3956
+ return result.then((r) => handleOptionalResult(r, input));
3957
+ return handleOptionalResult(result, input);
3819
3958
  }
3820
3959
  if (payload.value === void 0) {
3821
3960
  return payload;
@@ -3931,7 +4070,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3931
4070
  });
3932
4071
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3933
4072
  $ZodType.init(inst, def);
3934
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4073
+ inst._zod.optin = "optional";
3935
4074
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3936
4075
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3937
4076
  inst._zod.parse = (payload, ctx) => {
@@ -3951,6 +4090,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3951
4090
  input: payload.value
3952
4091
  });
3953
4092
  payload.issues = [];
4093
+ payload.fallback = true;
3954
4094
  }
3955
4095
  return payload;
3956
4096
  });
@@ -3965,6 +4105,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3965
4105
  input: payload.value
3966
4106
  });
3967
4107
  payload.issues = [];
4108
+ payload.fallback = true;
3968
4109
  }
3969
4110
  return payload;
3970
4111
  };
@@ -4010,7 +4151,7 @@ function handlePipeResult(left, next, ctx) {
4010
4151
  left.aborted = true;
4011
4152
  return left;
4012
4153
  }
4013
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4154
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4014
4155
  }
4015
4156
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
4016
4157
  $ZodType.init(inst, def);
@@ -4062,6 +4203,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
4062
4203
  }
4063
4204
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
4064
4205
  }
4206
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
4207
+ $ZodPipe.init(inst, def);
4208
+ });
4065
4209
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
4066
4210
  $ZodType.init(inst, def);
4067
4211
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -4213,7 +4357,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
4213
4357
  });
4214
4358
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4215
4359
  $ZodType.init(inst, def);
4216
- defineLazy(inst._zod, "innerType", () => def.getter());
4360
+ defineLazy(inst._zod, "innerType", () => {
4361
+ const d = def;
4362
+ if (!d._cachedInner)
4363
+ d._cachedInner = def.getter();
4364
+ return d._cachedInner;
4365
+ });
4217
4366
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4218
4367
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4219
4368
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4268,6 +4417,7 @@ __export(locales_exports, {
4268
4417
  cs: () => cs_default,
4269
4418
  da: () => da_default,
4270
4419
  de: () => de_default,
4420
+ el: () => el_default,
4271
4421
  en: () => en_default,
4272
4422
  eo: () => eo_default,
4273
4423
  es: () => es_default,
@@ -4276,6 +4426,7 @@ __export(locales_exports, {
4276
4426
  fr: () => fr_default,
4277
4427
  frCA: () => fr_CA_default,
4278
4428
  he: () => he_default,
4429
+ hr: () => hr_default,
4279
4430
  hu: () => hu_default,
4280
4431
  hy: () => hy_default,
4281
4432
  id: () => id_default,
@@ -4295,6 +4446,7 @@ __export(locales_exports, {
4295
4446
  pl: () => pl_default,
4296
4447
  ps: () => ps_default,
4297
4448
  pt: () => pt_default,
4449
+ ro: () => ro_default,
4298
4450
  ru: () => ru_default,
4299
4451
  sl: () => sl_default,
4300
4452
  sv: () => sv_default,
@@ -5248,8 +5400,118 @@ function de_default() {
5248
5400
  };
5249
5401
  }
5250
5402
 
5251
- // ../../node_modules/zod/v4/locales/en.js
5403
+ // ../../node_modules/zod/v4/locales/el.js
5252
5404
  var error9 = () => {
5405
+ const Sizable = {
5406
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5407
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5408
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5409
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5410
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5411
+ };
5412
+ function getSizing(origin) {
5413
+ return Sizable[origin] ?? null;
5414
+ }
5415
+ const FormatDictionary = {
5416
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5417
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5418
+ url: "URL",
5419
+ emoji: "emoji",
5420
+ uuid: "UUID",
5421
+ uuidv4: "UUIDv4",
5422
+ uuidv6: "UUIDv6",
5423
+ nanoid: "nanoid",
5424
+ guid: "GUID",
5425
+ cuid: "cuid",
5426
+ cuid2: "cuid2",
5427
+ ulid: "ULID",
5428
+ xid: "XID",
5429
+ ksuid: "KSUID",
5430
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5431
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5432
+ time: "ISO \u03CE\u03C1\u03B1",
5433
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5434
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5435
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5436
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5437
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5438
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5439
+ base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
5440
+ base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
5441
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5442
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5443
+ jwt: "JWT",
5444
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5445
+ };
5446
+ const TypeDictionary = {
5447
+ nan: "NaN"
5448
+ };
5449
+ return (issue2) => {
5450
+ switch (issue2.code) {
5451
+ case "invalid_type": {
5452
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5453
+ const receivedType = parsedType(issue2.input);
5454
+ const received = TypeDictionary[receivedType] ?? receivedType;
5455
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5456
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
5457
+ }
5458
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
5459
+ }
5460
+ case "invalid_value":
5461
+ if (issue2.values.length === 1)
5462
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
5463
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
5464
+ case "too_big": {
5465
+ const adj = issue2.inclusive ? "<=" : "<";
5466
+ const sizing = getSizing(issue2.origin);
5467
+ if (sizing)
5468
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
5469
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
5470
+ }
5471
+ case "too_small": {
5472
+ const adj = issue2.inclusive ? ">=" : ">";
5473
+ const sizing = getSizing(issue2.origin);
5474
+ if (sizing) {
5475
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5476
+ }
5477
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
5478
+ }
5479
+ case "invalid_format": {
5480
+ const _issue = issue2;
5481
+ if (_issue.format === "starts_with") {
5482
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
5483
+ }
5484
+ if (_issue.format === "ends_with")
5485
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
5486
+ if (_issue.format === "includes")
5487
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
5488
+ if (_issue.format === "regex")
5489
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
5490
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5491
+ }
5492
+ case "not_multiple_of":
5493
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
5494
+ case "unrecognized_keys":
5495
+ return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
5496
+ case "invalid_key":
5497
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5498
+ case "invalid_union":
5499
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5500
+ case "invalid_element":
5501
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5502
+ default:
5503
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5504
+ }
5505
+ };
5506
+ };
5507
+ function el_default() {
5508
+ return {
5509
+ localeError: error9()
5510
+ };
5511
+ }
5512
+
5513
+ // ../../node_modules/zod/v4/locales/en.js
5514
+ var error10 = () => {
5253
5515
  const Sizable = {
5254
5516
  string: { unit: "characters", verb: "to have" },
5255
5517
  file: { unit: "bytes", verb: "to have" },
@@ -5343,6 +5605,10 @@ var error9 = () => {
5343
5605
  case "invalid_key":
5344
5606
  return `Invalid key in ${issue2.origin}`;
5345
5607
  case "invalid_union":
5608
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
5609
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
5610
+ return `Invalid discriminator value. Expected ${opts}`;
5611
+ }
5346
5612
  return "Invalid input";
5347
5613
  case "invalid_element":
5348
5614
  return `Invalid value in ${issue2.origin}`;
@@ -5353,12 +5619,12 @@ var error9 = () => {
5353
5619
  };
5354
5620
  function en_default() {
5355
5621
  return {
5356
- localeError: error9()
5622
+ localeError: error10()
5357
5623
  };
5358
5624
  }
5359
5625
 
5360
5626
  // ../../node_modules/zod/v4/locales/eo.js
5361
- var error10 = () => {
5627
+ var error11 = () => {
5362
5628
  const Sizable = {
5363
5629
  string: { unit: "karaktrojn", verb: "havi" },
5364
5630
  file: { unit: "bajtojn", verb: "havi" },
@@ -5463,12 +5729,12 @@ var error10 = () => {
5463
5729
  };
5464
5730
  function eo_default() {
5465
5731
  return {
5466
- localeError: error10()
5732
+ localeError: error11()
5467
5733
  };
5468
5734
  }
5469
5735
 
5470
5736
  // ../../node_modules/zod/v4/locales/es.js
5471
- var error11 = () => {
5737
+ var error12 = () => {
5472
5738
  const Sizable = {
5473
5739
  string: { unit: "caracteres", verb: "tener" },
5474
5740
  file: { unit: "bytes", verb: "tener" },
@@ -5596,12 +5862,12 @@ var error11 = () => {
5596
5862
  };
5597
5863
  function es_default() {
5598
5864
  return {
5599
- localeError: error11()
5865
+ localeError: error12()
5600
5866
  };
5601
5867
  }
5602
5868
 
5603
5869
  // ../../node_modules/zod/v4/locales/fa.js
5604
- var error12 = () => {
5870
+ var error13 = () => {
5605
5871
  const Sizable = {
5606
5872
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
5607
5873
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -5711,12 +5977,12 @@ var error12 = () => {
5711
5977
  };
5712
5978
  function fa_default() {
5713
5979
  return {
5714
- localeError: error12()
5980
+ localeError: error13()
5715
5981
  };
5716
5982
  }
5717
5983
 
5718
5984
  // ../../node_modules/zod/v4/locales/fi.js
5719
- var error13 = () => {
5985
+ var error14 = () => {
5720
5986
  const Sizable = {
5721
5987
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
5722
5988
  file: { unit: "tavua", subject: "tiedoston" },
@@ -5824,12 +6090,12 @@ var error13 = () => {
5824
6090
  };
5825
6091
  function fi_default() {
5826
6092
  return {
5827
- localeError: error13()
6093
+ localeError: error14()
5828
6094
  };
5829
6095
  }
5830
6096
 
5831
6097
  // ../../node_modules/zod/v4/locales/fr.js
5832
- var error14 = () => {
6098
+ var error15 = () => {
5833
6099
  const Sizable = {
5834
6100
  string: { unit: "caract\xE8res", verb: "avoir" },
5835
6101
  file: { unit: "octets", verb: "avoir" },
@@ -5870,9 +6136,27 @@ var error14 = () => {
5870
6136
  template_literal: "entr\xE9e"
5871
6137
  };
5872
6138
  const TypeDictionary = {
5873
- nan: "NaN",
6139
+ string: "cha\xEEne",
5874
6140
  number: "nombre",
5875
- array: "tableau"
6141
+ int: "entier",
6142
+ boolean: "bool\xE9en",
6143
+ bigint: "grand entier",
6144
+ symbol: "symbole",
6145
+ undefined: "ind\xE9fini",
6146
+ null: "null",
6147
+ never: "jamais",
6148
+ void: "vide",
6149
+ date: "date",
6150
+ array: "tableau",
6151
+ object: "objet",
6152
+ tuple: "tuple",
6153
+ record: "enregistrement",
6154
+ map: "carte",
6155
+ set: "ensemble",
6156
+ file: "fichier",
6157
+ nonoptional: "non-optionnel",
6158
+ nan: "NaN",
6159
+ function: "fonction"
5876
6160
  };
5877
6161
  return (issue2) => {
5878
6162
  switch (issue2.code) {
@@ -5893,16 +6177,15 @@ var error14 = () => {
5893
6177
  const adj = issue2.inclusive ? "<=" : "<";
5894
6178
  const sizing = getSizing(issue2.origin);
5895
6179
  if (sizing)
5896
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
5897
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6180
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6181
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
5898
6182
  }
5899
6183
  case "too_small": {
5900
6184
  const adj = issue2.inclusive ? ">=" : ">";
5901
6185
  const sizing = getSizing(issue2.origin);
5902
- if (sizing) {
5903
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5904
- }
5905
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6186
+ if (sizing)
6187
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6188
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
5906
6189
  }
5907
6190
  case "invalid_format": {
5908
6191
  const _issue = issue2;
@@ -5933,12 +6216,12 @@ var error14 = () => {
5933
6216
  };
5934
6217
  function fr_default() {
5935
6218
  return {
5936
- localeError: error14()
6219
+ localeError: error15()
5937
6220
  };
5938
6221
  }
5939
6222
 
5940
6223
  // ../../node_modules/zod/v4/locales/fr-CA.js
5941
- var error15 = () => {
6224
+ var error16 = () => {
5942
6225
  const Sizable = {
5943
6226
  string: { unit: "caract\xE8res", verb: "avoir" },
5944
6227
  file: { unit: "octets", verb: "avoir" },
@@ -6041,12 +6324,12 @@ var error15 = () => {
6041
6324
  };
6042
6325
  function fr_CA_default() {
6043
6326
  return {
6044
- localeError: error15()
6327
+ localeError: error16()
6045
6328
  };
6046
6329
  }
6047
6330
 
6048
6331
  // ../../node_modules/zod/v4/locales/he.js
6049
- var error16 = () => {
6332
+ var error17 = () => {
6050
6333
  const TypeNames = {
6051
6334
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6052
6335
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6236,24 +6519,24 @@ var error16 = () => {
6236
6519
  };
6237
6520
  function he_default() {
6238
6521
  return {
6239
- localeError: error16()
6522
+ localeError: error17()
6240
6523
  };
6241
6524
  }
6242
6525
 
6243
- // ../../node_modules/zod/v4/locales/hu.js
6244
- var error17 = () => {
6526
+ // ../../node_modules/zod/v4/locales/hr.js
6527
+ var error18 = () => {
6245
6528
  const Sizable = {
6246
- string: { unit: "karakter", verb: "legyen" },
6247
- file: { unit: "byte", verb: "legyen" },
6248
- array: { unit: "elem", verb: "legyen" },
6249
- set: { unit: "elem", verb: "legyen" }
6529
+ string: { unit: "znakova", verb: "imati" },
6530
+ file: { unit: "bajtova", verb: "imati" },
6531
+ array: { unit: "stavki", verb: "imati" },
6532
+ set: { unit: "stavki", verb: "imati" }
6250
6533
  };
6251
6534
  function getSizing(origin) {
6252
6535
  return Sizable[origin] ?? null;
6253
6536
  }
6254
6537
  const FormatDictionary = {
6255
- regex: "bemenet",
6256
- email: "email c\xEDm",
6538
+ regex: "unos",
6539
+ email: "email adresa",
6257
6540
  url: "URL",
6258
6541
  emoji: "emoji",
6259
6542
  uuid: "UUID",
@@ -6266,25 +6549,37 @@ var error17 = () => {
6266
6549
  ulid: "ULID",
6267
6550
  xid: "XID",
6268
6551
  ksuid: "KSUID",
6269
- datetime: "ISO id\u0151b\xE9lyeg",
6270
- date: "ISO d\xE1tum",
6271
- time: "ISO id\u0151",
6272
- duration: "ISO id\u0151intervallum",
6273
- ipv4: "IPv4 c\xEDm",
6274
- ipv6: "IPv6 c\xEDm",
6275
- cidrv4: "IPv4 tartom\xE1ny",
6276
- cidrv6: "IPv6 tartom\xE1ny",
6277
- base64: "base64-k\xF3dolt string",
6278
- base64url: "base64url-k\xF3dolt string",
6279
- json_string: "JSON string",
6280
- e164: "E.164 sz\xE1m",
6552
+ datetime: "ISO datum i vrijeme",
6553
+ date: "ISO datum",
6554
+ time: "ISO vrijeme",
6555
+ duration: "ISO trajanje",
6556
+ ipv4: "IPv4 adresa",
6557
+ ipv6: "IPv6 adresa",
6558
+ cidrv4: "IPv4 raspon",
6559
+ cidrv6: "IPv6 raspon",
6560
+ base64: "base64 kodirani tekst",
6561
+ base64url: "base64url kodirani tekst",
6562
+ json_string: "JSON tekst",
6563
+ e164: "E.164 broj",
6281
6564
  jwt: "JWT",
6282
- template_literal: "bemenet"
6565
+ template_literal: "unos"
6283
6566
  };
6284
6567
  const TypeDictionary = {
6285
6568
  nan: "NaN",
6286
- number: "sz\xE1m",
6287
- array: "t\xF6mb"
6569
+ string: "tekst",
6570
+ number: "broj",
6571
+ boolean: "boolean",
6572
+ array: "niz",
6573
+ object: "objekt",
6574
+ set: "skup",
6575
+ file: "datoteka",
6576
+ date: "datum",
6577
+ bigint: "bigint",
6578
+ symbol: "simbol",
6579
+ undefined: "undefined",
6580
+ null: "null",
6581
+ function: "funkcija",
6582
+ map: "mapa"
6288
6583
  };
6289
6584
  return (issue2) => {
6290
6585
  switch (issue2.code) {
@@ -6293,26 +6588,137 @@ var error17 = () => {
6293
6588
  const receivedType = parsedType(issue2.input);
6294
6589
  const received = TypeDictionary[receivedType] ?? receivedType;
6295
6590
  if (/^[A-Z]/.test(issue2.expected)) {
6296
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6591
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6297
6592
  }
6298
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6593
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6299
6594
  }
6300
6595
  case "invalid_value":
6301
6596
  if (issue2.values.length === 1)
6302
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6303
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6597
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
6598
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
6304
6599
  case "too_big": {
6305
6600
  const adj = issue2.inclusive ? "<=" : "<";
6306
6601
  const sizing = getSizing(issue2.origin);
6602
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6307
6603
  if (sizing)
6308
- return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6309
- return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6604
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
6605
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
6310
6606
  }
6311
6607
  case "too_small": {
6312
6608
  const adj = issue2.inclusive ? ">=" : ">";
6313
6609
  const sizing = getSizing(issue2.origin);
6610
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6314
6611
  if (sizing) {
6315
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6612
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6613
+ }
6614
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
6615
+ }
6616
+ case "invalid_format": {
6617
+ const _issue = issue2;
6618
+ if (_issue.format === "starts_with")
6619
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
6620
+ if (_issue.format === "ends_with")
6621
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
6622
+ if (_issue.format === "includes")
6623
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
6624
+ if (_issue.format === "regex")
6625
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
6626
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
6627
+ }
6628
+ case "not_multiple_of":
6629
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
6630
+ case "unrecognized_keys":
6631
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
6632
+ case "invalid_key":
6633
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6634
+ case "invalid_union":
6635
+ return "Neispravan unos";
6636
+ case "invalid_element":
6637
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6638
+ default:
6639
+ return `Neispravan unos`;
6640
+ }
6641
+ };
6642
+ };
6643
+ function hr_default() {
6644
+ return {
6645
+ localeError: error18()
6646
+ };
6647
+ }
6648
+
6649
+ // ../../node_modules/zod/v4/locales/hu.js
6650
+ var error19 = () => {
6651
+ const Sizable = {
6652
+ string: { unit: "karakter", verb: "legyen" },
6653
+ file: { unit: "byte", verb: "legyen" },
6654
+ array: { unit: "elem", verb: "legyen" },
6655
+ set: { unit: "elem", verb: "legyen" }
6656
+ };
6657
+ function getSizing(origin) {
6658
+ return Sizable[origin] ?? null;
6659
+ }
6660
+ const FormatDictionary = {
6661
+ regex: "bemenet",
6662
+ email: "email c\xEDm",
6663
+ url: "URL",
6664
+ emoji: "emoji",
6665
+ uuid: "UUID",
6666
+ uuidv4: "UUIDv4",
6667
+ uuidv6: "UUIDv6",
6668
+ nanoid: "nanoid",
6669
+ guid: "GUID",
6670
+ cuid: "cuid",
6671
+ cuid2: "cuid2",
6672
+ ulid: "ULID",
6673
+ xid: "XID",
6674
+ ksuid: "KSUID",
6675
+ datetime: "ISO id\u0151b\xE9lyeg",
6676
+ date: "ISO d\xE1tum",
6677
+ time: "ISO id\u0151",
6678
+ duration: "ISO id\u0151intervallum",
6679
+ ipv4: "IPv4 c\xEDm",
6680
+ ipv6: "IPv6 c\xEDm",
6681
+ cidrv4: "IPv4 tartom\xE1ny",
6682
+ cidrv6: "IPv6 tartom\xE1ny",
6683
+ base64: "base64-k\xF3dolt string",
6684
+ base64url: "base64url-k\xF3dolt string",
6685
+ json_string: "JSON string",
6686
+ e164: "E.164 sz\xE1m",
6687
+ jwt: "JWT",
6688
+ template_literal: "bemenet"
6689
+ };
6690
+ const TypeDictionary = {
6691
+ nan: "NaN",
6692
+ number: "sz\xE1m",
6693
+ array: "t\xF6mb"
6694
+ };
6695
+ return (issue2) => {
6696
+ switch (issue2.code) {
6697
+ case "invalid_type": {
6698
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
6699
+ const receivedType = parsedType(issue2.input);
6700
+ const received = TypeDictionary[receivedType] ?? receivedType;
6701
+ if (/^[A-Z]/.test(issue2.expected)) {
6702
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
6703
+ }
6704
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
6705
+ }
6706
+ case "invalid_value":
6707
+ if (issue2.values.length === 1)
6708
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6709
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
6710
+ case "too_big": {
6711
+ const adj = issue2.inclusive ? "<=" : "<";
6712
+ const sizing = getSizing(issue2.origin);
6713
+ if (sizing)
6714
+ return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6715
+ return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
6716
+ }
6717
+ case "too_small": {
6718
+ const adj = issue2.inclusive ? ">=" : ">";
6719
+ const sizing = getSizing(issue2.origin);
6720
+ if (sizing) {
6721
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6316
6722
  }
6317
6723
  return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
6318
6724
  }
@@ -6345,7 +6751,7 @@ var error17 = () => {
6345
6751
  };
6346
6752
  function hu_default() {
6347
6753
  return {
6348
- localeError: error17()
6754
+ localeError: error19()
6349
6755
  };
6350
6756
  }
6351
6757
 
@@ -6360,7 +6766,7 @@ function withDefiniteArticle(word) {
6360
6766
  const lastChar = word[word.length - 1];
6361
6767
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
6362
6768
  }
6363
- var error18 = () => {
6769
+ var error20 = () => {
6364
6770
  const Sizable = {
6365
6771
  string: {
6366
6772
  unit: {
@@ -6493,12 +6899,12 @@ var error18 = () => {
6493
6899
  };
6494
6900
  function hy_default() {
6495
6901
  return {
6496
- localeError: error18()
6902
+ localeError: error20()
6497
6903
  };
6498
6904
  }
6499
6905
 
6500
6906
  // ../../node_modules/zod/v4/locales/id.js
6501
- var error19 = () => {
6907
+ var error21 = () => {
6502
6908
  const Sizable = {
6503
6909
  string: { unit: "karakter", verb: "memiliki" },
6504
6910
  file: { unit: "byte", verb: "memiliki" },
@@ -6600,12 +7006,12 @@ var error19 = () => {
6600
7006
  };
6601
7007
  function id_default() {
6602
7008
  return {
6603
- localeError: error19()
7009
+ localeError: error21()
6604
7010
  };
6605
7011
  }
6606
7012
 
6607
7013
  // ../../node_modules/zod/v4/locales/is.js
6608
- var error20 = () => {
7014
+ var error22 = () => {
6609
7015
  const Sizable = {
6610
7016
  string: { unit: "stafi", verb: "a\xF0 hafa" },
6611
7017
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -6710,12 +7116,12 @@ var error20 = () => {
6710
7116
  };
6711
7117
  function is_default() {
6712
7118
  return {
6713
- localeError: error20()
7119
+ localeError: error22()
6714
7120
  };
6715
7121
  }
6716
7122
 
6717
7123
  // ../../node_modules/zod/v4/locales/it.js
6718
- var error21 = () => {
7124
+ var error23 = () => {
6719
7125
  const Sizable = {
6720
7126
  string: { unit: "caratteri", verb: "avere" },
6721
7127
  file: { unit: "byte", verb: "avere" },
@@ -6800,7 +7206,7 @@ var error21 = () => {
6800
7206
  return `Stringa non valida: deve includere "${_issue.includes}"`;
6801
7207
  if (_issue.format === "regex")
6802
7208
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
6803
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7209
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
6804
7210
  }
6805
7211
  case "not_multiple_of":
6806
7212
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -6819,12 +7225,12 @@ var error21 = () => {
6819
7225
  };
6820
7226
  function it_default() {
6821
7227
  return {
6822
- localeError: error21()
7228
+ localeError: error23()
6823
7229
  };
6824
7230
  }
6825
7231
 
6826
7232
  // ../../node_modules/zod/v4/locales/ja.js
6827
- var error22 = () => {
7233
+ var error24 = () => {
6828
7234
  const Sizable = {
6829
7235
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
6830
7236
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -6927,12 +7333,12 @@ var error22 = () => {
6927
7333
  };
6928
7334
  function ja_default() {
6929
7335
  return {
6930
- localeError: error22()
7336
+ localeError: error24()
6931
7337
  };
6932
7338
  }
6933
7339
 
6934
7340
  // ../../node_modules/zod/v4/locales/ka.js
6935
- var error23 = () => {
7341
+ var error25 = () => {
6936
7342
  const Sizable = {
6937
7343
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
6938
7344
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -6965,9 +7371,9 @@ var error23 = () => {
6965
7371
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
6966
7372
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6967
7373
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6968
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6969
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6970
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7374
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7375
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7376
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
6971
7377
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
6972
7378
  jwt: "JWT",
6973
7379
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -6975,7 +7381,7 @@ var error23 = () => {
6975
7381
  const TypeDictionary = {
6976
7382
  nan: "NaN",
6977
7383
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
6978
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7384
+ string: "\u10D5\u10D4\u10DA\u10D8",
6979
7385
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
6980
7386
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
6981
7387
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7013,14 +7419,14 @@ var error23 = () => {
7013
7419
  case "invalid_format": {
7014
7420
  const _issue = issue2;
7015
7421
  if (_issue.format === "starts_with") {
7016
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
7422
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
7017
7423
  }
7018
7424
  if (_issue.format === "ends_with")
7019
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
7425
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
7020
7426
  if (_issue.format === "includes")
7021
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
7427
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
7022
7428
  if (_issue.format === "regex")
7023
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
7429
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
7024
7430
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7025
7431
  }
7026
7432
  case "not_multiple_of":
@@ -7040,12 +7446,12 @@ var error23 = () => {
7040
7446
  };
7041
7447
  function ka_default() {
7042
7448
  return {
7043
- localeError: error23()
7449
+ localeError: error25()
7044
7450
  };
7045
7451
  }
7046
7452
 
7047
7453
  // ../../node_modules/zod/v4/locales/km.js
7048
- var error24 = () => {
7454
+ var error26 = () => {
7049
7455
  const Sizable = {
7050
7456
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7051
7457
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7151,7 +7557,7 @@ var error24 = () => {
7151
7557
  };
7152
7558
  function km_default() {
7153
7559
  return {
7154
- localeError: error24()
7560
+ localeError: error26()
7155
7561
  };
7156
7562
  }
7157
7563
 
@@ -7161,7 +7567,7 @@ function kh_default() {
7161
7567
  }
7162
7568
 
7163
7569
  // ../../node_modules/zod/v4/locales/ko.js
7164
- var error25 = () => {
7570
+ var error27 = () => {
7165
7571
  const Sizable = {
7166
7572
  string: { unit: "\uBB38\uC790", verb: "to have" },
7167
7573
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7268,7 +7674,7 @@ var error25 = () => {
7268
7674
  };
7269
7675
  function ko_default() {
7270
7676
  return {
7271
- localeError: error25()
7677
+ localeError: error27()
7272
7678
  };
7273
7679
  }
7274
7680
 
@@ -7286,7 +7692,7 @@ function getUnitTypeFromNumber(number4) {
7286
7692
  return "one";
7287
7693
  return "few";
7288
7694
  }
7289
- var error26 = () => {
7695
+ var error28 = () => {
7290
7696
  const Sizable = {
7291
7697
  string: {
7292
7698
  unit: {
@@ -7472,12 +7878,12 @@ var error26 = () => {
7472
7878
  };
7473
7879
  function lt_default() {
7474
7880
  return {
7475
- localeError: error26()
7881
+ localeError: error28()
7476
7882
  };
7477
7883
  }
7478
7884
 
7479
7885
  // ../../node_modules/zod/v4/locales/mk.js
7480
- var error27 = () => {
7886
+ var error29 = () => {
7481
7887
  const Sizable = {
7482
7888
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7483
7889
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -7582,12 +7988,12 @@ var error27 = () => {
7582
7988
  };
7583
7989
  function mk_default() {
7584
7990
  return {
7585
- localeError: error27()
7991
+ localeError: error29()
7586
7992
  };
7587
7993
  }
7588
7994
 
7589
7995
  // ../../node_modules/zod/v4/locales/ms.js
7590
- var error28 = () => {
7996
+ var error30 = () => {
7591
7997
  const Sizable = {
7592
7998
  string: { unit: "aksara", verb: "mempunyai" },
7593
7999
  file: { unit: "bait", verb: "mempunyai" },
@@ -7690,12 +8096,12 @@ var error28 = () => {
7690
8096
  };
7691
8097
  function ms_default() {
7692
8098
  return {
7693
- localeError: error28()
8099
+ localeError: error30()
7694
8100
  };
7695
8101
  }
7696
8102
 
7697
8103
  // ../../node_modules/zod/v4/locales/nl.js
7698
- var error29 = () => {
8104
+ var error31 = () => {
7699
8105
  const Sizable = {
7700
8106
  string: { unit: "tekens", verb: "heeft" },
7701
8107
  file: { unit: "bytes", verb: "heeft" },
@@ -7801,12 +8207,12 @@ var error29 = () => {
7801
8207
  };
7802
8208
  function nl_default() {
7803
8209
  return {
7804
- localeError: error29()
8210
+ localeError: error31()
7805
8211
  };
7806
8212
  }
7807
8213
 
7808
8214
  // ../../node_modules/zod/v4/locales/no.js
7809
- var error30 = () => {
8215
+ var error32 = () => {
7810
8216
  const Sizable = {
7811
8217
  string: { unit: "tegn", verb: "\xE5 ha" },
7812
8218
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -7910,12 +8316,12 @@ var error30 = () => {
7910
8316
  };
7911
8317
  function no_default() {
7912
8318
  return {
7913
- localeError: error30()
8319
+ localeError: error32()
7914
8320
  };
7915
8321
  }
7916
8322
 
7917
8323
  // ../../node_modules/zod/v4/locales/ota.js
7918
- var error31 = () => {
8324
+ var error33 = () => {
7919
8325
  const Sizable = {
7920
8326
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
7921
8327
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8020,12 +8426,12 @@ var error31 = () => {
8020
8426
  };
8021
8427
  function ota_default() {
8022
8428
  return {
8023
- localeError: error31()
8429
+ localeError: error33()
8024
8430
  };
8025
8431
  }
8026
8432
 
8027
8433
  // ../../node_modules/zod/v4/locales/ps.js
8028
- var error32 = () => {
8434
+ var error34 = () => {
8029
8435
  const Sizable = {
8030
8436
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8031
8437
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8135,12 +8541,12 @@ var error32 = () => {
8135
8541
  };
8136
8542
  function ps_default() {
8137
8543
  return {
8138
- localeError: error32()
8544
+ localeError: error34()
8139
8545
  };
8140
8546
  }
8141
8547
 
8142
8548
  // ../../node_modules/zod/v4/locales/pl.js
8143
- var error33 = () => {
8549
+ var error35 = () => {
8144
8550
  const Sizable = {
8145
8551
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8146
8552
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8245,12 +8651,12 @@ var error33 = () => {
8245
8651
  };
8246
8652
  function pl_default() {
8247
8653
  return {
8248
- localeError: error33()
8654
+ localeError: error35()
8249
8655
  };
8250
8656
  }
8251
8657
 
8252
8658
  // ../../node_modules/zod/v4/locales/pt.js
8253
- var error34 = () => {
8659
+ var error36 = () => {
8254
8660
  const Sizable = {
8255
8661
  string: { unit: "caracteres", verb: "ter" },
8256
8662
  file: { unit: "bytes", verb: "ter" },
@@ -8354,7 +8760,127 @@ var error34 = () => {
8354
8760
  };
8355
8761
  function pt_default() {
8356
8762
  return {
8357
- localeError: error34()
8763
+ localeError: error36()
8764
+ };
8765
+ }
8766
+
8767
+ // ../../node_modules/zod/v4/locales/ro.js
8768
+ var error37 = () => {
8769
+ const Sizable = {
8770
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
8771
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
8772
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8773
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8774
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
8775
+ };
8776
+ function getSizing(origin) {
8777
+ return Sizable[origin] ?? null;
8778
+ }
8779
+ const FormatDictionary = {
8780
+ regex: "intrare",
8781
+ email: "adres\u0103 de email",
8782
+ url: "URL",
8783
+ emoji: "emoji",
8784
+ uuid: "UUID",
8785
+ uuidv4: "UUIDv4",
8786
+ uuidv6: "UUIDv6",
8787
+ nanoid: "nanoid",
8788
+ guid: "GUID",
8789
+ cuid: "cuid",
8790
+ cuid2: "cuid2",
8791
+ ulid: "ULID",
8792
+ xid: "XID",
8793
+ ksuid: "KSUID",
8794
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
8795
+ date: "dat\u0103 ISO",
8796
+ time: "or\u0103 ISO",
8797
+ duration: "durat\u0103 ISO",
8798
+ ipv4: "adres\u0103 IPv4",
8799
+ ipv6: "adres\u0103 IPv6",
8800
+ mac: "adres\u0103 MAC",
8801
+ cidrv4: "interval IPv4",
8802
+ cidrv6: "interval IPv6",
8803
+ base64: "\u0219ir codat base64",
8804
+ base64url: "\u0219ir codat base64url",
8805
+ json_string: "\u0219ir JSON",
8806
+ e164: "num\u0103r E.164",
8807
+ jwt: "JWT",
8808
+ template_literal: "intrare"
8809
+ };
8810
+ const TypeDictionary = {
8811
+ nan: "NaN",
8812
+ string: "\u0219ir",
8813
+ number: "num\u0103r",
8814
+ boolean: "boolean",
8815
+ function: "func\u021Bie",
8816
+ array: "matrice",
8817
+ object: "obiect",
8818
+ undefined: "nedefinit",
8819
+ symbol: "simbol",
8820
+ bigint: "num\u0103r mare",
8821
+ void: "void",
8822
+ never: "never",
8823
+ map: "hart\u0103",
8824
+ set: "set"
8825
+ };
8826
+ return (issue2) => {
8827
+ switch (issue2.code) {
8828
+ case "invalid_type": {
8829
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
8830
+ const receivedType = parsedType(issue2.input);
8831
+ const received = TypeDictionary[receivedType] ?? receivedType;
8832
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
8833
+ }
8834
+ case "invalid_value":
8835
+ if (issue2.values.length === 1)
8836
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
8837
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
8838
+ case "too_big": {
8839
+ const adj = issue2.inclusive ? "<=" : "<";
8840
+ const sizing = getSizing(issue2.origin);
8841
+ if (sizing)
8842
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
8843
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
8844
+ }
8845
+ case "too_small": {
8846
+ const adj = issue2.inclusive ? ">=" : ">";
8847
+ const sizing = getSizing(issue2.origin);
8848
+ if (sizing) {
8849
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8850
+ }
8851
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
8852
+ }
8853
+ case "invalid_format": {
8854
+ const _issue = issue2;
8855
+ if (_issue.format === "starts_with") {
8856
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
8857
+ }
8858
+ if (_issue.format === "ends_with")
8859
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
8860
+ if (_issue.format === "includes")
8861
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
8862
+ if (_issue.format === "regex")
8863
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
8864
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
8865
+ }
8866
+ case "not_multiple_of":
8867
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
8868
+ case "unrecognized_keys":
8869
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
8870
+ case "invalid_key":
8871
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
8872
+ case "invalid_union":
8873
+ return "Intrare invalid\u0103";
8874
+ case "invalid_element":
8875
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
8876
+ default:
8877
+ return `Intrare invalid\u0103`;
8878
+ }
8879
+ };
8880
+ };
8881
+ function ro_default() {
8882
+ return {
8883
+ localeError: error37()
8358
8884
  };
8359
8885
  }
8360
8886
 
@@ -8374,7 +8900,7 @@ function getRussianPlural(count, one, few, many) {
8374
8900
  }
8375
8901
  return many;
8376
8902
  }
8377
- var error35 = () => {
8903
+ var error38 = () => {
8378
8904
  const Sizable = {
8379
8905
  string: {
8380
8906
  unit: {
@@ -8511,12 +9037,12 @@ var error35 = () => {
8511
9037
  };
8512
9038
  function ru_default() {
8513
9039
  return {
8514
- localeError: error35()
9040
+ localeError: error38()
8515
9041
  };
8516
9042
  }
8517
9043
 
8518
9044
  // ../../node_modules/zod/v4/locales/sl.js
8519
- var error36 = () => {
9045
+ var error39 = () => {
8520
9046
  const Sizable = {
8521
9047
  string: { unit: "znakov", verb: "imeti" },
8522
9048
  file: { unit: "bajtov", verb: "imeti" },
@@ -8621,12 +9147,12 @@ var error36 = () => {
8621
9147
  };
8622
9148
  function sl_default() {
8623
9149
  return {
8624
- localeError: error36()
9150
+ localeError: error39()
8625
9151
  };
8626
9152
  }
8627
9153
 
8628
9154
  // ../../node_modules/zod/v4/locales/sv.js
8629
- var error37 = () => {
9155
+ var error40 = () => {
8630
9156
  const Sizable = {
8631
9157
  string: { unit: "tecken", verb: "att ha" },
8632
9158
  file: { unit: "bytes", verb: "att ha" },
@@ -8732,12 +9258,12 @@ var error37 = () => {
8732
9258
  };
8733
9259
  function sv_default() {
8734
9260
  return {
8735
- localeError: error37()
9261
+ localeError: error40()
8736
9262
  };
8737
9263
  }
8738
9264
 
8739
9265
  // ../../node_modules/zod/v4/locales/ta.js
8740
- var error38 = () => {
9266
+ var error41 = () => {
8741
9267
  const Sizable = {
8742
9268
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
8743
9269
  file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -8843,12 +9369,12 @@ var error38 = () => {
8843
9369
  };
8844
9370
  function ta_default() {
8845
9371
  return {
8846
- localeError: error38()
9372
+ localeError: error41()
8847
9373
  };
8848
9374
  }
8849
9375
 
8850
9376
  // ../../node_modules/zod/v4/locales/th.js
8851
- var error39 = () => {
9377
+ var error42 = () => {
8852
9378
  const Sizable = {
8853
9379
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
8854
9380
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -8954,12 +9480,12 @@ var error39 = () => {
8954
9480
  };
8955
9481
  function th_default() {
8956
9482
  return {
8957
- localeError: error39()
9483
+ localeError: error42()
8958
9484
  };
8959
9485
  }
8960
9486
 
8961
9487
  // ../../node_modules/zod/v4/locales/tr.js
8962
- var error40 = () => {
9488
+ var error43 = () => {
8963
9489
  const Sizable = {
8964
9490
  string: { unit: "karakter", verb: "olmal\u0131" },
8965
9491
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9060,12 +9586,12 @@ var error40 = () => {
9060
9586
  };
9061
9587
  function tr_default() {
9062
9588
  return {
9063
- localeError: error40()
9589
+ localeError: error43()
9064
9590
  };
9065
9591
  }
9066
9592
 
9067
9593
  // ../../node_modules/zod/v4/locales/uk.js
9068
- var error41 = () => {
9594
+ var error44 = () => {
9069
9595
  const Sizable = {
9070
9596
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9071
9597
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9169,7 +9695,7 @@ var error41 = () => {
9169
9695
  };
9170
9696
  function uk_default() {
9171
9697
  return {
9172
- localeError: error41()
9698
+ localeError: error44()
9173
9699
  };
9174
9700
  }
9175
9701
 
@@ -9179,7 +9705,7 @@ function ua_default() {
9179
9705
  }
9180
9706
 
9181
9707
  // ../../node_modules/zod/v4/locales/ur.js
9182
- var error42 = () => {
9708
+ var error45 = () => {
9183
9709
  const Sizable = {
9184
9710
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9185
9711
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9285,17 +9811,18 @@ var error42 = () => {
9285
9811
  };
9286
9812
  function ur_default() {
9287
9813
  return {
9288
- localeError: error42()
9814
+ localeError: error45()
9289
9815
  };
9290
9816
  }
9291
9817
 
9292
9818
  // ../../node_modules/zod/v4/locales/uz.js
9293
- var error43 = () => {
9819
+ var error46 = () => {
9294
9820
  const Sizable = {
9295
9821
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9296
9822
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9297
9823
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9298
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
9824
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
9825
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9299
9826
  };
9300
9827
  function getSizing(origin) {
9301
9828
  return Sizable[origin] ?? null;
@@ -9395,12 +9922,12 @@ var error43 = () => {
9395
9922
  };
9396
9923
  function uz_default() {
9397
9924
  return {
9398
- localeError: error43()
9925
+ localeError: error46()
9399
9926
  };
9400
9927
  }
9401
9928
 
9402
9929
  // ../../node_modules/zod/v4/locales/vi.js
9403
- var error44 = () => {
9930
+ var error47 = () => {
9404
9931
  const Sizable = {
9405
9932
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9406
9933
  file: { unit: "byte", verb: "c\xF3" },
@@ -9504,12 +10031,12 @@ var error44 = () => {
9504
10031
  };
9505
10032
  function vi_default() {
9506
10033
  return {
9507
- localeError: error44()
10034
+ localeError: error47()
9508
10035
  };
9509
10036
  }
9510
10037
 
9511
10038
  // ../../node_modules/zod/v4/locales/zh-CN.js
9512
- var error45 = () => {
10039
+ var error48 = () => {
9513
10040
  const Sizable = {
9514
10041
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9515
10042
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -9614,12 +10141,12 @@ var error45 = () => {
9614
10141
  };
9615
10142
  function zh_CN_default() {
9616
10143
  return {
9617
- localeError: error45()
10144
+ localeError: error48()
9618
10145
  };
9619
10146
  }
9620
10147
 
9621
10148
  // ../../node_modules/zod/v4/locales/zh-TW.js
9622
- var error46 = () => {
10149
+ var error49 = () => {
9623
10150
  const Sizable = {
9624
10151
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
9625
10152
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -9722,12 +10249,12 @@ var error46 = () => {
9722
10249
  };
9723
10250
  function zh_TW_default() {
9724
10251
  return {
9725
- localeError: error46()
10252
+ localeError: error49()
9726
10253
  };
9727
10254
  }
9728
10255
 
9729
10256
  // ../../node_modules/zod/v4/locales/yo.js
9730
- var error47 = () => {
10257
+ var error50 = () => {
9731
10258
  const Sizable = {
9732
10259
  string: { unit: "\xE0mi", verb: "n\xED" },
9733
10260
  file: { unit: "bytes", verb: "n\xED" },
@@ -9830,12 +10357,12 @@ var error47 = () => {
9830
10357
  };
9831
10358
  function yo_default() {
9832
10359
  return {
9833
- localeError: error47()
10360
+ localeError: error50()
9834
10361
  };
9835
10362
  }
9836
10363
 
9837
10364
  // ../../node_modules/zod/v4/core/registries.js
9838
- var _a;
10365
+ var _a2;
9839
10366
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
9840
10367
  var $input = /* @__PURE__ */ Symbol("ZodInput");
9841
10368
  var $ZodRegistry = class {
@@ -9881,7 +10408,7 @@ var $ZodRegistry = class {
9881
10408
  function registry() {
9882
10409
  return new $ZodRegistry();
9883
10410
  }
9884
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10411
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
9885
10412
  var globalRegistry = globalThis.__zod_globalRegistry;
9886
10413
 
9887
10414
  // ../../node_modules/zod/v4/core/api.js
@@ -10799,7 +11326,7 @@ function _refine(Class2, fn, _params) {
10799
11326
  return schema;
10800
11327
  }
10801
11328
  // @__NO_SIDE_EFFECTS__
10802
- function _superRefine(fn) {
11329
+ function _superRefine(fn, params) {
10803
11330
  const ch = /* @__PURE__ */ _check((payload) => {
10804
11331
  payload.addIssue = (issue2) => {
10805
11332
  if (typeof issue2 === "string") {
@@ -10816,7 +11343,7 @@ function _superRefine(fn) {
10816
11343
  }
10817
11344
  };
10818
11345
  return fn(payload.value, payload);
10819
- });
11346
+ }, params);
10820
11347
  return ch;
10821
11348
  }
10822
11349
  // @__NO_SIDE_EFFECTS__
@@ -10946,7 +11473,7 @@ function initializeContext(params) {
10946
11473
  };
10947
11474
  }
10948
11475
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
10949
- var _a2;
11476
+ var _a3;
10950
11477
  const def = schema._zod.def;
10951
11478
  const seen = ctx.seen.get(schema);
10952
11479
  if (seen) {
@@ -10993,8 +11520,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
10993
11520
  delete result.schema.examples;
10994
11521
  delete result.schema.default;
10995
11522
  }
10996
- if (ctx.io === "input" && result.schema._prefault)
10997
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11523
+ if (ctx.io === "input" && "_prefault" in result.schema)
11524
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
10998
11525
  delete result.schema._prefault;
10999
11526
  const _result = ctx.seen.get(schema);
11000
11527
  return _result.schema;
@@ -11175,10 +11702,15 @@ function finalize(ctx, schema) {
11175
11702
  result.$id = ctx.external.uri(id);
11176
11703
  }
11177
11704
  Object.assign(result, root.def ?? root.schema);
11705
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
11706
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
11707
+ delete result.id;
11178
11708
  const defs = ctx.external?.defs ?? {};
11179
11709
  for (const entry of ctx.seen.entries()) {
11180
11710
  const seen = entry[1];
11181
11711
  if (seen.def && seen.defId) {
11712
+ if (seen.def.id === seen.defId)
11713
+ delete seen.def.id;
11182
11714
  defs[seen.defId] = seen.def;
11183
11715
  }
11184
11716
  }
@@ -11234,6 +11766,8 @@ function isTransforming(_schema, _ctx) {
11234
11766
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11235
11767
  }
11236
11768
  if (def.type === "pipe") {
11769
+ if (_schema._zod.traits.has("$ZodCodec"))
11770
+ return true;
11237
11771
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11238
11772
  }
11239
11773
  if (def.type === "object") {
@@ -11323,39 +11857,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
11323
11857
  json2.type = "integer";
11324
11858
  else
11325
11859
  json2.type = "number";
11326
- if (typeof exclusiveMinimum === "number") {
11327
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11860
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
11861
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
11862
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
11863
+ if (exMin) {
11864
+ if (legacy) {
11328
11865
  json2.minimum = exclusiveMinimum;
11329
11866
  json2.exclusiveMinimum = true;
11330
11867
  } else {
11331
11868
  json2.exclusiveMinimum = exclusiveMinimum;
11332
11869
  }
11333
- }
11334
- if (typeof minimum === "number") {
11870
+ } else if (typeof minimum === "number") {
11335
11871
  json2.minimum = minimum;
11336
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11337
- if (exclusiveMinimum >= minimum)
11338
- delete json2.minimum;
11339
- else
11340
- delete json2.exclusiveMinimum;
11341
- }
11342
11872
  }
11343
- if (typeof exclusiveMaximum === "number") {
11344
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11873
+ if (exMax) {
11874
+ if (legacy) {
11345
11875
  json2.maximum = exclusiveMaximum;
11346
11876
  json2.exclusiveMaximum = true;
11347
11877
  } else {
11348
11878
  json2.exclusiveMaximum = exclusiveMaximum;
11349
11879
  }
11350
- }
11351
- if (typeof maximum === "number") {
11880
+ } else if (typeof maximum === "number") {
11352
11881
  json2.maximum = maximum;
11353
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11354
- if (exclusiveMaximum <= maximum)
11355
- delete json2.maximum;
11356
- else
11357
- delete json2.exclusiveMaximum;
11358
- }
11359
11882
  }
11360
11883
  if (typeof multipleOf === "number")
11361
11884
  json2.multipleOf = multipleOf;
@@ -11527,7 +12050,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
11527
12050
  if (typeof maximum === "number")
11528
12051
  json2.maxItems = maximum;
11529
12052
  json2.type = "array";
11530
- json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
12053
+ json2.items = process2(def.element, ctx, {
12054
+ ...params,
12055
+ path: [...params.path, "items"]
12056
+ });
11531
12057
  };
11532
12058
  var objectProcessor = (schema, ctx, _json, params) => {
11533
12059
  const json2 = _json;
@@ -11720,7 +12246,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
11720
12246
  };
11721
12247
  var pipeProcessor = (schema, ctx, _json, params) => {
11722
12248
  const def = schema._zod.def;
11723
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12249
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12250
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
11724
12251
  process2(innerType, ctx, params);
11725
12252
  const seen = ctx.seen.get(schema);
11726
12253
  seen.ref = innerType;
@@ -11954,6 +12481,7 @@ __export(schemas_exports2, {
11954
12481
  ZodOptional: () => ZodOptional,
11955
12482
  ZodPipe: () => ZodPipe,
11956
12483
  ZodPrefault: () => ZodPrefault,
12484
+ ZodPreprocess: () => ZodPreprocess,
11957
12485
  ZodPromise: () => ZodPromise,
11958
12486
  ZodReadonly: () => ZodReadonly,
11959
12487
  ZodRecord: () => ZodRecord,
@@ -12014,6 +12542,7 @@ __export(schemas_exports2, {
12014
12542
  int32: () => int32,
12015
12543
  int64: () => int64,
12016
12544
  intersection: () => intersection,
12545
+ invertCodec: () => invertCodec,
12017
12546
  ipv4: () => ipv42,
12018
12547
  ipv6: () => ipv62,
12019
12548
  json: () => json,
@@ -12183,8 +12712,8 @@ var initializer2 = (inst, issues) => {
12183
12712
  }
12184
12713
  });
12185
12714
  };
12186
- var ZodError = $constructor("ZodError", initializer2);
12187
- var ZodRealError = $constructor("ZodError", initializer2, {
12715
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
12716
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12188
12717
  Parent: Error
12189
12718
  });
12190
12719
 
@@ -12203,6 +12732,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12203
12732
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12204
12733
 
12205
12734
  // ../../node_modules/zod/v4/classic/schemas.js
12735
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
12736
+ function _installLazyMethods(inst, group, methods) {
12737
+ const proto = Object.getPrototypeOf(inst);
12738
+ let installed = _installedGroups.get(proto);
12739
+ if (!installed) {
12740
+ installed = /* @__PURE__ */ new Set();
12741
+ _installedGroups.set(proto, installed);
12742
+ }
12743
+ if (installed.has(group))
12744
+ return;
12745
+ installed.add(group);
12746
+ for (const key in methods) {
12747
+ const fn = methods[key];
12748
+ Object.defineProperty(proto, key, {
12749
+ configurable: true,
12750
+ enumerable: false,
12751
+ get() {
12752
+ const bound = fn.bind(this);
12753
+ Object.defineProperty(this, key, {
12754
+ configurable: true,
12755
+ writable: true,
12756
+ enumerable: true,
12757
+ value: bound
12758
+ });
12759
+ return bound;
12760
+ },
12761
+ set(v) {
12762
+ Object.defineProperty(this, key, {
12763
+ configurable: true,
12764
+ writable: true,
12765
+ enumerable: true,
12766
+ value: v
12767
+ });
12768
+ }
12769
+ });
12770
+ }
12771
+ }
12206
12772
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12207
12773
  $ZodType.init(inst, def);
12208
12774
  Object.assign(inst["~standard"], {
@@ -12215,23 +12781,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12215
12781
  inst.def = def;
12216
12782
  inst.type = def.type;
12217
12783
  Object.defineProperty(inst, "_def", { value: def });
12218
- inst.check = (...checks) => {
12219
- return inst.clone(util_exports.mergeDefs(def, {
12220
- checks: [
12221
- ...def.checks ?? [],
12222
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12223
- ]
12224
- }), {
12225
- parent: true
12226
- });
12227
- };
12228
- inst.with = inst.check;
12229
- inst.clone = (def2, params) => clone(inst, def2, params);
12230
- inst.brand = () => inst;
12231
- inst.register = ((reg, meta3) => {
12232
- reg.add(inst, meta3);
12233
- return inst;
12234
- });
12235
12784
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12236
12785
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12237
12786
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12245,45 +12794,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12245
12794
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12246
12795
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12247
12796
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12248
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12249
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12250
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12251
- inst.optional = () => optional(inst);
12252
- inst.exactOptional = () => exactOptional(inst);
12253
- inst.nullable = () => nullable(inst);
12254
- inst.nullish = () => optional(nullable(inst));
12255
- inst.nonoptional = (params) => nonoptional(inst, params);
12256
- inst.array = () => array(inst);
12257
- inst.or = (arg) => union([inst, arg]);
12258
- inst.and = (arg) => intersection(inst, arg);
12259
- inst.transform = (tx) => pipe(inst, transform(tx));
12260
- inst.default = (def2) => _default2(inst, def2);
12261
- inst.prefault = (def2) => prefault(inst, def2);
12262
- inst.catch = (params) => _catch2(inst, params);
12263
- inst.pipe = (target) => pipe(inst, target);
12264
- inst.readonly = () => readonly(inst);
12265
- inst.describe = (description) => {
12266
- const cl = inst.clone();
12267
- globalRegistry.add(cl, { description });
12268
- return cl;
12269
- };
12797
+ _installLazyMethods(inst, "ZodType", {
12798
+ check(...chks) {
12799
+ const def2 = this.def;
12800
+ return this.clone(util_exports.mergeDefs(def2, {
12801
+ checks: [
12802
+ ...def2.checks ?? [],
12803
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12804
+ ]
12805
+ }), { parent: true });
12806
+ },
12807
+ with(...chks) {
12808
+ return this.check(...chks);
12809
+ },
12810
+ clone(def2, params) {
12811
+ return clone(this, def2, params);
12812
+ },
12813
+ brand() {
12814
+ return this;
12815
+ },
12816
+ register(reg, meta3) {
12817
+ reg.add(this, meta3);
12818
+ return this;
12819
+ },
12820
+ refine(check2, params) {
12821
+ return this.check(refine(check2, params));
12822
+ },
12823
+ superRefine(refinement, params) {
12824
+ return this.check(superRefine(refinement, params));
12825
+ },
12826
+ overwrite(fn) {
12827
+ return this.check(_overwrite(fn));
12828
+ },
12829
+ optional() {
12830
+ return optional(this);
12831
+ },
12832
+ exactOptional() {
12833
+ return exactOptional(this);
12834
+ },
12835
+ nullable() {
12836
+ return nullable(this);
12837
+ },
12838
+ nullish() {
12839
+ return optional(nullable(this));
12840
+ },
12841
+ nonoptional(params) {
12842
+ return nonoptional(this, params);
12843
+ },
12844
+ array() {
12845
+ return array(this);
12846
+ },
12847
+ or(arg) {
12848
+ return union([this, arg]);
12849
+ },
12850
+ and(arg) {
12851
+ return intersection(this, arg);
12852
+ },
12853
+ transform(tx) {
12854
+ return pipe(this, transform(tx));
12855
+ },
12856
+ default(d) {
12857
+ return _default2(this, d);
12858
+ },
12859
+ prefault(d) {
12860
+ return prefault(this, d);
12861
+ },
12862
+ catch(params) {
12863
+ return _catch2(this, params);
12864
+ },
12865
+ pipe(target) {
12866
+ return pipe(this, target);
12867
+ },
12868
+ readonly() {
12869
+ return readonly(this);
12870
+ },
12871
+ describe(description) {
12872
+ const cl = this.clone();
12873
+ globalRegistry.add(cl, { description });
12874
+ return cl;
12875
+ },
12876
+ meta(...args) {
12877
+ if (args.length === 0)
12878
+ return globalRegistry.get(this);
12879
+ const cl = this.clone();
12880
+ globalRegistry.add(cl, args[0]);
12881
+ return cl;
12882
+ },
12883
+ isOptional() {
12884
+ return this.safeParse(void 0).success;
12885
+ },
12886
+ isNullable() {
12887
+ return this.safeParse(null).success;
12888
+ },
12889
+ apply(fn) {
12890
+ return fn(this);
12891
+ }
12892
+ });
12270
12893
  Object.defineProperty(inst, "description", {
12271
12894
  get() {
12272
12895
  return globalRegistry.get(inst)?.description;
12273
12896
  },
12274
12897
  configurable: true
12275
12898
  });
12276
- inst.meta = (...args) => {
12277
- if (args.length === 0) {
12278
- return globalRegistry.get(inst);
12279
- }
12280
- const cl = inst.clone();
12281
- globalRegistry.add(cl, args[0]);
12282
- return cl;
12283
- };
12284
- inst.isOptional = () => inst.safeParse(void 0).success;
12285
- inst.isNullable = () => inst.safeParse(null).success;
12286
- inst.apply = (fn) => fn(inst);
12287
12899
  return inst;
12288
12900
  });
12289
12901
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -12294,21 +12906,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
12294
12906
  inst.format = bag.format ?? null;
12295
12907
  inst.minLength = bag.minimum ?? null;
12296
12908
  inst.maxLength = bag.maximum ?? null;
12297
- inst.regex = (...args) => inst.check(_regex(...args));
12298
- inst.includes = (...args) => inst.check(_includes(...args));
12299
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
12300
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
12301
- inst.min = (...args) => inst.check(_minLength(...args));
12302
- inst.max = (...args) => inst.check(_maxLength(...args));
12303
- inst.length = (...args) => inst.check(_length(...args));
12304
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
12305
- inst.lowercase = (params) => inst.check(_lowercase(params));
12306
- inst.uppercase = (params) => inst.check(_uppercase(params));
12307
- inst.trim = () => inst.check(_trim());
12308
- inst.normalize = (...args) => inst.check(_normalize(...args));
12309
- inst.toLowerCase = () => inst.check(_toLowerCase());
12310
- inst.toUpperCase = () => inst.check(_toUpperCase());
12311
- inst.slugify = () => inst.check(_slugify());
12909
+ _installLazyMethods(inst, "_ZodString", {
12910
+ regex(...args) {
12911
+ return this.check(_regex(...args));
12912
+ },
12913
+ includes(...args) {
12914
+ return this.check(_includes(...args));
12915
+ },
12916
+ startsWith(...args) {
12917
+ return this.check(_startsWith(...args));
12918
+ },
12919
+ endsWith(...args) {
12920
+ return this.check(_endsWith(...args));
12921
+ },
12922
+ min(...args) {
12923
+ return this.check(_minLength(...args));
12924
+ },
12925
+ max(...args) {
12926
+ return this.check(_maxLength(...args));
12927
+ },
12928
+ length(...args) {
12929
+ return this.check(_length(...args));
12930
+ },
12931
+ nonempty(...args) {
12932
+ return this.check(_minLength(1, ...args));
12933
+ },
12934
+ lowercase(params) {
12935
+ return this.check(_lowercase(params));
12936
+ },
12937
+ uppercase(params) {
12938
+ return this.check(_uppercase(params));
12939
+ },
12940
+ trim() {
12941
+ return this.check(_trim());
12942
+ },
12943
+ normalize(...args) {
12944
+ return this.check(_normalize(...args));
12945
+ },
12946
+ toLowerCase() {
12947
+ return this.check(_toLowerCase());
12948
+ },
12949
+ toUpperCase() {
12950
+ return this.check(_toUpperCase());
12951
+ },
12952
+ slugify() {
12953
+ return this.check(_slugify());
12954
+ }
12955
+ });
12312
12956
  });
12313
12957
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
12314
12958
  $ZodString.init(inst, def);
@@ -12387,7 +13031,7 @@ function url(params) {
12387
13031
  }
12388
13032
  function httpUrl(params) {
12389
13033
  return _url(ZodURL, {
12390
- protocol: /^https?$/,
13034
+ protocol: regexes_exports.httpProtocol,
12391
13035
  hostname: regexes_exports.domain,
12392
13036
  ...util_exports.normalizeParams(params)
12393
13037
  });
@@ -12529,21 +13173,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
12529
13173
  $ZodNumber.init(inst, def);
12530
13174
  ZodType.init(inst, def);
12531
13175
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
12532
- inst.gt = (value, params) => inst.check(_gt(value, params));
12533
- inst.gte = (value, params) => inst.check(_gte(value, params));
12534
- inst.min = (value, params) => inst.check(_gte(value, params));
12535
- inst.lt = (value, params) => inst.check(_lt(value, params));
12536
- inst.lte = (value, params) => inst.check(_lte(value, params));
12537
- inst.max = (value, params) => inst.check(_lte(value, params));
12538
- inst.int = (params) => inst.check(int(params));
12539
- inst.safe = (params) => inst.check(int(params));
12540
- inst.positive = (params) => inst.check(_gt(0, params));
12541
- inst.nonnegative = (params) => inst.check(_gte(0, params));
12542
- inst.negative = (params) => inst.check(_lt(0, params));
12543
- inst.nonpositive = (params) => inst.check(_lte(0, params));
12544
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
12545
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
12546
- inst.finite = () => inst;
13176
+ _installLazyMethods(inst, "ZodNumber", {
13177
+ gt(value, params) {
13178
+ return this.check(_gt(value, params));
13179
+ },
13180
+ gte(value, params) {
13181
+ return this.check(_gte(value, params));
13182
+ },
13183
+ min(value, params) {
13184
+ return this.check(_gte(value, params));
13185
+ },
13186
+ lt(value, params) {
13187
+ return this.check(_lt(value, params));
13188
+ },
13189
+ lte(value, params) {
13190
+ return this.check(_lte(value, params));
13191
+ },
13192
+ max(value, params) {
13193
+ return this.check(_lte(value, params));
13194
+ },
13195
+ int(params) {
13196
+ return this.check(int(params));
13197
+ },
13198
+ safe(params) {
13199
+ return this.check(int(params));
13200
+ },
13201
+ positive(params) {
13202
+ return this.check(_gt(0, params));
13203
+ },
13204
+ nonnegative(params) {
13205
+ return this.check(_gte(0, params));
13206
+ },
13207
+ negative(params) {
13208
+ return this.check(_lt(0, params));
13209
+ },
13210
+ nonpositive(params) {
13211
+ return this.check(_lte(0, params));
13212
+ },
13213
+ multipleOf(value, params) {
13214
+ return this.check(_multipleOf(value, params));
13215
+ },
13216
+ step(value, params) {
13217
+ return this.check(_multipleOf(value, params));
13218
+ },
13219
+ finite() {
13220
+ return this;
13221
+ }
13222
+ });
12547
13223
  const bag = inst._zod.bag;
12548
13224
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
12549
13225
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -12690,11 +13366,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
12690
13366
  ZodType.init(inst, def);
12691
13367
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
12692
13368
  inst.element = def.element;
12693
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
12694
- inst.nonempty = (params) => inst.check(_minLength(1, params));
12695
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
12696
- inst.length = (len, params) => inst.check(_length(len, params));
12697
- inst.unwrap = () => inst.element;
13369
+ _installLazyMethods(inst, "ZodArray", {
13370
+ min(n, params) {
13371
+ return this.check(_minLength(n, params));
13372
+ },
13373
+ nonempty(params) {
13374
+ return this.check(_minLength(1, params));
13375
+ },
13376
+ max(n, params) {
13377
+ return this.check(_maxLength(n, params));
13378
+ },
13379
+ length(n, params) {
13380
+ return this.check(_length(n, params));
13381
+ },
13382
+ unwrap() {
13383
+ return this.element;
13384
+ }
13385
+ });
12698
13386
  });
12699
13387
  function array(element, params) {
12700
13388
  return _array(ZodArray, element, params);
@@ -12710,23 +13398,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
12710
13398
  util_exports.defineLazy(inst, "shape", () => {
12711
13399
  return def.shape;
12712
13400
  });
12713
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
12714
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
12715
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12716
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
12717
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
12718
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
12719
- inst.extend = (incoming) => {
12720
- return util_exports.extend(inst, incoming);
12721
- };
12722
- inst.safeExtend = (incoming) => {
12723
- return util_exports.safeExtend(inst, incoming);
12724
- };
12725
- inst.merge = (other) => util_exports.merge(inst, other);
12726
- inst.pick = (mask) => util_exports.pick(inst, mask);
12727
- inst.omit = (mask) => util_exports.omit(inst, mask);
12728
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
12729
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
13401
+ _installLazyMethods(inst, "ZodObject", {
13402
+ keyof() {
13403
+ return _enum2(Object.keys(this._zod.def.shape));
13404
+ },
13405
+ catchall(catchall) {
13406
+ return this.clone({ ...this._zod.def, catchall });
13407
+ },
13408
+ passthrough() {
13409
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13410
+ },
13411
+ loose() {
13412
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13413
+ },
13414
+ strict() {
13415
+ return this.clone({ ...this._zod.def, catchall: never() });
13416
+ },
13417
+ strip() {
13418
+ return this.clone({ ...this._zod.def, catchall: void 0 });
13419
+ },
13420
+ extend(incoming) {
13421
+ return util_exports.extend(this, incoming);
13422
+ },
13423
+ safeExtend(incoming) {
13424
+ return util_exports.safeExtend(this, incoming);
13425
+ },
13426
+ merge(other) {
13427
+ return util_exports.merge(this, other);
13428
+ },
13429
+ pick(mask) {
13430
+ return util_exports.pick(this, mask);
13431
+ },
13432
+ omit(mask) {
13433
+ return util_exports.omit(this, mask);
13434
+ },
13435
+ partial(...args) {
13436
+ return util_exports.partial(ZodOptional, this, args[0]);
13437
+ },
13438
+ required(...args) {
13439
+ return util_exports.required(ZodNonOptional, this, args[0]);
13440
+ }
13441
+ });
12730
13442
  });
12731
13443
  function object(shape, params) {
12732
13444
  const def = {
@@ -12831,6 +13543,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
12831
13543
  inst.valueType = def.valueType;
12832
13544
  });
12833
13545
  function record(keyType, valueType, params) {
13546
+ if (!valueType || !valueType._zod) {
13547
+ return new ZodRecord({
13548
+ type: "record",
13549
+ keyType: string2(),
13550
+ valueType: keyType,
13551
+ ...util_exports.normalizeParams(valueType)
13552
+ });
13553
+ }
12834
13554
  return new ZodRecord({
12835
13555
  type: "record",
12836
13556
  keyType,
@@ -13002,10 +13722,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
13002
13722
  if (output instanceof Promise) {
13003
13723
  return output.then((output2) => {
13004
13724
  payload.value = output2;
13725
+ payload.fallback = true;
13005
13726
  return payload;
13006
13727
  });
13007
13728
  }
13008
13729
  payload.value = output;
13730
+ payload.fallback = true;
13009
13731
  return payload;
13010
13732
  };
13011
13733
  });
@@ -13160,6 +13882,20 @@ function codec(in_, out, params) {
13160
13882
  reverseTransform: params.encode
13161
13883
  });
13162
13884
  }
13885
+ function invertCodec(codec2) {
13886
+ const def = codec2._zod.def;
13887
+ return new ZodCodec({
13888
+ type: "pipe",
13889
+ in: def.out,
13890
+ out: def.in,
13891
+ transform: def.reverseTransform,
13892
+ reverseTransform: def.transform
13893
+ });
13894
+ }
13895
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
13896
+ ZodPipe.init(inst, def);
13897
+ $ZodPreprocess.init(inst, def);
13898
+ });
13163
13899
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13164
13900
  $ZodReadonly.init(inst, def);
13165
13901
  ZodType.init(inst, def);
@@ -13239,8 +13975,8 @@ function custom(fn, _params) {
13239
13975
  function refine(fn, _params = {}) {
13240
13976
  return _refine(ZodCustom, fn, _params);
13241
13977
  }
13242
- function superRefine(fn) {
13243
- return _superRefine(fn);
13978
+ function superRefine(fn, params) {
13979
+ return _superRefine(fn, params);
13244
13980
  }
13245
13981
  var describe2 = describe;
13246
13982
  var meta2 = meta;
@@ -13278,7 +14014,11 @@ function json(params) {
13278
14014
  return jsonSchema;
13279
14015
  }
13280
14016
  function preprocess(fn, schema) {
13281
- return pipe(transform(fn), schema);
14017
+ return new ZodPreprocess({
14018
+ type: "pipe",
14019
+ in: transform(fn),
14020
+ out: schema
14021
+ });
13282
14022
  }
13283
14023
 
13284
14024
  // ../../node_modules/zod/v4/classic/compat.js
@@ -13699,12 +14439,6 @@ function convertBaseSchema(schema, ctx) {
13699
14439
  default:
13700
14440
  throw new Error(`Unsupported type: ${type}`);
13701
14441
  }
13702
- if (schema.description) {
13703
- zodSchema = zodSchema.describe(schema.description);
13704
- }
13705
- if (schema.default !== void 0) {
13706
- zodSchema = zodSchema.default(schema.default);
13707
- }
13708
14442
  return zodSchema;
13709
14443
  }
13710
14444
  function convertSchema(schema, ctx) {
@@ -13741,6 +14475,9 @@ function convertSchema(schema, ctx) {
13741
14475
  if (schema.readOnly === true) {
13742
14476
  baseSchema = z.readonly(baseSchema);
13743
14477
  }
14478
+ if (schema.default !== void 0) {
14479
+ baseSchema = baseSchema.default(schema.default);
14480
+ }
13744
14481
  const extraMeta = {};
13745
14482
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
13746
14483
  for (const key of coreMetadataKeys) {
@@ -13762,23 +14499,32 @@ function convertSchema(schema, ctx) {
13762
14499
  if (Object.keys(extraMeta).length > 0) {
13763
14500
  ctx.registry.add(baseSchema, extraMeta);
13764
14501
  }
14502
+ if (schema.description) {
14503
+ baseSchema = baseSchema.describe(schema.description);
14504
+ }
13765
14505
  return baseSchema;
13766
14506
  }
13767
14507
  function fromJSONSchema(schema, params) {
13768
14508
  if (typeof schema === "boolean") {
13769
14509
  return schema ? z.any() : z.never();
13770
14510
  }
13771
- const version2 = detectVersion(schema, params?.defaultTarget);
13772
- const defs = schema.$defs || schema.definitions || {};
14511
+ let normalized;
14512
+ try {
14513
+ normalized = JSON.parse(JSON.stringify(schema));
14514
+ } catch {
14515
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14516
+ }
14517
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14518
+ const defs = normalized.$defs || normalized.definitions || {};
13773
14519
  const ctx = {
13774
14520
  version: version2,
13775
14521
  defs,
13776
14522
  refs: /* @__PURE__ */ new Map(),
13777
14523
  processing: /* @__PURE__ */ new Set(),
13778
- rootSchema: schema,
14524
+ rootSchema: normalized,
13779
14525
  registry: params?.registry ?? globalRegistry
13780
14526
  };
13781
- return convertSchema(schema, ctx);
14527
+ return convertSchema(normalized, ctx);
13782
14528
  }
13783
14529
 
13784
14530
  // ../../node_modules/zod/v4/classic/coerce.js