@glasstrace/sdk 1.11.0 → 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 (74) hide show
  1. package/README.md +20 -3
  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-DQFGNX3H.js → chunk-CZQN6G4I.js} +21 -20
  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-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
  17. package/dist/{chunk-FQ4SEG6Y.js → chunk-V75ZB4G4.js} +3 -3
  18. package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
  19. package/dist/cli/init.cjs +1266 -497
  20. package/dist/cli/init.cjs.map +1 -1
  21. package/dist/cli/init.js +7 -7
  22. package/dist/cli/mcp-add.cjs +1171 -425
  23. package/dist/cli/mcp-add.cjs.map +1 -1
  24. package/dist/cli/mcp-add.js +3 -3
  25. package/dist/cli/uninit.js +3 -3
  26. package/dist/cli/upgrade-instructions.cjs +1 -1
  27. package/dist/cli/upgrade-instructions.js +3 -3
  28. package/dist/cli/validate.cjs +1168 -422
  29. package/dist/cli/validate.cjs.map +1 -1
  30. package/dist/cli/validate.js +2 -2
  31. package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
  32. package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
  33. package/dist/edge-entry.cjs +1197 -448
  34. package/dist/edge-entry.cjs.map +1 -1
  35. package/dist/edge-entry.d.cts +2 -2
  36. package/dist/edge-entry.d.ts +2 -2
  37. package/dist/edge-entry.js +4 -4
  38. package/dist/index.cjs +1335 -552
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.cts} +1 -1
  41. package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.ts} +1 -1
  42. package/dist/index.d.cts +4 -4
  43. package/dist/index.d.ts +4 -4
  44. package/dist/index.js +13 -6
  45. package/dist/index.js.map +1 -1
  46. package/dist/middleware/index.cjs +1192 -443
  47. package/dist/middleware/index.cjs.map +1 -1
  48. package/dist/middleware/index.js +2 -2
  49. package/dist/node-entry.cjs +1323 -550
  50. package/dist/node-entry.cjs.map +1 -1
  51. package/dist/node-entry.d.cts +3 -3
  52. package/dist/node-entry.d.ts +3 -3
  53. package/dist/node-entry.js +7 -7
  54. package/dist/node-subpath.cjs +1168 -422
  55. package/dist/node-subpath.cjs.map +1 -1
  56. package/dist/node-subpath.d.cts +1 -1
  57. package/dist/node-subpath.d.ts +1 -1
  58. package/dist/node-subpath.js +3 -3
  59. package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
  60. package/dist/trpc/index.cjs +1187 -438
  61. package/dist/trpc/index.cjs.map +1 -1
  62. package/dist/trpc/index.js +1 -1
  63. package/package.json +2 -2
  64. package/dist/chunk-6RKS3DNA.js.map +0 -1
  65. package/dist/chunk-DQFGNX3H.js.map +0 -1
  66. /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
  67. /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
  68. /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
  69. /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
  70. /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
  71. /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
  72. /package/dist/{chunk-FQ4SEG6Y.js.map → chunk-V75ZB4G4.js.map} +0 -0
  73. /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
  74. /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -119,10 +119,10 @@ function $constructor(name, initializer3, params) {
119
119
  }
120
120
  Object.defineProperty(Definition, "name", { value: name });
121
121
  function _(def) {
122
- var _a2;
122
+ var _a3;
123
123
  const inst = params?.Parent ? new Definition() : this;
124
124
  init(inst, def);
125
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
125
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
126
126
  for (const fn of inst._zod.deferred) {
127
127
  fn();
128
128
  }
@@ -144,11 +144,11 @@ function config(newConfig) {
144
144
  Object.assign(globalConfig, newConfig);
145
145
  return globalConfig;
146
146
  }
147
- var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
147
+ var _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
148
148
  var init_core = __esm({
149
149
  "../../node_modules/zod/v4/core/core.js"() {
150
150
  "use strict";
151
- NEVER = Object.freeze({
151
+ NEVER = /* @__PURE__ */ Object.freeze({
152
152
  status: "aborted"
153
153
  });
154
154
  $brand = /* @__PURE__ */ Symbol("zod_brand");
@@ -163,7 +163,8 @@ var init_core = __esm({
163
163
  this.name = "ZodEncodeError";
164
164
  }
165
165
  };
166
- globalConfig = {};
166
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
167
+ globalConfig = globalThis.__zod_globalConfig;
167
168
  }
168
169
  });
169
170
 
@@ -193,6 +194,7 @@ __export(util_exports, {
193
194
  defineLazy: () => defineLazy,
194
195
  esc: () => esc,
195
196
  escapeRegex: () => escapeRegex,
197
+ explicitlyAborted: () => explicitlyAborted,
196
198
  extend: () => extend,
197
199
  finalizeIssue: () => finalizeIssue,
198
200
  floatSafeRemainder: () => floatSafeRemainder,
@@ -281,19 +283,12 @@ function cleanRegex(source) {
281
283
  return source.slice(start, end);
282
284
  }
283
285
  function floatSafeRemainder(val, step) {
284
- const valDecCount = (val.toString().split(".")[1] || "").length;
285
- const stepString = step.toString();
286
- let stepDecCount = (stepString.split(".")[1] || "").length;
287
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
288
- const match = stepString.match(/\d?e-(\d?)/);
289
- if (match?.[1]) {
290
- stepDecCount = Number.parseInt(match[1]);
291
- }
292
- }
293
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
294
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
295
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
296
- return valInt % stepInt / 10 ** decCount;
286
+ const ratio = val / step;
287
+ const roundedRatio = Math.round(ratio);
288
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
289
+ if (Math.abs(ratio - roundedRatio) < tolerance)
290
+ return 0;
291
+ return ratio - roundedRatio;
297
292
  }
298
293
  function defineLazy(object2, key, getter) {
299
294
  let value = void 0;
@@ -393,6 +388,10 @@ function shallowClone(o) {
393
388
  return { ...o };
394
389
  if (Array.isArray(o))
395
390
  return [...o];
391
+ if (o instanceof Map)
392
+ return new Map(o);
393
+ if (o instanceof Set)
394
+ return new Set(o);
396
395
  return o;
397
396
  }
398
397
  function numKeys(data) {
@@ -561,6 +560,9 @@ function safeExtend(schema, shape) {
561
560
  return clone(schema, def);
562
561
  }
563
562
  function merge(a, b) {
563
+ if (a._zod.def.checks?.length) {
564
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
565
+ }
564
566
  const def = mergeDefs(a._zod.def, {
565
567
  get shape() {
566
568
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -570,8 +572,7 @@ function merge(a, b) {
570
572
  get catchall() {
571
573
  return b._zod.def.catchall;
572
574
  },
573
- checks: []
574
- // delete existing checks
575
+ checks: b._zod.def.checks ?? []
575
576
  });
576
577
  return clone(a, def);
577
578
  }
@@ -654,10 +655,20 @@ function aborted(x, startIndex = 0) {
654
655
  }
655
656
  return false;
656
657
  }
658
+ function explicitlyAborted(x, startIndex = 0) {
659
+ if (x.aborted === true)
660
+ return true;
661
+ for (let i = startIndex; i < x.issues.length; i++) {
662
+ if (x.issues[i]?.continue === false) {
663
+ return true;
664
+ }
665
+ }
666
+ return false;
667
+ }
657
668
  function prefixIssues(path4, issues) {
658
669
  return issues.map((iss) => {
659
- var _a2;
660
- (_a2 = iss).path ?? (_a2.path = []);
670
+ var _a3;
671
+ (_a3 = iss).path ?? (_a3.path = []);
661
672
  iss.path.unshift(path4);
662
673
  return iss;
663
674
  });
@@ -666,17 +677,14 @@ function unwrapMessage(message) {
666
677
  return typeof message === "string" ? message : message?.message;
667
678
  }
668
679
  function finalizeIssue(iss, ctx, config2) {
669
- const full = { ...iss, path: iss.path ?? [] };
670
- if (!iss.message) {
671
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
672
- full.message = message;
680
+ 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";
681
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
682
+ rest.path ?? (rest.path = []);
683
+ rest.message = message;
684
+ if (ctx?.reportInput) {
685
+ rest.input = _input;
673
686
  }
674
- delete full.inst;
675
- delete full.continue;
676
- if (!ctx?.reportInput) {
677
- delete full.input;
678
- }
679
- return full;
687
+ return rest;
680
688
  }
681
689
  function getSizableOrigin(input) {
682
690
  if (input instanceof Set)
@@ -773,10 +781,14 @@ var EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes,
773
781
  var init_util = __esm({
774
782
  "../../node_modules/zod/v4/core/util.js"() {
775
783
  "use strict";
784
+ init_core();
776
785
  EVALUATING = /* @__PURE__ */ Symbol("evaluating");
777
786
  captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
778
787
  };
779
- allowsEval = cached(() => {
788
+ allowsEval = /* @__PURE__ */ cached(() => {
789
+ if (globalConfig.jitless) {
790
+ return false;
791
+ }
780
792
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
781
793
  return false;
782
794
  }
@@ -833,7 +845,14 @@ var init_util = __esm({
833
845
  }
834
846
  };
835
847
  propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
836
- primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
848
+ primitiveTypes = /* @__PURE__ */ new Set([
849
+ "string",
850
+ "number",
851
+ "bigint",
852
+ "boolean",
853
+ "symbol",
854
+ "undefined"
855
+ ]);
837
856
  NUMBER_FORMAT_RANGES = {
838
857
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
839
858
  int32: [-2147483648, 2147483647],
@@ -853,10 +872,10 @@ var init_util = __esm({
853
872
  });
854
873
 
855
874
  // ../../node_modules/zod/v4/core/errors.js
856
- function flattenError(error48, mapper = (issue2) => issue2.message) {
875
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
857
876
  const fieldErrors = {};
858
877
  const formErrors = [];
859
- for (const sub of error48.issues) {
878
+ for (const sub of error51.issues) {
860
879
  if (sub.path.length > 0) {
861
880
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
862
881
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -866,50 +885,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
866
885
  }
867
886
  return { formErrors, fieldErrors };
868
887
  }
869
- function formatError(error48, mapper = (issue2) => issue2.message) {
888
+ function formatError(error51, mapper = (issue2) => issue2.message) {
870
889
  const fieldErrors = { _errors: [] };
871
- const processError = (error49) => {
872
- for (const issue2 of error49.issues) {
890
+ const processError = (error52, path4 = []) => {
891
+ for (const issue2 of error52.issues) {
873
892
  if (issue2.code === "invalid_union" && issue2.errors.length) {
874
- issue2.errors.map((issues) => processError({ issues }));
893
+ issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
875
894
  } else if (issue2.code === "invalid_key") {
876
- processError({ issues: issue2.issues });
895
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
877
896
  } else if (issue2.code === "invalid_element") {
878
- processError({ issues: issue2.issues });
879
- } else if (issue2.path.length === 0) {
880
- fieldErrors._errors.push(mapper(issue2));
897
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
881
898
  } else {
882
- let curr = fieldErrors;
883
- let i = 0;
884
- while (i < issue2.path.length) {
885
- const el = issue2.path[i];
886
- const terminal = i === issue2.path.length - 1;
887
- if (!terminal) {
888
- curr[el] = curr[el] || { _errors: [] };
889
- } else {
890
- curr[el] = curr[el] || { _errors: [] };
891
- curr[el]._errors.push(mapper(issue2));
899
+ const fullpath = [...path4, ...issue2.path];
900
+ if (fullpath.length === 0) {
901
+ fieldErrors._errors.push(mapper(issue2));
902
+ } else {
903
+ let curr = fieldErrors;
904
+ let i = 0;
905
+ while (i < fullpath.length) {
906
+ const el = fullpath[i];
907
+ const terminal = i === fullpath.length - 1;
908
+ if (!terminal) {
909
+ curr[el] = curr[el] || { _errors: [] };
910
+ } else {
911
+ curr[el] = curr[el] || { _errors: [] };
912
+ curr[el]._errors.push(mapper(issue2));
913
+ }
914
+ curr = curr[el];
915
+ i++;
892
916
  }
893
- curr = curr[el];
894
- i++;
895
917
  }
896
918
  }
897
919
  }
898
920
  };
899
- processError(error48);
921
+ processError(error51);
900
922
  return fieldErrors;
901
923
  }
902
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
924
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
903
925
  const result = { errors: [] };
904
- const processError = (error49, path4 = []) => {
905
- var _a2, _b;
906
- for (const issue2 of error49.issues) {
926
+ const processError = (error52, path4 = []) => {
927
+ var _a3, _b;
928
+ for (const issue2 of error52.issues) {
907
929
  if (issue2.code === "invalid_union" && issue2.errors.length) {
908
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
930
+ issue2.errors.map((issues) => processError({ issues }, [...path4, ...issue2.path]));
909
931
  } else if (issue2.code === "invalid_key") {
910
- processError({ issues: issue2.issues }, issue2.path);
932
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
911
933
  } else if (issue2.code === "invalid_element") {
912
- processError({ issues: issue2.issues }, issue2.path);
934
+ processError({ issues: issue2.issues }, [...path4, ...issue2.path]);
913
935
  } else {
914
936
  const fullpath = [...path4, ...issue2.path];
915
937
  if (fullpath.length === 0) {
@@ -923,7 +945,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
923
945
  const terminal = i === fullpath.length - 1;
924
946
  if (typeof el === "string") {
925
947
  curr.properties ?? (curr.properties = {});
926
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
948
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
927
949
  curr = curr.properties[el];
928
950
  } else {
929
951
  curr.items ?? (curr.items = []);
@@ -938,7 +960,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
938
960
  }
939
961
  }
940
962
  };
941
- processError(error48);
963
+ processError(error51);
942
964
  return result;
943
965
  }
944
966
  function toDotPath(_path) {
@@ -959,9 +981,9 @@ function toDotPath(_path) {
959
981
  }
960
982
  return segs.join("");
961
983
  }
962
- function prettifyError(error48) {
984
+ function prettifyError(error51) {
963
985
  const lines = [];
964
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
986
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
965
987
  for (const issue2 of issues) {
966
988
  lines.push(`\u2716 ${issue2.message}`);
967
989
  if (issue2.path?.length)
@@ -1005,7 +1027,7 @@ var init_parse = __esm({
1005
1027
  init_errors();
1006
1028
  init_util();
1007
1029
  _parse = (_Err) => (schema, value, _ctx, _params) => {
1008
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1030
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1009
1031
  const result = schema._zod.run({ value, issues: [] }, ctx);
1010
1032
  if (result instanceof Promise) {
1011
1033
  throw new $ZodAsyncError();
@@ -1019,7 +1041,7 @@ var init_parse = __esm({
1019
1041
  };
1020
1042
  parse = /* @__PURE__ */ _parse($ZodRealError);
1021
1043
  _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1022
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1044
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1023
1045
  let result = schema._zod.run({ value, issues: [] }, ctx);
1024
1046
  if (result instanceof Promise)
1025
1047
  result = await result;
@@ -1044,7 +1066,7 @@ var init_parse = __esm({
1044
1066
  };
1045
1067
  safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1046
1068
  _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1047
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1069
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1048
1070
  let result = schema._zod.run({ value, issues: [] }, ctx);
1049
1071
  if (result instanceof Promise)
1050
1072
  result = await result;
@@ -1055,7 +1077,7 @@ var init_parse = __esm({
1055
1077
  };
1056
1078
  safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1057
1079
  _encode = (_Err) => (schema, value, _ctx) => {
1058
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1080
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1059
1081
  return _parse(_Err)(schema, value, ctx);
1060
1082
  };
1061
1083
  encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1064,7 +1086,7 @@ var init_parse = __esm({
1064
1086
  };
1065
1087
  decode = /* @__PURE__ */ _decode($ZodRealError);
1066
1088
  _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1067
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1089
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1068
1090
  return _parseAsync(_Err)(schema, value, ctx);
1069
1091
  };
1070
1092
  encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1073,7 +1095,7 @@ var init_parse = __esm({
1073
1095
  };
1074
1096
  decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1075
1097
  _safeEncode = (_Err) => (schema, value, _ctx) => {
1076
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1098
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1077
1099
  return _safeParse(_Err)(schema, value, ctx);
1078
1100
  };
1079
1101
  safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1082,7 +1104,7 @@ var init_parse = __esm({
1082
1104
  };
1083
1105
  safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1084
1106
  _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1085
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1107
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1086
1108
  return _safeParseAsync(_Err)(schema, value, ctx);
1087
1109
  };
1088
1110
  safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1117,6 +1139,7 @@ __export(regexes_exports, {
1117
1139
  hex: () => hex,
1118
1140
  hostname: () => hostname,
1119
1141
  html5Email: () => html5Email,
1142
+ httpProtocol: () => httpProtocol,
1120
1143
  idnEmail: () => idnEmail,
1121
1144
  integer: () => integer,
1122
1145
  ipv4: () => ipv4,
@@ -1182,12 +1205,12 @@ function fixedBase64(bodyLength, padding) {
1182
1205
  function fixedBase64url(length) {
1183
1206
  return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
1184
1207
  }
1185
- var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
1208
+ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
1186
1209
  var init_regexes = __esm({
1187
1210
  "../../node_modules/zod/v4/core/regexes.js"() {
1188
1211
  "use strict";
1189
1212
  init_util();
1190
- cuid = /^[cC][^\s-]{8,}$/;
1213
+ cuid = /^[cC][0-9a-z]{6,}$/;
1191
1214
  cuid2 = /^[0-9a-z]+$/;
1192
1215
  ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
1193
1216
  xid = /^[0-9a-vA-V]{20}$/;
@@ -1223,6 +1246,7 @@ var init_regexes = __esm({
1223
1246
  base64url = /^[A-Za-z0-9_-]*$/;
1224
1247
  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])?)*\.?$/;
1225
1248
  domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
1249
+ httpProtocol = /^https?$/;
1226
1250
  e164 = /^\+[1-9]\d{6,14}$/;
1227
1251
  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])))`;
1228
1252
  date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -1271,10 +1295,10 @@ var init_checks = __esm({
1271
1295
  init_regexes();
1272
1296
  init_util();
1273
1297
  $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1274
- var _a2;
1298
+ var _a3;
1275
1299
  inst._zod ?? (inst._zod = {});
1276
1300
  inst._zod.def = def;
1277
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
1301
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
1278
1302
  });
1279
1303
  numericOriginMap = {
1280
1304
  number: "number",
@@ -1340,8 +1364,8 @@ var init_checks = __esm({
1340
1364
  $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1341
1365
  $ZodCheck.init(inst, def);
1342
1366
  inst._zod.onattach.push((inst2) => {
1343
- var _a2;
1344
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
1367
+ var _a3;
1368
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
1345
1369
  });
1346
1370
  inst._zod.check = (payload) => {
1347
1371
  if (typeof payload.value !== typeof def.value)
@@ -1474,9 +1498,9 @@ var init_checks = __esm({
1474
1498
  };
1475
1499
  });
1476
1500
  $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1477
- var _a2;
1501
+ var _a3;
1478
1502
  $ZodCheck.init(inst, def);
1479
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1503
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1480
1504
  const val = payload.value;
1481
1505
  return !nullish(val) && val.size !== void 0;
1482
1506
  });
@@ -1502,9 +1526,9 @@ var init_checks = __esm({
1502
1526
  };
1503
1527
  });
1504
1528
  $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1505
- var _a2;
1529
+ var _a3;
1506
1530
  $ZodCheck.init(inst, def);
1507
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1531
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1508
1532
  const val = payload.value;
1509
1533
  return !nullish(val) && val.size !== void 0;
1510
1534
  });
@@ -1530,9 +1554,9 @@ var init_checks = __esm({
1530
1554
  };
1531
1555
  });
1532
1556
  $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1533
- var _a2;
1557
+ var _a3;
1534
1558
  $ZodCheck.init(inst, def);
1535
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1559
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1536
1560
  const val = payload.value;
1537
1561
  return !nullish(val) && val.size !== void 0;
1538
1562
  });
@@ -1560,9 +1584,9 @@ var init_checks = __esm({
1560
1584
  };
1561
1585
  });
1562
1586
  $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1563
- var _a2;
1587
+ var _a3;
1564
1588
  $ZodCheck.init(inst, def);
1565
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1589
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1566
1590
  const val = payload.value;
1567
1591
  return !nullish(val) && val.length !== void 0;
1568
1592
  });
@@ -1589,9 +1613,9 @@ var init_checks = __esm({
1589
1613
  };
1590
1614
  });
1591
1615
  $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1592
- var _a2;
1616
+ var _a3;
1593
1617
  $ZodCheck.init(inst, def);
1594
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1618
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1595
1619
  const val = payload.value;
1596
1620
  return !nullish(val) && val.length !== void 0;
1597
1621
  });
@@ -1618,9 +1642,9 @@ var init_checks = __esm({
1618
1642
  };
1619
1643
  });
1620
1644
  $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1621
- var _a2;
1645
+ var _a3;
1622
1646
  $ZodCheck.init(inst, def);
1623
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
1647
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
1624
1648
  const val = payload.value;
1625
1649
  return !nullish(val) && val.length !== void 0;
1626
1650
  });
@@ -1649,7 +1673,7 @@ var init_checks = __esm({
1649
1673
  };
1650
1674
  });
1651
1675
  $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1652
- var _a2, _b;
1676
+ var _a3, _b;
1653
1677
  $ZodCheck.init(inst, def);
1654
1678
  inst._zod.onattach.push((inst2) => {
1655
1679
  const bag = inst2._zod.bag;
@@ -1660,7 +1684,7 @@ var init_checks = __esm({
1660
1684
  }
1661
1685
  });
1662
1686
  if (def.pattern)
1663
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
1687
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
1664
1688
  def.pattern.lastIndex = 0;
1665
1689
  if (def.pattern.test(payload.value))
1666
1690
  return;
@@ -1863,8 +1887,8 @@ var init_versions = __esm({
1863
1887
  "use strict";
1864
1888
  version = {
1865
1889
  major: 4,
1866
- minor: 3,
1867
- patch: 6
1890
+ minor: 4,
1891
+ patch: 3
1868
1892
  };
1869
1893
  }
1870
1894
  });
@@ -1873,6 +1897,8 @@ var init_versions = __esm({
1873
1897
  function isValidBase64(data) {
1874
1898
  if (data === "")
1875
1899
  return true;
1900
+ if (/\s/.test(data))
1901
+ return false;
1876
1902
  if (data.length % 4 !== 0)
1877
1903
  return false;
1878
1904
  try {
@@ -1915,15 +1941,27 @@ function handleArrayResult(result, final, index) {
1915
1941
  }
1916
1942
  final.value[index] = result.value;
1917
1943
  }
1918
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
1944
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
1945
+ const isPresent = key in input;
1919
1946
  if (result.issues.length) {
1920
- if (isOptionalOut && !(key in input)) {
1947
+ if (isOptionalIn && isOptionalOut && !isPresent) {
1921
1948
  return;
1922
1949
  }
1923
1950
  final.issues.push(...prefixIssues(key, result.issues));
1924
1951
  }
1952
+ if (!isPresent && !isOptionalIn) {
1953
+ if (!result.issues.length) {
1954
+ final.issues.push({
1955
+ code: "invalid_type",
1956
+ expected: "nonoptional",
1957
+ input: void 0,
1958
+ path: [key]
1959
+ });
1960
+ }
1961
+ return;
1962
+ }
1925
1963
  if (result.value === void 0) {
1926
- if (key in input) {
1964
+ if (isPresent) {
1927
1965
  final.value[key] = void 0;
1928
1966
  }
1929
1967
  } else {
@@ -1951,8 +1989,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1951
1989
  const keySet = def.keySet;
1952
1990
  const _catchall = def.catchall._zod;
1953
1991
  const t = _catchall.def.type;
1992
+ const isOptionalIn = _catchall.optin === "optional";
1954
1993
  const isOptionalOut = _catchall.optout === "optional";
1955
1994
  for (const key in input) {
1995
+ if (key === "__proto__")
1996
+ continue;
1956
1997
  if (keySet.has(key))
1957
1998
  continue;
1958
1999
  if (t === "never") {
@@ -1961,9 +2002,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1961
2002
  }
1962
2003
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
1963
2004
  if (r instanceof Promise) {
1964
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
2005
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
1965
2006
  } else {
1966
- handlePropertyResult(r, payload, key, input, isOptionalOut);
2007
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
1967
2008
  }
1968
2009
  }
1969
2010
  if (unrecognized.length) {
@@ -2107,12 +2148,41 @@ function handleIntersectionResults(result, left, right) {
2107
2148
  result.value = merged.data;
2108
2149
  return result;
2109
2150
  }
2151
+ function getTupleOptStart(items, key) {
2152
+ for (let i = items.length - 1; i >= 0; i--) {
2153
+ if (items[i]._zod[key] !== "optional")
2154
+ return i + 1;
2155
+ }
2156
+ return 0;
2157
+ }
2110
2158
  function handleTupleResult(result, final, index) {
2111
2159
  if (result.issues.length) {
2112
2160
  final.issues.push(...prefixIssues(index, result.issues));
2113
2161
  }
2114
2162
  final.value[index] = result.value;
2115
2163
  }
2164
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
2165
+ for (let i = 0; i < items.length; i++) {
2166
+ const r = itemResults[i];
2167
+ const isPresent = i < input.length;
2168
+ if (r.issues.length) {
2169
+ if (!isPresent && i >= optoutStart) {
2170
+ final.value.length = i;
2171
+ break;
2172
+ }
2173
+ final.issues.push(...prefixIssues(i, r.issues));
2174
+ }
2175
+ final.value[i] = r.value;
2176
+ }
2177
+ for (let i = final.value.length - 1; i >= input.length; i--) {
2178
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
2179
+ final.value.length = i;
2180
+ } else {
2181
+ break;
2182
+ }
2183
+ }
2184
+ return final;
2185
+ }
2116
2186
  function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
2117
2187
  if (keyResult.issues.length) {
2118
2188
  if (propertyKeyTypes.has(typeof key)) {
@@ -2150,7 +2220,7 @@ function handleSetResult(result, final) {
2150
2220
  final.value.add(result.value);
2151
2221
  }
2152
2222
  function handleOptionalResult(result, input) {
2153
- if (result.issues.length && input === void 0) {
2223
+ if (input === void 0 && (result.issues.length || result.fallback)) {
2154
2224
  return { issues: [], value: void 0 };
2155
2225
  }
2156
2226
  return result;
@@ -2177,7 +2247,7 @@ function handlePipeResult(left, next, ctx) {
2177
2247
  left.aborted = true;
2178
2248
  return left;
2179
2249
  }
2180
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
2250
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
2181
2251
  }
2182
2252
  function handleCodecAResult(result, def, ctx) {
2183
2253
  if (result.issues.length) {
@@ -2227,7 +2297,7 @@ function handleRefineResult(result, payload, input, inst) {
2227
2297
  payload.issues.push(issue(_iss));
2228
2298
  }
2229
2299
  }
2230
- var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
2300
+ var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
2231
2301
  var init_schemas = __esm({
2232
2302
  "../../node_modules/zod/v4/core/schemas.js"() {
2233
2303
  "use strict";
@@ -2240,7 +2310,7 @@ var init_schemas = __esm({
2240
2310
  init_versions();
2241
2311
  init_util();
2242
2312
  $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2243
- var _a2;
2313
+ var _a3;
2244
2314
  inst ?? (inst = {});
2245
2315
  inst._zod.def = def;
2246
2316
  inst._zod.bag = inst._zod.bag || {};
@@ -2255,7 +2325,7 @@ var init_schemas = __esm({
2255
2325
  }
2256
2326
  }
2257
2327
  if (checks.length === 0) {
2258
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2328
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2259
2329
  inst._zod.deferred?.push(() => {
2260
2330
  inst._zod.run = inst._zod.parse;
2261
2331
  });
@@ -2265,6 +2335,8 @@ var init_schemas = __esm({
2265
2335
  let asyncResult;
2266
2336
  for (const ch of checks2) {
2267
2337
  if (ch._zod.def.when) {
2338
+ if (explicitlyAborted(payload))
2339
+ continue;
2268
2340
  const shouldRun = ch._zod.def.when(payload);
2269
2341
  if (!shouldRun)
2270
2342
  continue;
@@ -2405,6 +2477,19 @@ var init_schemas = __esm({
2405
2477
  inst._zod.check = (payload) => {
2406
2478
  try {
2407
2479
  const trimmed = payload.value.trim();
2480
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2481
+ if (!/^https?:\/\//i.test(trimmed)) {
2482
+ payload.issues.push({
2483
+ code: "invalid_format",
2484
+ format: "url",
2485
+ note: "Invalid URL format",
2486
+ input: payload.value,
2487
+ inst,
2488
+ continue: !def.abort
2489
+ });
2490
+ return;
2491
+ }
2492
+ }
2408
2493
  const url2 = new URL(trimmed);
2409
2494
  if (def.hostname) {
2410
2495
  def.hostname.lastIndex = 0;
@@ -2711,8 +2796,6 @@ var init_schemas = __esm({
2711
2796
  $ZodType.init(inst, def);
2712
2797
  inst._zod.pattern = _undefined;
2713
2798
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2714
- inst._zod.optin = "optional";
2715
- inst._zod.optout = "optional";
2716
2799
  inst._zod.parse = (payload, _ctx) => {
2717
2800
  const input = payload.value;
2718
2801
  if (typeof input === "undefined")
@@ -2884,12 +2967,13 @@ var init_schemas = __esm({
2884
2967
  const shape = value.shape;
2885
2968
  for (const key of value.keys) {
2886
2969
  const el = shape[key];
2970
+ const isOptionalIn = el._zod.optin === "optional";
2887
2971
  const isOptionalOut = el._zod.optout === "optional";
2888
2972
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
2889
2973
  if (r instanceof Promise) {
2890
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
2974
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
2891
2975
  } else {
2892
- handlePropertyResult(r, payload, key, input, isOptionalOut);
2976
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
2893
2977
  }
2894
2978
  }
2895
2979
  if (!catchall) {
@@ -2920,9 +3004,10 @@ var init_schemas = __esm({
2920
3004
  const id = ids[key];
2921
3005
  const k = esc(key);
2922
3006
  const schema = shape[key];
3007
+ const isOptionalIn = schema?._zod?.optin === "optional";
2923
3008
  const isOptionalOut = schema?._zod?.optout === "optional";
2924
3009
  doc.write(`const ${id} = ${parseStr(key)};`);
2925
- if (isOptionalOut) {
3010
+ if (isOptionalIn && isOptionalOut) {
2926
3011
  doc.write(`
2927
3012
  if (${id}.issues.length) {
2928
3013
  if (${k} in input) {
@@ -2941,6 +3026,33 @@ var init_schemas = __esm({
2941
3026
  newResult[${k}] = ${id}.value;
2942
3027
  }
2943
3028
 
3029
+ `);
3030
+ } else if (!isOptionalIn) {
3031
+ doc.write(`
3032
+ const ${id}_present = ${k} in input;
3033
+ if (${id}.issues.length) {
3034
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3035
+ ...iss,
3036
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3037
+ })));
3038
+ }
3039
+ if (!${id}_present && !${id}.issues.length) {
3040
+ payload.issues.push({
3041
+ code: "invalid_type",
3042
+ expected: "nonoptional",
3043
+ input: undefined,
3044
+ path: [${k}]
3045
+ });
3046
+ }
3047
+
3048
+ if (${id}_present) {
3049
+ if (${id}.value === undefined) {
3050
+ newResult[${k}] = undefined;
3051
+ } else {
3052
+ newResult[${k}] = ${id}.value;
3053
+ }
3054
+ }
3055
+
2944
3056
  `);
2945
3057
  } else {
2946
3058
  doc.write(`
@@ -3014,10 +3126,9 @@ var init_schemas = __esm({
3014
3126
  }
3015
3127
  return void 0;
3016
3128
  });
3017
- const single = def.options.length === 1;
3018
- const first = def.options[0]._zod.run;
3129
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3019
3130
  inst._zod.parse = (payload, ctx) => {
3020
- if (single) {
3131
+ if (first) {
3021
3132
  return first(payload, ctx);
3022
3133
  }
3023
3134
  let async = false;
@@ -3046,10 +3157,9 @@ var init_schemas = __esm({
3046
3157
  $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3047
3158
  $ZodUnion.init(inst, def);
3048
3159
  def.inclusive = false;
3049
- const single = def.options.length === 1;
3050
- const first = def.options[0]._zod.run;
3160
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3051
3161
  inst._zod.parse = (payload, ctx) => {
3052
- if (single) {
3162
+ if (first) {
3053
3163
  return first(payload, ctx);
3054
3164
  }
3055
3165
  let async = false;
@@ -3124,7 +3234,7 @@ var init_schemas = __esm({
3124
3234
  if (opt) {
3125
3235
  return opt._zod.run(payload, ctx);
3126
3236
  }
3127
- if (def.unionFallback) {
3237
+ if (def.unionFallback || ctx.direction === "backward") {
3128
3238
  return _super(payload, ctx);
3129
3239
  }
3130
3240
  payload.issues.push({
@@ -3132,6 +3242,7 @@ var init_schemas = __esm({
3132
3242
  errors: [],
3133
3243
  note: "No matching discriminator",
3134
3244
  discriminator: def.discriminator,
3245
+ options: Array.from(disc.value.keys()),
3135
3246
  input,
3136
3247
  path: [def.discriminator],
3137
3248
  inst
@@ -3170,56 +3281,59 @@ var init_schemas = __esm({
3170
3281
  }
3171
3282
  payload.value = [];
3172
3283
  const proms = [];
3173
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3174
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3284
+ const optinStart = getTupleOptStart(items, "optin");
3285
+ const optoutStart = getTupleOptStart(items, "optout");
3175
3286
  if (!def.rest) {
3176
- const tooBig = input.length > items.length;
3177
- const tooSmall = input.length < optStart - 1;
3178
- if (tooBig || tooSmall) {
3287
+ if (input.length < optinStart) {
3179
3288
  payload.issues.push({
3180
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3289
+ code: "too_small",
3290
+ minimum: optinStart,
3291
+ inclusive: true,
3181
3292
  input,
3182
3293
  inst,
3183
3294
  origin: "array"
3184
3295
  });
3185
3296
  return payload;
3186
3297
  }
3187
- }
3188
- let i = -1;
3189
- for (const item of items) {
3190
- i++;
3191
- if (i >= input.length) {
3192
- if (i >= optStart)
3193
- continue;
3298
+ if (input.length > items.length) {
3299
+ payload.issues.push({
3300
+ code: "too_big",
3301
+ maximum: items.length,
3302
+ inclusive: true,
3303
+ input,
3304
+ inst,
3305
+ origin: "array"
3306
+ });
3194
3307
  }
3195
- const result = item._zod.run({
3196
- value: input[i],
3197
- issues: []
3198
- }, ctx);
3199
- if (result instanceof Promise) {
3200
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3308
+ }
3309
+ const itemResults = new Array(items.length);
3310
+ for (let i = 0; i < items.length; i++) {
3311
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3312
+ if (r instanceof Promise) {
3313
+ proms.push(r.then((rr) => {
3314
+ itemResults[i] = rr;
3315
+ }));
3201
3316
  } else {
3202
- handleTupleResult(result, payload, i);
3317
+ itemResults[i] = r;
3203
3318
  }
3204
3319
  }
3205
3320
  if (def.rest) {
3321
+ let i = items.length - 1;
3206
3322
  const rest = input.slice(items.length);
3207
3323
  for (const el of rest) {
3208
3324
  i++;
3209
- const result = def.rest._zod.run({
3210
- value: el,
3211
- issues: []
3212
- }, ctx);
3325
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3213
3326
  if (result instanceof Promise) {
3214
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3327
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3215
3328
  } else {
3216
3329
  handleTupleResult(result, payload, i);
3217
3330
  }
3218
3331
  }
3219
3332
  }
3220
- if (proms.length)
3221
- return Promise.all(proms).then(() => payload);
3222
- return payload;
3333
+ if (proms.length) {
3334
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3335
+ }
3336
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3223
3337
  };
3224
3338
  });
3225
3339
  $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
@@ -3243,19 +3357,35 @@ var init_schemas = __esm({
3243
3357
  for (const key of values) {
3244
3358
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3245
3359
  recordKeys.add(typeof key === "number" ? key.toString() : key);
3360
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3361
+ if (keyResult instanceof Promise) {
3362
+ throw new Error("Async schemas not supported in object keys currently");
3363
+ }
3364
+ if (keyResult.issues.length) {
3365
+ payload.issues.push({
3366
+ code: "invalid_key",
3367
+ origin: "record",
3368
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
3369
+ input: key,
3370
+ path: [key],
3371
+ inst
3372
+ });
3373
+ continue;
3374
+ }
3375
+ const outKey = keyResult.value;
3246
3376
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3247
3377
  if (result instanceof Promise) {
3248
3378
  proms.push(result.then((result2) => {
3249
3379
  if (result2.issues.length) {
3250
3380
  payload.issues.push(...prefixIssues(key, result2.issues));
3251
3381
  }
3252
- payload.value[key] = result2.value;
3382
+ payload.value[outKey] = result2.value;
3253
3383
  }));
3254
3384
  } else {
3255
3385
  if (result.issues.length) {
3256
3386
  payload.issues.push(...prefixIssues(key, result.issues));
3257
3387
  }
3258
- payload.value[key] = result.value;
3388
+ payload.value[outKey] = result.value;
3259
3389
  }
3260
3390
  }
3261
3391
  }
@@ -3279,6 +3409,8 @@ var init_schemas = __esm({
3279
3409
  for (const key of Reflect.ownKeys(input)) {
3280
3410
  if (key === "__proto__")
3281
3411
  continue;
3412
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
3413
+ continue;
3282
3414
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3283
3415
  if (keyResult instanceof Promise) {
3284
3416
  throw new Error("Async schemas not supported in object keys currently");
@@ -3447,6 +3579,7 @@ var init_schemas = __esm({
3447
3579
  });
3448
3580
  $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3449
3581
  $ZodType.init(inst, def);
3582
+ inst._zod.optin = "optional";
3450
3583
  inst._zod.parse = (payload, ctx) => {
3451
3584
  if (ctx.direction === "backward") {
3452
3585
  throw new $ZodEncodeError(inst.constructor.name);
@@ -3456,6 +3589,7 @@ var init_schemas = __esm({
3456
3589
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3457
3590
  return output.then((output2) => {
3458
3591
  payload.value = output2;
3592
+ payload.fallback = true;
3459
3593
  return payload;
3460
3594
  });
3461
3595
  }
@@ -3463,6 +3597,7 @@ var init_schemas = __esm({
3463
3597
  throw new $ZodAsyncError();
3464
3598
  }
3465
3599
  payload.value = _out;
3600
+ payload.fallback = true;
3466
3601
  return payload;
3467
3602
  };
3468
3603
  });
@@ -3479,10 +3614,11 @@ var init_schemas = __esm({
3479
3614
  });
3480
3615
  inst._zod.parse = (payload, ctx) => {
3481
3616
  if (def.innerType._zod.optin === "optional") {
3617
+ const input = payload.value;
3482
3618
  const result = def.innerType._zod.run(payload, ctx);
3483
3619
  if (result instanceof Promise)
3484
- return result.then((r) => handleOptionalResult(r, payload.value));
3485
- return handleOptionalResult(result, payload.value);
3620
+ return result.then((r) => handleOptionalResult(r, input));
3621
+ return handleOptionalResult(result, input);
3486
3622
  }
3487
3623
  if (payload.value === void 0) {
3488
3624
  return payload;
@@ -3581,7 +3717,7 @@ var init_schemas = __esm({
3581
3717
  });
3582
3718
  $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3583
3719
  $ZodType.init(inst, def);
3584
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3720
+ inst._zod.optin = "optional";
3585
3721
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3586
3722
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3587
3723
  inst._zod.parse = (payload, ctx) => {
@@ -3601,6 +3737,7 @@ var init_schemas = __esm({
3601
3737
  input: payload.value
3602
3738
  });
3603
3739
  payload.issues = [];
3740
+ payload.fallback = true;
3604
3741
  }
3605
3742
  return payload;
3606
3743
  });
@@ -3615,6 +3752,7 @@ var init_schemas = __esm({
3615
3752
  input: payload.value
3616
3753
  });
3617
3754
  payload.issues = [];
3755
+ payload.fallback = true;
3618
3756
  }
3619
3757
  return payload;
3620
3758
  };
@@ -3678,6 +3816,9 @@ var init_schemas = __esm({
3678
3816
  }
3679
3817
  };
3680
3818
  });
3819
+ $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
3820
+ $ZodPipe.init(inst, def);
3821
+ });
3681
3822
  $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3682
3823
  $ZodType.init(inst, def);
3683
3824
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -3825,7 +3966,12 @@ var init_schemas = __esm({
3825
3966
  });
3826
3967
  $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
3827
3968
  $ZodType.init(inst, def);
3828
- defineLazy(inst._zod, "innerType", () => def.getter());
3969
+ defineLazy(inst._zod, "innerType", () => {
3970
+ const d = def;
3971
+ if (!d._cachedInner)
3972
+ d._cachedInner = def.getter();
3973
+ return d._cachedInner;
3974
+ });
3829
3975
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
3830
3976
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
3831
3977
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4847,18 +4993,135 @@ var init_de = __esm({
4847
4993
  }
4848
4994
  });
4849
4995
 
4850
- // ../../node_modules/zod/v4/locales/en.js
4851
- function en_default() {
4996
+ // ../../node_modules/zod/v4/locales/el.js
4997
+ function el_default() {
4852
4998
  return {
4853
4999
  localeError: error9()
4854
5000
  };
4855
5001
  }
4856
5002
  var error9;
5003
+ var init_el = __esm({
5004
+ "../../node_modules/zod/v4/locales/el.js"() {
5005
+ "use strict";
5006
+ init_util();
5007
+ error9 = () => {
5008
+ const Sizable = {
5009
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5010
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5011
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5012
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5013
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5014
+ };
5015
+ function getSizing(origin) {
5016
+ return Sizable[origin] ?? null;
5017
+ }
5018
+ const FormatDictionary = {
5019
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5020
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5021
+ url: "URL",
5022
+ emoji: "emoji",
5023
+ uuid: "UUID",
5024
+ uuidv4: "UUIDv4",
5025
+ uuidv6: "UUIDv6",
5026
+ nanoid: "nanoid",
5027
+ guid: "GUID",
5028
+ cuid: "cuid",
5029
+ cuid2: "cuid2",
5030
+ ulid: "ULID",
5031
+ xid: "XID",
5032
+ ksuid: "KSUID",
5033
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5034
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5035
+ time: "ISO \u03CE\u03C1\u03B1",
5036
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5037
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5038
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5039
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5040
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5041
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5042
+ 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",
5043
+ 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",
5044
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5045
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5046
+ jwt: "JWT",
5047
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5048
+ };
5049
+ const TypeDictionary = {
5050
+ nan: "NaN"
5051
+ };
5052
+ return (issue2) => {
5053
+ switch (issue2.code) {
5054
+ case "invalid_type": {
5055
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5056
+ const receivedType = parsedType(issue2.input);
5057
+ const received = TypeDictionary[receivedType] ?? receivedType;
5058
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5059
+ 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}`;
5060
+ }
5061
+ 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}`;
5062
+ }
5063
+ case "invalid_value":
5064
+ if (issue2.values.length === 1)
5065
+ 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])}`;
5066
+ 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, "|")}`;
5067
+ case "too_big": {
5068
+ const adj = issue2.inclusive ? "<=" : "<";
5069
+ const sizing = getSizing(issue2.origin);
5070
+ if (sizing)
5071
+ 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"}`;
5072
+ 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()}`;
5073
+ }
5074
+ case "too_small": {
5075
+ const adj = issue2.inclusive ? ">=" : ">";
5076
+ const sizing = getSizing(issue2.origin);
5077
+ if (sizing) {
5078
+ 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}`;
5079
+ }
5080
+ 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()}`;
5081
+ }
5082
+ case "invalid_format": {
5083
+ const _issue = issue2;
5084
+ if (_issue.format === "starts_with") {
5085
+ 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}"`;
5086
+ }
5087
+ if (_issue.format === "ends_with")
5088
+ 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}"`;
5089
+ if (_issue.format === "includes")
5090
+ 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}"`;
5091
+ if (_issue.format === "regex")
5092
+ 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}`;
5093
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5094
+ }
5095
+ case "not_multiple_of":
5096
+ 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}`;
5097
+ case "unrecognized_keys":
5098
+ 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, ", ")}`;
5099
+ case "invalid_key":
5100
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5101
+ case "invalid_union":
5102
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5103
+ case "invalid_element":
5104
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5105
+ default:
5106
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5107
+ }
5108
+ };
5109
+ };
5110
+ }
5111
+ });
5112
+
5113
+ // ../../node_modules/zod/v4/locales/en.js
5114
+ function en_default() {
5115
+ return {
5116
+ localeError: error10()
5117
+ };
5118
+ }
5119
+ var error10;
4857
5120
  var init_en = __esm({
4858
5121
  "../../node_modules/zod/v4/locales/en.js"() {
4859
5122
  "use strict";
4860
5123
  init_util();
4861
- error9 = () => {
5124
+ error10 = () => {
4862
5125
  const Sizable = {
4863
5126
  string: { unit: "characters", verb: "to have" },
4864
5127
  file: { unit: "bytes", verb: "to have" },
@@ -4952,6 +5215,10 @@ var init_en = __esm({
4952
5215
  case "invalid_key":
4953
5216
  return `Invalid key in ${issue2.origin}`;
4954
5217
  case "invalid_union":
5218
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
5219
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
5220
+ return `Invalid discriminator value. Expected ${opts}`;
5221
+ }
4955
5222
  return "Invalid input";
4956
5223
  case "invalid_element":
4957
5224
  return `Invalid value in ${issue2.origin}`;
@@ -4966,15 +5233,15 @@ var init_en = __esm({
4966
5233
  // ../../node_modules/zod/v4/locales/eo.js
4967
5234
  function eo_default() {
4968
5235
  return {
4969
- localeError: error10()
5236
+ localeError: error11()
4970
5237
  };
4971
5238
  }
4972
- var error10;
5239
+ var error11;
4973
5240
  var init_eo = __esm({
4974
5241
  "../../node_modules/zod/v4/locales/eo.js"() {
4975
5242
  "use strict";
4976
5243
  init_util();
4977
- error10 = () => {
5244
+ error11 = () => {
4978
5245
  const Sizable = {
4979
5246
  string: { unit: "karaktrojn", verb: "havi" },
4980
5247
  file: { unit: "bajtojn", verb: "havi" },
@@ -5083,15 +5350,15 @@ var init_eo = __esm({
5083
5350
  // ../../node_modules/zod/v4/locales/es.js
5084
5351
  function es_default() {
5085
5352
  return {
5086
- localeError: error11()
5353
+ localeError: error12()
5087
5354
  };
5088
5355
  }
5089
- var error11;
5356
+ var error12;
5090
5357
  var init_es = __esm({
5091
5358
  "../../node_modules/zod/v4/locales/es.js"() {
5092
5359
  "use strict";
5093
5360
  init_util();
5094
- error11 = () => {
5361
+ error12 = () => {
5095
5362
  const Sizable = {
5096
5363
  string: { unit: "caracteres", verb: "tener" },
5097
5364
  file: { unit: "bytes", verb: "tener" },
@@ -5223,15 +5490,15 @@ var init_es = __esm({
5223
5490
  // ../../node_modules/zod/v4/locales/fa.js
5224
5491
  function fa_default() {
5225
5492
  return {
5226
- localeError: error12()
5493
+ localeError: error13()
5227
5494
  };
5228
5495
  }
5229
- var error12;
5496
+ var error13;
5230
5497
  var init_fa = __esm({
5231
5498
  "../../node_modules/zod/v4/locales/fa.js"() {
5232
5499
  "use strict";
5233
5500
  init_util();
5234
- error12 = () => {
5501
+ error13 = () => {
5235
5502
  const Sizable = {
5236
5503
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
5237
5504
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -5345,15 +5612,15 @@ var init_fa = __esm({
5345
5612
  // ../../node_modules/zod/v4/locales/fi.js
5346
5613
  function fi_default() {
5347
5614
  return {
5348
- localeError: error13()
5615
+ localeError: error14()
5349
5616
  };
5350
5617
  }
5351
- var error13;
5618
+ var error14;
5352
5619
  var init_fi = __esm({
5353
5620
  "../../node_modules/zod/v4/locales/fi.js"() {
5354
5621
  "use strict";
5355
5622
  init_util();
5356
- error13 = () => {
5623
+ error14 = () => {
5357
5624
  const Sizable = {
5358
5625
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
5359
5626
  file: { unit: "tavua", subject: "tiedoston" },
@@ -5465,15 +5732,15 @@ var init_fi = __esm({
5465
5732
  // ../../node_modules/zod/v4/locales/fr.js
5466
5733
  function fr_default() {
5467
5734
  return {
5468
- localeError: error14()
5735
+ localeError: error15()
5469
5736
  };
5470
5737
  }
5471
- var error14;
5738
+ var error15;
5472
5739
  var init_fr = __esm({
5473
5740
  "../../node_modules/zod/v4/locales/fr.js"() {
5474
5741
  "use strict";
5475
5742
  init_util();
5476
- error14 = () => {
5743
+ error15 = () => {
5477
5744
  const Sizable = {
5478
5745
  string: { unit: "caract\xE8res", verb: "avoir" },
5479
5746
  file: { unit: "octets", verb: "avoir" },
@@ -5514,9 +5781,27 @@ var init_fr = __esm({
5514
5781
  template_literal: "entr\xE9e"
5515
5782
  };
5516
5783
  const TypeDictionary = {
5517
- nan: "NaN",
5784
+ string: "cha\xEEne",
5518
5785
  number: "nombre",
5519
- array: "tableau"
5786
+ int: "entier",
5787
+ boolean: "bool\xE9en",
5788
+ bigint: "grand entier",
5789
+ symbol: "symbole",
5790
+ undefined: "ind\xE9fini",
5791
+ null: "null",
5792
+ never: "jamais",
5793
+ void: "vide",
5794
+ date: "date",
5795
+ array: "tableau",
5796
+ object: "objet",
5797
+ tuple: "tuple",
5798
+ record: "enregistrement",
5799
+ map: "carte",
5800
+ set: "ensemble",
5801
+ file: "fichier",
5802
+ nonoptional: "non-optionnel",
5803
+ nan: "NaN",
5804
+ function: "fonction"
5520
5805
  };
5521
5806
  return (issue2) => {
5522
5807
  switch (issue2.code) {
@@ -5537,16 +5822,15 @@ var init_fr = __esm({
5537
5822
  const adj = issue2.inclusive ? "<=" : "<";
5538
5823
  const sizing = getSizing(issue2.origin);
5539
5824
  if (sizing)
5540
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
5541
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
5825
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
5826
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
5542
5827
  }
5543
5828
  case "too_small": {
5544
5829
  const adj = issue2.inclusive ? ">=" : ">";
5545
5830
  const sizing = getSizing(issue2.origin);
5546
- if (sizing) {
5547
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5548
- }
5549
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
5831
+ if (sizing)
5832
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5833
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
5550
5834
  }
5551
5835
  case "invalid_format": {
5552
5836
  const _issue = issue2;
@@ -5581,15 +5865,15 @@ var init_fr = __esm({
5581
5865
  // ../../node_modules/zod/v4/locales/fr-CA.js
5582
5866
  function fr_CA_default() {
5583
5867
  return {
5584
- localeError: error15()
5868
+ localeError: error16()
5585
5869
  };
5586
5870
  }
5587
- var error15;
5871
+ var error16;
5588
5872
  var init_fr_CA = __esm({
5589
5873
  "../../node_modules/zod/v4/locales/fr-CA.js"() {
5590
5874
  "use strict";
5591
5875
  init_util();
5592
- error15 = () => {
5876
+ error16 = () => {
5593
5877
  const Sizable = {
5594
5878
  string: { unit: "caract\xE8res", verb: "avoir" },
5595
5879
  file: { unit: "octets", verb: "avoir" },
@@ -5696,15 +5980,15 @@ var init_fr_CA = __esm({
5696
5980
  // ../../node_modules/zod/v4/locales/he.js
5697
5981
  function he_default() {
5698
5982
  return {
5699
- localeError: error16()
5983
+ localeError: error17()
5700
5984
  };
5701
5985
  }
5702
- var error16;
5986
+ var error17;
5703
5987
  var init_he = __esm({
5704
5988
  "../../node_modules/zod/v4/locales/he.js"() {
5705
5989
  "use strict";
5706
5990
  init_util();
5707
- error16 = () => {
5991
+ error17 = () => {
5708
5992
  const TypeNames = {
5709
5993
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
5710
5994
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -5895,22 +6179,152 @@ var init_he = __esm({
5895
6179
  }
5896
6180
  });
5897
6181
 
5898
- // ../../node_modules/zod/v4/locales/hu.js
5899
- function hu_default() {
6182
+ // ../../node_modules/zod/v4/locales/hr.js
6183
+ function hr_default() {
5900
6184
  return {
5901
- localeError: error17()
6185
+ localeError: error18()
5902
6186
  };
5903
6187
  }
5904
- var error17;
5905
- var init_hu = __esm({
5906
- "../../node_modules/zod/v4/locales/hu.js"() {
6188
+ var error18;
6189
+ var init_hr = __esm({
6190
+ "../../node_modules/zod/v4/locales/hr.js"() {
5907
6191
  "use strict";
5908
6192
  init_util();
5909
- error17 = () => {
6193
+ error18 = () => {
5910
6194
  const Sizable = {
5911
- string: { unit: "karakter", verb: "legyen" },
5912
- file: { unit: "byte", verb: "legyen" },
5913
- array: { unit: "elem", verb: "legyen" },
6195
+ string: { unit: "znakova", verb: "imati" },
6196
+ file: { unit: "bajtova", verb: "imati" },
6197
+ array: { unit: "stavki", verb: "imati" },
6198
+ set: { unit: "stavki", verb: "imati" }
6199
+ };
6200
+ function getSizing(origin) {
6201
+ return Sizable[origin] ?? null;
6202
+ }
6203
+ const FormatDictionary = {
6204
+ regex: "unos",
6205
+ email: "email adresa",
6206
+ url: "URL",
6207
+ emoji: "emoji",
6208
+ uuid: "UUID",
6209
+ uuidv4: "UUIDv4",
6210
+ uuidv6: "UUIDv6",
6211
+ nanoid: "nanoid",
6212
+ guid: "GUID",
6213
+ cuid: "cuid",
6214
+ cuid2: "cuid2",
6215
+ ulid: "ULID",
6216
+ xid: "XID",
6217
+ ksuid: "KSUID",
6218
+ datetime: "ISO datum i vrijeme",
6219
+ date: "ISO datum",
6220
+ time: "ISO vrijeme",
6221
+ duration: "ISO trajanje",
6222
+ ipv4: "IPv4 adresa",
6223
+ ipv6: "IPv6 adresa",
6224
+ cidrv4: "IPv4 raspon",
6225
+ cidrv6: "IPv6 raspon",
6226
+ base64: "base64 kodirani tekst",
6227
+ base64url: "base64url kodirani tekst",
6228
+ json_string: "JSON tekst",
6229
+ e164: "E.164 broj",
6230
+ jwt: "JWT",
6231
+ template_literal: "unos"
6232
+ };
6233
+ const TypeDictionary = {
6234
+ nan: "NaN",
6235
+ string: "tekst",
6236
+ number: "broj",
6237
+ boolean: "boolean",
6238
+ array: "niz",
6239
+ object: "objekt",
6240
+ set: "skup",
6241
+ file: "datoteka",
6242
+ date: "datum",
6243
+ bigint: "bigint",
6244
+ symbol: "simbol",
6245
+ undefined: "undefined",
6246
+ null: "null",
6247
+ function: "funkcija",
6248
+ map: "mapa"
6249
+ };
6250
+ return (issue2) => {
6251
+ switch (issue2.code) {
6252
+ case "invalid_type": {
6253
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
6254
+ const receivedType = parsedType(issue2.input);
6255
+ const received = TypeDictionary[receivedType] ?? receivedType;
6256
+ if (/^[A-Z]/.test(issue2.expected)) {
6257
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6258
+ }
6259
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6260
+ }
6261
+ case "invalid_value":
6262
+ if (issue2.values.length === 1)
6263
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
6264
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
6265
+ case "too_big": {
6266
+ const adj = issue2.inclusive ? "<=" : "<";
6267
+ const sizing = getSizing(issue2.origin);
6268
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6269
+ if (sizing)
6270
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
6271
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
6272
+ }
6273
+ case "too_small": {
6274
+ const adj = issue2.inclusive ? ">=" : ">";
6275
+ const sizing = getSizing(issue2.origin);
6276
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6277
+ if (sizing) {
6278
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6279
+ }
6280
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
6281
+ }
6282
+ case "invalid_format": {
6283
+ const _issue = issue2;
6284
+ if (_issue.format === "starts_with")
6285
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
6286
+ if (_issue.format === "ends_with")
6287
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
6288
+ if (_issue.format === "includes")
6289
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
6290
+ if (_issue.format === "regex")
6291
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
6292
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
6293
+ }
6294
+ case "not_multiple_of":
6295
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
6296
+ case "unrecognized_keys":
6297
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
6298
+ case "invalid_key":
6299
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6300
+ case "invalid_union":
6301
+ return "Neispravan unos";
6302
+ case "invalid_element":
6303
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
6304
+ default:
6305
+ return `Neispravan unos`;
6306
+ }
6307
+ };
6308
+ };
6309
+ }
6310
+ });
6311
+
6312
+ // ../../node_modules/zod/v4/locales/hu.js
6313
+ function hu_default() {
6314
+ return {
6315
+ localeError: error19()
6316
+ };
6317
+ }
6318
+ var error19;
6319
+ var init_hu = __esm({
6320
+ "../../node_modules/zod/v4/locales/hu.js"() {
6321
+ "use strict";
6322
+ init_util();
6323
+ error19 = () => {
6324
+ const Sizable = {
6325
+ string: { unit: "karakter", verb: "legyen" },
6326
+ file: { unit: "byte", verb: "legyen" },
6327
+ array: { unit: "elem", verb: "legyen" },
5914
6328
  set: { unit: "elem", verb: "legyen" }
5915
6329
  };
5916
6330
  function getSizing(origin) {
@@ -6024,15 +6438,15 @@ function withDefiniteArticle(word) {
6024
6438
  }
6025
6439
  function hy_default() {
6026
6440
  return {
6027
- localeError: error18()
6441
+ localeError: error20()
6028
6442
  };
6029
6443
  }
6030
- var error18;
6444
+ var error20;
6031
6445
  var init_hy = __esm({
6032
6446
  "../../node_modules/zod/v4/locales/hy.js"() {
6033
6447
  "use strict";
6034
6448
  init_util();
6035
- error18 = () => {
6449
+ error20 = () => {
6036
6450
  const Sizable = {
6037
6451
  string: {
6038
6452
  unit: {
@@ -6169,15 +6583,15 @@ var init_hy = __esm({
6169
6583
  // ../../node_modules/zod/v4/locales/id.js
6170
6584
  function id_default() {
6171
6585
  return {
6172
- localeError: error19()
6586
+ localeError: error21()
6173
6587
  };
6174
6588
  }
6175
- var error19;
6589
+ var error21;
6176
6590
  var init_id = __esm({
6177
6591
  "../../node_modules/zod/v4/locales/id.js"() {
6178
6592
  "use strict";
6179
6593
  init_util();
6180
- error19 = () => {
6594
+ error21 = () => {
6181
6595
  const Sizable = {
6182
6596
  string: { unit: "karakter", verb: "memiliki" },
6183
6597
  file: { unit: "byte", verb: "memiliki" },
@@ -6283,15 +6697,15 @@ var init_id = __esm({
6283
6697
  // ../../node_modules/zod/v4/locales/is.js
6284
6698
  function is_default() {
6285
6699
  return {
6286
- localeError: error20()
6700
+ localeError: error22()
6287
6701
  };
6288
6702
  }
6289
- var error20;
6703
+ var error22;
6290
6704
  var init_is = __esm({
6291
6705
  "../../node_modules/zod/v4/locales/is.js"() {
6292
6706
  "use strict";
6293
6707
  init_util();
6294
- error20 = () => {
6708
+ error22 = () => {
6295
6709
  const Sizable = {
6296
6710
  string: { unit: "stafi", verb: "a\xF0 hafa" },
6297
6711
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -6400,15 +6814,15 @@ var init_is = __esm({
6400
6814
  // ../../node_modules/zod/v4/locales/it.js
6401
6815
  function it_default() {
6402
6816
  return {
6403
- localeError: error21()
6817
+ localeError: error23()
6404
6818
  };
6405
6819
  }
6406
- var error21;
6820
+ var error23;
6407
6821
  var init_it = __esm({
6408
6822
  "../../node_modules/zod/v4/locales/it.js"() {
6409
6823
  "use strict";
6410
6824
  init_util();
6411
- error21 = () => {
6825
+ error23 = () => {
6412
6826
  const Sizable = {
6413
6827
  string: { unit: "caratteri", verb: "avere" },
6414
6828
  file: { unit: "byte", verb: "avere" },
@@ -6493,7 +6907,7 @@ var init_it = __esm({
6493
6907
  return `Stringa non valida: deve includere "${_issue.includes}"`;
6494
6908
  if (_issue.format === "regex")
6495
6909
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
6496
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
6910
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
6497
6911
  }
6498
6912
  case "not_multiple_of":
6499
6913
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -6516,15 +6930,15 @@ var init_it = __esm({
6516
6930
  // ../../node_modules/zod/v4/locales/ja.js
6517
6931
  function ja_default() {
6518
6932
  return {
6519
- localeError: error22()
6933
+ localeError: error24()
6520
6934
  };
6521
6935
  }
6522
- var error22;
6936
+ var error24;
6523
6937
  var init_ja = __esm({
6524
6938
  "../../node_modules/zod/v4/locales/ja.js"() {
6525
6939
  "use strict";
6526
6940
  init_util();
6527
- error22 = () => {
6941
+ error24 = () => {
6528
6942
  const Sizable = {
6529
6943
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
6530
6944
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -6631,15 +7045,15 @@ var init_ja = __esm({
6631
7045
  // ../../node_modules/zod/v4/locales/ka.js
6632
7046
  function ka_default() {
6633
7047
  return {
6634
- localeError: error23()
7048
+ localeError: error25()
6635
7049
  };
6636
7050
  }
6637
- var error23;
7051
+ var error25;
6638
7052
  var init_ka = __esm({
6639
7053
  "../../node_modules/zod/v4/locales/ka.js"() {
6640
7054
  "use strict";
6641
7055
  init_util();
6642
- error23 = () => {
7056
+ error25 = () => {
6643
7057
  const Sizable = {
6644
7058
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
6645
7059
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -6672,9 +7086,9 @@ var init_ka = __esm({
6672
7086
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
6673
7087
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6674
7088
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
6675
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6676
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
6677
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7089
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7090
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7091
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
6678
7092
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
6679
7093
  jwt: "JWT",
6680
7094
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -6682,7 +7096,7 @@ var init_ka = __esm({
6682
7096
  const TypeDictionary = {
6683
7097
  nan: "NaN",
6684
7098
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
6685
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7099
+ string: "\u10D5\u10D4\u10DA\u10D8",
6686
7100
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
6687
7101
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
6688
7102
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -6720,14 +7134,14 @@ var init_ka = __esm({
6720
7134
  case "invalid_format": {
6721
7135
  const _issue = issue2;
6722
7136
  if (_issue.format === "starts_with") {
6723
- 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`;
7137
+ 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`;
6724
7138
  }
6725
7139
  if (_issue.format === "ends_with")
6726
- 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`;
7140
+ 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`;
6727
7141
  if (_issue.format === "includes")
6728
- 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`;
7142
+ 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`;
6729
7143
  if (_issue.format === "regex")
6730
- 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}`;
7144
+ 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}`;
6731
7145
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
6732
7146
  }
6733
7147
  case "not_multiple_of":
@@ -6751,15 +7165,15 @@ var init_ka = __esm({
6751
7165
  // ../../node_modules/zod/v4/locales/km.js
6752
7166
  function km_default() {
6753
7167
  return {
6754
- localeError: error24()
7168
+ localeError: error26()
6755
7169
  };
6756
7170
  }
6757
- var error24;
7171
+ var error26;
6758
7172
  var init_km = __esm({
6759
7173
  "../../node_modules/zod/v4/locales/km.js"() {
6760
7174
  "use strict";
6761
7175
  init_util();
6762
- error24 = () => {
7176
+ error26 = () => {
6763
7177
  const Sizable = {
6764
7178
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
6765
7179
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -6880,15 +7294,15 @@ var init_kh = __esm({
6880
7294
  // ../../node_modules/zod/v4/locales/ko.js
6881
7295
  function ko_default() {
6882
7296
  return {
6883
- localeError: error25()
7297
+ localeError: error27()
6884
7298
  };
6885
7299
  }
6886
- var error25;
7300
+ var error27;
6887
7301
  var init_ko = __esm({
6888
7302
  "../../node_modules/zod/v4/locales/ko.js"() {
6889
7303
  "use strict";
6890
7304
  init_util();
6891
- error25 = () => {
7305
+ error27 = () => {
6892
7306
  const Sizable = {
6893
7307
  string: { unit: "\uBB38\uC790", verb: "to have" },
6894
7308
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7009,10 +7423,10 @@ function getUnitTypeFromNumber(number4) {
7009
7423
  }
7010
7424
  function lt_default() {
7011
7425
  return {
7012
- localeError: error26()
7426
+ localeError: error28()
7013
7427
  };
7014
7428
  }
7015
- var capitalizeFirstCharacter, error26;
7429
+ var capitalizeFirstCharacter, error28;
7016
7430
  var init_lt = __esm({
7017
7431
  "../../node_modules/zod/v4/locales/lt.js"() {
7018
7432
  "use strict";
@@ -7020,7 +7434,7 @@ var init_lt = __esm({
7020
7434
  capitalizeFirstCharacter = (text) => {
7021
7435
  return text.charAt(0).toUpperCase() + text.slice(1);
7022
7436
  };
7023
- error26 = () => {
7437
+ error28 = () => {
7024
7438
  const Sizable = {
7025
7439
  string: {
7026
7440
  unit: {
@@ -7210,15 +7624,15 @@ var init_lt = __esm({
7210
7624
  // ../../node_modules/zod/v4/locales/mk.js
7211
7625
  function mk_default() {
7212
7626
  return {
7213
- localeError: error27()
7627
+ localeError: error29()
7214
7628
  };
7215
7629
  }
7216
- var error27;
7630
+ var error29;
7217
7631
  var init_mk = __esm({
7218
7632
  "../../node_modules/zod/v4/locales/mk.js"() {
7219
7633
  "use strict";
7220
7634
  init_util();
7221
- error27 = () => {
7635
+ error29 = () => {
7222
7636
  const Sizable = {
7223
7637
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7224
7638
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -7327,15 +7741,15 @@ var init_mk = __esm({
7327
7741
  // ../../node_modules/zod/v4/locales/ms.js
7328
7742
  function ms_default() {
7329
7743
  return {
7330
- localeError: error28()
7744
+ localeError: error30()
7331
7745
  };
7332
7746
  }
7333
- var error28;
7747
+ var error30;
7334
7748
  var init_ms = __esm({
7335
7749
  "../../node_modules/zod/v4/locales/ms.js"() {
7336
7750
  "use strict";
7337
7751
  init_util();
7338
- error28 = () => {
7752
+ error30 = () => {
7339
7753
  const Sizable = {
7340
7754
  string: { unit: "aksara", verb: "mempunyai" },
7341
7755
  file: { unit: "bait", verb: "mempunyai" },
@@ -7442,15 +7856,15 @@ var init_ms = __esm({
7442
7856
  // ../../node_modules/zod/v4/locales/nl.js
7443
7857
  function nl_default() {
7444
7858
  return {
7445
- localeError: error29()
7859
+ localeError: error31()
7446
7860
  };
7447
7861
  }
7448
- var error29;
7862
+ var error31;
7449
7863
  var init_nl = __esm({
7450
7864
  "../../node_modules/zod/v4/locales/nl.js"() {
7451
7865
  "use strict";
7452
7866
  init_util();
7453
- error29 = () => {
7867
+ error31 = () => {
7454
7868
  const Sizable = {
7455
7869
  string: { unit: "tekens", verb: "heeft" },
7456
7870
  file: { unit: "bytes", verb: "heeft" },
@@ -7560,15 +7974,15 @@ var init_nl = __esm({
7560
7974
  // ../../node_modules/zod/v4/locales/no.js
7561
7975
  function no_default() {
7562
7976
  return {
7563
- localeError: error30()
7977
+ localeError: error32()
7564
7978
  };
7565
7979
  }
7566
- var error30;
7980
+ var error32;
7567
7981
  var init_no = __esm({
7568
7982
  "../../node_modules/zod/v4/locales/no.js"() {
7569
7983
  "use strict";
7570
7984
  init_util();
7571
- error30 = () => {
7985
+ error32 = () => {
7572
7986
  const Sizable = {
7573
7987
  string: { unit: "tegn", verb: "\xE5 ha" },
7574
7988
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -7676,15 +8090,15 @@ var init_no = __esm({
7676
8090
  // ../../node_modules/zod/v4/locales/ota.js
7677
8091
  function ota_default() {
7678
8092
  return {
7679
- localeError: error31()
8093
+ localeError: error33()
7680
8094
  };
7681
8095
  }
7682
- var error31;
8096
+ var error33;
7683
8097
  var init_ota = __esm({
7684
8098
  "../../node_modules/zod/v4/locales/ota.js"() {
7685
8099
  "use strict";
7686
8100
  init_util();
7687
- error31 = () => {
8101
+ error33 = () => {
7688
8102
  const Sizable = {
7689
8103
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
7690
8104
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -7793,15 +8207,15 @@ var init_ota = __esm({
7793
8207
  // ../../node_modules/zod/v4/locales/ps.js
7794
8208
  function ps_default() {
7795
8209
  return {
7796
- localeError: error32()
8210
+ localeError: error34()
7797
8211
  };
7798
8212
  }
7799
- var error32;
8213
+ var error34;
7800
8214
  var init_ps = __esm({
7801
8215
  "../../node_modules/zod/v4/locales/ps.js"() {
7802
8216
  "use strict";
7803
8217
  init_util();
7804
- error32 = () => {
8218
+ error34 = () => {
7805
8219
  const Sizable = {
7806
8220
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
7807
8221
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -7915,15 +8329,15 @@ var init_ps = __esm({
7915
8329
  // ../../node_modules/zod/v4/locales/pl.js
7916
8330
  function pl_default() {
7917
8331
  return {
7918
- localeError: error33()
8332
+ localeError: error35()
7919
8333
  };
7920
8334
  }
7921
- var error33;
8335
+ var error35;
7922
8336
  var init_pl = __esm({
7923
8337
  "../../node_modules/zod/v4/locales/pl.js"() {
7924
8338
  "use strict";
7925
8339
  init_util();
7926
- error33 = () => {
8340
+ error35 = () => {
7927
8341
  const Sizable = {
7928
8342
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
7929
8343
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8032,27 +8446,144 @@ var init_pl = __esm({
8032
8446
  // ../../node_modules/zod/v4/locales/pt.js
8033
8447
  function pt_default() {
8034
8448
  return {
8035
- localeError: error34()
8449
+ localeError: error36()
8036
8450
  };
8037
8451
  }
8038
- var error34;
8452
+ var error36;
8039
8453
  var init_pt = __esm({
8040
8454
  "../../node_modules/zod/v4/locales/pt.js"() {
8041
8455
  "use strict";
8042
8456
  init_util();
8043
- error34 = () => {
8457
+ error36 = () => {
8458
+ const Sizable = {
8459
+ string: { unit: "caracteres", verb: "ter" },
8460
+ file: { unit: "bytes", verb: "ter" },
8461
+ array: { unit: "itens", verb: "ter" },
8462
+ set: { unit: "itens", verb: "ter" }
8463
+ };
8464
+ function getSizing(origin) {
8465
+ return Sizable[origin] ?? null;
8466
+ }
8467
+ const FormatDictionary = {
8468
+ regex: "padr\xE3o",
8469
+ email: "endere\xE7o de e-mail",
8470
+ url: "URL",
8471
+ emoji: "emoji",
8472
+ uuid: "UUID",
8473
+ uuidv4: "UUIDv4",
8474
+ uuidv6: "UUIDv6",
8475
+ nanoid: "nanoid",
8476
+ guid: "GUID",
8477
+ cuid: "cuid",
8478
+ cuid2: "cuid2",
8479
+ ulid: "ULID",
8480
+ xid: "XID",
8481
+ ksuid: "KSUID",
8482
+ datetime: "data e hora ISO",
8483
+ date: "data ISO",
8484
+ time: "hora ISO",
8485
+ duration: "dura\xE7\xE3o ISO",
8486
+ ipv4: "endere\xE7o IPv4",
8487
+ ipv6: "endere\xE7o IPv6",
8488
+ cidrv4: "faixa de IPv4",
8489
+ cidrv6: "faixa de IPv6",
8490
+ base64: "texto codificado em base64",
8491
+ base64url: "URL codificada em base64",
8492
+ json_string: "texto JSON",
8493
+ e164: "n\xFAmero E.164",
8494
+ jwt: "JWT",
8495
+ template_literal: "entrada"
8496
+ };
8497
+ const TypeDictionary = {
8498
+ nan: "NaN",
8499
+ number: "n\xFAmero",
8500
+ null: "nulo"
8501
+ };
8502
+ return (issue2) => {
8503
+ switch (issue2.code) {
8504
+ case "invalid_type": {
8505
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
8506
+ const receivedType = parsedType(issue2.input);
8507
+ const received = TypeDictionary[receivedType] ?? receivedType;
8508
+ if (/^[A-Z]/.test(issue2.expected)) {
8509
+ return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
8510
+ }
8511
+ return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
8512
+ }
8513
+ case "invalid_value":
8514
+ if (issue2.values.length === 1)
8515
+ return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
8516
+ return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
8517
+ case "too_big": {
8518
+ const adj = issue2.inclusive ? "<=" : "<";
8519
+ const sizing = getSizing(issue2.origin);
8520
+ if (sizing)
8521
+ return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
8522
+ return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
8523
+ }
8524
+ case "too_small": {
8525
+ const adj = issue2.inclusive ? ">=" : ">";
8526
+ const sizing = getSizing(issue2.origin);
8527
+ if (sizing) {
8528
+ return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8529
+ }
8530
+ return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
8531
+ }
8532
+ case "invalid_format": {
8533
+ const _issue = issue2;
8534
+ if (_issue.format === "starts_with")
8535
+ return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
8536
+ if (_issue.format === "ends_with")
8537
+ return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
8538
+ if (_issue.format === "includes")
8539
+ return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
8540
+ if (_issue.format === "regex")
8541
+ return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
8542
+ return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
8543
+ }
8544
+ case "not_multiple_of":
8545
+ return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
8546
+ case "unrecognized_keys":
8547
+ return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
8548
+ case "invalid_key":
8549
+ return `Chave inv\xE1lida em ${issue2.origin}`;
8550
+ case "invalid_union":
8551
+ return "Entrada inv\xE1lida";
8552
+ case "invalid_element":
8553
+ return `Valor inv\xE1lido em ${issue2.origin}`;
8554
+ default:
8555
+ return `Campo inv\xE1lido`;
8556
+ }
8557
+ };
8558
+ };
8559
+ }
8560
+ });
8561
+
8562
+ // ../../node_modules/zod/v4/locales/ro.js
8563
+ function ro_default() {
8564
+ return {
8565
+ localeError: error37()
8566
+ };
8567
+ }
8568
+ var error37;
8569
+ var init_ro = __esm({
8570
+ "../../node_modules/zod/v4/locales/ro.js"() {
8571
+ "use strict";
8572
+ init_util();
8573
+ error37 = () => {
8044
8574
  const Sizable = {
8045
- string: { unit: "caracteres", verb: "ter" },
8046
- file: { unit: "bytes", verb: "ter" },
8047
- array: { unit: "itens", verb: "ter" },
8048
- set: { unit: "itens", verb: "ter" }
8575
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
8576
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
8577
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8578
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
8579
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
8049
8580
  };
8050
8581
  function getSizing(origin) {
8051
8582
  return Sizable[origin] ?? null;
8052
8583
  }
8053
8584
  const FormatDictionary = {
8054
- regex: "padr\xE3o",
8055
- email: "endere\xE7o de e-mail",
8585
+ regex: "intrare",
8586
+ email: "adres\u0103 de email",
8056
8587
  url: "URL",
8057
8588
  emoji: "emoji",
8058
8589
  uuid: "UUID",
@@ -8065,25 +8596,37 @@ var init_pt = __esm({
8065
8596
  ulid: "ULID",
8066
8597
  xid: "XID",
8067
8598
  ksuid: "KSUID",
8068
- datetime: "data e hora ISO",
8069
- date: "data ISO",
8070
- time: "hora ISO",
8071
- duration: "dura\xE7\xE3o ISO",
8072
- ipv4: "endere\xE7o IPv4",
8073
- ipv6: "endere\xE7o IPv6",
8074
- cidrv4: "faixa de IPv4",
8075
- cidrv6: "faixa de IPv6",
8076
- base64: "texto codificado em base64",
8077
- base64url: "URL codificada em base64",
8078
- json_string: "texto JSON",
8079
- e164: "n\xFAmero E.164",
8599
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
8600
+ date: "dat\u0103 ISO",
8601
+ time: "or\u0103 ISO",
8602
+ duration: "durat\u0103 ISO",
8603
+ ipv4: "adres\u0103 IPv4",
8604
+ ipv6: "adres\u0103 IPv6",
8605
+ mac: "adres\u0103 MAC",
8606
+ cidrv4: "interval IPv4",
8607
+ cidrv6: "interval IPv6",
8608
+ base64: "\u0219ir codat base64",
8609
+ base64url: "\u0219ir codat base64url",
8610
+ json_string: "\u0219ir JSON",
8611
+ e164: "num\u0103r E.164",
8080
8612
  jwt: "JWT",
8081
- template_literal: "entrada"
8613
+ template_literal: "intrare"
8082
8614
  };
8083
8615
  const TypeDictionary = {
8084
8616
  nan: "NaN",
8085
- number: "n\xFAmero",
8086
- null: "nulo"
8617
+ string: "\u0219ir",
8618
+ number: "num\u0103r",
8619
+ boolean: "boolean",
8620
+ function: "func\u021Bie",
8621
+ array: "matrice",
8622
+ object: "obiect",
8623
+ undefined: "nedefinit",
8624
+ symbol: "simbol",
8625
+ bigint: "num\u0103r mare",
8626
+ void: "void",
8627
+ never: "never",
8628
+ map: "hart\u0103",
8629
+ set: "set"
8087
8630
  };
8088
8631
  return (issue2) => {
8089
8632
  switch (issue2.code) {
@@ -8091,54 +8634,52 @@ var init_pt = __esm({
8091
8634
  const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
8092
8635
  const receivedType = parsedType(issue2.input);
8093
8636
  const received = TypeDictionary[receivedType] ?? receivedType;
8094
- if (/^[A-Z]/.test(issue2.expected)) {
8095
- return `Tipo inv\xE1lido: esperado instanceof ${issue2.expected}, recebido ${received}`;
8096
- }
8097
- return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`;
8637
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
8098
8638
  }
8099
8639
  case "invalid_value":
8100
8640
  if (issue2.values.length === 1)
8101
- return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`;
8102
- return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`;
8641
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
8642
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
8103
8643
  case "too_big": {
8104
8644
  const adj = issue2.inclusive ? "<=" : "<";
8105
8645
  const sizing = getSizing(issue2.origin);
8106
8646
  if (sizing)
8107
- return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
8108
- return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
8647
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
8648
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
8109
8649
  }
8110
8650
  case "too_small": {
8111
8651
  const adj = issue2.inclusive ? ">=" : ">";
8112
8652
  const sizing = getSizing(issue2.origin);
8113
8653
  if (sizing) {
8114
- return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8654
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8115
8655
  }
8116
- return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
8656
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
8117
8657
  }
8118
8658
  case "invalid_format": {
8119
8659
  const _issue = issue2;
8120
- if (_issue.format === "starts_with")
8121
- return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`;
8660
+ if (_issue.format === "starts_with") {
8661
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
8662
+ }
8122
8663
  if (_issue.format === "ends_with")
8123
- return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`;
8664
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
8124
8665
  if (_issue.format === "includes")
8125
- return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`;
8666
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
8126
8667
  if (_issue.format === "regex")
8127
- return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`;
8128
- return `${FormatDictionary[_issue.format] ?? issue2.format} inv\xE1lido`;
8668
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
8669
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
8129
8670
  }
8130
8671
  case "not_multiple_of":
8131
- return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
8672
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
8132
8673
  case "unrecognized_keys":
8133
- return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
8674
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
8134
8675
  case "invalid_key":
8135
- return `Chave inv\xE1lida em ${issue2.origin}`;
8676
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
8136
8677
  case "invalid_union":
8137
- return "Entrada inv\xE1lida";
8678
+ return "Intrare invalid\u0103";
8138
8679
  case "invalid_element":
8139
- return `Valor inv\xE1lido em ${issue2.origin}`;
8680
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
8140
8681
  default:
8141
- return `Campo inv\xE1lido`;
8682
+ return `Intrare invalid\u0103`;
8142
8683
  }
8143
8684
  };
8144
8685
  };
@@ -8163,15 +8704,15 @@ function getRussianPlural(count, one, few, many) {
8163
8704
  }
8164
8705
  function ru_default() {
8165
8706
  return {
8166
- localeError: error35()
8707
+ localeError: error38()
8167
8708
  };
8168
8709
  }
8169
- var error35;
8710
+ var error38;
8170
8711
  var init_ru = __esm({
8171
8712
  "../../node_modules/zod/v4/locales/ru.js"() {
8172
8713
  "use strict";
8173
8714
  init_util();
8174
- error35 = () => {
8715
+ error38 = () => {
8175
8716
  const Sizable = {
8176
8717
  string: {
8177
8718
  unit: {
@@ -8312,15 +8853,15 @@ var init_ru = __esm({
8312
8853
  // ../../node_modules/zod/v4/locales/sl.js
8313
8854
  function sl_default() {
8314
8855
  return {
8315
- localeError: error36()
8856
+ localeError: error39()
8316
8857
  };
8317
8858
  }
8318
- var error36;
8859
+ var error39;
8319
8860
  var init_sl = __esm({
8320
8861
  "../../node_modules/zod/v4/locales/sl.js"() {
8321
8862
  "use strict";
8322
8863
  init_util();
8323
- error36 = () => {
8864
+ error39 = () => {
8324
8865
  const Sizable = {
8325
8866
  string: { unit: "znakov", verb: "imeti" },
8326
8867
  file: { unit: "bajtov", verb: "imeti" },
@@ -8429,15 +8970,15 @@ var init_sl = __esm({
8429
8970
  // ../../node_modules/zod/v4/locales/sv.js
8430
8971
  function sv_default() {
8431
8972
  return {
8432
- localeError: error37()
8973
+ localeError: error40()
8433
8974
  };
8434
8975
  }
8435
- var error37;
8976
+ var error40;
8436
8977
  var init_sv = __esm({
8437
8978
  "../../node_modules/zod/v4/locales/sv.js"() {
8438
8979
  "use strict";
8439
8980
  init_util();
8440
- error37 = () => {
8981
+ error40 = () => {
8441
8982
  const Sizable = {
8442
8983
  string: { unit: "tecken", verb: "att ha" },
8443
8984
  file: { unit: "bytes", verb: "att ha" },
@@ -8547,15 +9088,15 @@ var init_sv = __esm({
8547
9088
  // ../../node_modules/zod/v4/locales/ta.js
8548
9089
  function ta_default() {
8549
9090
  return {
8550
- localeError: error38()
9091
+ localeError: error41()
8551
9092
  };
8552
9093
  }
8553
- var error38;
9094
+ var error41;
8554
9095
  var init_ta = __esm({
8555
9096
  "../../node_modules/zod/v4/locales/ta.js"() {
8556
9097
  "use strict";
8557
9098
  init_util();
8558
- error38 = () => {
9099
+ error41 = () => {
8559
9100
  const Sizable = {
8560
9101
  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" },
8561
9102
  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" },
@@ -8665,15 +9206,15 @@ var init_ta = __esm({
8665
9206
  // ../../node_modules/zod/v4/locales/th.js
8666
9207
  function th_default() {
8667
9208
  return {
8668
- localeError: error39()
9209
+ localeError: error42()
8669
9210
  };
8670
9211
  }
8671
- var error39;
9212
+ var error42;
8672
9213
  var init_th = __esm({
8673
9214
  "../../node_modules/zod/v4/locales/th.js"() {
8674
9215
  "use strict";
8675
9216
  init_util();
8676
- error39 = () => {
9217
+ error42 = () => {
8677
9218
  const Sizable = {
8678
9219
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
8679
9220
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -8783,15 +9324,15 @@ var init_th = __esm({
8783
9324
  // ../../node_modules/zod/v4/locales/tr.js
8784
9325
  function tr_default() {
8785
9326
  return {
8786
- localeError: error40()
9327
+ localeError: error43()
8787
9328
  };
8788
9329
  }
8789
- var error40;
9330
+ var error43;
8790
9331
  var init_tr = __esm({
8791
9332
  "../../node_modules/zod/v4/locales/tr.js"() {
8792
9333
  "use strict";
8793
9334
  init_util();
8794
- error40 = () => {
9335
+ error43 = () => {
8795
9336
  const Sizable = {
8796
9337
  string: { unit: "karakter", verb: "olmal\u0131" },
8797
9338
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -8896,15 +9437,15 @@ var init_tr = __esm({
8896
9437
  // ../../node_modules/zod/v4/locales/uk.js
8897
9438
  function uk_default() {
8898
9439
  return {
8899
- localeError: error41()
9440
+ localeError: error44()
8900
9441
  };
8901
9442
  }
8902
- var error41;
9443
+ var error44;
8903
9444
  var init_uk = __esm({
8904
9445
  "../../node_modules/zod/v4/locales/uk.js"() {
8905
9446
  "use strict";
8906
9447
  init_util();
8907
- error41 = () => {
9448
+ error44 = () => {
8908
9449
  const Sizable = {
8909
9450
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
8910
9451
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9023,15 +9564,15 @@ var init_ua = __esm({
9023
9564
  // ../../node_modules/zod/v4/locales/ur.js
9024
9565
  function ur_default() {
9025
9566
  return {
9026
- localeError: error42()
9567
+ localeError: error45()
9027
9568
  };
9028
9569
  }
9029
- var error42;
9570
+ var error45;
9030
9571
  var init_ur = __esm({
9031
9572
  "../../node_modules/zod/v4/locales/ur.js"() {
9032
9573
  "use strict";
9033
9574
  init_util();
9034
- error42 = () => {
9575
+ error45 = () => {
9035
9576
  const Sizable = {
9036
9577
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9037
9578
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9141,20 +9682,21 @@ var init_ur = __esm({
9141
9682
  // ../../node_modules/zod/v4/locales/uz.js
9142
9683
  function uz_default() {
9143
9684
  return {
9144
- localeError: error43()
9685
+ localeError: error46()
9145
9686
  };
9146
9687
  }
9147
- var error43;
9688
+ var error46;
9148
9689
  var init_uz = __esm({
9149
9690
  "../../node_modules/zod/v4/locales/uz.js"() {
9150
9691
  "use strict";
9151
9692
  init_util();
9152
- error43 = () => {
9693
+ error46 = () => {
9153
9694
  const Sizable = {
9154
9695
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9155
9696
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9156
9697
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9157
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
9698
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
9699
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9158
9700
  };
9159
9701
  function getSizing(origin) {
9160
9702
  return Sizable[origin] ?? null;
@@ -9258,15 +9800,15 @@ var init_uz = __esm({
9258
9800
  // ../../node_modules/zod/v4/locales/vi.js
9259
9801
  function vi_default() {
9260
9802
  return {
9261
- localeError: error44()
9803
+ localeError: error47()
9262
9804
  };
9263
9805
  }
9264
- var error44;
9806
+ var error47;
9265
9807
  var init_vi = __esm({
9266
9808
  "../../node_modules/zod/v4/locales/vi.js"() {
9267
9809
  "use strict";
9268
9810
  init_util();
9269
- error44 = () => {
9811
+ error47 = () => {
9270
9812
  const Sizable = {
9271
9813
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9272
9814
  file: { unit: "byte", verb: "c\xF3" },
@@ -9374,15 +9916,15 @@ var init_vi = __esm({
9374
9916
  // ../../node_modules/zod/v4/locales/zh-CN.js
9375
9917
  function zh_CN_default() {
9376
9918
  return {
9377
- localeError: error45()
9919
+ localeError: error48()
9378
9920
  };
9379
9921
  }
9380
- var error45;
9922
+ var error48;
9381
9923
  var init_zh_CN = __esm({
9382
9924
  "../../node_modules/zod/v4/locales/zh-CN.js"() {
9383
9925
  "use strict";
9384
9926
  init_util();
9385
- error45 = () => {
9927
+ error48 = () => {
9386
9928
  const Sizable = {
9387
9929
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9388
9930
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -9491,15 +10033,15 @@ var init_zh_CN = __esm({
9491
10033
  // ../../node_modules/zod/v4/locales/zh-TW.js
9492
10034
  function zh_TW_default() {
9493
10035
  return {
9494
- localeError: error46()
10036
+ localeError: error49()
9495
10037
  };
9496
10038
  }
9497
- var error46;
10039
+ var error49;
9498
10040
  var init_zh_TW = __esm({
9499
10041
  "../../node_modules/zod/v4/locales/zh-TW.js"() {
9500
10042
  "use strict";
9501
10043
  init_util();
9502
- error46 = () => {
10044
+ error49 = () => {
9503
10045
  const Sizable = {
9504
10046
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
9505
10047
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -9606,15 +10148,15 @@ var init_zh_TW = __esm({
9606
10148
  // ../../node_modules/zod/v4/locales/yo.js
9607
10149
  function yo_default() {
9608
10150
  return {
9609
- localeError: error47()
10151
+ localeError: error50()
9610
10152
  };
9611
10153
  }
9612
- var error47;
10154
+ var error50;
9613
10155
  var init_yo = __esm({
9614
10156
  "../../node_modules/zod/v4/locales/yo.js"() {
9615
10157
  "use strict";
9616
10158
  init_util();
9617
- error47 = () => {
10159
+ error50 = () => {
9618
10160
  const Sizable = {
9619
10161
  string: { unit: "\xE0mi", verb: "n\xED" },
9620
10162
  file: { unit: "bytes", verb: "n\xED" },
@@ -9729,6 +10271,7 @@ __export(locales_exports, {
9729
10271
  cs: () => cs_default,
9730
10272
  da: () => da_default,
9731
10273
  de: () => de_default,
10274
+ el: () => el_default,
9732
10275
  en: () => en_default,
9733
10276
  eo: () => eo_default,
9734
10277
  es: () => es_default,
@@ -9737,6 +10280,7 @@ __export(locales_exports, {
9737
10280
  fr: () => fr_default,
9738
10281
  frCA: () => fr_CA_default,
9739
10282
  he: () => he_default,
10283
+ hr: () => hr_default,
9740
10284
  hu: () => hu_default,
9741
10285
  hy: () => hy_default,
9742
10286
  id: () => id_default,
@@ -9756,6 +10300,7 @@ __export(locales_exports, {
9756
10300
  pl: () => pl_default,
9757
10301
  ps: () => ps_default,
9758
10302
  pt: () => pt_default,
10303
+ ro: () => ro_default,
9759
10304
  ru: () => ru_default,
9760
10305
  sl: () => sl_default,
9761
10306
  sv: () => sv_default,
@@ -9782,6 +10327,7 @@ var init_locales = __esm({
9782
10327
  init_cs();
9783
10328
  init_da();
9784
10329
  init_de();
10330
+ init_el();
9785
10331
  init_en();
9786
10332
  init_eo();
9787
10333
  init_es();
@@ -9790,6 +10336,7 @@ var init_locales = __esm({
9790
10336
  init_fr();
9791
10337
  init_fr_CA();
9792
10338
  init_he();
10339
+ init_hr();
9793
10340
  init_hu();
9794
10341
  init_hy();
9795
10342
  init_id();
@@ -9809,6 +10356,7 @@ var init_locales = __esm({
9809
10356
  init_ps();
9810
10357
  init_pl();
9811
10358
  init_pt();
10359
+ init_ro();
9812
10360
  init_ru();
9813
10361
  init_sl();
9814
10362
  init_sv();
@@ -9830,7 +10378,7 @@ var init_locales = __esm({
9830
10378
  function registry() {
9831
10379
  return new $ZodRegistry();
9832
10380
  }
9833
- var _a, $output, $input, $ZodRegistry, globalRegistry;
10381
+ var _a2, $output, $input, $ZodRegistry, globalRegistry;
9834
10382
  var init_registries = __esm({
9835
10383
  "../../node_modules/zod/v4/core/registries.js"() {
9836
10384
  "use strict";
@@ -9876,7 +10424,7 @@ var init_registries = __esm({
9876
10424
  return this._map.has(schema);
9877
10425
  }
9878
10426
  };
9879
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10427
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
9880
10428
  globalRegistry = globalThis.__zod_globalRegistry;
9881
10429
  }
9882
10430
  });
@@ -10789,7 +11337,7 @@ function _refine(Class2, fn, _params) {
10789
11337
  return schema;
10790
11338
  }
10791
11339
  // @__NO_SIDE_EFFECTS__
10792
- function _superRefine(fn) {
11340
+ function _superRefine(fn, params) {
10793
11341
  const ch = /* @__PURE__ */ _check((payload) => {
10794
11342
  payload.addIssue = (issue2) => {
10795
11343
  if (typeof issue2 === "string") {
@@ -10806,7 +11354,7 @@ function _superRefine(fn) {
10806
11354
  }
10807
11355
  };
10808
11356
  return fn(payload.value, payload);
10809
- });
11357
+ }, params);
10810
11358
  return ch;
10811
11359
  }
10812
11360
  // @__NO_SIDE_EFFECTS__
@@ -10953,7 +11501,7 @@ function initializeContext(params) {
10953
11501
  };
10954
11502
  }
10955
11503
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
10956
- var _a2;
11504
+ var _a3;
10957
11505
  const def = schema._zod.def;
10958
11506
  const seen = ctx.seen.get(schema);
10959
11507
  if (seen) {
@@ -11000,8 +11548,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
11000
11548
  delete result.schema.examples;
11001
11549
  delete result.schema.default;
11002
11550
  }
11003
- if (ctx.io === "input" && result.schema._prefault)
11004
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11551
+ if (ctx.io === "input" && "_prefault" in result.schema)
11552
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11005
11553
  delete result.schema._prefault;
11006
11554
  const _result = ctx.seen.get(schema);
11007
11555
  return _result.schema;
@@ -11182,10 +11730,15 @@ function finalize(ctx, schema) {
11182
11730
  result.$id = ctx.external.uri(id);
11183
11731
  }
11184
11732
  Object.assign(result, root.def ?? root.schema);
11733
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
11734
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
11735
+ delete result.id;
11185
11736
  const defs = ctx.external?.defs ?? {};
11186
11737
  for (const entry of ctx.seen.entries()) {
11187
11738
  const seen = entry[1];
11188
11739
  if (seen.def && seen.defId) {
11740
+ if (seen.def.id === seen.defId)
11741
+ delete seen.def.id;
11189
11742
  defs[seen.defId] = seen.def;
11190
11743
  }
11191
11744
  }
@@ -11241,6 +11794,8 @@ function isTransforming(_schema, _ctx) {
11241
11794
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11242
11795
  }
11243
11796
  if (def.type === "pipe") {
11797
+ if (_schema._zod.traits.has("$ZodCodec"))
11798
+ return true;
11244
11799
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11245
11800
  }
11246
11801
  if (def.type === "object") {
@@ -11377,39 +11932,28 @@ var init_json_schema_processors = __esm({
11377
11932
  json2.type = "integer";
11378
11933
  else
11379
11934
  json2.type = "number";
11380
- if (typeof exclusiveMinimum === "number") {
11381
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11935
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
11936
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
11937
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
11938
+ if (exMin) {
11939
+ if (legacy) {
11382
11940
  json2.minimum = exclusiveMinimum;
11383
11941
  json2.exclusiveMinimum = true;
11384
11942
  } else {
11385
11943
  json2.exclusiveMinimum = exclusiveMinimum;
11386
11944
  }
11387
- }
11388
- if (typeof minimum === "number") {
11945
+ } else if (typeof minimum === "number") {
11389
11946
  json2.minimum = minimum;
11390
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11391
- if (exclusiveMinimum >= minimum)
11392
- delete json2.minimum;
11393
- else
11394
- delete json2.exclusiveMinimum;
11395
- }
11396
11947
  }
11397
- if (typeof exclusiveMaximum === "number") {
11398
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
11948
+ if (exMax) {
11949
+ if (legacy) {
11399
11950
  json2.maximum = exclusiveMaximum;
11400
11951
  json2.exclusiveMaximum = true;
11401
11952
  } else {
11402
11953
  json2.exclusiveMaximum = exclusiveMaximum;
11403
11954
  }
11404
- }
11405
- if (typeof maximum === "number") {
11955
+ } else if (typeof maximum === "number") {
11406
11956
  json2.maximum = maximum;
11407
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11408
- if (exclusiveMaximum <= maximum)
11409
- delete json2.maximum;
11410
- else
11411
- delete json2.exclusiveMaximum;
11412
- }
11413
11957
  }
11414
11958
  if (typeof multipleOf === "number")
11415
11959
  json2.multipleOf = multipleOf;
@@ -11581,7 +12125,10 @@ var init_json_schema_processors = __esm({
11581
12125
  if (typeof maximum === "number")
11582
12126
  json2.maxItems = maximum;
11583
12127
  json2.type = "array";
11584
- json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
12128
+ json2.items = process2(def.element, ctx, {
12129
+ ...params,
12130
+ path: [...params.path, "items"]
12131
+ });
11585
12132
  };
11586
12133
  objectProcessor = (schema, ctx, _json, params) => {
11587
12134
  const json2 = _json;
@@ -11774,7 +12321,8 @@ var init_json_schema_processors = __esm({
11774
12321
  };
11775
12322
  pipeProcessor = (schema, ctx, _json, params) => {
11776
12323
  const def = schema._zod.def;
11777
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12324
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12325
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
11778
12326
  process2(innerType, ctx, params);
11779
12327
  const seen = ctx.seen.get(schema);
11780
12328
  seen.ref = innerType;
@@ -12019,6 +12567,7 @@ __export(core_exports2, {
12019
12567
  $ZodOptional: () => $ZodOptional,
12020
12568
  $ZodPipe: () => $ZodPipe,
12021
12569
  $ZodPrefault: () => $ZodPrefault,
12570
+ $ZodPreprocess: () => $ZodPreprocess,
12022
12571
  $ZodPromise: () => $ZodPromise,
12023
12572
  $ZodReadonly: () => $ZodReadonly,
12024
12573
  $ZodRealError: () => $ZodRealError,
@@ -12369,8 +12918,8 @@ var init_errors2 = __esm({
12369
12918
  }
12370
12919
  });
12371
12920
  };
12372
- ZodError = $constructor("ZodError", initializer2);
12373
- ZodRealError = $constructor("ZodError", initializer2, {
12921
+ ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
12922
+ ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12374
12923
  Parent: Error
12375
12924
  });
12376
12925
  }
@@ -12448,6 +12997,7 @@ __export(schemas_exports2, {
12448
12997
  ZodOptional: () => ZodOptional,
12449
12998
  ZodPipe: () => ZodPipe,
12450
12999
  ZodPrefault: () => ZodPrefault,
13000
+ ZodPreprocess: () => ZodPreprocess,
12451
13001
  ZodPromise: () => ZodPromise,
12452
13002
  ZodReadonly: () => ZodReadonly,
12453
13003
  ZodRecord: () => ZodRecord,
@@ -12508,6 +13058,7 @@ __export(schemas_exports2, {
12508
13058
  int32: () => int32,
12509
13059
  int64: () => int64,
12510
13060
  intersection: () => intersection,
13061
+ invertCodec: () => invertCodec,
12511
13062
  ipv4: () => ipv42,
12512
13063
  ipv6: () => ipv62,
12513
13064
  json: () => json,
@@ -12566,6 +13117,42 @@ __export(schemas_exports2, {
12566
13117
  xid: () => xid2,
12567
13118
  xor: () => xor
12568
13119
  });
13120
+ function _installLazyMethods(inst, group, methods) {
13121
+ const proto = Object.getPrototypeOf(inst);
13122
+ let installed2 = _installedGroups.get(proto);
13123
+ if (!installed2) {
13124
+ installed2 = /* @__PURE__ */ new Set();
13125
+ _installedGroups.set(proto, installed2);
13126
+ }
13127
+ if (installed2.has(group))
13128
+ return;
13129
+ installed2.add(group);
13130
+ for (const key in methods) {
13131
+ const fn = methods[key];
13132
+ Object.defineProperty(proto, key, {
13133
+ configurable: true,
13134
+ enumerable: false,
13135
+ get() {
13136
+ const bound = fn.bind(this);
13137
+ Object.defineProperty(this, key, {
13138
+ configurable: true,
13139
+ writable: true,
13140
+ enumerable: true,
13141
+ value: bound
13142
+ });
13143
+ return bound;
13144
+ },
13145
+ set(v) {
13146
+ Object.defineProperty(this, key, {
13147
+ configurable: true,
13148
+ writable: true,
13149
+ enumerable: true,
13150
+ value: v
13151
+ });
13152
+ }
13153
+ });
13154
+ }
13155
+ }
12569
13156
  function string2(params) {
12570
13157
  return _string(ZodString, params);
12571
13158
  }
@@ -12592,7 +13179,7 @@ function url(params) {
12592
13179
  }
12593
13180
  function httpUrl(params) {
12594
13181
  return _url(ZodURL, {
12595
- protocol: /^https?$/,
13182
+ protocol: regexes_exports.httpProtocol,
12596
13183
  hostname: regexes_exports.domain,
12597
13184
  ...util_exports.normalizeParams(params)
12598
13185
  });
@@ -12789,6 +13376,14 @@ function tuple(items, _paramsOrRest, _params) {
12789
13376
  });
12790
13377
  }
12791
13378
  function record(keyType, valueType, params) {
13379
+ if (!valueType || !valueType._zod) {
13380
+ return new ZodRecord({
13381
+ type: "record",
13382
+ keyType: string2(),
13383
+ valueType: keyType,
13384
+ ...util_exports.normalizeParams(valueType)
13385
+ });
13386
+ }
12792
13387
  return new ZodRecord({
12793
13388
  type: "record",
12794
13389
  keyType,
@@ -12940,6 +13535,16 @@ function codec(in_, out, params) {
12940
13535
  reverseTransform: params.encode
12941
13536
  });
12942
13537
  }
13538
+ function invertCodec(codec2) {
13539
+ const def = codec2._zod.def;
13540
+ return new ZodCodec({
13541
+ type: "pipe",
13542
+ in: def.out,
13543
+ out: def.in,
13544
+ transform: def.reverseTransform,
13545
+ reverseTransform: def.transform
13546
+ });
13547
+ }
12943
13548
  function readonly(innerType) {
12944
13549
  return new ZodReadonly({
12945
13550
  type: "readonly",
@@ -12986,8 +13591,8 @@ function custom(fn, _params) {
12986
13591
  function refine(fn, _params = {}) {
12987
13592
  return _refine(ZodCustom, fn, _params);
12988
13593
  }
12989
- function superRefine(fn) {
12990
- return _superRefine(fn);
13594
+ function superRefine(fn, params) {
13595
+ return _superRefine(fn, params);
12991
13596
  }
12992
13597
  function _instanceof(cls, params = {}) {
12993
13598
  const inst = new ZodCustom({
@@ -13018,9 +13623,13 @@ function json(params) {
13018
13623
  return jsonSchema;
13019
13624
  }
13020
13625
  function preprocess(fn, schema) {
13021
- return pipe(transform(fn), schema);
13626
+ return new ZodPreprocess({
13627
+ type: "pipe",
13628
+ in: transform(fn),
13629
+ out: schema
13630
+ });
13022
13631
  }
13023
- var ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
13632
+ var _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool;
13024
13633
  var init_schemas2 = __esm({
13025
13634
  "../../node_modules/zod/v4/classic/schemas.js"() {
13026
13635
  "use strict";
@@ -13031,6 +13640,7 @@ var init_schemas2 = __esm({
13031
13640
  init_checks2();
13032
13641
  init_iso();
13033
13642
  init_parse2();
13643
+ _installedGroups = /* @__PURE__ */ new WeakMap();
13034
13644
  ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13035
13645
  $ZodType.init(inst, def);
13036
13646
  Object.assign(inst["~standard"], {
@@ -13043,23 +13653,6 @@ var init_schemas2 = __esm({
13043
13653
  inst.def = def;
13044
13654
  inst.type = def.type;
13045
13655
  Object.defineProperty(inst, "_def", { value: def });
13046
- inst.check = (...checks) => {
13047
- return inst.clone(util_exports.mergeDefs(def, {
13048
- checks: [
13049
- ...def.checks ?? [],
13050
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
13051
- ]
13052
- }), {
13053
- parent: true
13054
- });
13055
- };
13056
- inst.with = inst.check;
13057
- inst.clone = (def2, params) => clone(inst, def2, params);
13058
- inst.brand = () => inst;
13059
- inst.register = ((reg, meta3) => {
13060
- reg.add(inst, meta3);
13061
- return inst;
13062
- });
13063
13656
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
13064
13657
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
13065
13658
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -13073,45 +13666,108 @@ var init_schemas2 = __esm({
13073
13666
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
13074
13667
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
13075
13668
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
13076
- inst.refine = (check2, params) => inst.check(refine(check2, params));
13077
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
13078
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
13079
- inst.optional = () => optional(inst);
13080
- inst.exactOptional = () => exactOptional(inst);
13081
- inst.nullable = () => nullable(inst);
13082
- inst.nullish = () => optional(nullable(inst));
13083
- inst.nonoptional = (params) => nonoptional(inst, params);
13084
- inst.array = () => array(inst);
13085
- inst.or = (arg) => union([inst, arg]);
13086
- inst.and = (arg) => intersection(inst, arg);
13087
- inst.transform = (tx) => pipe(inst, transform(tx));
13088
- inst.default = (def2) => _default2(inst, def2);
13089
- inst.prefault = (def2) => prefault(inst, def2);
13090
- inst.catch = (params) => _catch2(inst, params);
13091
- inst.pipe = (target) => pipe(inst, target);
13092
- inst.readonly = () => readonly(inst);
13093
- inst.describe = (description) => {
13094
- const cl = inst.clone();
13095
- globalRegistry.add(cl, { description });
13096
- return cl;
13097
- };
13669
+ _installLazyMethods(inst, "ZodType", {
13670
+ check(...chks) {
13671
+ const def2 = this.def;
13672
+ return this.clone(util_exports.mergeDefs(def2, {
13673
+ checks: [
13674
+ ...def2.checks ?? [],
13675
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
13676
+ ]
13677
+ }), { parent: true });
13678
+ },
13679
+ with(...chks) {
13680
+ return this.check(...chks);
13681
+ },
13682
+ clone(def2, params) {
13683
+ return clone(this, def2, params);
13684
+ },
13685
+ brand() {
13686
+ return this;
13687
+ },
13688
+ register(reg, meta3) {
13689
+ reg.add(this, meta3);
13690
+ return this;
13691
+ },
13692
+ refine(check2, params) {
13693
+ return this.check(refine(check2, params));
13694
+ },
13695
+ superRefine(refinement, params) {
13696
+ return this.check(superRefine(refinement, params));
13697
+ },
13698
+ overwrite(fn) {
13699
+ return this.check(_overwrite(fn));
13700
+ },
13701
+ optional() {
13702
+ return optional(this);
13703
+ },
13704
+ exactOptional() {
13705
+ return exactOptional(this);
13706
+ },
13707
+ nullable() {
13708
+ return nullable(this);
13709
+ },
13710
+ nullish() {
13711
+ return optional(nullable(this));
13712
+ },
13713
+ nonoptional(params) {
13714
+ return nonoptional(this, params);
13715
+ },
13716
+ array() {
13717
+ return array(this);
13718
+ },
13719
+ or(arg) {
13720
+ return union([this, arg]);
13721
+ },
13722
+ and(arg) {
13723
+ return intersection(this, arg);
13724
+ },
13725
+ transform(tx) {
13726
+ return pipe(this, transform(tx));
13727
+ },
13728
+ default(d) {
13729
+ return _default2(this, d);
13730
+ },
13731
+ prefault(d) {
13732
+ return prefault(this, d);
13733
+ },
13734
+ catch(params) {
13735
+ return _catch2(this, params);
13736
+ },
13737
+ pipe(target) {
13738
+ return pipe(this, target);
13739
+ },
13740
+ readonly() {
13741
+ return readonly(this);
13742
+ },
13743
+ describe(description) {
13744
+ const cl = this.clone();
13745
+ globalRegistry.add(cl, { description });
13746
+ return cl;
13747
+ },
13748
+ meta(...args) {
13749
+ if (args.length === 0)
13750
+ return globalRegistry.get(this);
13751
+ const cl = this.clone();
13752
+ globalRegistry.add(cl, args[0]);
13753
+ return cl;
13754
+ },
13755
+ isOptional() {
13756
+ return this.safeParse(void 0).success;
13757
+ },
13758
+ isNullable() {
13759
+ return this.safeParse(null).success;
13760
+ },
13761
+ apply(fn) {
13762
+ return fn(this);
13763
+ }
13764
+ });
13098
13765
  Object.defineProperty(inst, "description", {
13099
13766
  get() {
13100
13767
  return globalRegistry.get(inst)?.description;
13101
13768
  },
13102
13769
  configurable: true
13103
13770
  });
13104
- inst.meta = (...args) => {
13105
- if (args.length === 0) {
13106
- return globalRegistry.get(inst);
13107
- }
13108
- const cl = inst.clone();
13109
- globalRegistry.add(cl, args[0]);
13110
- return cl;
13111
- };
13112
- inst.isOptional = () => inst.safeParse(void 0).success;
13113
- inst.isNullable = () => inst.safeParse(null).success;
13114
- inst.apply = (fn) => fn(inst);
13115
13771
  return inst;
13116
13772
  });
13117
13773
  _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -13122,21 +13778,53 @@ var init_schemas2 = __esm({
13122
13778
  inst.format = bag.format ?? null;
13123
13779
  inst.minLength = bag.minimum ?? null;
13124
13780
  inst.maxLength = bag.maximum ?? null;
13125
- inst.regex = (...args) => inst.check(_regex(...args));
13126
- inst.includes = (...args) => inst.check(_includes(...args));
13127
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
13128
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
13129
- inst.min = (...args) => inst.check(_minLength(...args));
13130
- inst.max = (...args) => inst.check(_maxLength(...args));
13131
- inst.length = (...args) => inst.check(_length(...args));
13132
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
13133
- inst.lowercase = (params) => inst.check(_lowercase(params));
13134
- inst.uppercase = (params) => inst.check(_uppercase(params));
13135
- inst.trim = () => inst.check(_trim());
13136
- inst.normalize = (...args) => inst.check(_normalize(...args));
13137
- inst.toLowerCase = () => inst.check(_toLowerCase());
13138
- inst.toUpperCase = () => inst.check(_toUpperCase());
13139
- inst.slugify = () => inst.check(_slugify());
13781
+ _installLazyMethods(inst, "_ZodString", {
13782
+ regex(...args) {
13783
+ return this.check(_regex(...args));
13784
+ },
13785
+ includes(...args) {
13786
+ return this.check(_includes(...args));
13787
+ },
13788
+ startsWith(...args) {
13789
+ return this.check(_startsWith(...args));
13790
+ },
13791
+ endsWith(...args) {
13792
+ return this.check(_endsWith(...args));
13793
+ },
13794
+ min(...args) {
13795
+ return this.check(_minLength(...args));
13796
+ },
13797
+ max(...args) {
13798
+ return this.check(_maxLength(...args));
13799
+ },
13800
+ length(...args) {
13801
+ return this.check(_length(...args));
13802
+ },
13803
+ nonempty(...args) {
13804
+ return this.check(_minLength(1, ...args));
13805
+ },
13806
+ lowercase(params) {
13807
+ return this.check(_lowercase(params));
13808
+ },
13809
+ uppercase(params) {
13810
+ return this.check(_uppercase(params));
13811
+ },
13812
+ trim() {
13813
+ return this.check(_trim());
13814
+ },
13815
+ normalize(...args) {
13816
+ return this.check(_normalize(...args));
13817
+ },
13818
+ toLowerCase() {
13819
+ return this.check(_toLowerCase());
13820
+ },
13821
+ toUpperCase() {
13822
+ return this.check(_toUpperCase());
13823
+ },
13824
+ slugify() {
13825
+ return this.check(_slugify());
13826
+ }
13827
+ });
13140
13828
  });
13141
13829
  ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
13142
13830
  $ZodString.init(inst, def);
@@ -13261,21 +13949,53 @@ var init_schemas2 = __esm({
13261
13949
  $ZodNumber.init(inst, def);
13262
13950
  ZodType.init(inst, def);
13263
13951
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
13264
- inst.gt = (value, params) => inst.check(_gt(value, params));
13265
- inst.gte = (value, params) => inst.check(_gte(value, params));
13266
- inst.min = (value, params) => inst.check(_gte(value, params));
13267
- inst.lt = (value, params) => inst.check(_lt(value, params));
13268
- inst.lte = (value, params) => inst.check(_lte(value, params));
13269
- inst.max = (value, params) => inst.check(_lte(value, params));
13270
- inst.int = (params) => inst.check(int(params));
13271
- inst.safe = (params) => inst.check(int(params));
13272
- inst.positive = (params) => inst.check(_gt(0, params));
13273
- inst.nonnegative = (params) => inst.check(_gte(0, params));
13274
- inst.negative = (params) => inst.check(_lt(0, params));
13275
- inst.nonpositive = (params) => inst.check(_lte(0, params));
13276
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
13277
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
13278
- inst.finite = () => inst;
13952
+ _installLazyMethods(inst, "ZodNumber", {
13953
+ gt(value, params) {
13954
+ return this.check(_gt(value, params));
13955
+ },
13956
+ gte(value, params) {
13957
+ return this.check(_gte(value, params));
13958
+ },
13959
+ min(value, params) {
13960
+ return this.check(_gte(value, params));
13961
+ },
13962
+ lt(value, params) {
13963
+ return this.check(_lt(value, params));
13964
+ },
13965
+ lte(value, params) {
13966
+ return this.check(_lte(value, params));
13967
+ },
13968
+ max(value, params) {
13969
+ return this.check(_lte(value, params));
13970
+ },
13971
+ int(params) {
13972
+ return this.check(int(params));
13973
+ },
13974
+ safe(params) {
13975
+ return this.check(int(params));
13976
+ },
13977
+ positive(params) {
13978
+ return this.check(_gt(0, params));
13979
+ },
13980
+ nonnegative(params) {
13981
+ return this.check(_gte(0, params));
13982
+ },
13983
+ negative(params) {
13984
+ return this.check(_lt(0, params));
13985
+ },
13986
+ nonpositive(params) {
13987
+ return this.check(_lte(0, params));
13988
+ },
13989
+ multipleOf(value, params) {
13990
+ return this.check(_multipleOf(value, params));
13991
+ },
13992
+ step(value, params) {
13993
+ return this.check(_multipleOf(value, params));
13994
+ },
13995
+ finite() {
13996
+ return this;
13997
+ }
13998
+ });
13279
13999
  const bag = inst._zod.bag;
13280
14000
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
13281
14001
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -13368,11 +14088,23 @@ var init_schemas2 = __esm({
13368
14088
  ZodType.init(inst, def);
13369
14089
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
13370
14090
  inst.element = def.element;
13371
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
13372
- inst.nonempty = (params) => inst.check(_minLength(1, params));
13373
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
13374
- inst.length = (len, params) => inst.check(_length(len, params));
13375
- inst.unwrap = () => inst.element;
14091
+ _installLazyMethods(inst, "ZodArray", {
14092
+ min(n, params) {
14093
+ return this.check(_minLength(n, params));
14094
+ },
14095
+ nonempty(params) {
14096
+ return this.check(_minLength(1, params));
14097
+ },
14098
+ max(n, params) {
14099
+ return this.check(_maxLength(n, params));
14100
+ },
14101
+ length(n, params) {
14102
+ return this.check(_length(n, params));
14103
+ },
14104
+ unwrap() {
14105
+ return this.element;
14106
+ }
14107
+ });
13376
14108
  });
13377
14109
  ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
13378
14110
  $ZodObjectJIT.init(inst, def);
@@ -13381,23 +14113,47 @@ var init_schemas2 = __esm({
13381
14113
  util_exports.defineLazy(inst, "shape", () => {
13382
14114
  return def.shape;
13383
14115
  });
13384
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
13385
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
13386
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13387
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13388
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
13389
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
13390
- inst.extend = (incoming) => {
13391
- return util_exports.extend(inst, incoming);
13392
- };
13393
- inst.safeExtend = (incoming) => {
13394
- return util_exports.safeExtend(inst, incoming);
13395
- };
13396
- inst.merge = (other) => util_exports.merge(inst, other);
13397
- inst.pick = (mask) => util_exports.pick(inst, mask);
13398
- inst.omit = (mask) => util_exports.omit(inst, mask);
13399
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
13400
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
14116
+ _installLazyMethods(inst, "ZodObject", {
14117
+ keyof() {
14118
+ return _enum2(Object.keys(this._zod.def.shape));
14119
+ },
14120
+ catchall(catchall) {
14121
+ return this.clone({ ...this._zod.def, catchall });
14122
+ },
14123
+ passthrough() {
14124
+ return this.clone({ ...this._zod.def, catchall: unknown() });
14125
+ },
14126
+ loose() {
14127
+ return this.clone({ ...this._zod.def, catchall: unknown() });
14128
+ },
14129
+ strict() {
14130
+ return this.clone({ ...this._zod.def, catchall: never() });
14131
+ },
14132
+ strip() {
14133
+ return this.clone({ ...this._zod.def, catchall: void 0 });
14134
+ },
14135
+ extend(incoming) {
14136
+ return util_exports.extend(this, incoming);
14137
+ },
14138
+ safeExtend(incoming) {
14139
+ return util_exports.safeExtend(this, incoming);
14140
+ },
14141
+ merge(other) {
14142
+ return util_exports.merge(this, other);
14143
+ },
14144
+ pick(mask) {
14145
+ return util_exports.pick(this, mask);
14146
+ },
14147
+ omit(mask) {
14148
+ return util_exports.omit(this, mask);
14149
+ },
14150
+ partial(...args) {
14151
+ return util_exports.partial(ZodOptional, this, args[0]);
14152
+ },
14153
+ required(...args) {
14154
+ return util_exports.required(ZodNonOptional, this, args[0]);
14155
+ }
14156
+ });
13401
14157
  });
13402
14158
  ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
13403
14159
  $ZodUnion.init(inst, def);
@@ -13541,10 +14297,12 @@ var init_schemas2 = __esm({
13541
14297
  if (output instanceof Promise) {
13542
14298
  return output.then((output2) => {
13543
14299
  payload.value = output2;
14300
+ payload.fallback = true;
13544
14301
  return payload;
13545
14302
  });
13546
14303
  }
13547
14304
  payload.value = output;
14305
+ payload.fallback = true;
13548
14306
  return payload;
13549
14307
  };
13550
14308
  });
@@ -13614,6 +14372,10 @@ var init_schemas2 = __esm({
13614
14372
  ZodPipe.init(inst, def);
13615
14373
  $ZodCodec.init(inst, def);
13616
14374
  });
14375
+ ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
14376
+ ZodPipe.init(inst, def);
14377
+ $ZodPreprocess.init(inst, def);
14378
+ });
13617
14379
  ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13618
14380
  $ZodReadonly.init(inst, def);
13619
14381
  ZodType.init(inst, def);
@@ -13671,7 +14433,6 @@ var init_compat = __esm({
13671
14433
  "../../node_modules/zod/v4/classic/compat.js"() {
13672
14434
  "use strict";
13673
14435
  init_core2();
13674
- init_core2();
13675
14436
  ZodIssueCode = {
13676
14437
  invalid_type: "invalid_type",
13677
14438
  too_big: "too_big",
@@ -14006,12 +14767,6 @@ function convertBaseSchema(schema, ctx) {
14006
14767
  default:
14007
14768
  throw new Error(`Unsupported type: ${type}`);
14008
14769
  }
14009
- if (schema.description) {
14010
- zodSchema = zodSchema.describe(schema.description);
14011
- }
14012
- if (schema.default !== void 0) {
14013
- zodSchema = zodSchema.default(schema.default);
14014
- }
14015
14770
  return zodSchema;
14016
14771
  }
14017
14772
  function convertSchema(schema, ctx) {
@@ -14048,6 +14803,9 @@ function convertSchema(schema, ctx) {
14048
14803
  if (schema.readOnly === true) {
14049
14804
  baseSchema = z.readonly(baseSchema);
14050
14805
  }
14806
+ if (schema.default !== void 0) {
14807
+ baseSchema = baseSchema.default(schema.default);
14808
+ }
14051
14809
  const extraMeta = {};
14052
14810
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
14053
14811
  for (const key of coreMetadataKeys) {
@@ -14069,23 +14827,32 @@ function convertSchema(schema, ctx) {
14069
14827
  if (Object.keys(extraMeta).length > 0) {
14070
14828
  ctx.registry.add(baseSchema, extraMeta);
14071
14829
  }
14830
+ if (schema.description) {
14831
+ baseSchema = baseSchema.describe(schema.description);
14832
+ }
14072
14833
  return baseSchema;
14073
14834
  }
14074
14835
  function fromJSONSchema(schema, params) {
14075
14836
  if (typeof schema === "boolean") {
14076
14837
  return schema ? z.any() : z.never();
14077
14838
  }
14078
- const version2 = detectVersion(schema, params?.defaultTarget);
14079
- const defs = schema.$defs || schema.definitions || {};
14839
+ let normalized;
14840
+ try {
14841
+ normalized = JSON.parse(JSON.stringify(schema));
14842
+ } catch {
14843
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14844
+ }
14845
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14846
+ const defs = normalized.$defs || normalized.definitions || {};
14080
14847
  const ctx = {
14081
14848
  version: version2,
14082
14849
  defs,
14083
14850
  refs: /* @__PURE__ */ new Map(),
14084
14851
  processing: /* @__PURE__ */ new Set(),
14085
- rootSchema: schema,
14852
+ rootSchema: normalized,
14086
14853
  registry: params?.registry ?? globalRegistry
14087
14854
  };
14088
- return convertSchema(schema, ctx);
14855
+ return convertSchema(normalized, ctx);
14089
14856
  }
14090
14857
  var z, RECOGNIZED_KEYS;
14091
14858
  var init_from_json_schema = __esm({
@@ -14268,6 +15035,7 @@ __export(external_exports, {
14268
15035
  ZodOptional: () => ZodOptional,
14269
15036
  ZodPipe: () => ZodPipe,
14270
15037
  ZodPrefault: () => ZodPrefault,
15038
+ ZodPreprocess: () => ZodPreprocess,
14271
15039
  ZodPromise: () => ZodPromise,
14272
15040
  ZodReadonly: () => ZodReadonly,
14273
15041
  ZodRealError: () => ZodRealError,
@@ -14346,6 +15114,7 @@ __export(external_exports, {
14346
15114
  int32: () => int32,
14347
15115
  int64: () => int64,
14348
15116
  intersection: () => intersection,
15117
+ invertCodec: () => invertCodec,
14349
15118
  ipv4: () => ipv42,
14350
15119
  ipv6: () => ipv62,
14351
15120
  iso: () => iso_exports,
@@ -14781,6 +15550,9 @@ var init_dist = __esm({
14781
15550
  SIDE_EFFECT_FIELD_TIMEZONE: "glasstrace.side_effect.field.timezone",
14782
15551
  SIDE_EFFECT_FIELD_STATUS: "glasstrace.side_effect.field.status",
14783
15552
  SIDE_EFFECT_FIELD_PHASE: "glasstrace.side_effect.field.phase",
15553
+ SIDE_EFFECT_FIELD_RECIPIENT_CLASS: "glasstrace.side_effect.field.recipientClass",
15554
+ SIDE_EFFECT_FIELD_PARTICIPANT_COUNT: "glasstrace.side_effect.field.participantCount",
15555
+ SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT: "glasstrace.side_effect.field.activeParticipantCount",
14784
15556
  // Omission reason attributes — one per allowlisted reason. The
14785
15557
  // attribute value carries an integer count; the rejected value is
14786
15558
  // never echoed.
@@ -15004,7 +15776,10 @@ var init_dist = __esm({
15004
15776
  "locale",
15005
15777
  "timezone",
15006
15778
  "status",
15007
- "phase"
15779
+ "phase",
15780
+ "recipientClass",
15781
+ "participantCount",
15782
+ "activeParticipantCount"
15008
15783
  ];
15009
15784
  SIDE_EFFECT_OMISSION_REASONS = [
15010
15785
  "pii",
@@ -15114,8 +15889,8 @@ var init_semver = __esm({
15114
15889
 
15115
15890
  // ../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
15116
15891
  function registerGlobal(type, instance, diag3, allowOverride = false) {
15117
- var _a2;
15118
- const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a2 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a2 !== void 0 ? _a2 : {
15892
+ var _a3;
15893
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
15119
15894
  version: VERSION
15120
15895
  };
15121
15896
  if (!allowOverride && api[type]) {
@@ -15133,8 +15908,8 @@ function registerGlobal(type, instance, diag3, allowOverride = false) {
15133
15908
  return true;
15134
15909
  }
15135
15910
  function getGlobal(type) {
15136
- var _a2, _b;
15137
- const globalVersion = (_a2 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a2 === void 0 ? void 0 : _a2.version;
15911
+ var _a3, _b;
15912
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
15138
15913
  if (!globalVersion || !isCompatible(globalVersion)) {
15139
15914
  return;
15140
15915
  }
@@ -15276,10 +16051,10 @@ var init_diag = __esm({
15276
16051
  }
15277
16052
  const self2 = this;
15278
16053
  const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
15279
- var _a2, _b, _c;
16054
+ var _a3, _b, _c;
15280
16055
  if (logger === self2) {
15281
16056
  const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
15282
- self2.error((_a2 = err.stack) !== null && _a2 !== void 0 ? _a2 : err.message);
16057
+ self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
15283
16058
  return false;
15284
16059
  }
15285
16060
  if (typeof optionsOrLogLevel === "number") {
@@ -15820,8 +16595,8 @@ function setSpanContext(context2, spanContext) {
15820
16595
  return setSpan(context2, new NonRecordingSpan(spanContext));
15821
16596
  }
15822
16597
  function getSpanContext(context2) {
15823
- var _a2;
15824
- return (_a2 = getSpan(context2)) === null || _a2 === void 0 ? void 0 : _a2.spanContext();
16598
+ var _a3;
16599
+ return (_a3 = getSpan(context2)) === null || _a3 === void 0 ? void 0 : _a3.spanContext();
15825
16600
  }
15826
16601
  var SPAN_KEY;
15827
16602
  var init_context_utils = __esm({
@@ -16089,12 +16864,12 @@ var init_ProxyTracerProvider = __esm({
16089
16864
  * Get a {@link ProxyTracer}
16090
16865
  */
16091
16866
  getTracer(name, version2, options) {
16092
- var _a2;
16093
- return (_a2 = this.getDelegateTracer(name, version2, options)) !== null && _a2 !== void 0 ? _a2 : new ProxyTracer(this, name, version2, options);
16867
+ var _a3;
16868
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version2, options);
16094
16869
  }
16095
16870
  getDelegate() {
16096
- var _a2;
16097
- return (_a2 = this._delegate) !== null && _a2 !== void 0 ? _a2 : NOOP_TRACER_PROVIDER;
16871
+ var _a3;
16872
+ return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
16098
16873
  }
16099
16874
  /**
16100
16875
  * Set the delegate tracer provider
@@ -16103,8 +16878,8 @@ var init_ProxyTracerProvider = __esm({
16103
16878
  this._delegate = delegate;
16104
16879
  }
16105
16880
  getDelegateTracer(name, version2, options) {
16106
- var _a2;
16107
- return (_a2 = this._delegate) === null || _a2 === void 0 ? void 0 : _a2.getTracer(name, version2, options);
16881
+ var _a3;
16882
+ return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version2, options);
16108
16883
  }
16109
16884
  };
16110
16885
  }
@@ -18236,9 +19011,9 @@ async function sendInitRequest(config2, anonKey, sdkVersion, importGraph, health
18236
19011
  });
18237
19012
  } catch (err) {
18238
19013
  if (err instanceof HttpsStatusError) {
18239
- const error48 = new Error(`Init request failed with status ${err.status}`);
18240
- error48.status = err.status;
18241
- throw error48;
19014
+ const error51 = new Error(`Init request failed with status ${err.status}`);
19015
+ error51.status = err.status;
19016
+ throw error51;
18242
19017
  }
18243
19018
  if (err instanceof HttpsBodyParseError) {
18244
19019
  const cause = err.cause;
@@ -20313,7 +21088,7 @@ function getStringFromEnv(key) {
20313
21088
  }
20314
21089
 
20315
21090
  // ../../node_modules/@opentelemetry/core/build/esm/version.js
20316
- var VERSION2 = "2.7.0";
21091
+ var VERSION2 = "2.7.1";
20317
21092
 
20318
21093
  // ../../node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js
20319
21094
  var ATTR_EXCEPTION_MESSAGE = "exception.message";
@@ -21181,7 +21956,7 @@ function parseRetryAfterToMills(retryAfter) {
21181
21956
  }
21182
21957
 
21183
21958
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js
21184
- var VERSION3 = "0.215.0";
21959
+ var VERSION3 = "0.218.0";
21185
21960
 
21186
21961
  // ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js
21187
21962
  var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION3}`;
@@ -21195,14 +21970,11 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
21195
21970
  headers["User-Agent"] = DEFAULT_USER_AGENT;
21196
21971
  }
21197
21972
  const options = {
21198
- hostname: parsedUrl.hostname,
21199
- port: parsedUrl.port,
21200
- path: parsedUrl.pathname,
21201
21973
  method: "POST",
21202
21974
  headers,
21203
21975
  agent
21204
21976
  };
21205
- const req = request(options, (res) => {
21977
+ const req = request(parsedUrl, options, (res) => {
21206
21978
  const responseData = [];
21207
21979
  let responseSize = 0;
21208
21980
  res.on("data", (chunk) => {
@@ -21227,14 +21999,14 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
21227
21999
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
21228
22000
  });
21229
22001
  } else {
21230
- const error48 = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
22002
+ const error51 = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
21231
22003
  resolve3({
21232
22004
  status: "failure",
21233
- error: error48
22005
+ error: error51
21234
22006
  });
21235
22007
  }
21236
22008
  });
21237
- res.on("error", (error48) => {
22009
+ res.on("error", (error51) => {
21238
22010
  if (res.statusCode && res.statusCode <= 299) {
21239
22011
  resolve3({
21240
22012
  status: "success"
@@ -21242,13 +22014,13 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
21242
22014
  } else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
21243
22015
  resolve3({
21244
22016
  status: "retryable",
21245
- error: error48,
22017
+ error: error51,
21246
22018
  retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
21247
22019
  });
21248
22020
  } else {
21249
22021
  resolve3({
21250
22022
  status: "failure",
21251
- error: error48
22023
+ error: error51
21252
22024
  });
21253
22025
  }
21254
22026
  });
@@ -21260,23 +22032,23 @@ function sendWithHttp(request, url2, headers, compression, userAgent, agent, dat
21260
22032
  error: new Error("Request timed out")
21261
22033
  });
21262
22034
  });
21263
- req.on("error", (error48) => {
21264
- if (isHttpTransportNetworkErrorRetryable(error48)) {
22035
+ req.on("error", (error51) => {
22036
+ if (isHttpTransportNetworkErrorRetryable(error51)) {
21265
22037
  resolve3({
21266
22038
  status: "retryable",
21267
- error: error48
22039
+ error: error51
21268
22040
  });
21269
22041
  } else {
21270
22042
  resolve3({
21271
22043
  status: "failure",
21272
- error: error48
22044
+ error: error51
21273
22045
  });
21274
22046
  }
21275
22047
  });
21276
- compressAndSend(req, compression, data, (error48) => {
22048
+ compressAndSend(req, compression, data, (error51) => {
21277
22049
  resolve3({
21278
22050
  status: "failure",
21279
- error: error48
22051
+ error: error51
21280
22052
  });
21281
22053
  });
21282
22054
  });
@@ -21295,7 +22067,7 @@ function readableFromUint8Array(buff) {
21295
22067
  readable.push(null);
21296
22068
  return readable;
21297
22069
  }
21298
- function isHttpTransportNetworkErrorRetryable(error48) {
22070
+ function isHttpTransportNetworkErrorRetryable(error51) {
21299
22071
  const RETRYABLE_NETWORK_ERROR_CODES = /* @__PURE__ */ new Set([
21300
22072
  "ECONNRESET",
21301
22073
  "ECONNREFUSED",
@@ -21306,8 +22078,8 @@ function isHttpTransportNetworkErrorRetryable(error48) {
21306
22078
  "ENETUNREACH",
21307
22079
  "EHOSTUNREACH"
21308
22080
  ]);
21309
- if ("code" in error48 && typeof error48.code === "string") {
21310
- return RETRYABLE_NETWORK_ERROR_CODES.has(error48.code);
22081
+ if ("code" in error51 && typeof error51.code === "string") {
22082
+ return RETRYABLE_NETWORK_ERROR_CODES.has(error51.code);
21311
22083
  }
21312
22084
  return false;
21313
22085
  }
@@ -21913,8 +22685,8 @@ var SpanImpl = class {
21913
22685
  }
21914
22686
  _isSpanEnded() {
21915
22687
  if (this._ended) {
21916
- const error48 = new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);
21917
- diag2.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, error48);
22688
+ const error51 = new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);
22689
+ diag2.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, error51);
21918
22690
  }
21919
22691
  return this._ended;
21920
22692
  }
@@ -22054,9 +22826,13 @@ var TraceIdRatioBasedSampler = class {
22054
22826
  }
22055
22827
  _accumulate(traceId) {
22056
22828
  let accumulation = 0;
22057
- for (let i = 0; i < traceId.length / 8; i++) {
22058
- const pos = i * 8;
22059
- const part = parseInt(traceId.slice(pos, pos + 8), 16);
22829
+ for (let i = 0; i < 32; i += 8) {
22830
+ let part = 0;
22831
+ for (let j = 0; j < 8; j++) {
22832
+ const c = traceId.charCodeAt(i + j);
22833
+ const v = c < 58 ? c - 48 : c < 71 ? c - 55 : c - 87;
22834
+ part = part << 4 | v;
22835
+ }
22060
22836
  accumulation = (accumulation ^ part) >>> 0;
22061
22837
  }
22062
22838
  return accumulation;
@@ -22417,7 +23193,7 @@ function samplingDecisionToString(decision) {
22417
23193
  }
22418
23194
 
22419
23195
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js
22420
- var VERSION4 = "2.7.0";
23196
+ var VERSION4 = "2.7.1";
22421
23197
 
22422
23198
  // ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js
22423
23199
  var Tracer = class {
@@ -22551,8 +23327,8 @@ var MultiSpanProcessor = class {
22551
23327
  return new Promise((resolve3) => {
22552
23328
  Promise.all(promises).then(() => {
22553
23329
  resolve3();
22554
- }).catch((error48) => {
22555
- globalErrorHandler(error48 || new Error("MultiSpanProcessor: forceFlush failed"));
23330
+ }).catch((error51) => {
23331
+ globalErrorHandler(error51 || new Error("MultiSpanProcessor: forceFlush failed"));
22556
23332
  resolve3();
22557
23333
  });
22558
23334
  });
@@ -22634,10 +23410,10 @@ var BasicTracerProvider = class {
22634
23410
  state = ForceFlushState.resolved;
22635
23411
  resolve3(state);
22636
23412
  }
22637
- }).catch((error48) => {
23413
+ }).catch((error51) => {
22638
23414
  clearTimeout(timeoutInterval);
22639
23415
  state = ForceFlushState.error;
22640
- resolve3(error48);
23416
+ resolve3(error51);
22641
23417
  });
22642
23418
  });
22643
23419
  });
@@ -22649,7 +23425,7 @@ var BasicTracerProvider = class {
22649
23425
  } else {
22650
23426
  resolve3();
22651
23427
  }
22652
- }).catch((error48) => reject([error48]));
23428
+ }).catch((error51) => reject([error51]));
22653
23429
  });
22654
23430
  }
22655
23431
  shutdown() {
@@ -23581,11 +24357,11 @@ function registerGlasstrace(options) {
23581
24357
  setCoreState(CoreState.REGISTERING);
23582
24358
  maybeWarnStaleAgentInstructions({
23583
24359
  projectRoot: process.cwd(),
23584
- sdkVersion: "1.11.0"
24360
+ sdkVersion: "1.12.0"
23585
24361
  });
23586
24362
  startRuntimeStateWriter({
23587
24363
  projectRoot: process.cwd(),
23588
- sdkVersion: "1.11.0"
24364
+ sdkVersion: "1.12.0"
23589
24365
  });
23590
24366
  const config2 = resolveConfig(options);
23591
24367
  if (config2.verbose) {
@@ -23752,8 +24528,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
23752
24528
  if (config2.verbose) {
23753
24529
  console.info("[glasstrace] Background init firing.");
23754
24530
  }
23755
- const healthReport = collectHealthReport("1.11.0");
23756
- const initResult = await performInit(config2, anonKeyForInit, "1.11.0", healthReport);
24531
+ const healthReport = collectHealthReport("1.12.0");
24532
+ const initResult = await performInit(config2, anonKeyForInit, "1.12.0", healthReport);
23757
24533
  if (generation !== registrationGeneration) return;
23758
24534
  const currentState = getCoreState();
23759
24535
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -23776,7 +24552,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
23776
24552
  }
23777
24553
  maybeInstallConsoleCapture();
23778
24554
  if (didLastInitSucceed()) {
23779
- startHeartbeat(config2, anonKeyForInit, "1.11.0", generation, (newApiKey, accountId) => {
24555
+ startHeartbeat(config2, anonKeyForInit, "1.12.0", generation, (newApiKey, accountId) => {
23780
24556
  setAuthState(AuthState.CLAIMING);
23781
24557
  emitLifecycleEvent("auth:claim_started", { accountId });
23782
24558
  setResolvedApiKey(newApiKey);
@@ -23924,8 +24700,8 @@ async function handleSourceMapUpload(distDir) {
23924
24700
  console.info(
23925
24701
  `[glasstrace] Uploaded ${String(files.length)} source map(s) for build ${buildHash}.`
23926
24702
  );
23927
- } catch (error48) {
23928
- const message = error48 instanceof Error ? error48.message : "Unknown error";
24703
+ } catch (error51) {
24704
+ const message = error51 instanceof Error ? error51.message : "Unknown error";
23929
24705
  console.warn(
23930
24706
  `[glasstrace] Source map upload failed: ${message}. Build continues normally.`
23931
24707
  );
@@ -23982,18 +24758,18 @@ function parseTopStackFrame(stack) {
23982
24758
  }
23983
24759
 
23984
24760
  // src/capture-error.ts
23985
- function captureError(error48) {
24761
+ function captureError(error51) {
23986
24762
  try {
23987
24763
  const span = trace.getSpan(context.active());
23988
24764
  if (!span) return;
23989
24765
  const attributes = {
23990
- "error.message": String(error48)
24766
+ "error.message": String(error51)
23991
24767
  };
23992
- if (error48 instanceof Error) {
23993
- attributes["error.type"] = error48.constructor.name;
23994
- if (error48.stack) {
23995
- attributes["error.stack"] = error48.stack;
23996
- const frame = parseTopStackFrame(error48.stack);
24768
+ if (error51 instanceof Error) {
24769
+ attributes["error.type"] = error51.constructor.name;
24770
+ if (error51.stack) {
24771
+ attributes["error.stack"] = error51.stack;
24772
+ const frame = parseTopStackFrame(error51.stack);
23997
24773
  if (frame) {
23998
24774
  attributes[GLASSTRACE_ATTRIBUTE_NAMES.SOURCE_FILE] = frame.file;
23999
24775
  attributes[GLASSTRACE_ATTRIBUTE_NAMES.SOURCE_LINE] = frame.line;
@@ -24001,7 +24777,7 @@ function captureError(error48) {
24001
24777
  }
24002
24778
  }
24003
24779
  span.addEvent("glasstrace.error", attributes);
24004
- maybeShowMcpNudge(String(error48));
24780
+ maybeShowMcpNudge(String(error51));
24005
24781
  } catch {
24006
24782
  }
24007
24783
  }
@@ -24092,6 +24868,7 @@ var OMISSION_REASON_SET = new Set(
24092
24868
  var TOKEN_REGEX = /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/;
24093
24869
  var LOCALE_REGEX = /^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8}){0,3}$/;
24094
24870
  var TIMEZONE_REGEX = /^(?:UTC|GMT|[A-Za-z][A-Za-z0-9_+-]*(?:\/[A-Za-z0-9_+-]+){1,3})$/;
24871
+ var DIGIT_REGEX = /^[0-9]+$/;
24095
24872
  var URL_SCHEME = /:\/\//;
24096
24873
  var URL_SCHEME_RELATIVE = /^\/\//;
24097
24874
  var EMAIL_LIKE = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i;
@@ -24123,6 +24900,9 @@ function detectUnsafePattern(value) {
24123
24900
  function passesFieldValidator(key, value) {
24124
24901
  if (key === "locale") return LOCALE_REGEX.test(value);
24125
24902
  if (key === "timezone") return TIMEZONE_REGEX.test(value);
24903
+ if (key === "participantCount" || key === "activeParticipantCount") {
24904
+ return DIGIT_REGEX.test(value);
24905
+ }
24126
24906
  return TOKEN_REGEX.test(value);
24127
24907
  }
24128
24908
  function checkOperationLabel(value) {
@@ -24231,7 +25011,10 @@ var FIELD_ATTRIBUTE_BY_KEY = {
24231
25011
  locale: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_LOCALE,
24232
25012
  timezone: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_TIMEZONE,
24233
25013
  status: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_STATUS,
24234
- phase: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_PHASE
25014
+ phase: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_PHASE,
25015
+ recipientClass: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_RECIPIENT_CLASS,
25016
+ participantCount: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_PARTICIPANT_COUNT,
25017
+ activeParticipantCount: GLASSTRACE_ATTRIBUTE_NAMES.SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT
24235
25018
  };
24236
25019
  function attachOperation(input) {
24237
25020
  const span = getRecordingActiveSpan();